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
[".editorconfig"] | |
root = true | |
[".editorconfig"."*"] | |
indent_style = "space" | |
indent_size = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
end_of_line = "lf" | |
charset = "utf-8" |
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
import os | |
import json | |
import functools | |
from aocd import get_data | |
DAY=5 | |
dir = os.path.dirname(__file__) | |
directory = os.path.join(dir, f"day{DAY}") | |
if not os.path.exists(directory): |
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
import os | |
import json | |
from attr import attrs, attrib | |
from datetime import datetime | |
from enum import Enum | |
import re | |
dir = os.path.dirname(__file__) | |
file_name =os.path.join(dir, "data.txt") | |
f = open(file_name) |
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
import requests | |
import os | |
dir = os.path.dirname(__file__) | |
f = open(os.path.join(dir, "data.txt")) | |
inputs = [int(x) for x in f] | |
# Question 1 answer | |
print(sum(inputs)) | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Assuming you have a working gopass installation. I personally use multiple mounts and I store all the passwords under a | |
# single directory. | |
# | |
# Add the following section to your `ansible.cfg` | |
# | |
# [vault] | |
# mount='store-X' # replace `store-x` with your actual store, if using the root set to an empty string |
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
vagrant up --debug | |
INFO global: Vagrant version: 2.1.2 | |
INFO global: Ruby version: 2.4.4 | |
INFO global: RubyGems version: 2.6.14.1 | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.1.2/gems/vagrant-2.1.2/bin/vagrant" | |
INFO global: VAGRANT_INSTALLER_ENV="1" | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded" | |
INFO global: VAGRANT_LOG="debug" | |
WARN global: resolv replacement has not been enabled! |
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
TEST ={t={}} | |
do | |
print(TEST.t.stolen) | |
local test = TEST.t | |
test.stolen = true | |
print(TEST.t.stolen) | |
end | |
output: | |
nil |