Skip to content
View fbarresi's full-sized avatar
🪁
🪁

Block or report fbarresi

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
fbarresi/README.md

Hi there 👋

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

json import bare bones

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)

csv import bare bones

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)

regex

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))

Pinned Loading

  1. Sharp7 Sharp7 Public

    Nuget package for Sharp7

    C# 255 80

  2. SoftPlc SoftPlc Public

    Software plc with docker support

    C# 155 38

  3. BeckhoffHttpClient BeckhoffHttpClient Public

    Unofficial TwinCAT function for HTTP-Client and Json conversion

    C# 80 9

  4. TwinCAT.JsonExtension TwinCAT.JsonExtension Public

    TwinCAT variables to and from json

    C# 59 9

  5. TwinCatAdsTool TwinCatAdsTool Public

    TwinCAT Tool for explore backup and compare ADS Variables

    C# 105 15

  6. SoftBeckhoff SoftBeckhoff Public

    Virtual Beckhoff PLC for local testing with docker support

    C# 110 13