My name is Fede! I'm a physicist, professional software developer and opensource enthusiast.
- 🔭 I’m currently working at ams OSRAM
- 💬 Ask me about anything related to me, programming or whatever by creating a new discussion here.
- ⚡ Fun fact: you can talk to me in three different languages: italian, german and english!
In case of emergency open this section
import json
with open('catdata.json') as file:
data = json.load(file)
cats = list(set(map(lambda x: x['alt'].split(':')[0], data)))
comma_lines = sorted(filter(lambda x: ',' in x, cats), key=lambda x: x.count(','), reverse=True)
widest = sorted(map(lambda x: x['width'], data), reverse=True, key=lambda x: (x))[0]
tallest = sorted(map(lambda x: x['height'], data), reverse=True, key=lambda x: (x))[0]
ext = list(map(lambda x: x['filename'].split('.')[-1], data))
extensions = dict((x, ext.count(x)) for x in ext)
print("unique cat names: ", len(cats))
print("widest: ", widest)
print("tallest: ", tallest)
print("extensions: ", extensions)import pandas as pd
import numpy as np
data = pd.read_csv('dataset.csv')
for index, row in data.iterrows():
print(row)
max_w = np.max(data['Width'])
min_w = np.min(data['Width'])
print("Biggest item is",data[data['Width'] == max_w]['Item'].item(),"with",max_w)
print("Smallest item is",data[data['Width'] == min_w]['Item'].item(),"with",min_w)import re
maches = re.findall(r'\d*', text)
sum = 0
for match in maches:
if match:
sum +=int(match)
print(sum)
print(re.split(r'\d*', text))




