Skip to content

Instantly share code, notes, and snippets.

View andrea-dagostino's full-sized avatar

Andrea D'Agostino andrea-dagostino

View GitHub Profile
@andrea-dagostino
andrea-dagostino / gist:9002c807723cf74bca717acbbb6f7eb2
Created August 7, 2026 08:02
Github Issue Tracker Pi Agent Extension
/**
* GitHub Issues Panel
*
* Ambient issue strip above the editor (never overlaps chat) plus an
* expandable right-side overlay with a status timeline of tracked issues
* and their sub-issues, for the current repository (via the GitHub CLI `gh`).
*
* ctrl+shift+i or /issues — toggle the strip above the editor
* /issues expand — toggle the full right-side panel
*
# output layer
layers.Dense(2, activation="softmax", name="output")
# output layer
layers.Dense(1, name="output")
model = keras.Sequential(
[
layers.Dense(256, input_dim=4, activation="relu", name="input")
layers.Dense(128, activation="relu", name="layer1"),
layers.Dense(64, activation="relu", name="layer2"),
# ...
]
)
# input layer
layers.Dense(256, input_dim=4, activation="relu", name="input")
@andrea-dagostino
andrea-dagostino / seq1.py
Created November 21, 2022 09:11
seq_model
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
model = keras.Sequential(
# [...]
)
@andrea-dagostino
andrea-dagostino / fuzzy_logic_tagging_eng3.py
Last active March 27, 2023 11:59
fuzzy_logic_tagging
def fuzzy_tagging(tags, articles):
"""
This function receives as input a list of predefined tags and the list of textual content to be tagged.
Returns a Pandas dataframe with the articles tagged
"""
results = []
# iterate through tags
for i, tag in enumerate(tags):
d = {}
ranking = process.extract(tag, articles, limit=4) # extract the tag, ranking the 4 articles most representative
# upload the dataset and isolate posts
df = pd.read_csv('dataset.csv')
posts = df[df.url.str.contains('post')]
posts.reset_index(inplace=True, drop=True)
articles = list(posts.article)
# these are the tags we want to apply to our documents.
# change this list at your discretion
tags = [
"machine learning",
"clustering",
"carriera", # "career" in ita
"progetto", # "project" in ita
"consigli", # "tips" in ita
"analytics",
"deep learning",
from thefuzz import fuzz, process
import pandas as pd
# definiamo le categorie che vogliamo applicare
tags = [
"machine learning",
"clustering",
"carriera",
"progetto",
"consigli",