<commit_before>package options

import (
	"fmt"
)

func ExtractFrom(parsedArgs map[string]interface{}) (*Options, error) {
	res := &Options{}
	if val, ok := parsedArgs["User"]; ok {
		delete(parsedArgs, "User")
		res.User = val.(string)
	}
	if val, ok := parsedArgs["Password"]; ok {
		delete(parsedArgs, "Password")
		res.Password = val.(string)
	}
	if val, ok := parsedArgs["Format"]; ok {
		delete(parsedArgs, "Format")
		res.Output = val.(string)<commit_msg>Parse the profile option<commit_after>package options

import (
	"fmt"
)

func ExtractFrom(parsedArgs map[string]interface{}) (*Options, error) {
	res := &Options{}
	if val, ok := parsedArgs["User"]; ok {
		delete(parsedArgs, "User")
		res.User = val.(string)
	}
	if val, ok := parsedArgs["Password"]; ok {
		delete(parsedArgs, "Password")
		res.Password = val.(string)
	}
	if val, ok := parsedArgs["Profile"]; ok {
		if _, ok := val.(string); !ok {
			return nil, fmt.Errorf("Profile must be string.")
		}
		delete(parsedArgs, "Profile")
		res.Profile = val.(string)
	}
	if val, ok := parsedArgs["Format"]; ok {
		delete(parsedArgs, "Format")
		res.Output = val.(string)
{'fraction_non_alphanumeric': 0.17740511915269197, 'fraction_numerical': 0.0, 'mean_word_length': 4.478260869565218, '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': '1174251', 'n_tokens_mistral': 403, 'n_tokens_neox': 390, 'n_words': 97}