<commit_before>
import frappe, json
from frappe.model.utils.user_settings import update_user_settings, sync_user_settings

def execute():
	users = frappe.db.sql("select distinct(user) from `__UserSettings`", as_dict=True)

	for user in users:
		user_settings = frappe.db.sql('''
			select
				* from `__UserSettings`
			where
				user="{user}"
		'''.format(user = user.user), as_dict=True)

		for setting in user_settings:<commit_msg>fix: Make query Postgres compatible (#15240)<commit_after>
import frappe, json
from frappe.model.utils.user_settings import update_user_settings, sync_user_settings

def execute():
	users = frappe.db.sql("select distinct(user) from `__UserSettings`", as_dict=True)

	for user in users:
		user_settings = frappe.db.sql('''
			select
				* from `__UserSettings`
			where
				user='{user}'
		'''.format(user = user.user), as_dict=True)

		for setting in user_settings:
{'fraction_non_alphanumeric': 0.12013348164627363, 'fraction_numerical': 0.0055617352614015575, 'mean_word_length': 5.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '7057660', 'n_tokens_mistral': 329, 'n_tokens_neox': 300, 'n_words': 74}