See imgur / linked pastebin and github mirror for 1-8 → 1-8 balancers. Creator: raynquist, github mirror linked in Balancers Illustrated: 1 through 8 balancers explained, imgur album linked in Balancer Book Update (Summer 2019)
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 json | |
import zlib | |
import base64 | |
original_bp_string = '0eNp9j80OgjAQhN9lzq0RFNC+ijGGnw1uQhdCi5GQvrstXjx5m9mfb2c3NMNC08ziYTZwO4qDuW1w3Es9pJpfJ4IBe7JQkNomVztHthlYem3r9slCOkdQYOnoDZOFuwKJZ8/05e1mfchiG5rjwH+SwjS6uDxKShCB+nQoFNYoskOR7sQ0LvWmeeyW1vMr0rWNeiB9gslDSrBnNj8vKrxodjs2v2Tn6nytyio7lkUZwgd0Blhx' | |
bp_json = json.loads(zlib.decompress(base64.b64decode(original_bp_string[1:])).decode('utf8')) | |
# there is one entity in the blueprint, it's an assembler with a item request for 2 prod-3 modules and no recipe set | |
# for the fields of the blueprint json see https://wiki.factorio.com/Blueprint_string_format | |
bp_json['blueprint']['entities'][0]['items'] = {'copper-plate': 200} # overwrites existing item request |
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 re | |
from typing import List | |
from docutils import nodes | |
from docutils.nodes import Node | |
from docutils.statemachine import StringList, ViewList | |
import sphinx | |
from sphinx import addnodes | |
from sphinx.directives.other import TocTree |
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
ios: | |
background-image: 'center / cover no-repeat url("/local/img/ios-bg.png") fixed' | |
accent-color: "#FFF" | |
primary-color: "#FFF" | |
light-primary-color: '#B6B6C1' | |
primary-background-color: "#23232E" | |
secondary-background-color: rgba(25, 25, 25, 0.5) | |
divider-color: "#FFF" | |
### Text ### | |
primary-text-color: "#FFF" |
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 Events | |
class OtherApp: | |
def initialize(self): | |
self.fire_event('spotify.start', volume=100) | |
# Using get_app() | |
class OtherApp: | |
def initialize(self): | |
self.get_app('start_spotify').start(volume=100) |
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
{ | |
"python": { | |
"library": "import json\ndef black_reformat(cell_text):\n import black\n import re\n cell_text = re.sub('^%', '#%#', cell_text, flags=re.M)\n try:\n reformated_text = black.format_str(cell_text, 88)\n except TypeError:\n reformated_text = black.format_str(cell_text, mode=black.FileMode(line_length=88))\n return re.sub('^#%#', '%', reformated_text, flags=re.M)", | |
"prefix": "print(json.dumps(black_reformat(u", | |
"postfix": ")))" | |
}, | |
"r": { | |
"library": "library(formatR)\nlibrary(jsonlite)", | |
"prefix": "cat(toJSON(paste(tidy_source(text=", | |
"postfix": ", output=FALSE)[['text.tidy']], collapse='\n')))" |
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
# Disable Commercial Repo | |
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list | |
apt-get update | |
# Add PVE Community Repo | |
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list | |
apt-get update | |
# Remove nag | |
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script |
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
#cloud-config | |
apt_sources: | |
- source: "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ bionic main" | |
key: | | |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.7 (GNU/Linux) | |
mQENBFYxWIwBCADAKoZhZlJxGNGWzqV+1OG1xiQeoowKhssGAKvd+buXCGISZJwT | |
LXZqIcIiLP7pqdcZWtE9bSc7yBY2MalDp9Liu0KekywQ6VVX1T72NPf5Ev6x6DLV | |
7aVWsCzUAF+eb7DC9fPuFLEdxmOEYoPjzrQ7cCnSV4JQxAqhU4T6OjbvRazGl3ag |
Prerequisites for installation: Windows 10 (updates after September 2016) and Linux subsystem for windows. Linux subsystem is in fact Ubuntu 14.04 Trusty, so the instructions are similar. One could in fact use ubuntu instructions (via sudo apt-get install python3-numpy or pip3 install numpy), but the performance would be suboptimal. In order to get optimal perfomance, one needs to compile LAPACK libraries and numpy/scipy. Two ways are possible: manual installation and package manager (spack).
This way of installation has not been tested, but should be easier to do. Since we don't need binaries and ubuntu trusty is old, one needs a source package manager.
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
# | |
# Original solution via StackOverflow: | |
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t | |
# | |
# | |
# Install via `conda` directly. | |
# This will fail to install all | |
# dependencies. If one fails, | |
# all dependencies will fail to install. |
NewerOlder