<jupyter_start><jupyter_text><jupyter_code>s = '--a1=[1,2,3]--a2=4.0'
s1 = '--a1=[1,0,0]'
s2 = '--a1=[[1,2,3],[]]--a2=4'
s = ''.join([i for i in s if i.isdigit()])
s1 = ''.join([i for i in s1 if i.isdigit()])
s2 = ''.join([i for i in s2 if i.isdigit()])
print(s)
print(s1)
print(s2)
s = ''.join([i for i in s]).replace('a1','')
s = ''.join([i for i in s]).replace('a2','')
print(s)
s = ''.join([i for i in s if i.isdigit()])
print(s)
import re
p = re.compile('(?:a1=)(.*)')
print(p.findall(s))
import re 

def normalize(s):
  result = 0 

  if 'a1' in s:
    p = re.compile('(?:a1=)(.*)')
    l = (p.findall(s))
    print(l)
  if 'a2' in s:
    p = re.compile('(?:a2=)(.*)')
    print(p.findall(s))

normalize(s)
import re 

def normalize_1(s1):
  result = 0 

  if 'a1' in s1:
    p = re.compile('(?:a1=)(.*)')
    l = (p.findall(s1))
    
    #print(l)
    print(sum(l) / float(len(l)))

normalize_1(s1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2727272727272727, 'fraction_numerical': 0.044919786096256686, 'mean_word_length': 3.3333333333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '348432', 'license': 'MIT', 'n_tokens_mistral': 478, 'n_tokens_neox': 463, 'n_words': 101, 'path': 'aud.ipynb', 'repo_name': 'fakecoinbase/sweetpandslashAlgorithms', 'size': '935'}