<commit_before># coding=utf-8
__author__ = "<NAME> <<EMAIL>>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'

import sys
import os
import yaml
import logging
import re
import uuid

APPNAME="OctoPrint"

instance = None

def settings(init=False, configfile=None, basedir=None):
	global instance
	if instance is None:
		if init:
			instance = Settings(configfile, basedir)
		else:
			raise ValueError("Settings not initialized yet")
	return instance

default_settings = {
	"serial": {
		"port": None,
		"baudrate": None,
		"autoconnect": False,
		"log": False,
		"timeout": {
			"detection": 0.5,
			"connection": 2,
			"communication": 5
		},
		"additionalPorts": []
	},
	"server": {
		"host": "0.0.0.0",
		"port": 5000,
		"firstRun": True
	},
	"webcam": {
		"stream": None,
		"snapshot": None,
		"ffmpeg": None,
		"bitrate": "5000k",
		"watermark": True,
		"flipH": False,
		"flipV": False,
		"timelapse": {
			"type": "off",
			"options": {}
		}
	},
	"feature": {
		"gCodeVisualizer": True,
		"temperatureGraph": True,
		"waitForStartOnConnect": False,
		"alwaysSendChecksum": False,
		"sdSupport": True,
		"swallowOkAfterResend": False
	},
	"folder": {
		"uploads": None,
		"timelapse": None,
		"timelapse_tmp": None,
		"logs": None,
		"virtualSd": None
	},
	"temperature": {
		"profiles":
			[
				{"name": "ABS", "extruder" : 210, "bed" : 100 },
				{"name": "PLA", "extruder" : 180, "bed" : 60 }<commit_msg>Make swallowOkAfterResend default to True, part of the fix for #166<commit_after># coding=utf-8
__author__ = "<NAME> <<EMAIL>>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'

import sys
import os
import yaml
import logging
import re
import uuid

APPNAME="OctoPrint"

instance = None

def settings(init=False, configfile=None, basedir=None):
	global instance
	if instance is None:
		if init:
			instance = Settings(configfile, basedir)
		else:
			raise ValueError("Settings not initialized yet")
	return instance

default_settings = {
	"serial": {
		"port": None,
		"baudrate": None,
		"autoconnect": False,
		"log": False,
		"timeout": {
			"detection": 0.5,
			"connection": 2,
			"communication": 5
		},
		"additionalPorts": []
	},
	"server": {
		"host": "0.0.0.0",
		"port": 5000,
		"firstRun": True
	},
	"webcam": {
		"stream": None,
		"snapshot": None,
		"ffmpeg": None,
		"bitrate": "5000k",
		"watermark": True,
		"flipH": False,
		"flipV": False,
		"timelapse": {
			"type": "off",
			"options": {}
		}
	},
	"feature": {
		"gCodeVisualizer": True,
		"temperatureGraph": True,
		"waitForStartOnConnect": False,
		"alwaysSendChecksum": False,
		"sdSupport": True,
		"swallowOkAfterResend": True
	},
	"folder": {
		"uploads": None,
		"timelapse": None,
		"timelapse_tmp": None,
		"logs": None,
		"virtualSd": None
	},
	"temperature": {
		"profiles":
			[
				{"name": "ABS", "extruder" : 210, "bed" : 100 },
				{"name": "PLA", "extruder" : 180, "bed" : 60 }
{'fraction_non_alphanumeric': 0.1785593506932702, 'fraction_numerical': 0.019952654717619207, 'mean_word_length': 4.00507614213198, 'pattern_counts': {'":': 84, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2186676', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1120, 'n_words': 274}