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
""" | |
This code is for generating a single, circular "loop" of names of family | |
members for gift giving as part of a Secret Santa tradition. | |
The input is a file named "family.json". The JSON file should be of a single | |
mapping where the keys are the family members, and the values would be a | |
that contains the key "group". | |
The purpose of the "group" is to define households of people so that this code | |
can prevent people within the same household getting one another as recipients. |
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
""" | |
This code is for generating a single, circular "loop" of names of family | |
members for gift giving as part of a Secret Santa tradition. | |
The input is a file named "family.json". The JSON file should be of a single | |
mapping where the keys are the family members, and the values would be a | |
that contains the key "group". | |
The purpose of the "group" is to define households of people so that this code | |
can prevent people within the same household getting one another as recipients. |
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
# generated by PrusaSlicer 2.1.0+ on 2019-11-29 at 18:25:13 UTC | |
bed_temperature = 60 | |
bridge_fan_speed = 30 | |
compatible_printers = | |
compatible_printers_condition = ! (printer_notes=~/.*PRINTER_VENDOR_PRUSA3D.*/ and printer_notes=~/.*PRINTER_MODEL_MK(2.5|3).*/ and single_extruder_multi_material) | |
compatible_prints = | |
compatible_prints_condition = | |
cooling = 0 | |
disable_fan_first_layers = 1 | |
end_filament_gcode = "; Filament-specific end gcode" |
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
# generated by PrusaSlicer 2.0.0+ on 2019-06-30 at 10:59:22 | |
bed_temperature = 65 | |
bridge_fan_speed = 40 | |
compatible_printers = | |
compatible_printers_condition = | |
compatible_prints = | |
compatible_prints_condition = | |
cooling = 0 | |
disable_fan_first_layers = 4 | |
end_filament_gcode = "; Filament-specific end gcode" |
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
# -*- coding: utf-8 -*- | |
import random | |
import json | |
import sys | |
import time | |
def rate_measured(report_period=10, report_function=None): | |
""" |
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
# Adds the current branch to the bash prompt when the working directory is | |
# part of a Git repository. Includes color-coding and indicators to quickly | |
# indicate the status of working directory. | |
# | |
# To use: Copy into ~/.bashrc and tweak if desired. | |
# | |
# Based upon the following gists: | |
# <https://gist.github.com/henrik/31631> | |
# <https://gist.github.com/srguiwiz/de87bf6355717f0eede5> | |
# Modified by me, using ideas from comments on those gists. |
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
Verifying that "mkoistinen.id" is my Blockstack ID. https://onename.com/mkoistinen |
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
# Basically, since we can't use '*' as a wildcard according to the CORS spec, we need to use | |
# Nginx to conditionally apply it to the "right" subdomains. This should allow all subdomains | |
# of `yourtld.tld`. | |
location ~* ^.+\.(ttf|oft|eot|woff|svg)$ { | |
# | |
# NOTE: CORS standards allow a specific protocol/host combination, | |
# 'null', or '*' only. So, wildcard subdomains won't work. | |
# | |
# Have a look here: |
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
class CustomPKMixin(object): | |
""" | |
Allows a normal SingleObjectMixin view. | |
""" | |
pk_field = None | |
def get_object(self, queryset=None): | |
""" | |
Returns the object the view is displaying. |
NewerOlder