fix: add back missing files from oss (#4832)
This commit is contained in:
committed by
Caren Thomas
parent
2f716d4961
commit
7840db6801
100
tests/data/1_to_100.py
Normal file
100
tests/data/1_to_100.py
Normal file
@@ -0,0 +1,100 @@
|
||||
x1 = 1
|
||||
x2 = 2
|
||||
x3 = 3
|
||||
x4 = 4
|
||||
x5 = 5
|
||||
x6 = 6
|
||||
x7 = 7
|
||||
x8 = 8
|
||||
x9 = 9
|
||||
x10 = 10
|
||||
x11 = 11
|
||||
x12 = 12
|
||||
x13 = 13
|
||||
x14 = 14
|
||||
x15 = 15
|
||||
x16 = 16
|
||||
x17 = 17
|
||||
x18 = 18
|
||||
x19 = 19
|
||||
x20 = 20
|
||||
x21 = 21
|
||||
x22 = 22
|
||||
x23 = 23
|
||||
x24 = 24
|
||||
x25 = 25
|
||||
x26 = 26
|
||||
x27 = 27
|
||||
x28 = 28
|
||||
x29 = 29
|
||||
x30 = 30
|
||||
x31 = 31
|
||||
x32 = 32
|
||||
x33 = 33
|
||||
x34 = 34
|
||||
x35 = 35
|
||||
x36 = 36
|
||||
x37 = 37
|
||||
x38 = 38
|
||||
x39 = 39
|
||||
x40 = 40
|
||||
x41 = 41
|
||||
x42 = 42
|
||||
x43 = 43
|
||||
x44 = 44
|
||||
x45 = 45
|
||||
x46 = 46
|
||||
x47 = 47
|
||||
x48 = 48
|
||||
x49 = 49
|
||||
x50 = 50
|
||||
x51 = 51
|
||||
x52 = 52
|
||||
x53 = 53
|
||||
x54 = 54
|
||||
x55 = 55
|
||||
x56 = 56
|
||||
x57 = 57
|
||||
x58 = 58
|
||||
x59 = 59
|
||||
x60 = 60
|
||||
x61 = 61
|
||||
x62 = 62
|
||||
x63 = 63
|
||||
x64 = 64
|
||||
x65 = 65
|
||||
x66 = 66
|
||||
x67 = 67
|
||||
x68 = 68
|
||||
x69 = 69
|
||||
x70 = 70
|
||||
x71 = 71
|
||||
x72 = 72
|
||||
x73 = 73
|
||||
x74 = 74
|
||||
x75 = 75
|
||||
x76 = 76
|
||||
x77 = 77
|
||||
x78 = 78
|
||||
x79 = 79
|
||||
x80 = 80
|
||||
x81 = 81
|
||||
x82 = 82
|
||||
x83 = 83
|
||||
x84 = 84
|
||||
x85 = 85
|
||||
x86 = 86
|
||||
x87 = 87
|
||||
x88 = 88
|
||||
x89 = 89
|
||||
x90 = 90
|
||||
x91 = 91
|
||||
x92 = 92
|
||||
x93 = 93
|
||||
x94 = 94
|
||||
x95 = 95
|
||||
x96 = 96
|
||||
x97 = 97
|
||||
x98 = 98
|
||||
x99 = 99
|
||||
x100 = 100
|
||||
BIN
tests/data/__pycache__/1_to_100.cpython-310.pyc
Normal file
BIN
tests/data/__pycache__/1_to_100.cpython-310.pyc
Normal file
Binary file not shown.
BIN
tests/data/__pycache__/data_analysis.cpython-310.pyc
Normal file
BIN
tests/data/__pycache__/data_analysis.cpython-310.pyc
Normal file
Binary file not shown.
371
tests/data/api_server.go
Normal file
371
tests/data/api_server.go
Normal file
@@ -0,0 +1,371 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
// User represents a user in the system
|
||||
type User struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// UserService handles user-related operations
|
||||
type UserService struct {
|
||||
users map[int]*User
|
||||
nextID int
|
||||
mutex sync.RWMutex
|
||||
}
|
||||
|
||||
// NewUserService creates a new instance of UserService
|
||||
func NewUserService() *UserService {
|
||||
return &UserService{
|
||||
users: make(map[int]*User),
|
||||
nextID: 1,
|
||||
}
|
||||
}
|
||||
|
||||
// CreateUser adds a new user to the service
|
||||
func (us *UserService) CreateUser(name, email string) (*User, error) {
|
||||
us.mutex.Lock()
|
||||
defer us.mutex.Unlock()
|
||||
|
||||
if name == "" || email == "" {
|
||||
return nil, fmt.Errorf("name and email are required")
|
||||
}
|
||||
|
||||
// Check for duplicate email
|
||||
for _, user := range us.users {
|
||||
if user.Email == email {
|
||||
return nil, fmt.Errorf("user with email %s already exists", email)
|
||||
}
|
||||
}
|
||||
|
||||
user := &User{
|
||||
ID: us.nextID,
|
||||
Name: name,
|
||||
Email: email,
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
|
||||
us.users[us.nextID] = user
|
||||
us.nextID++
|
||||
|
||||
return user, nil
|
||||
}
|
||||
|
||||
// GetUser retrieves a user by ID
|
||||
func (us *UserService) GetUser(id int) (*User, error) {
|
||||
us.mutex.RLock()
|
||||
defer us.mutex.RUnlock()
|
||||
|
||||
user, exists := us.users[id]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("user with ID %d not found", id)
|
||||
}
|
||||
|
||||
return user, nil
|
||||
}
|
||||
|
||||
// GetAllUsers returns all users
|
||||
func (us *UserService) GetAllUsers() []*User {
|
||||
us.mutex.RLock()
|
||||
defer us.mutex.RUnlock()
|
||||
|
||||
users := make([]*User, 0, len(us.users))
|
||||
for _, user := range us.users {
|
||||
users = append(users, user)
|
||||
}
|
||||
|
||||
return users
|
||||
}
|
||||
|
||||
// UpdateUser modifies an existing user
|
||||
func (us *UserService) UpdateUser(id int, name, email string) (*User, error) {
|
||||
us.mutex.Lock()
|
||||
defer us.mutex.Unlock()
|
||||
|
||||
user, exists := us.users[id]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("user with ID %d not found", id)
|
||||
}
|
||||
|
||||
// Check for duplicate email (excluding current user)
|
||||
if email != user.Email {
|
||||
for _, u := range us.users {
|
||||
if u.Email == email && u.ID != id {
|
||||
return nil, fmt.Errorf("user with email %s already exists", email)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if name != "" {
|
||||
user.Name = name
|
||||
}
|
||||
if email != "" {
|
||||
user.Email = email
|
||||
}
|
||||
user.UpdatedAt = time.Now()
|
||||
|
||||
return user, nil
|
||||
}
|
||||
|
||||
// DeleteUser removes a user from the service
|
||||
func (us *UserService) DeleteUser(id int) error {
|
||||
us.mutex.Lock()
|
||||
defer us.mutex.Unlock()
|
||||
|
||||
if _, exists := us.users[id]; !exists {
|
||||
return fmt.Errorf("user with ID %d not found", id)
|
||||
}
|
||||
|
||||
delete(us.users, id)
|
||||
return nil
|
||||
}
|
||||
|
||||
// APIServer represents the HTTP server
|
||||
type APIServer struct {
|
||||
userService *UserService
|
||||
router *mux.Router
|
||||
}
|
||||
|
||||
// NewAPIServer creates a new API server instance
|
||||
func NewAPIServer(userService *UserService) *APIServer {
|
||||
server := &APIServer{
|
||||
userService: userService,
|
||||
router: mux.NewRouter(),
|
||||
}
|
||||
server.setupRoutes()
|
||||
return server
|
||||
}
|
||||
|
||||
// setupRoutes configures the API routes
|
||||
func (s *APIServer) setupRoutes() {
|
||||
api := s.router.PathPrefix("/api/v1").Subrouter()
|
||||
|
||||
// User routes
|
||||
api.HandleFunc("/users", s.handleGetUsers).Methods("GET")
|
||||
api.HandleFunc("/users", s.handleCreateUser).Methods("POST")
|
||||
api.HandleFunc("/users/{id:[0-9]+}", s.handleGetUser).Methods("GET")
|
||||
api.HandleFunc("/users/{id:[0-9]+}", s.handleUpdateUser).Methods("PUT")
|
||||
api.HandleFunc("/users/{id:[0-9]+}", s.handleDeleteUser).Methods("DELETE")
|
||||
|
||||
// Health check
|
||||
api.HandleFunc("/health", s.handleHealthCheck).Methods("GET")
|
||||
|
||||
// Add CORS middleware
|
||||
s.router.Use(s.corsMiddleware)
|
||||
s.router.Use(s.loggingMiddleware)
|
||||
}
|
||||
|
||||
// HTTP Handlers
|
||||
|
||||
func (s *APIServer) handleGetUsers(w http.ResponseWriter, r *http.Request) {
|
||||
users := s.userService.GetAllUsers()
|
||||
s.writeJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"users": users,
|
||||
"count": len(users),
|
||||
})
|
||||
}
|
||||
|
||||
func (s *APIServer) handleCreateUser(w http.ResponseWriter, r *http.Request) {
|
||||
var req struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, "Invalid JSON payload")
|
||||
return
|
||||
}
|
||||
|
||||
user, err := s.userService.CreateUser(req.Name, req.Email)
|
||||
if err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
s.writeJSON(w, http.StatusCreated, map[string]*User{"user": user})
|
||||
}
|
||||
|
||||
func (s *APIServer) handleGetUser(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
id, err := strconv.Atoi(vars["id"])
|
||||
if err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, "Invalid user ID")
|
||||
return
|
||||
}
|
||||
|
||||
user, err := s.userService.GetUser(id)
|
||||
if err != nil {
|
||||
s.writeError(w, http.StatusNotFound, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
s.writeJSON(w, http.StatusOK, map[string]*User{"user": user})
|
||||
}
|
||||
|
||||
func (s *APIServer) handleUpdateUser(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
id, err := strconv.Atoi(vars["id"])
|
||||
if err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, "Invalid user ID")
|
||||
return
|
||||
}
|
||||
|
||||
var req struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, "Invalid JSON payload")
|
||||
return
|
||||
}
|
||||
|
||||
user, err := s.userService.UpdateUser(id, req.Name, req.Email)
|
||||
if err != nil {
|
||||
status := http.StatusBadRequest
|
||||
if strings.Contains(err.Error(), "not found") {
|
||||
status = http.StatusNotFound
|
||||
}
|
||||
s.writeError(w, status, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
s.writeJSON(w, http.StatusOK, map[string]*User{"user": user})
|
||||
}
|
||||
|
||||
func (s *APIServer) handleDeleteUser(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
id, err := strconv.Atoi(vars["id"])
|
||||
if err != nil {
|
||||
s.writeError(w, http.StatusBadRequest, "Invalid user ID")
|
||||
return
|
||||
}
|
||||
|
||||
if err := s.userService.DeleteUser(id); err != nil {
|
||||
s.writeError(w, http.StatusNotFound, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
s.writeJSON(w, http.StatusOK, map[string]string{"message": "User deleted successfully"})
|
||||
}
|
||||
|
||||
func (s *APIServer) handleHealthCheck(w http.ResponseWriter, r *http.Request) {
|
||||
s.writeJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"status": "healthy",
|
||||
"timestamp": time.Now(),
|
||||
"service": "user-api",
|
||||
})
|
||||
}
|
||||
|
||||
// Middleware
|
||||
|
||||
func (s *APIServer) corsMiddleware(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
||||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
|
||||
|
||||
if r.Method == "OPTIONS" {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
||||
func (s *APIServer) loggingMiddleware(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
start := time.Now()
|
||||
|
||||
// Wrap ResponseWriter to capture status code
|
||||
ww := &responseWriter{ResponseWriter: w, statusCode: http.StatusOK}
|
||||
|
||||
next.ServeHTTP(ww, r)
|
||||
|
||||
log.Printf("%s %s %d %v", r.Method, r.URL.Path, ww.statusCode, time.Since(start))
|
||||
})
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
|
||||
func (s *APIServer) writeJSON(w http.ResponseWriter, status int, data interface{}) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(status)
|
||||
json.NewEncoder(w).Encode(data)
|
||||
}
|
||||
|
||||
func (s *APIServer) writeError(w http.ResponseWriter, status int, message string) {
|
||||
s.writeJSON(w, status, map[string]string{"error": message})
|
||||
}
|
||||
|
||||
// responseWriter wraps http.ResponseWriter to capture status code
|
||||
type responseWriter struct {
|
||||
http.ResponseWriter
|
||||
statusCode int
|
||||
}
|
||||
|
||||
func (rw *responseWriter) WriteHeader(code int) {
|
||||
rw.statusCode = code
|
||||
rw.ResponseWriter.WriteHeader(code)
|
||||
}
|
||||
|
||||
// Start starts the HTTP server
|
||||
func (s *APIServer) Start(ctx context.Context, addr string) error {
|
||||
server := &http.Server{
|
||||
Addr: addr,
|
||||
Handler: s.router,
|
||||
ReadTimeout: 15 * time.Second,
|
||||
WriteTimeout: 15 * time.Second,
|
||||
IdleTimeout: 60 * time.Second,
|
||||
}
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
log.Println("Shutting down server...")
|
||||
|
||||
shutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if err := server.Shutdown(shutdownCtx); err != nil {
|
||||
log.Printf("Server shutdown error: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
log.Printf("Server starting on %s", addr)
|
||||
return server.ListenAndServe()
|
||||
}
|
||||
|
||||
func main() {
|
||||
userService := NewUserService()
|
||||
|
||||
// Add some sample data
|
||||
userService.CreateUser("John Doe", "john@example.com")
|
||||
userService.CreateUser("Jane Smith", "jane@example.com")
|
||||
|
||||
server := NewAPIServer(userService)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
if err := server.Start(ctx, ":8080"); err != nil && err != http.ErrServerClosed {
|
||||
log.Fatalf("Server failed to start: %v", err)
|
||||
}
|
||||
}
|
||||
402
tests/data/data_analysis.py
Normal file
402
tests/data/data_analysis.py
Normal file
@@ -0,0 +1,402 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Data Analysis Module - Advanced statistical and machine learning operations
|
||||
Contains various data processing and analysis functions for research purposes.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import Dict, Optional
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
|
||||
class AnalysisType(Enum):
|
||||
"""Enumeration of different analysis types."""
|
||||
|
||||
DESCRIPTIVE = "descriptive"
|
||||
CORRELATION = "correlation"
|
||||
REGRESSION = "regression"
|
||||
CLUSTERING = "clustering"
|
||||
TIME_SERIES = "time_series"
|
||||
|
||||
|
||||
@dataclass
|
||||
class AnalysisResult:
|
||||
"""Container for analysis results."""
|
||||
|
||||
analysis_type: AnalysisType
|
||||
timestamp: datetime
|
||||
metrics: Dict[str, float]
|
||||
metadata: Dict[str, any]
|
||||
success: bool = True
|
||||
error_message: Optional[str] = None
|
||||
|
||||
|
||||
class DataPreprocessor:
|
||||
"""
|
||||
Advanced data preprocessing utility class.
|
||||
Handles cleaning, transformation, and feature engineering.
|
||||
"""
|
||||
|
||||
def __init__(self, missing_threshold: float = 0.5):
|
||||
self.missing_threshold = missing_threshold
|
||||
self.transformations_applied = []
|
||||
|
||||
def clean_data(self, df: pd.DataFrame) -> pd.DataFrame:
|
||||
"""
|
||||
Comprehensive data cleaning pipeline.
|
||||
|
||||
Args:
|
||||
df: Input DataFrame to clean
|
||||
|
||||
Returns:
|
||||
Cleaned DataFrame
|
||||
"""
|
||||
original_shape = df.shape
|
||||
|
||||
# Remove columns with excessive missing values
|
||||
missing_ratios = df.isnull().sum() / len(df)
|
||||
cols_to_drop = missing_ratios[missing_ratios > self.missing_threshold].index
|
||||
df_cleaned = df.drop(columns=cols_to_drop)
|
||||
|
||||
if len(cols_to_drop) > 0:
|
||||
self.transformations_applied.append(f"Dropped {len(cols_to_drop)} columns")
|
||||
|
||||
# Handle remaining missing values
|
||||
numeric_cols = df_cleaned.select_dtypes(include=[np.number]).columns
|
||||
categorical_cols = df_cleaned.select_dtypes(include=["object"]).columns
|
||||
|
||||
# Fill numeric missing values with median
|
||||
for col in numeric_cols:
|
||||
if df_cleaned[col].isnull().any():
|
||||
median_value = df_cleaned[col].median()
|
||||
df_cleaned[col].fillna(median_value, inplace=True)
|
||||
self.transformations_applied.append(f"Filled {col} with median")
|
||||
|
||||
# Fill categorical missing values with mode
|
||||
for col in categorical_cols:
|
||||
if df_cleaned[col].isnull().any():
|
||||
mode_value = df_cleaned[col].mode().iloc[0] if not df_cleaned[col].mode().empty else "Unknown"
|
||||
df_cleaned[col].fillna(mode_value, inplace=True)
|
||||
self.transformations_applied.append(f"Filled {col} with mode")
|
||||
|
||||
# Remove duplicates
|
||||
initial_rows = len(df_cleaned)
|
||||
df_cleaned = df_cleaned.drop_duplicates()
|
||||
duplicates_removed = initial_rows - len(df_cleaned)
|
||||
|
||||
if duplicates_removed > 0:
|
||||
self.transformations_applied.append(f"Removed {duplicates_removed} duplicate rows")
|
||||
|
||||
print(f"Data cleaning complete: {original_shape} -> {df_cleaned.shape}")
|
||||
return df_cleaned
|
||||
|
||||
def engineer_features(self, df: pd.DataFrame) -> pd.DataFrame:
|
||||
"""
|
||||
Create new features from existing data.
|
||||
|
||||
Args:
|
||||
df: Input DataFrame
|
||||
|
||||
Returns:
|
||||
DataFrame with engineered features
|
||||
"""
|
||||
df_featured = df.copy()
|
||||
|
||||
# Numeric feature engineering
|
||||
numeric_cols = df_featured.select_dtypes(include=[np.number]).columns
|
||||
|
||||
if len(numeric_cols) >= 2:
|
||||
# Create interaction features
|
||||
for i, col1 in enumerate(numeric_cols):
|
||||
for col2 in numeric_cols[i + 1 :]:
|
||||
df_featured[f"{col1}_{col2}_ratio"] = df_featured[col1] / (df_featured[col2] + 1e-8)
|
||||
df_featured[f"{col1}_{col2}_sum"] = df_featured[col1] + df_featured[col2]
|
||||
|
||||
self.transformations_applied.append("Created interaction features")
|
||||
|
||||
# Binning continuous variables
|
||||
for col in numeric_cols:
|
||||
if df_featured[col].nunique() > 10: # Only bin if many unique values
|
||||
df_featured[f"{col}_binned"] = pd.qcut(df_featured[col], q=5, labels=False, duplicates="drop")
|
||||
self.transformations_applied.append(f"Binned {col}")
|
||||
|
||||
return df_featured
|
||||
|
||||
|
||||
class StatisticalAnalyzer:
|
||||
"""
|
||||
Statistical analysis and hypothesis testing utilities.
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def descriptive_statistics(df: pd.DataFrame) -> AnalysisResult:
|
||||
"""
|
||||
Calculate comprehensive descriptive statistics.
|
||||
|
||||
Args:
|
||||
df: Input DataFrame
|
||||
|
||||
Returns:
|
||||
AnalysisResult with descriptive metrics
|
||||
"""
|
||||
try:
|
||||
numeric_df = df.select_dtypes(include=[np.number])
|
||||
|
||||
if numeric_df.empty:
|
||||
return AnalysisResult(
|
||||
analysis_type=AnalysisType.DESCRIPTIVE,
|
||||
timestamp=datetime.now(),
|
||||
metrics={},
|
||||
metadata={},
|
||||
success=False,
|
||||
error_message="No numeric columns found",
|
||||
)
|
||||
|
||||
metrics = {
|
||||
"mean_values": numeric_df.mean().to_dict(),
|
||||
"std_values": numeric_df.std().to_dict(),
|
||||
"median_values": numeric_df.median().to_dict(),
|
||||
"skewness": numeric_df.skew().to_dict(),
|
||||
"kurtosis": numeric_df.kurtosis().to_dict(),
|
||||
"correlation_with_target": None, # Would need target column
|
||||
}
|
||||
|
||||
metadata = {
|
||||
"total_rows": len(df),
|
||||
"total_columns": len(df.columns),
|
||||
"numeric_columns": len(numeric_df.columns),
|
||||
"missing_values": df.isnull().sum().to_dict(),
|
||||
}
|
||||
|
||||
return AnalysisResult(analysis_type=AnalysisType.DESCRIPTIVE, timestamp=datetime.now(), metrics=metrics, metadata=metadata)
|
||||
|
||||
except Exception as e:
|
||||
return AnalysisResult(
|
||||
analysis_type=AnalysisType.DESCRIPTIVE,
|
||||
timestamp=datetime.now(),
|
||||
metrics={},
|
||||
metadata={},
|
||||
success=False,
|
||||
error_message=str(e),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def correlation_analysis(df: pd.DataFrame, method: str = "pearson") -> AnalysisResult:
|
||||
"""
|
||||
Perform correlation analysis between variables.
|
||||
|
||||
Args:
|
||||
df: Input DataFrame
|
||||
method: Correlation method ('pearson', 'spearman', 'kendall')
|
||||
|
||||
Returns:
|
||||
AnalysisResult with correlation metrics
|
||||
"""
|
||||
try:
|
||||
numeric_df = df.select_dtypes(include=[np.number])
|
||||
|
||||
if len(numeric_df.columns) < 2:
|
||||
return AnalysisResult(
|
||||
analysis_type=AnalysisType.CORRELATION,
|
||||
timestamp=datetime.now(),
|
||||
metrics={},
|
||||
metadata={},
|
||||
success=False,
|
||||
error_message="Need at least 2 numeric columns for correlation",
|
||||
)
|
||||
|
||||
corr_matrix = numeric_df.corr(method=method)
|
||||
|
||||
# Find highest correlations (excluding diagonal)
|
||||
corr_pairs = []
|
||||
for i in range(len(corr_matrix.columns)):
|
||||
for j in range(i + 1, len(corr_matrix.columns)):
|
||||
col1, col2 = corr_matrix.columns[i], corr_matrix.columns[j]
|
||||
corr_value = corr_matrix.iloc[i, j]
|
||||
if not np.isnan(corr_value):
|
||||
corr_pairs.append((col1, col2, abs(corr_value)))
|
||||
|
||||
# Sort by correlation strength
|
||||
corr_pairs.sort(key=lambda x: x[2], reverse=True)
|
||||
|
||||
metrics = {
|
||||
"correlation_matrix": corr_matrix.to_dict(),
|
||||
"highest_correlations": corr_pairs[:10], # Top 10
|
||||
"method_used": method,
|
||||
}
|
||||
|
||||
metadata = {"variables_analyzed": list(numeric_df.columns), "total_pairs": len(corr_pairs)}
|
||||
|
||||
return AnalysisResult(analysis_type=AnalysisType.CORRELATION, timestamp=datetime.now(), metrics=metrics, metadata=metadata)
|
||||
|
||||
except Exception as e:
|
||||
return AnalysisResult(
|
||||
analysis_type=AnalysisType.CORRELATION,
|
||||
timestamp=datetime.now(),
|
||||
metrics={},
|
||||
metadata={},
|
||||
success=False,
|
||||
error_message=str(e),
|
||||
)
|
||||
|
||||
|
||||
class TimeSeriesAnalyzer:
|
||||
"""
|
||||
Time series analysis and forecasting utilities.
|
||||
"""
|
||||
|
||||
def __init__(self, frequency: str = "D"):
|
||||
self.frequency = frequency
|
||||
self.models_fitted = {}
|
||||
|
||||
def detect_seasonality(self, series: pd.Series) -> Dict[str, any]:
|
||||
"""
|
||||
Detect seasonal patterns in time series data.
|
||||
|
||||
Args:
|
||||
series: Time series data
|
||||
|
||||
Returns:
|
||||
Dictionary with seasonality information
|
||||
"""
|
||||
try:
|
||||
# Simple seasonality detection using autocorrelation
|
||||
autocorr_values = []
|
||||
for lag in range(1, min(len(series) // 2, 365)):
|
||||
if len(series) > lag:
|
||||
autocorr = series.autocorr(lag=lag)
|
||||
if not np.isnan(autocorr):
|
||||
autocorr_values.append((lag, autocorr))
|
||||
|
||||
# Find peaks in autocorrelation
|
||||
significant_lags = [(lag, corr) for lag, corr in autocorr_values if abs(corr) > 0.5]
|
||||
significant_lags.sort(key=lambda x: abs(x[1]), reverse=True)
|
||||
|
||||
return {
|
||||
"seasonal_lags": significant_lags[:5],
|
||||
"strongest_seasonality": significant_lags[0] if significant_lags else None,
|
||||
"autocorrelation_values": autocorr_values,
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
warnings.warn(f"Seasonality detection failed: {e}")
|
||||
return {"error": str(e)}
|
||||
|
||||
def trend_analysis(self, series: pd.Series, window: int = 30) -> Dict[str, any]:
|
||||
"""
|
||||
Analyze trend patterns in time series.
|
||||
|
||||
Args:
|
||||
series: Time series data
|
||||
window: Rolling window size for trend calculation
|
||||
|
||||
Returns:
|
||||
Dictionary with trend information
|
||||
"""
|
||||
try:
|
||||
# Calculate rolling statistics
|
||||
rolling_mean = series.rolling(window=window).mean()
|
||||
rolling_std = series.rolling(window=window).std()
|
||||
|
||||
# Simple trend detection
|
||||
first_third = rolling_mean.iloc[: len(rolling_mean) // 3].mean()
|
||||
last_third = rolling_mean.iloc[-len(rolling_mean) // 3 :].mean()
|
||||
|
||||
trend_direction = "increasing" if last_third > first_third else "decreasing"
|
||||
trend_strength = abs(last_third - first_third) / first_third if first_third != 0 else 0
|
||||
|
||||
return {
|
||||
"trend_direction": trend_direction,
|
||||
"trend_strength": trend_strength,
|
||||
"rolling_mean": rolling_mean.to_dict(),
|
||||
"rolling_std": rolling_std.to_dict(),
|
||||
"volatility": rolling_std.mean(),
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
warnings.warn(f"Trend analysis failed: {e}")
|
||||
return {"error": str(e)}
|
||||
|
||||
|
||||
def generate_sample_data(n_samples: int = 1000) -> pd.DataFrame:
|
||||
"""
|
||||
Generate sample dataset for testing analysis functions.
|
||||
|
||||
Args:
|
||||
n_samples: Number of samples to generate
|
||||
|
||||
Returns:
|
||||
Sample DataFrame
|
||||
"""
|
||||
np.random.seed(42)
|
||||
|
||||
data = {
|
||||
"feature_1": np.random.normal(100, 15, n_samples),
|
||||
"feature_2": np.random.exponential(2, n_samples),
|
||||
"feature_3": np.random.uniform(0, 100, n_samples),
|
||||
"category": np.random.choice(["A", "B", "C"], n_samples),
|
||||
"timestamp": pd.date_range("2023-01-01", periods=n_samples, freq="D"),
|
||||
}
|
||||
|
||||
# Add some correlation
|
||||
data["feature_4"] = data["feature_1"] * 0.7 + np.random.normal(0, 10, n_samples)
|
||||
|
||||
# Add missing values
|
||||
missing_indices = np.random.choice(n_samples, size=int(0.05 * n_samples), replace=False)
|
||||
for idx in missing_indices:
|
||||
col = np.random.choice(["feature_1", "feature_2", "feature_3"])
|
||||
data[col][idx] = np.nan
|
||||
|
||||
return pd.DataFrame(data)
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Demonstration of the data analysis pipeline.
|
||||
"""
|
||||
print("=== Data Analysis Pipeline Demo ===")
|
||||
|
||||
# Generate sample data
|
||||
df = generate_sample_data(1000)
|
||||
print(f"Generated dataset with shape: {df.shape}")
|
||||
|
||||
# Data preprocessing
|
||||
preprocessor = DataPreprocessor(missing_threshold=0.1)
|
||||
df_clean = preprocessor.clean_data(df)
|
||||
df_featured = preprocessor.engineer_features(df_clean)
|
||||
|
||||
print(f"Applied transformations: {preprocessor.transformations_applied}")
|
||||
|
||||
# Statistical analysis
|
||||
analyzer = StatisticalAnalyzer()
|
||||
|
||||
# Descriptive statistics
|
||||
desc_result = analyzer.descriptive_statistics(df_featured)
|
||||
if desc_result.success:
|
||||
print(f"Descriptive analysis completed at {desc_result.timestamp}")
|
||||
print(f"Analyzed {desc_result.metadata['numeric_columns']} numeric columns")
|
||||
|
||||
# Correlation analysis
|
||||
corr_result = analyzer.correlation_analysis(df_featured)
|
||||
if corr_result.success:
|
||||
print(f"Correlation analysis completed")
|
||||
print(f"Found {len(corr_result.metrics['highest_correlations'])} significant correlations")
|
||||
|
||||
# Time series analysis
|
||||
ts_analyzer = TimeSeriesAnalyzer()
|
||||
time_series = df_clean.set_index("timestamp")["feature_1"]
|
||||
|
||||
ts_analyzer.detect_seasonality(time_series)
|
||||
trend = ts_analyzer.trend_analysis(time_series)
|
||||
|
||||
print(f"Time series trend: {trend.get('trend_direction', 'unknown')}")
|
||||
print(f"Volatility: {trend.get('volatility', 0):.2f}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
286
tests/data/data_structures.cpp
Normal file
286
tests/data/data_structures.cpp
Normal file
@@ -0,0 +1,286 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
|
||||
/**
|
||||
* Binary Search Tree implementation with smart pointers
|
||||
* Template class supporting any comparable type
|
||||
*/
|
||||
template<typename T>
|
||||
class BinarySearchTree {
|
||||
private:
|
||||
struct Node {
|
||||
T data;
|
||||
std::unique_ptr<Node> left;
|
||||
std::unique_ptr<Node> right;
|
||||
|
||||
Node(const T& value) : data(value), left(nullptr), right(nullptr) {}
|
||||
};
|
||||
|
||||
std::unique_ptr<Node> root;
|
||||
size_t size_;
|
||||
|
||||
void insertHelper(std::unique_ptr<Node>& node, const T& value) {
|
||||
if (!node) {
|
||||
node = std::make_unique<Node>(value);
|
||||
++size_;
|
||||
return;
|
||||
}
|
||||
|
||||
if (value < node->data) {
|
||||
insertHelper(node->left, value);
|
||||
} else if (value > node->data) {
|
||||
insertHelper(node->right, value);
|
||||
}
|
||||
// Ignore duplicates
|
||||
}
|
||||
|
||||
bool searchHelper(const std::unique_ptr<Node>& node, const T& value) const {
|
||||
if (!node) return false;
|
||||
|
||||
if (value == node->data) return true;
|
||||
else if (value < node->data) return searchHelper(node->left, value);
|
||||
else return searchHelper(node->right, value);
|
||||
}
|
||||
|
||||
void inorderHelper(const std::unique_ptr<Node>& node, std::vector<T>& result) const {
|
||||
if (!node) return;
|
||||
|
||||
inorderHelper(node->left, result);
|
||||
result.push_back(node->data);
|
||||
inorderHelper(node->right, result);
|
||||
}
|
||||
|
||||
std::unique_ptr<Node> removeHelper(std::unique_ptr<Node> node, const T& value) {
|
||||
if (!node) return nullptr;
|
||||
|
||||
if (value < node->data) {
|
||||
node->left = removeHelper(std::move(node->left), value);
|
||||
} else if (value > node->data) {
|
||||
node->right = removeHelper(std::move(node->right), value);
|
||||
} else {
|
||||
// Node to delete found
|
||||
--size_;
|
||||
|
||||
if (!node->left) return std::move(node->right);
|
||||
if (!node->right) return std::move(node->left);
|
||||
|
||||
// Node has two children
|
||||
Node* successor = findMin(node->right.get());
|
||||
node->data = successor->data;
|
||||
node->right = removeHelper(std::move(node->right), successor->data);
|
||||
++size_; // Compensate for decrement in recursive call
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
Node* findMin(Node* node) const {
|
||||
while (node->left) {
|
||||
node = node->left.get();
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
public:
|
||||
BinarySearchTree() : root(nullptr), size_(0) {}
|
||||
|
||||
void insert(const T& value) {
|
||||
insertHelper(root, value);
|
||||
}
|
||||
|
||||
bool search(const T& value) const {
|
||||
return searchHelper(root, value);
|
||||
}
|
||||
|
||||
void remove(const T& value) {
|
||||
root = removeHelper(std::move(root), value);
|
||||
}
|
||||
|
||||
std::vector<T> inorderTraversal() const {
|
||||
std::vector<T> result;
|
||||
inorderHelper(root, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
size_t size() const { return size_; }
|
||||
bool empty() const { return size_ == 0; }
|
||||
|
||||
void clear() {
|
||||
root.reset();
|
||||
size_ = 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Dynamic Array implementation with automatic resizing
|
||||
*/
|
||||
template<typename T>
|
||||
class DynamicArray {
|
||||
private:
|
||||
std::unique_ptr<T[]> data;
|
||||
size_t capacity_;
|
||||
size_t size_;
|
||||
|
||||
void resize() {
|
||||
size_t newCapacity = capacity_ == 0 ? 1 : capacity_ * 2;
|
||||
auto newData = std::make_unique<T[]>(newCapacity);
|
||||
|
||||
for (size_t i = 0; i < size_; ++i) {
|
||||
newData[i] = std::move(data[i]);
|
||||
}
|
||||
|
||||
data = std::move(newData);
|
||||
capacity_ = newCapacity;
|
||||
}
|
||||
|
||||
public:
|
||||
DynamicArray() : data(nullptr), capacity_(0), size_(0) {}
|
||||
|
||||
explicit DynamicArray(size_t initialCapacity)
|
||||
: data(std::make_unique<T[]>(initialCapacity)),
|
||||
capacity_(initialCapacity),
|
||||
size_(0) {}
|
||||
|
||||
void pushBack(const T& value) {
|
||||
if (size_ >= capacity_) {
|
||||
resize();
|
||||
}
|
||||
data[size_++] = value;
|
||||
}
|
||||
|
||||
void pushBack(T&& value) {
|
||||
if (size_ >= capacity_) {
|
||||
resize();
|
||||
}
|
||||
data[size_++] = std::move(value);
|
||||
}
|
||||
|
||||
T& operator[](size_t index) {
|
||||
if (index >= size_) {
|
||||
throw std::out_of_range("Index out of bounds");
|
||||
}
|
||||
return data[index];
|
||||
}
|
||||
|
||||
const T& operator[](size_t index) const {
|
||||
if (index >= size_) {
|
||||
throw std::out_of_range("Index out of bounds");
|
||||
}
|
||||
return data[index];
|
||||
}
|
||||
|
||||
void popBack() {
|
||||
if (size_ > 0) {
|
||||
--size_;
|
||||
}
|
||||
}
|
||||
|
||||
size_t size() const { return size_; }
|
||||
size_t capacity() const { return capacity_; }
|
||||
bool empty() const { return size_ == 0; }
|
||||
|
||||
void clear() { size_ = 0; }
|
||||
|
||||
// Iterator support
|
||||
T* begin() { return data.get(); }
|
||||
T* end() { return data.get() + size_; }
|
||||
const T* begin() const { return data.get(); }
|
||||
const T* end() const { return data.get() + size_; }
|
||||
};
|
||||
|
||||
/**
|
||||
* Stack implementation using dynamic array
|
||||
*/
|
||||
template<typename T>
|
||||
class Stack {
|
||||
private:
|
||||
DynamicArray<T> container;
|
||||
|
||||
public:
|
||||
void push(const T& value) {
|
||||
container.pushBack(value);
|
||||
}
|
||||
|
||||
void push(T&& value) {
|
||||
container.pushBack(std::move(value));
|
||||
}
|
||||
|
||||
void pop() {
|
||||
if (empty()) {
|
||||
throw std::runtime_error("Stack underflow");
|
||||
}
|
||||
container.popBack();
|
||||
}
|
||||
|
||||
T& top() {
|
||||
if (empty()) {
|
||||
throw std::runtime_error("Stack is empty");
|
||||
}
|
||||
return container[container.size() - 1];
|
||||
}
|
||||
|
||||
const T& top() const {
|
||||
if (empty()) {
|
||||
throw std::runtime_error("Stack is empty");
|
||||
}
|
||||
return container[container.size() - 1];
|
||||
}
|
||||
|
||||
bool empty() const { return container.empty(); }
|
||||
size_t size() const { return container.size(); }
|
||||
};
|
||||
|
||||
// Demonstration and testing
|
||||
int main() {
|
||||
std::cout << "=== Binary Search Tree Demo ===" << std::endl;
|
||||
|
||||
BinarySearchTree<int> bst;
|
||||
std::vector<int> values = {50, 30, 70, 20, 40, 60, 80, 10, 25, 35};
|
||||
|
||||
for (int val : values) {
|
||||
bst.insert(val);
|
||||
}
|
||||
|
||||
std::cout << "Tree size: " << bst.size() << std::endl;
|
||||
std::cout << "Inorder traversal: ";
|
||||
auto inorder = bst.inorderTraversal();
|
||||
for (size_t i = 0; i < inorder.size(); ++i) {
|
||||
std::cout << inorder[i];
|
||||
if (i < inorder.size() - 1) std::cout << ", ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << "\n=== Dynamic Array Demo ===" << std::endl;
|
||||
|
||||
DynamicArray<std::string> arr;
|
||||
arr.pushBack("Hello");
|
||||
arr.pushBack("World");
|
||||
arr.pushBack("C++");
|
||||
arr.pushBack("Templates");
|
||||
|
||||
std::cout << "Array contents: ";
|
||||
for (size_t i = 0; i < arr.size(); ++i) {
|
||||
std::cout << arr[i];
|
||||
if (i < arr.size() - 1) std::cout << ", ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
std::cout << "\n=== Stack Demo ===" << std::endl;
|
||||
|
||||
Stack<int> stack;
|
||||
for (int i = 1; i <= 5; ++i) {
|
||||
stack.push(i * 10);
|
||||
}
|
||||
|
||||
std::cout << "Stack contents (top to bottom): ";
|
||||
while (!stack.empty()) {
|
||||
std::cout << stack.top() << " ";
|
||||
stack.pop();
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
BIN
tests/data/functions/__pycache__/dump_json.cpython-310.pyc
Normal file
BIN
tests/data/functions/__pycache__/dump_json.cpython-310.pyc
Normal file
Binary file not shown.
16
tests/data/functions/dump_json.py
Normal file
16
tests/data/functions/dump_json.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
from letta.agent import Agent
|
||||
|
||||
|
||||
def dump_json(self: Agent, input: str) -> str:
|
||||
"""
|
||||
Dumps the content to JSON.
|
||||
|
||||
Args:
|
||||
input (dict): dictionary object to convert to a string
|
||||
|
||||
Returns:
|
||||
str: returns string version of the input
|
||||
"""
|
||||
return json.dumps(input)
|
||||
2431
tests/data/list_tools.json
Normal file
2431
tests/data/list_tools.json
Normal file
File diff suppressed because one or more lines are too long
412
tests/data/long_test.txt
Normal file
412
tests/data/long_test.txt
Normal file
@@ -0,0 +1,412 @@
|
||||
Enrico Letta (Italian: [enˈriːko ˈlɛtta]; born 20 August 1966) is an Italian politician who served as Prime Minister of Italy from April 2013 to February 2014, leading a grand coalition of centre-left and centre-right parties.[1] He was the leader of the Democratic Party (PD) from March 2021 to March 2023.[2]
|
||||
|
||||
After working as an academic, Letta entered politics in 1998 when he was appointed to the Cabinet as Minister for the Community Policies, a role he held until 1999 when he was promoted to become Minister of Industry, Commerce, and Crafts. In 2001, he left the Cabinet upon his election to the Chamber of Deputies. From 2006 to 2008, he was appointed Secretary of the Council of Ministers.[3] In 2007, Letta was one of the senior founding members of the Democratic Party, and in 2009 was elected as its Deputy Secretary.[4]
|
||||
|
||||
After the 2013 Italian general election produced an inconclusive result, and following negotiations between party leaders, President Giorgio Napolitano gave him the task of forming a national unity government (Letta Cabinet), composed of Letta's PD, the centre-right The People of Freedom (PdL), and the centrist Civic Choice, in order to mitigate the economic and social crises engulfing Italy as a result of the Great Recession. Following an agreement between parties, Letta resigned as PD Deputy Secretary and was appointed Prime Minister of Italy on 28 April 2013.[5][6] His government tried to promote economic recovery by securing a funding deal from the European Union to alleviate youth unemployment and abolished the party subsidies, something seen as a watershed moment for Italian politics, which for years had depended upon public funds.[7][8][9] Letta also faced the early stages of the 2015 European migrant crisis, including the 2013 Lampedusa migrant shipwreck, the deadliest shipwreck in the recent history of the Mediterranean Sea; in response, Letta implemented Operation Mare Nostrum to patrol the maritime borders and rescue migrants.[10]
|
||||
|
||||
In November 2013, PdL leader Silvio Berlusconi attempted to withdraw his party's support from the government in order to bring about a change of prime minister; in response, all of the cabinet's centre-right ministers chose to leave the PdL and formed a new party, saying they wished to continue supporting Letta. Despite securing his position, the election in December 2013 of Matteo Renzi as PD secretary brought significant leadership tensions within the PD to public view. After several weeks of denying that he would seek a change, Renzi publicly challenged Letta for the position of prime minister on 13 February 2014. Letta quickly lost the support of his colleagues and resigned as prime minister on 22 February.[11]
|
||||
|
||||
Following his resignation, Letta initially retired from politics, leaving Italy to accept appointment as dean of the School of International Affairs at Sciences Po in Paris.[12] In March 2021, the PD secretary Nicola Zingaretti resigned after growing tensions within the party.[13] Many prominent members of the party asked Letta to become the new leader; after a few days, Letta announced that he would return to Italy to accept the candidacy, and he was elected as new secretary by the national assembly on 14 March 2021.[14][15] On 4 October 2021, Letta was elected to the Chamber of Deputies for the Siena constituency.[16] He resigned on 20 December 2024.[17] to become Dean of IE University’s School of Politics, Economics and Global Affairs in Madrid, Spain.[18]
|
||||
|
||||
Early life and education
|
||||
Letta was born in Pisa, Tuscany, to Giorgio Letta, an Abruzzo-born professor of mathematics who taught probability theory at the University of Pisa, member of the Lincean Academy and of the National Academy of the Sciences, and Anna Banchi, born in Sassari and raised in Porto Torres of Tuscan and Sardinian origins.[19][20] Born into a numerous family, uncles on his father's side include the centre-right politician Gianni Letta, a close advisor of Silvio Berlusconi, and the archaeologist Cesare Letta, while one of his paternal aunts, Maria Teresa Letta, served as vice president of the Italian Red Cross;[19] a maternal great-uncle is the poet and playwright Gian Paolo Bazzoni.[20]
|
||||
|
||||
After spending part of his childhood in Strasbourg,[21] Letta completed his schooling in Italy at the liceo classico Galileo Galilei in Pisa.[22] He has a degree in political science, which he received from the University of Pisa and subsequently obtained a PhD at the Sant'Anna School of Advanced Studies, a Graduate School with university status.[23][n 1]
|
||||
|
||||
From 2001 to 2003, Letta was professor at the University Carlo Cattaneo near Varese, and then he taught at the Sant'Anna School in Pisa in 2003 and at the HEC Paris in 2004.[25]
|
||||
|
||||
Political career
|
||||
|
||||
Letta in 2001
|
||||
This article is part of
|
||||
a series about
|
||||
Enrico Letta
|
||||
Political positions
|
||||
Minister for the Community Policies (1998–99)
|
||||
Minister of Industry (1999–2001)
|
||||
Prime Minister of Italy (2013–14)
|
||||
Democratic Party Secretary (2021–present)
|
||||
Political career
|
||||
2007 leadership electionLettiani360 Association
|
||||
Prime Minister of Italy
|
||||
2013 electionLetta CabinetGrand coalitionEuropean debt crisisMigrant crisis2013 Lampedusa shipwreckOperation Mare NostrumResignation
|
||||
Secretary of the Democratic Party
|
||||
Leadership2021 by-election2022 presidential election2022 government crisis2022 general election
|
||||
Academic career
|
||||
Sciences PoJacques Delors Institute
|
||||
|
||||
vte
|
||||
Letta, a Catholic,[26] began his political career in the Christian Democracy (DC),[27] the dominant centrist and Roman Catholic party, which ruled Italy for almost fifty years. From 1991 to 1995, Letta was president of the Youth of the European People's Party,[23] the official youth wing of the European People's Party, a European political party founded by national-level Christian democratic parties, including the Italian DC; he used his presidency to help strengthen long-term connections among a variety of centrist parties in Europe, and has since remained a convinced supporter of the European Union and European integration.[28][29]
|
||||
|
||||
During the Ciampi Cabinet headed by Carlo Azeglio Ciampi in 1993 and 1994, Letta worked as chief of staff for the minister of foreign affairs, Beniamino Andreatta; Andreatta, a left-leaning Christian Democrat economist with whom Letta had already been collaborating in a think tank known as Agenzia di Ricerche e Legislazione (AREL), played a highly influential role in Letta's political career.[23][28]
|
||||
|
||||
Following the collapse of the DC in 1994, Letta joined its immediate successor, the Italian People's Party (PPI); after serving as secretary general of the Euro Committee within the Ministry of Treasury from 1996 to 1997, he became deputy secretary of the party in 1997 and 1998, when it was fully allied with the centre-left.[30] In 1998, after the fall of Romano Prodi's first government, Letta was appointed Minister for the Community Policies in cabinet of Massimo D'Alema at the age of 32, becoming the youngest cabinet minister in post-war Italy.[27]
|
||||
|
||||
In 1999, Letta became Minister of Industry, Commerce and Crafts in the second government of D'Alema; a position that he held until 2001, serving also in the cabinet of Giuliano Amato.[31] During Amato's government he held the role of Minister of Foreign Trade too.[32]
|
||||
|
||||
In the 2001 Italian general election, Letta was elected to the Chamber of Deputies as a member of Democracy is Freedom – The Daisy, a newly formed centrist formation to which the Italian People's Party had joined.[30][33] In the following year, he was appointed national responsible for the economic policies of The Daisy.[34]
|
||||
|
||||
In 2004, Letta was elected member of the European Parliament, with nearly 179,000 votes, within The Olive Tree list,[35] joining the Alliance of Liberals and Democrats for Europe (ALDE) group. As MEP he became a member of the Committee on Economic and Monetary Affairs.[36] Letta served also in the committee for relations with the Maghreb countries and the Arab Maghreb Union.[37]
|
||||
|
||||
In 2006, Letta was re-elected to the Chamber of Deputies and was appointed Secretary of the Council of Ministers in the second government of Romano Prodi, thereby succeeding his uncle Gianni Letta who had held the same position in the outgoing cabinet of Silvio Berlusconi. In this post, he became the closest advisor of Prime Minister Prodi, becoming one of the most influential politicians within the government. However, Prodi's government fell after only two years following tensions within its majority caused by the resignation of the Minister of Justice, Clemente Mastella.[38][39] Following the 2008 Italian general election, which saw a victory of the centre-right, Letta returned the post to his uncle, when the Berlusconi IV Cabinet was sworn in.[28][29]
|
||||
|
||||
Leadership election candidacy
|
||||
Main article: 2007 Democratic Party (Italy) leadership election
|
||||
In 2007, together with other The Daisy's members, Letta joined the Democratic Party (PD), the new centre-left party, born from the union between The Daisy and the Democrats of the Left.[40][41] Having been a founding member of the party, Letta run in the first leadership election, which was held as an open primary. He announced his candidacy in July 2007 through a YouTube video.[42] A few weeks after the announcement, he compared the PD to Wikipedia, stating: "As in Wikipedia, even in the PD each of the hundreds of thousands of members must bring their own contributions, their own skills, which in certain fields are certainly more important than mine and those of the other leaders of the centre-left."[43] In support of his candidacy, Letta founded the 360 Association, a centrist and Christian leftist group, mainly composed by former members of The Daisy.[44][45]
|
||||
|
||||
Letta's candidacy was supported by prominent members of the Italian centre-left, like Francesco Cossiga, Paolo De Castro, Gianni Pittella, Vito De Filippo and many other former members of The Daisy.[46] Moreover, Letta's faction was composed by politicians considered close to Prime Minister Romano Prodi, a Christian leftist professor and founding father of the Italian centre-left.[47][48] However, Letta had to face the politician who, more than any other, had worked to the formation of the Democratic Party and who was unanimously considered the future leader of the centre-left, Walter Veltroni, the incumbent Mayor of Rome.[49] In the primary election, Veltroni won by a landslide with 75.8% of votes, followed by the former Minister of Health Rosy Bindi with 12.9% and Letta with 11.0%.[50]
|
||||
|
||||
After the primary election, Veltroni appointed Letta as the national responsible for labour. In May 2008, after the defeat in the 2008 election, Letta was appointed Shadow Minister of Labour and Social Policies in the second and last Shadow Cabinet formed in Italy.[51]
|
||||
|
||||
Deputy Secretary of the Democratic Party
|
||||
|
||||
Letta during a convention of his 360 Association in 2012
|
||||
During the leadership election of 2009, Letta supported the eventual winner, the social-democrat Pier Luigi Bersani, being appointed Deputy Secretary by the party's national convention.[52]
|
||||
|
||||
In June 2010, Letta organized a three-day meeting in Verona, during which he met, within its association, entrepreneurs and key leaders of Lega Nord, the largest party in Veneto and eastern Lombardy.[53][54] An opinion poll among northern Democrats, released during the "Nord Camp", showed that they were keener on an alliance with Lega Nord than Berlusconi's The People of Freedom.[55] Letta was praised both by Roberto Maroni and Umberto Bossi.[56]
|
||||
|
||||
In the 2013 Italian general election, the centre-left alliance Italy Common Good led by Bersani won a clear majority of seats in the Chamber of Deputies, thanks to a majority bonus that has effectively trebled the number of seats assigned to the winning party, while in the popular vote, it narrowly defeated the centre-right alliance of former prime minister Berlusconi. Close behind, the new anti-establishment Five Star Movement of comedian Beppe Grillo became the third-strongest force, clearly ahead of the centrist coalition of outgoing Prime Minister Mario Monti. In the Senate, no political group or party won an outright majority, resulting in a hung parliament.[57][58]
|
||||
|
||||
On 20 April 2013, when Bersani resigned as Secretary after the candidates for President of the Republic Franco Marini and Romano Prodi were defeated in the presidential election, the whole leadership of the PD, including Deputy Secretary Letta, resigned their positions.
|
||||
|
||||
Prime Minister of Italy
|
||||
Main article: Letta Cabinet
|
||||
Government formation
|
||||
Following five inconclusive ballots for the 2013 Italian presidential election, incumbent president Giorgio Napolitano accepted to be re-elected at the Quirinal Palace.[59] Eventually, Napolitano reluctantly agreed to serve for another term in order to safeguard the continuity of the country's institutions.[60][61] Napolitano was easily re-elected on 20 April 2013, receiving 738 of the 1007 possible votes, and was sworn in on 22 April 2013 after a speech when he asked for constitutional and electoral reforms.[62]
|
||||
|
||||
|
||||
Letta with President Giorgio Napolitano in Rome, 2013
|
||||
After his re-election, Napolitano immediately began consultations with the chairmen of the Chamber of Deputies, Senate and political forces, after the failure of the previous attempt with Bersani, and the establishment of a panel of experts by the President himself (dubbed as wise men by the press), in order to outline priorities and formulate an agenda to deal with the persistent economic hardship and growing unemployment. On 24 April 2013, Enrico Letta was invited to form a government by President Napolitano, following weeks of political deadlock.[63]
|
||||
|
||||
On 27 April, Letta formally accepted the task of leading a grand coalition government, with support from the centre-left Democratic Party, the centre-right People of Freedom (PdL) of Silvio Berlusconi and the centrist Civic Choice of outgoing PM Mario Monti. The government he formed became the first in the history of the Italian Republic to include representatives of all the major coalitions that had run in the latest election. His close relationship with his uncle, Gianni Letta, one of Berlusconi's most trusted advisors, was perceived as a way of overcoming the bitter hostility between the two opposing factions.[21][64] Letta appointed Angelino Alfano, secretary of the People of Freedom, as his Deputy Prime Minister. The new government was formally sworn-in as on 28 April.[65] During the swearing ceremony, a man fired gunshots outside Chigi Palace and wounded two Carabinieri.[66] The attacker, Luigi Preiti, was stopped and arrested; he declared that he wanted to kill politicians or at least to hit a "symbol of politics" and that he was forced by despair being unemployed and recently divorced.[67]
|
||||
|
||||
On 29 April, Letta's government won the confidence vote in the Chamber with 453 votes in favour, 152 against and 17 abstentions.[68] On the following day, he won the confidence vote in Senate too, with 233 votes in favour, 59 against 18 abstentions.[69] In his first speech in front of the Parliament, Letta stressed "necessity to restore decency, sobriety and a sense of honour"; he also advocated for a reduction of politics' costs.[70]
|
||||
|
||||
Economic policies
|
||||
|
||||
Prime Minister Letta in 2013
|
||||
During his premiership, Letta had to face a serious socio-economic crisis caused by the Great Recession and the subsequent European debt crisis. In 2013, one of the major problems of the country was the huge youth unemployment, which was valued around 40%.[71] To face this issue, on 14 June 2013, Letta scheduled a summit at Chigi Palace with the ministers of the economy, finance and labour of Italy, Germany, France and Spain, to agree on common EU policies for reducing unemployment.[8] After a few weeks, during a press conference at the conclusion of the Council of the European Union in Brussels, Letta announced that Italy would receive 1.5 billion euros in EU funds to fight youth unemployment.[9]
|
||||
|
||||
On 31 May, the Council of Ministers resolved to sponsor a bill to abolish party subsidies, which was widely considered a revolution in Italian politics and political parties, which heavily depended on public funds.[7] On 4 June, Letta, within his Minister of Economic Development, Flavio Zanonato and his Minister of the Environment, Andrea Orlando, announced the receivership of Ilva, one of the largest steel makers in Europe, for a duration of 36 months, appointing Enrico Bondi as receiver.[72]
|
||||
|
||||
On 15 June, the government approved the so-called "Action Decree" on hiring policies enabling economic recovery.[73] The decree was later approved by the Parliament between July and August 2013 with a confidence vote. The reform was harshly criticized by the anti-establishment Five Star Movement.[74] On 29 August, the government abolished IMU, the Italian tax on real estate introduced by the technocratic government of Mario Monti, for primary homes and for farm buildings .[75]
|
||||
|
||||
Immigration policies
|
||||
See also: Operation Mare Nostrum
|
||||
As a result of the Libyan and Syrian Civil Wars, a major problem faced by Letta upon becoming prime minister in 2013 was the high levels of illegal immigration to Italy.[76]
|
||||
|
||||
On 3 October 2013, a boat carrying migrants from Libya to Italy sank off the Italian island of Lampedusa. It was reported that the boat had sailed from Misrata, Libya, but that many of the migrants were originally from Eritrea, Somalia and Ghana.[77][78][79] An emergency response involving the Italian Coast Guard resulted in the rescue of 155 survivors.[78] On 12 October it was reported that the confirmed death toll after searching the boat was 359, but that further bodies were still missing;[80] a figure of "more than 360" deaths was later reported, becoming the deadliest shipwreck occurred in the Mediterranean Sea.[81]
|
||||
|
||||
After the Lampedusa tragedy, Prime Minister Letta decided to strengthen the national patrolling of Sicilian channel by authorizing Operation Mare Nostrum, a military and humanitarian operation whose purpose was to patrol the maritime border and provide relief to migrants. This operation had two main purposes: to safeguard life at sea and to combat the illegal smuggling of migrants.[82] The operation brought at least 150,000 migrants to Europe, mainly from Africa and the Middle East.[83] The operation ended a few months after the end of his premiership, on 31 October 2014.[84]
|
||||
|
||||
Foreign policies
|
||||
|
||||
Letta with the U.S. President Barack Obama in the Oval Office
|
||||
A strong pro-Europeanist politician, Letta built up close relations with other prominent European leaders like Angela Merkel, who was the first foreign leader he met, just a few days after his sworn in, on 30 April.[85] Letta also built a warm relationship with the French President François Hollande, with whom he shared a common view on austerity policies, considered outdated to face the economic crisis; Letta and Hollande often stressed the necessity to increase the public expenditures in investments.[86]
|
||||
|
||||
On 17 and 18 June, Letta participated in his first G8 summit at Lough Erne in Northern Ireland.[87] During the summit, Letta had his first bilateral meeting with the President of the United States, Barack Obama. On 17 October, Letta was invited to the White House by President Obama, who stated that he had been really impressed by the Italian Prime Minister and his reforms plan.[88]
|
||||
|
||||
On 5 and 6 September, Letta took part in the G20 summit in Saint Petersburg. The summit was focused on the aftermath of the Syrian civil war. Letta advocated for a diplomatic resolution of the crisis promoted by the United Nations.[89] On 25 September, during his speech in front of the United Nations General Assembly, Letta asked a deep reform of the UN Security Council.[90]
|
||||
|
||||
September 2013 government crisis
|
||||
On 28 September 2013, five ministers of The People of Freedom resigned on the orders of their leader, Silvio Berlusconi, pointing to the decision to postpone the decree that prevented the increase of the VAT from 21 to 22%, thus opening a government crisis.[91] On the following day, Letta had a meeting with President Napolitano to discuss the possible alternatives to solve the crisis. The head of State stressed that he would dissolve parliament only if there were no other possible alternatives.[92]
|
||||
|
||||
|
||||
Letta with Angelino Alfano and Giorgio Napolitano in December 2013
|
||||
In the following days, dozens of members of PdL prepared to defy Berlusconi and vote in favour of the government, prompting him to announce that he would back the Prime Minister.[93][94][95] On 2 October, the government received 235 votes in favor and 70 against in the Senate, and 435 in favor and 162 against in the Chamber of Deputies.[96][97] Letta could thus continue his grand coalition government.[98]
|
||||
|
||||
On 23 November, the Senate had to vote about the expulsion of Berlusconi from the Parliament, due to a conviction of tax fraud by the court of final instance and the Court of Cassation, which occurred a few months before.[99] Because he had been sentenced to a gross imprisonment for more than two years, the Senate voted to expel him from the Parliament, barring him from serving in any legislative office for six years.[100][101]
|
||||
|
||||
After his expulsion from the Parliament, Berlusconi, who disbanded the PdL a few days before re-founding Forza Italia party, withdrew his support to the government. However, the interior minister Angelino Alfano did not follow his former leader, founding, along with other ministers and many members of the parliament, the New Centre-Right party, remaining in government.[102] The government later won key confidence votes in December 2013, with 173 votes in favour in the Senate and 350 in the Chamber.[103]
|
||||
|
||||
On 26 January 2014, the Minister of Agriculture, Nunzia De Girolamo, resigned from her post due to claims of improper conduct linked to a scandal in the local healthcare system of her hometown, Benevento.[104][105] Her resignation was accepted by Letta on the following day, who took the ministerial role ad interim.[106]
|
||||
|
||||
Resignation
|
||||
On 8 December 2013, the Mayor of Florence, Matteo Renzi, won the Democratic Party leadership election by a landslide, immediately starting rumours about the possibility of becoming the new prime minister.[107] On 17 January 2014, while on air at Le invasioni barbariche on La7 TV channel, interviewed about tensions between him and Prime Minister Letta, Renzi tweeted the hashtag #enricostaisereno ("Enrico don't worry") to reassure his party colleague that he was not plotting anything against him.[108]
|
||||
|
||||
|
||||
Letta with Matteo Renzi and President Napolitano in October 2013
|
||||
The growing criticism of the slow pace of Italian economic reform left Letta increasingly isolated within his own party.[109] At a PD's meeting on 13 February 2014, the Democratic Party leadership voted heavily in favour of Renzi's motion for "a new government, a new phase and a radical programme of reforms". Minutes after the party backed Renzi's proposal by 136 votes to 16, with two abstentions, Letta went to the Quirinal Palace, for a bilateral meeting with President Napolitano.[11]
|
||||
|
||||
In an earlier speech, Renzi had paid tribute to Letta, saying that he did not intend to put him "on trial". But, without directly proposing himself as the next prime minister, he said the Eurozone's third-largest economy urgently needed "a new phase" and "radical programme" to push through badly-needed reforms. The motion he put forward made clear "the necessity and urgency of opening a new phase with a new executive". Speaking privately to party leaders, Renzi said that Italy was "at a crossroads" and faced either holding fresh elections or a new government without a return to the polls.[110]
|
||||
|
||||
On 14 February, Letta resigned from the office of prime minister.[111] Following Letta's resignation, Renzi received the task of forming a new government from President Napolitano on 17 February,[112] and was formally sworn in as prime minister on 22 February.[113]
|
||||
|
||||
Academic career
|
||||
|
||||
Letta speaking at the Jacques Delors Institute in 2016
|
||||
In 2015, Letta resigned as a member of the Chamber of Deputies, after having voted against the new electoral law proposed by Prime Minister Renzi; at the same time, he announced that he would not renew the PD's membership.[114]
|
||||
|
||||
In April 2015, Letta moved to Paris to teach at the Sciences Po, a higher education institute of political science. Since 1 September, he became dean of the Paris School of International Affairs (PSIA) of the same institute.[115] Along with his commitment to Sciences Po, he also had teaching periods at the University of Technology Sydney and the School of Global Policy and Strategy at the University of California, San Diego. In the same year, Letta launched Scuola di Politiche (School of Politics), a course of political science for young Italians.[116]
|
||||
|
||||
In 2016, Letta supported the constitutional reform proposed by Renzi to reduce the powers of the Senate.[117] In the same year, along with the Jacques Delors Institute, he launched a school of political science focused on European issues, known as Académie Notre Europe.[118] In October 2017, he joined the new Comitè Action Publique 2022, a public commission for the reform of state and public administration in France which was strongly supported by President Emmanuel Macron.[119]
|
||||
|
||||
|
||||
Letta with François Hollande and Jean-Claude Juncker in 2016
|
||||
In March 2019, following the victory of Nicola Zingaretti in the PD leadership election, Letta announced that he would re-join the party after four years.[120] In the same year, Letta also served on the advisory board of the annual Human Development Report of the United Nations Development Programme (UNDP), co-chaired by Thomas Piketty and Tharman Shanmugaratnam.[121] In 2020, he spoke in favour of the constitutional reform to reduce the number of MPs, considering it the first step to overcome perfect bicameralism.[122]
|
||||
|
||||
Following his retirement from politics, Letta became advisor of many corporations and international organizations like Abertis, where he became member of the Board of Directors in 2016,[123][124] Amundi, in which he served as member of the Global Advisory Board since 2016,[125] the Eurasia Group, of which he has been Senior Advisor since 2016,[126] Publicis, where he served within the International Advisory Board since 2019[127] and Tikehau Capital, of which he became member of the International Advisory Board.[128]
|
||||
|
||||
Letta is a member of many no-profit organizations like the International Gender Champions (IGC),[129] the British Council, Re-Imagine Europa,[130] the Trilateral Commission, in which he presided the European Group,[131] the Aspen Institute Italia, in which he served in the Executive Committee,[132] Associazione Italia ASEAN, of which he became chairman[133] and the Institut de Prospective Economique du Monde Méditerranéen (IPEMED).[134].
|
||||
|
||||
Letta was appointed Dean of IE School of Politics, Economics and Global Affairs. Letta will replace Manuel Muñiz, the current Provost of IE University and Charmain of the Board of IE New York College. He will join IE University on November 20.[135]
|
||||
|
||||
Secretary of the Democratic Party
|
||||
|
||||
Letta speaking at the European Parliament during the memorial for David Sassoli, in January 2022
|
||||
In January 2021, after the government crisis which forced Prime Minister Giuseppe Conte to resign, a national unity government led by Mario Draghi was formed.[136] In the midst of the formation of Draghi's government, Zingaretti was heavily criticized by the party's minority for his management of the crisis and strenuous support to Conte. On 4 March, after weeks of internal turmoil, Zingaretti announced his resignation as secretary, stating that he was "ashamed of the power struggles" within the party.[137]
|
||||
|
||||
In the next days, many prominent members of the PD, including Zingaretti himself, but also former prime minister Paolo Gentiloni, former party secretary Dario Franceschini and President of Emilia-Romagna Stefano Bonaccini, publicly asked former Letta to become the new leader of the party.[138][139] Following an initial reluctance, Letta stated that he needed a few days to evaluate the option.[140] On 12 March, he officially accepted his candidacy as new party's leader.[141][142] On 14 March, the national assembly of the PD elected Letta secretary with 860 votes in favour, 2 against and 4 abstentions.[143][144]
|
||||
|
||||
On 17 March, Letta appointed Peppe Provenzano and Irene Tinagli as his deputy secretaries.[145] On the following day, he appointed the party's new executive, composed of eight men and eight women.[146] Later that month, Letta forced the two Democratic leaders in Parliament, Graziano Delrio and Andrea Marcucci, to resign and proposed the election of two female leaders.[147] On 25 and 30 March, senators and deputies elected Simona Malpezzi and Debora Serracchiani as their leaders in the Senate and in the Chamber.[148][149]
|
||||
|
||||
|
||||
Letta with Giuseppe Conte and the Finnish PM Sanna Marin in 2022
|
||||
In July 2021, Letta announced his intention to run for the Chamber of Deputies in the Siena constituency, which remained vacant after the resignation of Pier Carlo Padoan. On 4 October, Letta won the by-election with 49.9% of votes, returning to the Parliament after six years.[150] In the concurrent local elections, the PD and its allies won municipal elections in Milan, Bologna, Naples, Rome, Turin and many other major cities across the country.[151]
|
||||
|
||||
As leader of the third political force in the parliament, Letta played an important role in the re-election of incumbent president Sergio Mattarella. On 23 January 2022, during Fabio Fazio's talk show Che tempo che fa, Letta stated that his favourable candidates for the presidency were Mario Draghi and Sergio Mattarella.[152] On the morning of 29 January, after the fall of all other possible candidacies, Letta asked the other leaders to follow "the Parliament's wisdom", referring to the massive support that Mattarella had received in the previous ballots.[153] On the same day, all the main parties asked Mattarella to serve for a second term. Despite his initial firm denial, Mattarella accepted the nomination[154] and was re-elected with 759 votes.[155]
|
||||
|
||||
In July 2022, tensions arose within the governing majority, especially between Giuseppe Conte, leader of the Five Star Movement, and Prime Minister Draghi. Letta, who was trying to form a broad centre-left coalition with the M5S in the following election, was particularly critical of the possibility of a government crisis.[156] On 13 July, Conte announced that the M5S would revoke its support to the national unity government regarding the so-called decreto aiuti (English: aid decree), concerning economic stimulus to contrast the ongoing energy crisis, opening a political crisis within the majority.[157] On the following day, the M5S abstained and Prime Minister Draghi, despite having won the confidence vote, resigned.[158] However, the resignation was rejected by President Mattarella.[159] On the same day, Letta stressed that a government crisis needed to be officially opened in the Parliament, adding that "Italy deserved to stand with a strong personality like that of PM Draghi and the team that was around him."[160] However, on 21 July, Draghi resigned again after a new confidence vote in the Senate failed to pass with an absolute majority, following the defections of M5S, Lega, and Forza Italia;[161][162] A snap election was called for 25 September 2022.[163]
|
||||
|
||||
After the 2022 general election, Enrico Letta conceded defeat and announced that he would not stand at the congress to elect the new party secretary.[164][165][166][167] He was succeeded by Elly Schlein, following the election on 26 February 2023.[168]
|
||||
|
||||
Personal life
|
||||
Letta is married to Gianna Fregonara, an Italian journalist, with whom he had three children, Giacomo, Lorenzo and Francesco.[169]
|
||||
|
||||
Letta is known to be fond of listening to Dire Straits and playing Subbuteo;[170] he is also an avid supporter of A.C. Milan.[171] In addition to his native Italian, Letta speaks French and English fluently.[29]
|
||||
|
||||
Electoral history
|
||||
Election House Constituency Party Votes Result
|
||||
2001 Chamber of Deputies Piedmont 1 DL –[a] check Elected
|
||||
2004 European Parliament North-East Italy Ulivo 178,707 check Elected
|
||||
2006 Chamber of Deputies Lombardy 1 Ulivo –[a] check Elected
|
||||
2008 Chamber of Deputies Lombardy 2 PD –[a] check Elected
|
||||
2013 Chamber of Deputies Marche PD –[a] check Elected
|
||||
2021 Chamber of Deputies Siena PD 33,391 check Elected
|
||||
2022 Chamber of Deputies Lombardy 1 PD –[a] check Elected
|
||||
Elected in a closed list proportional representation system.
|
||||
First-past-the-post elections
|
||||
2021 Italian by-election (C): Siena
|
||||
Candidate Party Votes %
|
||||
Enrico Letta Centre-left coalition 33,391 49.9
|
||||
Tommaso Marrocchesi Marzi Centre-right coalition 25,303 37.8
|
||||
Others 8,191 12.3
|
||||
Total 66,885 100.0
|
||||
References
|
||||
Quirinale, il governo di Letta giura davanti a Napolitano, Il Fatto Quotidiano
|
||||
Letta eletto segretario: "Serve un nuovo Pd aperto, non partito del potere", Sky Tg24
|
||||
Enrico Letta, Enciclopedia Treccani
|
||||
Italian Parliament Website LETTA Enrico – PD Retrieved 24 April 2013
|
||||
Nuovo governo, incarico a Enrico Letta. Napolitano: "I media cooperino", Il Fatto Quotidiano
|
||||
"Letta: Grande coalizione, bisogna farsene una ragione". Archived from the original on 8 October 2016. Retrieved 28 January 2019.
|
||||
Tre canali di finanziamento, più trasparenza. Ecco punto per punto il ddl del governo, Corriere della Sera
|
||||
Vertice lavoro, Letta ai ministri europei: «Non c'è più tempo, si deve agire subito Scelta sciagurata guardare solo i conti» – Il Messaggero Archived 16 June 2013 at the Wayback Machine. Ilmessaggero.it. Retrieved on 24 August 2013.
|
||||
Letta: all'Italia 1,5 miliardi per il lavoro. Grillo «poteva mandare tutto in vacca», Corriere della Sera
|
||||
Letta: perché difendo Mare Nostrum, Avvenire
|
||||
"Letta al Quirinale, si è dimesso – Top News". Retrieved 12 July 2016.
|
||||
Enrico Letta, Sciences Po
|
||||
Pd, Zingaretti si dimette. Dice addio il decimo segretario in 14 anni, Il Sole 24 Ore
|
||||
Letta, il giorno della scelta. Zingaretti: rilancerà il Pd, il manifesto
|
||||
Letta: "Non vi serve un nuovo segretario, ma un nuovo Pd", Huffington Post
|
||||
Elezioni suppletive Siena: vince Letta, La Stampa
|
||||
https://www.ansa.it/sito/notizie/politica/2024/12/20/in-aula-alla-camera-si-votano-le-dimissioni-di-enrico-letta_7a395834-ba1c-4567-bcfe-b3e3f499f045.html
|
||||
Popova, Maria (1 October 2024). "Enrico Letta, new dean of the Faculty of Politics and Economics of the IE University of Segovia". Top Buzz Times. Retrieved 2 October 2024.
|
||||
Motta, Nino (2 February 2013). "Un Letta per ogni stagione". Il Centro.
|
||||
"Gli zii di Enrico Letta. Non solo Gianni: c'è anche Gian Paolo Bazzoni a Porto Torres". Sardinia Post. 25 April 2013. Retrieved 2 June 2013.
|
||||
Winfield, Nicole (24 April 2013). "Enrico Letta Appointed Italian Prime Minister, Asked To Form Government". The Huffington Post. Retrieved 4 May 2013.
|
||||
Letta, Enrico (2013). "Curriculum Vitae" (PDF). Archived from the original (PDF) on 11 June 2013. Retrieved 3 June 2013.
|
||||
"Enrico Letta: la bio del giovane dalla grande esperienza". Huffington Post (in Italian). 24 August 2013. Retrieved 3 June 2013.
|
||||
"Su esecutivo marchio scuola Sant'Anna: Pisa Letta si e' specializzato, Carrozza e' stato rettore" (in Italian). ANSA. 27 April 2013. Retrieved 11 June 2013.
|
||||
Governo. Enrico Letta, l’allievo di Andreatta diventa presidente del Consiglio, Il Giornale
|
||||
Enrico Marro (24 April 2013). "Chi è Enrico Letta? Quel giovane cattolico moderato, con agganci in tutto il Transatlantico. Nipote di Gianni. E fan di Mandela". Il Sole-24 Ore (in Italian). Milan. Retrieved 6 December 2022.
|
||||
"Profile: Enrico Letta". BBC News. 24 April 2013. Retrieved 3 June 2013.
|
||||
Povoledo, Elisabetta (28 April 2013). "An Italian Leader and a Political Acrobat". The New York Times. Retrieved 3 June 2013.
|
||||
Dinmore, Guy (24 April 2013). "Italy's Enrico Letta a party loyalist and bridge-builder". Financial Times.
|
||||
Sachelli, Orlando (24 April 2013). "Enrico Letta, il giovane Dc che deve far da paciere tra Pd e Pdl". Il Giornale (in Italian). Retrieved 7 June 2013.
|
||||
Enrico Letta, Il Sole 24 Ore
|
||||
DDL presentati dal Ministero del commercio con l'estero (Governo Amato-II), Parlamento
|
||||
"Pisano, milanista, baby-ministro. Ecco chi è Enrico Letta, l'eterno "giovane" del Pd". Libero (in Italian). 24 April 2013.
|
||||
Enrico Letta, Biografie Online
|
||||
Elezioni Europee del 2004. Circoscrizione Italia Nord-Orientale, Dipartimento per gli Affari Interni
|
||||
"European Parliament Website". European Parliament. Retrieved 7 May 2013.
|
||||
Members of the European Parliament, European Parliament
|
||||
"Mastella to Drop Support for Prodi, Favors Elections", Bloomberg, 21 January 2008.
|
||||
"Italy PM in cabinet crisis talks", BBC News, 21 January 2008.
|
||||
Vespa, Bruno (2010). Il Cuore e la Spada: Storia politica e romantica dell'Italia unita, 1861–2011. Mondadori. p. 650. ISBN 9788852017285.
|
||||
Augusto, Giuliano (8 December 2013), "De profundis per il Pd", Rinascita, archived from the original on 1 March 2014
|
||||
Pd: Letta: «Mi candido». Video sul web, Corriere della Sera
|
||||
Letta leader? Senza grinta, Il Fatto Quotidiano
|
||||
"Associazione 360". Archived from the original on 20 June 2008. Retrieved 3 July 2008.
|
||||
"Noi". Associazione Trecento Sessanta. Archived from the original on 14 March 2010. Retrieved 10 March 2010.
|
||||
De Castro: "Candidatura di Letta grande occasione per coinvolgere la società Archived 27 September 2007 at the Wayback Machine, Enrico Letta
|
||||
"DemocraticiPerLetta.info – Home". Archived from the original on 6 October 2008. Retrieved 3 July 2008.
|
||||
"cantieredemocratico.it – - Notizie: Pd: per Veltroni tre liste nazionali". Archived from the original on 7 January 2009. Retrieved 3 July 2008.
|
||||
"Rome Mayor Set to Win Left's Leadership". Associated Press. 14 October 2007. Retrieved 15 October 2007.[permanent dead link]
|
||||
"Veltroni stravince con il 76% ma è la festa dei cittadini elettori". la Repubblica (in Italian). 14 October 2007.
|
||||
Partito Democratico Archived 2008-04-30 at the Wayback Machine
|
||||
"Pd, Bersani indica la rotta "Noi, partito dell'alternativa"". Quotidiano.net (in Italian). 9 September 2009. Retrieved 26 April 2013.
|
||||
"Il Pd "sale" al Nord. E dialoga con Maroni". Archiviostorico.corriere.it. Retrieved 17 July 2014.
|
||||
"Letta accoglie Maroni "Con la Lega si deve parlare"". Archiviostorico.corriere.it. Retrieved 17 July 2014.
|
||||
"L' elettore del Nord: il Pdl? Meglio allearsi con la Lega". Archiviostorico.corriere.it. Retrieved 17 July 2014.
|
||||
"Bossi loda Letta: giusto il dialogo sa che con noi si vince alle urne". Archiviostorico.corriere.it. Retrieved 17 July 2014.
|
||||
"Italian election results: gridlock likely – as it happened". The Guardian. 26 February 2013. Retrieved 27 February 2013.
|
||||
"Italy struggles with 'nightmare' election result". BBC News. 26 February 2013. Retrieved 27 February 2013.
|
||||
"Italy crisis: President Giorgio Napolitano re-elected". BBC News. 20 April 2013. Retrieved 20 April 2013.
|
||||
Mackenzie, James (20 April 2013). "Giorgio Napolitano, Italy's reluctant president". Bloomberg L.P. Retrieved 21 April 2013.
|
||||
Napolitano, Giorgio; Scalfari, Eugenio (9 June 2013). "Napolitano si racconta a Scalfari: 'La mia vita, da comunista a Presidente'" (Video, at 59 min). La Repubblica (in Italian). Retrieved 9 June 2013.
|
||||
The critical findings on electoral law echoed in the words that the head of state gave 22 April 2013 before the Electoral College that had re-elected him for a second term: Buonomo, Giampiero (2013). "Porcellum, premio di maggioranza a rischio". Golem Informazione. Archived from the original on 11 December 2019. Retrieved 11 March 2021.
|
||||
Frye, Andrew (24 April 2013). "Letta Named Italian Prime Minister as Impasse Ends". Bloomberg. Retrieved 26 April 2013.
|
||||
"Bridge-builder Enrico Letta seals Silvio Berlusconi deal". The Australian. 29 April 2013. Retrieved 8 June 2013.
|
||||
Nasce il governo Letta, ora la fiducia. Il premier: «Sobria soddisfazione», Corriere della Sera
|
||||
"New Italian 'grand coalition' government sworn in". BBC News. 28 April 2013. Retrieved 28 April 2013.
|
||||
Sparatoria Palazzo Chigi: due carabinieri feriti. L’attentatore: "Puntavo ai politici", Il Fatto Quotidiano
|
||||
Letta: «Abbiamo un'ultima possibilità. Basta debiti scaricati sulle future generazioni», Corriere della Sera
|
||||
Governo Letta, fiducia anche al Senato, Corriere della Sera
|
||||
Governo Letta, fiducia alla Camera: 453 sì, 153 no. Si astiene la Lega, Il Fatto Quotidiano
|
||||
Disoccupazione giovanile, Bce: "Nel 2013 in Italia è arrivata vicina al 40%", Il Fatto Quotidiano
|
||||
Ilva, firmato il decreto: Enrico Bondi commissario per 36 mesi, Il Fatto Quotidiano
|
||||
Il Decreto del fare, misura per misura – Europa Quotidiano Archived 19 June 2013 at the Wayback Machine. Europaquotidiano.it (16 June 2013). Retrieved on 24 August 2013.
|
||||
La Camera approva il «decreto del fare», Corriere della Sera
|
||||
Abolizione IMU 2013, ecco cosa cambia per "prima casa", edilizia e terreni agricoli, EdilTecnico
|
||||
Letta da Malta: " Orgoglio per l'operazione Mare Nostrum", Rai News
|
||||
Pianigiani, Gaia (3 October 2013). "Scores of Migrants Dead After Boat Sinks Off Sicily". The New York Times. Siracusa. Retrieved 3 October 2013.
|
||||
"Dozens of migrants die in Italy boat sinking near Lampedusa". BBC News. 3 October 2013. Retrieved 3 October 2013.
|
||||
"Witness: Boat migrants used bottles to stay afloat". USA Today. 4 October 2013. Retrieved 4 October 2013.
|
||||
"Mediterranean 'a cemetery' – Maltese PM Muscat". BBC News. 12 October 2013. Retrieved 12 October 2013.
|
||||
"Lampedusa boat tragedy: Migrants 'raped and tortured'". BBC News. 8 November 2013. Retrieved 8 November 2013.
|
||||
"Mare Nostrum Operation". Ministry of Defence of Italy. Retrieved 16 April 2015.
|
||||
"IOM Applauds Italy's Life-Saving Mare Nostrum Operation: "Not a Migrant Pull Factor"". International Organization for Migration. 31 October 2014. Archived from the original on 16 April 2015. Retrieved 16 April 2015.
|
||||
Ella Ide (31 October 2014). "Italy ignores pleas, ends boat migrant rescue operation". Yahoo! News. Retrieved 16 April 2015.
|
||||
Letta, tour in Europa: vertice con Merkel. La cancelliera: «Italia sulla buona strada», Il Fatto Quotidiano
|
||||
Ue, asse Letta-Hollande per la crescita, Corriere della Sera
|
||||
G8, il debutto di Enrico Letta Prima l'incontro con Obama L'incognita Siria divide già – Quotidiano Net. Quotidiano.net. Retrieved on 24 August 2013.
|
||||
Usa, Obama riceve Letta: "Italia sulla strada giusta, impressionato da premier", la Repubblica
|
||||
Siria, Enrico Letta: "Una soluzione politica con l'Onu è ancora possibile. Strada stretta, ma fondamentale", Huffington Post
|
||||
Letta a Wall Street: "Siamo affidabili". E all'Onu chiede riforma Consiglio sicurezza, la Repubblica
|
||||
"Berlusconi fa dimettere ministri: è crisi. Letta: gesto folle per motivi personali". Repubblica.it. 28 September 2013. Retrieved 13 February 2014.
|
||||
"Napolitano: "Verifico possibilità legislatura". Caos nel Pdl. Alfano: "No a estremismi"". Repubblica.it. 29 September 2013. Retrieved 13 February 2014.
|
||||
Berlusconi U-turn secures Italian government survival
|
||||
"Italian PM wins confidence vote after Berlusconi abandons revolt - as it happens". The Guardian. 2 October 2013. Archived from the original on 27 March 2023.
|
||||
Italy crisis: PM Letta wins vote after Berlusconi U-turn
|
||||
"Irrevocabili dimissioni ministri Pdl – Politica". ANSA.it. 28 September 2013. Retrieved 13 February 2014.
|
||||
"Letta mercoledì a Camera e Senato – Politica". ANSA.it. 29 September 2013. Retrieved 13 February 2014.
|
||||
"Berlusconi si arrende, Letta ottiene fiducia Napolitano: "Ora basta giochi al massacro"". Repubblica.it. 16 November 2013. Retrieved 13 February 2014.
|
||||
Parks, Tim (24 August 2013). "Holding Italy Hostage". The New York Review of Books. Archived from the original on 25 October 2013. Retrieved 6 September 2013.
|
||||
Italy's Senate expels ex-PM Silvio Berlusconi, BBC, 27 November 2013. Archived 30 November 2013 at the Wayback Machine
|
||||
"Berlusconi vows to stay in politics as ban approaches". Reuters. 18 September 2013. Archived from the original on 14 October 2013. Retrieved 18 September 2013.
|
||||
james mackenzie (3 December 2013). "Italy PM Letta to seek new confidence vote on December 11". The Star. Malaysia. Archived from the original on 7 December 2013. Retrieved 13 February 2014.
|
||||
Letta incassa la fiducia, ma è bagarre in aula. E la Lega perde un pezzo, la Repubblica
|
||||
James MacKenzie (26 January 2014). "Italy minister resigns, adding to headaches for government". Reuters. Rome. Retrieved 29 January 2014.
|
||||
"Italy's agriculture minister resigns, blow to govt". Seattle Pi. 26 January 2014. Retrieved 29 January 2014.
|
||||
"Premier accepts agriculture minister's resignation". La Gazzetta del Mezzogiorno. 27 January 2014. Archived from the original on 2 July 2015. Retrieved 29 January 2014.
|
||||
Primarie PD 2013, Partito Democratico
|
||||
Renzi: quando assicurava di non voler prendere il posto di Letta, Corriere della Sera
|
||||
"Napolitano accepts Letta's resignation as Italian prime minister". Euronews. 14 February 2014. Archived from the original on 14 February 2014. Retrieved 14 February 2014.
|
||||
Lizzy Davies in Rome. "Italian PM Enrico Letta to resign". The Guardian. Retrieved 13 February 2014.
|
||||
Правительственный кризис в Италии: премьер Летта ушел в отставку (in Russian). RIA Novosti. 14 February 2014. Retrieved 14 February 2014.
|
||||
"39 Year Old Matteo Renzi becomes, at 39, Youngest Italian Prime Minister". IANS. news.biharprabha.com. Retrieved 17 February 2014.
|
||||
"Matteo Renzi sworn in as Italy's new PM in Rome ceremony". BBC. 22 February 2014. Retrieved 26 February 2014.
|
||||
Enrico Letta si dimette da deputato: il discorso in aula e il lungo applauso della Camera, Huffington Post
|
||||
"Enrico Letta, New Dean of PSIA". SciencesPo News. 21 April 2014. Retrieved 10 March 2017.
|
||||
"Scuola di Politiche", Scuoladipolitiche.eu. Retrieved 4 February 2022.
|
||||
Letta: «Italicum legge sbagliata. Ma al referendum io voterò Sì», Corriere della Sera
|
||||
Letta battezza Académie Notre Europe: "Per creare una classe dirigente europea ed europeista", Huffington Post
|
||||
Macron chiama Letta a far parte della Commissione per la riforma dello Stato, Il Giornale
|
||||
Enrico Letta: "Dopo 5 anni riprendo la tessera del Pd. Mai più partito dell’antipatia", la Repubblica
|
||||
2019 Human Development Report Advisory Board Members United Nations Development Programme (UNDP).
|
||||
Referendum, Letta: "Voterò Sì convintamente. Tutte le nostre proposte di riforma prevedevano lo stesso taglio. 630 deputati? Ne bastano 400", Il Fatto Quotidiano
|
||||
"Abertis' Board of Directors appoints Luis Fortuño and Enrico Letta as new directors". Abertis.com. Archived from the original on 16 August 2018. Retrieved 16 August 2018.
|
||||
Polizzi, Daniela. "Ai Benetton le autostrade spagnole Accordo Atlantia-Hochtief su Abertis". Corriere della Sera (in Italian). Retrieved 16 August 2018.
|
||||
Amundi creates a Global Advisory Board with world-renowned experts in global economic and political issues Amundi, press release of 31 May 2016.
|
||||
Former Italian Prime Minister Enrico Letta joins Eurasia Group as Senior Advisor Eurasia Group, press release of 8 March 2016.
|
||||
Supervisory Board Publicis, press release of 7 March 2019.
|
||||
International Advisory Board Archived 4 January 2021 at the Wayback Machine Tikehau Capital.
|
||||
Members International Gender Champions (IGC).
|
||||
Advisory Board Re-Imagine Europa.
|
||||
Membership Trilateral Commission.
|
||||
"Comitato Esecutivo". Aspen Institute Italia. Archived from the original on 9 October 2010. Retrieved 26 April 2013.
|
||||
About Us Archived 25 November 2018 at the Wayback Machine Associazione Italia ASEAN.
|
||||
Governance Institut de Prospective Economique du Monde Méditerranéen (IPEMED), Paris.
|
||||
https://www.ie.edu/school-politics-economics-global-affairs/news/enrico-letta-former-italian-prime-minister-appointed-dean-ie-school-politics-economics-global-affairs/
|
||||
"Mario Draghi sworn in as Italy's new prime minister". BBC News. 13 February 2021.
|
||||
"Zingaretti quits as chief of Italy's Democratic party over infighting". Financial Times. 4 March 2021. Archived from the original on 7 March 2021. Retrieved 12 March 2021.
|
||||
"Zingaretti: "Letta può rendere il Pd protagonista indiscusso della democrazia italiana"" (in Italian). Il Foglio. 12 March 2021.
|
||||
""Dobbiamo salvare il Pd". Così Franceschini lavora per Letta" (in Italian). Il Foglio. 9 March 2021.
|
||||
"Letta takes time to consider taking lead of PD – English". ANSA.it. 10 March 2021. Retrieved 10 March 2021.
|
||||
"Pd, Letta sarà il nuovo segretario. Il tweet: "Io ci sono, chiedo voto sulla base delle mie parole". Ecco il programma dell'Assemblea di domenica" (in Italian). La Repubblica. 12 March 2021.
|
||||
"Enrico Letta, Italian ex-PM, poised for political comeback". Politico Europe. 12 March 2021.
|
||||
Pd, Letta segretario con 860 sì: "Serve un nuovo Pd. Priorità a lavoro, giovani e donne". Promette battaglia sul voto ai sedicenni e Ius soli. E sulle alleanze: "Sentirò 5S e Renzi", la Repubblica
|
||||
First speech as candidate secretary of the Italian Partito Democratico (in Italian). Archived from the original on 13 December 2021.
|
||||
Provenzano e Tinagli, il cacciavite di Letta funziona, Huffington Post
|
||||
Pd, Letta nomina la nuova segreteria del partito: sedici membri, otto uomini e otto donne, la Repubblica
|
||||
Pd, Letta: "Nominiamo due donne capigruppo alla Camera e al Senato". Delrio: "Agito sempre per parità", la Repubblica
|
||||
Pd, Simona Malpezzi è la nuova capogruppo al Senato. E alla Camera vacilla l'ipotesi Serracchiani, la Repubblica
|
||||
Debora Serracchiani capogruppo Pd alla Camera, ANSA
|
||||
Letta vince a Siena le suppletive, ANSA
|
||||
Risultati ballottaggi del 17 e 18 ottobre. A Roma e Torino trionfa il centrosinistra. A Trieste vince il centrodestra, la Repubblica
|
||||
Quirinale, la proposta di Letta: "Draghi o Mattarella, il bis sarebbe il massimo", la Repubblica
|
||||
"L'assist di Letta la Mattarella-bis". Corriere della Sera (in Italian). 29 January 2022. Retrieved 29 January 2022.
|
||||
"Mattarella to be re-elected after saying he is 'willing'". ANSA. 29 January 2022. Archived from the original on 29 January 2022. Retrieved 30 January 2022.
|
||||
"Elezioni Presidente della repubblica 2022". La Repubblica (in Italian). 29 January 2022. Archived from the original on 29 January 2022. Retrieved 28 January 2022.
|
||||
Letta: "Evitiamo il colpo di pistola di Sarajevo, se cade il governo si va al voto", Huffington Post
|
||||
"Italy's government on the brink as 5-Star threatens to boycott confidence vote". Guardian. 13 July 2022. Retrieved 13 July 2022.
|
||||
Italian Prime Minister Mario Draghi says he’ll resign, government faces collapse, Washington Post
|
||||
Mattarella respinge dimissioni Draghi e manda premier a Camere, ANSA
|
||||
Governo in bilico, Letta: "La crisi si apre in Parlamento". Anche la Lega valuta la verifica di maggioranza: cosa significa, la Repubblica
|
||||
Horowitz, Jason (20 July 2022). "Draghi Government Falls Apart, Returning Turbulent Politics to Italy". The New York Times. ISSN 0362-4331. Archived from the original on 21 July 2022. Retrieved 21 July 2022.
|
||||
"Italy in limbo as Draghi wins confidence vote but loses parliamentary majority". France 24. Agence-France Press. 20 July 2022. Archived from the original on 20 July 2022. Retrieved 21 July 2022.
|
||||
Borghese, Livia; Braithwaite, Sharon; Fox, Kara; Latza Nadeau, Barbie; Ruotolo, Nicola (21 July 2022). "Italy's president dissolves parliament, triggering snap election following Draghi's resignation". CNN. Archived from the original on 21 July 2022. Retrieved 22 July 2022.
|
||||
"«Letta si dimette sotto questa percentuale». E i big già lo archiviano: è caccia al nuovo segretario". 6 September 2022.
|
||||
"Come una mucca nel corridoio. Il congresso Pd si piazza sul palco di Letta". 23 September 2022.
|
||||
"Letta pensa alle elezioni, ma il Pd pensa al congresso".
|
||||
"Pd: Letta, giovedì 6 ottobre direzione sul congresso". 28 September 2022.
|
||||
Nova, Redazione Agenzia (26 February 2023). "Elly Schlein è la nuova segretaria del Partito democratico". Agenzia Nova (in Italian). Retrieved 26 February 2023.
|
||||
"Enrico Letta Profile: Mild-Mannered AC Milan Fan who is Italy's Next PM". International Business Times. 24 April 2013. Retrieved 30 April 2013.
|
||||
Kington, Tom (24 April 2013). "Enrico Letta to become youngest Italian prime minister in 25 years". The Daily Telegraph. Retrieved 4 May 2013.
|
||||
Tra la passione per la politica, l'Ue e il Milan, chi è Enrico Letta, AGI – Agenzia Italiana
|
||||
Notes
|
||||
|
||||
It is not altogether clear whether the Doctorate degree was obtained in international law in 1997 as reported in his curriculum vitae,[22] or in political science in 1999 as reported by ANSA.[24]
|
||||
External links
|
||||
|
||||
Wikimedia Commons has media related to Enrico Letta.
|
||||
Personal profile of Enrico Letta in the European Parliament's database of members
|
||||
Declaration (PDF) of financial interests (in Italian)
|
||||
Political offices
|
||||
Preceded by
|
||||
Lamberto Dini
|
||||
Minister for the Community Policies
|
||||
1998–1999 Succeeded by
|
||||
Patrizia Toia
|
||||
Preceded by
|
||||
Pier Luigi Bersani
|
||||
Minister of Industry, Commerce and Crafts
|
||||
1999–2001 Succeeded by
|
||||
Antonio Marzano
|
||||
as Minister of Productive Activities
|
||||
Preceded by
|
||||
Gianni Letta
|
||||
Secretary of the Council of Ministers
|
||||
2006–2008 Succeeded by
|
||||
Gianni Letta
|
||||
Preceded by
|
||||
Mario Monti
|
||||
Prime Minister of Italy
|
||||
2013–2014 Succeeded by
|
||||
Matteo Renzi
|
||||
Party political offices
|
||||
Preceded by
|
||||
Dario Franceschini
|
||||
Deputy Secretary of the Democratic Party
|
||||
2009–2013 Succeeded by
|
||||
Debora Serracchiani
|
||||
Succeeded by
|
||||
Lorenzo Guerini
|
||||
Preceded by
|
||||
Nicola Zingaretti
|
||||
Secretary of the Democratic Party
|
||||
2021–2023 Succeeded by
|
||||
Elly Schlein
|
||||
Enrico Letta
|
||||
Authority control databases Edit this at Wikidata
|
||||
Categories: 1966 birthsLiving peoplePeople from PisaItalian Roman CatholicsChristian Democracy (Italy) politiciansItalian People's Party (1994) politiciansDemocracy is Freedom – The Daisy politiciansPrime ministers of ItalyGovernment ministers of ItalyMinisters of agriculture of ItalyDeputies of Legislature XIV of ItalyDeputies of Legislature XV of ItalyDeputies of Legislature XVI of ItalyDeputies of Legislature XVII of ItalyLetta CabinetDemocratic Party (Italy) MEPsMEPs for Italy 2004–2009University of Pisa alumniSant'Anna School of Advanced Studies alumniLeaders of political parties in Italy
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
20
tests/data/memgpt-0.2.11/agents/agent_test/config.json
Normal file
20
tests/data/memgpt-0.2.11/agents/agent_test/config.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "agent_test",
|
||||
"persona": "sam_pov",
|
||||
"human": "basic",
|
||||
"preset": "memgpt_chat",
|
||||
"context_window": 8192,
|
||||
"model": "gpt-4",
|
||||
"model_endpoint_type": "openai",
|
||||
"model_endpoint": "https://api.openai.com/v1",
|
||||
"model_wrapper": null,
|
||||
"embedding_endpoint_type": "openai",
|
||||
"embedding_endpoint": "https://api.openai.com/v1",
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"embedding_dim": 1536,
|
||||
"embedding_chunk_size": 300,
|
||||
"data_sources": [],
|
||||
"create_time": "2024-01-11 12:42:25 PM",
|
||||
"letta_version": "0.2.11",
|
||||
"agent_config_path": "/Users/sarahwooders/.letta/agents/agent_test/config.json"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "agent_test_attach",
|
||||
"persona": "sam_pov",
|
||||
"human": "basic",
|
||||
"preset": "memgpt_chat",
|
||||
"context_window": 8192,
|
||||
"model": "gpt-4",
|
||||
"model_endpoint_type": "openai",
|
||||
"model_endpoint": "https://api.openai.com/v1",
|
||||
"model_wrapper": null,
|
||||
"embedding_endpoint_type": "openai",
|
||||
"embedding_endpoint": "https://api.openai.com/v1",
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"embedding_dim": 1536,
|
||||
"embedding_chunk_size": 300,
|
||||
"data_sources": [
|
||||
"test"
|
||||
],
|
||||
"create_time": "2024-01-11 12:41:37 PM",
|
||||
"letta_version": "0.2.11",
|
||||
"agent_config_path": "/Users/sarahwooders/.letta/agents/agent_test_attach/config.json"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "agent_test_empty_archival",
|
||||
"persona": "sam_pov",
|
||||
"human": "basic",
|
||||
"preset": "memgpt_chat",
|
||||
"context_window": 8192,
|
||||
"model": "gpt-4",
|
||||
"model_endpoint_type": "openai",
|
||||
"model_endpoint": "https://api.openai.com/v1",
|
||||
"model_wrapper": null,
|
||||
"embedding_endpoint_type": "openai",
|
||||
"embedding_endpoint": "https://api.openai.com/v1",
|
||||
"embedding_model": "text-embedding-ada-002",
|
||||
"embedding_dim": 1536,
|
||||
"embedding_chunk_size": 300,
|
||||
"data_sources": [],
|
||||
"create_time": "2024-01-11 12:44:07 PM",
|
||||
"letta_version": "0.2.11",
|
||||
"agent_config_path": "/Users/sarahwooders/.letta/agents/agent_test_empty_archival/config.json"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
<EFBFBD>]<5D>.
|
||||
BIN
tests/data/memgpt-0.2.11/archival/test/nodes.pkl
Normal file
BIN
tests/data/memgpt-0.2.11/archival/test/nodes.pkl
Normal file
Binary file not shown.
36
tests/data/memgpt-0.2.11/config
Normal file
36
tests/data/memgpt-0.2.11/config
Normal file
@@ -0,0 +1,36 @@
|
||||
[defaults]
|
||||
preset = memgpt_chat
|
||||
persona = sam_pov
|
||||
human = basic
|
||||
|
||||
[model]
|
||||
model = gpt-4
|
||||
model_endpoint = https://api.openai.com/v1
|
||||
model_endpoint_type = openai
|
||||
context_window = 8192
|
||||
|
||||
[embedding]
|
||||
embedding_endpoint_type = openai
|
||||
embedding_endpoint = https://api.openai.com/v1
|
||||
embedding_model = text-embedding-ada-002
|
||||
embedding_dim = 1536
|
||||
embedding_chunk_size = 300
|
||||
|
||||
[archival_storage]
|
||||
type = chroma
|
||||
path = /Users/sarahwooders/.letta/chroma
|
||||
|
||||
[recall_storage]
|
||||
type = sqlite
|
||||
path = /Users/sarahwooders/.letta
|
||||
|
||||
[metadata_storage]
|
||||
type = sqlite
|
||||
path = /Users/sarahwooders/.letta
|
||||
|
||||
[version]
|
||||
letta_version = 0.2.12
|
||||
|
||||
[client]
|
||||
anon_clientid = 00000000000000000000d67f40108c5c
|
||||
|
||||
BIN
tests/data/memgpt-0.3.17/sqlite.db
Normal file
BIN
tests/data/memgpt-0.3.17/sqlite.db
Normal file
Binary file not shown.
BIN
tests/data/memgpt_paper.pdf
Normal file
BIN
tests/data/memgpt_paper.pdf
Normal file
Binary file not shown.
7
tests/data/philosophical_question.txt
Normal file
7
tests/data/philosophical_question.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
You know, sometimes I wonder if the entire structure of our lives is built on a series of unexamined assumptions we just silently agreed to somewhere along the way—like how we all just decided that five days a week of work and two days of "rest" constitutes balance, or how 9-to-5 became the default rhythm of a meaningful life, or even how the idea of "success" got boiled down to job titles and property ownership and productivity metrics on a LinkedIn profile, when maybe none of that is actually what makes a life feel full, or grounded, or real. And then there's the weird paradox of ambition, how we're taught to chase it like a finish line that keeps moving, constantly redefining itself right as you're about to grasp it—because even when you get the job, or the degree, or the validation, there's always something next, something more, like a treadmill with invisible settings you didn't realize were turned up all the way.
|
||||
|
||||
And have you noticed how we rarely stop to ask who set those definitions for us? Like was there ever a council that decided, yes, owning a home by thirty-five and retiring by sixty-five is the universal template for fulfillment? Or did it just accumulate like cultural sediment over generations, layered into us so deeply that questioning it feels uncomfortable, even dangerous? And isn't it strange that we spend so much of our lives trying to optimize things—our workflows, our diets, our sleep, our morning routines—as though the point of life is to operate more efficiently rather than to experience it more richly? We build these intricate systems, these rulebooks for being a "high-functioning" human, but where in all of that is the space for feeling lost, for being soft, for wandering without a purpose just because it's a sunny day and your heart is tugging you toward nowhere in particular?
|
||||
|
||||
Sometimes I lie awake at night and wonder if all the noise we wrap around ourselves—notifications, updates, performance reviews, even our internal monologues—might be crowding out the questions we were meant to live into slowly, like how to love better, or how to forgive ourselves, or what the hell we're even doing here in the first place. And when you strip it all down—no goals, no KPIs, no curated identity—what's actually left of us? Are we just a sum of the roles we perform, or is there something quieter underneath that we've forgotten how to hear?
|
||||
|
||||
And if there is something underneath all of it—something real, something worth listening to—then how do we begin to uncover it, gently, without rushing or reducing it to another task on our to-do list?
|
||||
123
tests/data/react_component.jsx
Normal file
123
tests/data/react_component.jsx
Normal file
@@ -0,0 +1,123 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
/**
|
||||
* UserProfile component for displaying user information
|
||||
* @param {Object} props - Component props
|
||||
* @param {Object} props.user - User object
|
||||
* @param {Function} props.onEdit - Edit callback function
|
||||
*/
|
||||
const UserProfile = ({ user, onEdit }) => {
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const [userData, setUserData] = useState(user);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setUserData(user);
|
||||
}, [user]);
|
||||
|
||||
const handleSave = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
await onEdit(userData);
|
||||
setIsEditing(false);
|
||||
} catch (error) {
|
||||
console.error('Failed to save user data:', error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
setUserData(user);
|
||||
setIsEditing(false);
|
||||
};
|
||||
|
||||
const handleInputChange = (field, value) => {
|
||||
setUserData(prev => ({
|
||||
...prev,
|
||||
[field]: value
|
||||
}));
|
||||
};
|
||||
|
||||
if (loading) {
|
||||
return <div className="loading-spinner">Saving...</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="user-profile">
|
||||
<div className="profile-header">
|
||||
<h2>{userData.name}</h2>
|
||||
{!isEditing && (
|
||||
<button onClick={() => setIsEditing(true)} className="edit-btn">
|
||||
Edit Profile
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="profile-content">
|
||||
{isEditing ? (
|
||||
<form onSubmit={(e) => { e.preventDefault(); handleSave(); }}>
|
||||
<div className="form-group">
|
||||
<label htmlFor="name">Name:</label>
|
||||
<input
|
||||
id="name"
|
||||
type="text"
|
||||
value={userData.name}
|
||||
onChange={(e) => handleInputChange('name', e.target.value)}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<label htmlFor="email">Email:</label>
|
||||
<input
|
||||
id="email"
|
||||
type="email"
|
||||
value={userData.email}
|
||||
onChange={(e) => handleInputChange('email', e.target.value)}
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form-group">
|
||||
<label htmlFor="bio">Bio:</label>
|
||||
<textarea
|
||||
id="bio"
|
||||
value={userData.bio || ''}
|
||||
onChange={(e) => handleInputChange('bio', e.target.value)}
|
||||
rows={4}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form-actions">
|
||||
<button type="submit" className="save-btn">Save</button>
|
||||
<button type="button" onClick={handleCancel} className="cancel-btn">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
) : (
|
||||
<div className="profile-display">
|
||||
<p><strong>Email:</strong> {userData.email}</p>
|
||||
<p><strong>Bio:</strong> {userData.bio || 'No bio provided'}</p>
|
||||
<p><strong>Member since:</strong> {new Date(userData.joinDate).toLocaleDateString()}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
UserProfile.propTypes = {
|
||||
user: PropTypes.shape({
|
||||
id: PropTypes.number.isRequired,
|
||||
name: PropTypes.string.isRequired,
|
||||
email: PropTypes.string.isRequired,
|
||||
bio: PropTypes.string,
|
||||
joinDate: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
onEdit: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default UserProfile;
|
||||
177
tests/data/task_manager.java
Normal file
177
tests/data/task_manager.java
Normal file
@@ -0,0 +1,177 @@
|
||||
package com.example.taskmanager;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* TaskManager class for managing tasks and their lifecycle
|
||||
*
|
||||
* @author Development Team
|
||||
* @version 1.0
|
||||
*/
|
||||
public class TaskManager {
|
||||
private Map<String, Task> tasks;
|
||||
private List<TaskObserver> observers;
|
||||
private static final int MAX_TASKS = 1000;
|
||||
|
||||
public TaskManager() {
|
||||
this.tasks = new HashMap<>();
|
||||
this.observers = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new task to the manager
|
||||
*
|
||||
* @param id Unique task identifier
|
||||
* @param title Task title
|
||||
* @param description Task description
|
||||
* @param priority Task priority level
|
||||
* @return true if task was added successfully
|
||||
* @throws IllegalArgumentException if task ID already exists
|
||||
* @throws IllegalStateException if maximum tasks exceeded
|
||||
*/
|
||||
public boolean addTask(String id, String title, String description, Priority priority) {
|
||||
if (tasks.containsKey(id)) {
|
||||
throw new IllegalArgumentException("Task with ID " + id + " already exists");
|
||||
}
|
||||
|
||||
if (tasks.size() >= MAX_TASKS) {
|
||||
throw new IllegalStateException("Maximum number of tasks reached");
|
||||
}
|
||||
|
||||
Task newTask = new Task(id, title, description, priority);
|
||||
tasks.put(id, newTask);
|
||||
notifyObservers(TaskEvent.TASK_ADDED, newTask);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing task status
|
||||
*/
|
||||
public void updateTaskStatus(String id, TaskStatus newStatus) {
|
||||
Task task = tasks.get(id);
|
||||
if (task == null) {
|
||||
throw new NoSuchElementException("Task not found: " + id);
|
||||
}
|
||||
|
||||
TaskStatus oldStatus = task.getStatus();
|
||||
task.setStatus(newStatus);
|
||||
task.setLastModified(LocalDateTime.now());
|
||||
|
||||
notifyObservers(TaskEvent.TASK_UPDATED, task);
|
||||
|
||||
if (newStatus == TaskStatus.COMPLETED) {
|
||||
handleTaskCompletion(task);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves tasks by status
|
||||
*/
|
||||
public List<Task> getTasksByStatus(TaskStatus status) {
|
||||
return tasks.values()
|
||||
.stream()
|
||||
.filter(task -> task.getStatus() == status)
|
||||
.sorted(Comparator.comparing(Task::getPriority))
|
||||
.toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles task completion logic
|
||||
*/
|
||||
private void handleTaskCompletion(Task task) {
|
||||
task.setCompletedAt(LocalDateTime.now());
|
||||
System.out.println("Task completed: " + task.getTitle());
|
||||
|
||||
// Check for dependent tasks
|
||||
tasks.values().stream()
|
||||
.filter(t -> t.getDependencies().contains(task.getId()))
|
||||
.forEach(this::checkDependenciesResolved);
|
||||
}
|
||||
|
||||
private void checkDependenciesResolved(Task task) {
|
||||
boolean allResolved = task.getDependencies()
|
||||
.stream()
|
||||
.allMatch(depId -> {
|
||||
Task dep = tasks.get(depId);
|
||||
return dep != null && dep.getStatus() == TaskStatus.COMPLETED;
|
||||
});
|
||||
|
||||
if (allResolved && task.getStatus() == TaskStatus.BLOCKED) {
|
||||
updateTaskStatus(task.getId(), TaskStatus.TODO);
|
||||
}
|
||||
}
|
||||
|
||||
public void addObserver(TaskObserver observer) {
|
||||
observers.add(observer);
|
||||
}
|
||||
|
||||
private void notifyObservers(TaskEvent event, Task task) {
|
||||
observers.forEach(observer -> observer.onTaskEvent(event, task));
|
||||
}
|
||||
|
||||
// Inner classes and enums
|
||||
public enum Priority {
|
||||
LOW(1), MEDIUM(2), HIGH(3), CRITICAL(4);
|
||||
|
||||
private final int value;
|
||||
Priority(int value) { this.value = value; }
|
||||
public int getValue() { return value; }
|
||||
}
|
||||
|
||||
public enum TaskStatus {
|
||||
TODO, IN_PROGRESS, BLOCKED, COMPLETED, CANCELLED
|
||||
}
|
||||
|
||||
public enum TaskEvent {
|
||||
TASK_ADDED, TASK_UPDATED, TASK_DELETED
|
||||
}
|
||||
|
||||
public static class Task {
|
||||
private String id;
|
||||
private String title;
|
||||
private String description;
|
||||
private Priority priority;
|
||||
private TaskStatus status;
|
||||
private LocalDateTime createdAt;
|
||||
private LocalDateTime lastModified;
|
||||
private LocalDateTime completedAt;
|
||||
private Set<String> dependencies;
|
||||
|
||||
public Task(String id, String title, String description, Priority priority) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.priority = priority;
|
||||
this.status = TaskStatus.TODO;
|
||||
this.createdAt = LocalDateTime.now();
|
||||
this.lastModified = LocalDateTime.now();
|
||||
this.dependencies = new HashSet<>();
|
||||
}
|
||||
|
||||
// Getters and setters
|
||||
public String getId() { return id; }
|
||||
public String getTitle() { return title; }
|
||||
public String getDescription() { return description; }
|
||||
public Priority getPriority() { return priority; }
|
||||
public TaskStatus getStatus() { return status; }
|
||||
public LocalDateTime getCreatedAt() { return createdAt; }
|
||||
public LocalDateTime getLastModified() { return lastModified; }
|
||||
public LocalDateTime getCompletedAt() { return completedAt; }
|
||||
public Set<String> getDependencies() { return dependencies; }
|
||||
|
||||
public void setStatus(TaskStatus status) { this.status = status; }
|
||||
public void setLastModified(LocalDateTime lastModified) { this.lastModified = lastModified; }
|
||||
public void setCompletedAt(LocalDateTime completedAt) { this.completedAt = completedAt; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("Task{id='%s', title='%s', status=%s, priority=%s}",
|
||||
id, title, status, priority);
|
||||
}
|
||||
}
|
||||
|
||||
public interface TaskObserver {
|
||||
void onTaskEvent(TaskEvent event, Task task);
|
||||
}
|
||||
}
|
||||
100
tests/data/test.csv
Normal file
100
tests/data/test.csv
Normal file
@@ -0,0 +1,100 @@
|
||||
Index,Name,Description,Brand,Category,Price,Currency,Stock,EAN,Color,Size,Availability,Internal ID
|
||||
1,Smart Fan Iron Cooker Go Wireless Portable,Catch enough role nearly.,Herman Ltd,Kids' Clothing,585,USD,194,3968600833473,Cornsilk,5x7 in,limited_stock,54
|
||||
2,Fan,All movement yeah tax me.,"Braun, King and Rollins",Grooming Tools,992,USD,724,0191126950284,Bisque,S,discontinued,49
|
||||
3,Smart Speakerphone Charger Eco Plus Clean,Quickly inside pull line lay start.,Peck-Coleman,Fishing & Hunting,940,USD,769,7569143820621,Blue,Extra Large,pre_order,42
|
||||
4,Premium Grill Trimmer Portable,Lawyer one than fire.,Hines Ltd,Skincare,324,USD,93,2705140928037,Ivory,50x70 cm,out_of_stock,93
|
||||
5,Keyboard Freezer,Remain Congress blood plan voice.,"Spence, Webster and Orr",Laptops & Computers,908,USD,614,9830391008108,FloralWhite,10x10 cm,discontinued,91
|
||||
6,Smart Fridge Plus,Tell tend provide government voice.,"Marks, Guzman and Cooley",Kitchen Appliances,627,USD,901,3039245054025,LightSalmon,XXL,pre_order,29
|
||||
7,Compact Dock One Portable Wireless,Push role risk must get performance color.,Newman-Barajas,Fishing & Hunting,385,USD,366,6194768427002,MediumPurple,Large,out_of_stock,23
|
||||
8,Premium Cooler Digital Portable X,Fall opportunity southern drive professor top.,"Gutierrez, Singleton and Downs",Skincare,296,USD,609,6978363826350,PaleGreen,8x10 in,in_stock,6
|
||||
9,Compact Fan Scooter Headphones,Medical myself his piece agree.,Weber and Sons,Clothing & Apparel,870,USD,930,2666733210512,DarkBlue,XS,limited_stock,6
|
||||
10,Eco Dock Air,Know hope enjoy budget have.,Humphrey and Sons,Beauty & Personal Care,602,USD,923,3726212774009,SandyBrown,50x70 cm,in_stock,11
|
||||
11,Thermostat Stove Lamp,Pull perhaps customer available.,Moreno-Weaver,Kids' Clothing,707,USD,257,6886778382210,Thistle,M,discontinued,33
|
||||
12,Mini Powerbank Lite Plus,Still can tell.,"Gentry, Vincent and Saunders",Makeup,499,USD,108,9632709420387,OldLace,M,pre_order,22
|
||||
13,Scooter Bicycle Oven,Deal event item ever financial home.,Mclean-Aguilar,Laptops & Computers,79,USD,203,0227867819631,LightSkyBlue,30x40 cm,in_stock,58
|
||||
14,Fan,It minute eight mother often focus ever.,Mcdaniel LLC,Toys & Games,897,USD,338,1326983446208,MediumBlue,50x70 cm,limited_stock,67
|
||||
15,Wireless Light Heater Clock X,Sing statement show future size hard hope.,Sosa LLC,Grooming Tools,581,USD,877,4749136042046,DarkTurquoise,8x10 in,limited_stock,84
|
||||
16,Ultra Powerbank Scale Automatic,Against or catch tough nor wait reason.,Macias Group,Fishing & Hunting,223,USD,62,6282374002499,Azure,30x40 cm,pre_order,93
|
||||
17,Projector,Party everybody bill work condition behind great share.,Ali Group,Men's Clothing,699,USD,762,3359907564212,DeepSkyBlue,Small,in_stock,89
|
||||
18,Blender,Bit dog upon sometimes trade.,Gray-Deleon,Camping & Hiking,881,USD,34,2045936905300,DarkSeaGreen,30x40 cm,discontinued,83
|
||||
19,Wireless Speakerphone Oven Advanced,Something the interview actually book white easy.,"Yates, Logan and Cervantes",Grooming Tools,601,USD,26,4270229099796,BlanchedAlmond,12x18 in,out_of_stock,76
|
||||
20,Iron Microphone,High see avoid draw check.,"Acosta, Sullivan and Chaney",Men's Clothing,261,USD,80,1846205234548,OldLace,S,discontinued,45
|
||||
21,Lock,Who seven meeting ball trouble ago cover.,Mullins-Dodson,Fishing & Hunting,350,USD,842,0651020229713,LavenderBlush,5x7 in,in_stock,22
|
||||
22,Automatic Speaker Wireless Plus Edge,Near physical blood number never and.,Farrell-Ramos,Cleaning Supplies,726,USD,215,8872341006131,LemonChiffon,15x20 cm,limited_stock,69
|
||||
23,Eco Treadmill Plus Smart,Despite truth develop cover move serve describe it.,Bautista-Allen,Headphones & Earbuds,756,USD,148,3581173655015,SaddleBrown,XS,discontinued,65
|
||||
24,Smart Microphone Clock Ultra One,Open section note all.,Larson LLC,Home & Kitchen,17,USD,687,8108499855216,CadetBlue,M,pre_order,1
|
||||
25,Digital Router Scanner One,Suffer event thought entire add.,"Bryan, Benitez and Barton",Haircare,257,USD,130,3287425624081,DarkSalmon,15x20 cm,in_stock,27
|
||||
26,Pro Stove Light,Mention nature whom discuss minute successful.,"Brock, Lawrence and Pennington",Fishing & Hunting,263,USD,867,3636002675846,HoneyDew,10x10 cm,pre_order,4
|
||||
27,Clean Mixer Ultra Eco,Serious source open threat.,"Luna, Davidson and Galvan",Grooming Tools,951,USD,190,7547662604151,DarkRed,15x20 cm,discontinued,33
|
||||
28,Ultra Fan,Structure training receive name collection stuff west.,Fleming PLC,Kids' Clothing,931,USD,31,6232473294448,Peru,S,discontinued,2
|
||||
29,Ultra Drone Smart,Conference imagine apply decade care return.,Aguirre-Mercado,Headphones & Earbuds,809,USD,250,0194012822726,AntiqueWhite,15x20 cm,backorder,25
|
||||
30,Smart Lock Mini Pro,Three development base reveal smile morning military.,Branch Ltd,Cleaning Supplies,989,USD,879,9292256940884,DarkCyan,10x10 cm,discontinued,91
|
||||
31,Rechargeable Keyboard Toaster Monitor Portable Fast,Parent these not.,Carter-Holland,Cameras & Accessories,962,USD,546,1884257734807,LightGray,XS,discontinued,24
|
||||
32,Mini Mixer Freezer Trimmer Smart,Impact prepare religious public everyone allow often.,Pollard-Branch,Bedding & Bath,399,USD,88,0358170616393,RoyalBlue,M,backorder,36
|
||||
33,Heater Cooker,Station shoulder get suggest tax.,"Preston, Bowen and Singh",Haircare,285,USD,840,4811472870604,CornflowerBlue,50x70 cm,pre_order,40
|
||||
34,Fast Shaver X One,Concern current war still sit a draw with.,"Cunningham, Barr and Ponce",Cleaning Supplies,894,USD,860,0631386626401,Red,Large,pre_order,92
|
||||
35,Wireless Webcam Bicycle Camera,Bank international into Republican something important mean.,"Houston, Newton and Terry",Men's Clothing,141,USD,704,0607700002091,SandyBrown,10x10 cm,discontinued,72
|
||||
36,Clean Scale Speaker Powerbank Clean Wireless,Science think fight piece front.,Galvan PLC,"Accessories (Bags, Hats, Belts)",308,USD,637,6988842313004,PaleGoldenRod,10x10 cm,limited_stock,35
|
||||
37,Advanced Fan Powerbank,White mission budget those pretty fly.,Sims LLC,Headphones & Earbuds,711,USD,892,5796764564586,IndianRed,L,out_of_stock,89
|
||||
38,Pro Thermostat Speaker Touch Eco,Republican vote drug produce.,Brewer-Day,Camping & Hiking,865,USD,593,7535096642818,LimeGreen,100x200 mm,backorder,57
|
||||
39,Fast Blender Treadmill Tablet One Air,True oil town like.,Stevenson-Cummings,Team Sports,409,USD,69,5314300563345,Aqua,Small,limited_stock,35
|
||||
40,Automatic Iron Toaster Projector,Hold dinner everything.,Foley-Thornton,Smartwatches,787,USD,805,9338080255944,RoyalBlue,8x10 in,out_of_stock,13
|
||||
41,Smart Scale Stove,Two toward direction memory account cost.,"Pace, Becker and Ibarra",Smartwatches,334,USD,38,9990041184672,AntiqueWhite,5x7 in,in_stock,10
|
||||
42,Smart Webcam Mouse Digital,Learn week rate hard.,Fernandez-Hendrix,Toys & Games,830,USD,120,8985787888893,Snow,S,out_of_stock,92
|
||||
43,Compact Drone Lite,There only southern.,Rowe-Robinson,"Accessories (Bags, Hats, Belts)",339,USD,220,0512595115903,SpringGreen,Extra Large,out_of_stock,20
|
||||
44,Digital Scale Wireless One Portable,Step system consider project point.,"Anthony, Monroe and Myers",Headphones & Earbuds,128,USD,727,6358706879234,Snow,Large,pre_order,86
|
||||
45,Clean Drone Thermostat Headphones,Several maintain most position street share room.,Ray-Monroe,Fragrances,716,USD,617,2864500397712,Teal,XXL,discontinued,40
|
||||
46,Wireless Scooter,Wish their determine character third would among.,Johns-Huber,Women's Clothing,625,USD,173,4771208434411,DarkOrchid,XL,pre_order,1
|
||||
47,Clean Light Advanced Smart Premium,Mouth others type as of same piece.,Robbins and Sons,Grooming Tools,485,USD,448,3353269497386,LightGreen,Small,discontinued,55
|
||||
48,Compact Fan Iron Clock Digital,Hotel admit pressure democratic television reason remember.,Novak-Hamilton,Home & Kitchen,526,USD,944,3674615714477,CadetBlue,15x20 cm,pre_order,11
|
||||
49,Ultra Watch Eco,Eye analysis require create community knowledge.,"Le, Sampson and Walsh",Shoes & Footwear,703,USD,572,5786160872088,LightSalmon,10x10 cm,discontinued,17
|
||||
50,Fast Lamp Scanner Vacuum,There respond common travel as language everything more.,Bautista-Green,Shoes & Footwear,363,USD,250,4598210880599,GreenYellow,10x10 cm,pre_order,60
|
||||
51,Eco Stove Edge,Hold wrong only language production.,"Gonzales, Best and Ponce",Furniture,52,USD,121,1925515729316,Plum,12x18 in,limited_stock,86
|
||||
52,Fast Powerbank Radio Automatic Touch Ultra,Education our science loss call.,Wolfe-Holden,Beauty & Personal Care,685,USD,178,1419539240556,DarkRed,50x70 cm,backorder,76
|
||||
53,Pro Oven Scale,Mention fish certain allow in environmental source leg.,Mcclure and Sons,Home Decor,150,USD,816,5047126002551,Blue,XL,backorder,24
|
||||
54,Smart Printer Charger Brush Smart Ultra Touch,Environmental authority accept.,Powers-Burgess,Grooming Tools,312,USD,752,9297742472047,MediumOrchid,M,out_of_stock,65
|
||||
55,Wireless Watch Premium Air,Little agree game thing type environmental.,Lynch PLC,Fishing & Hunting,673,USD,552,5327358796184,Fuchsia,30x40 cm,out_of_stock,39
|
||||
56,Advanced Thermostat Microphone Scooter Clean Smart,Miss special Republican team draw middle opportunity.,Meza-Roberson,Kitchen Appliances,425,USD,422,0673364369078,Aqua,30x40 cm,out_of_stock,28
|
||||
57,Pro Mouse Mini Rechargeable,Age possible Republican rest exist interesting source.,"Bernard, Bird and Eaton",Fitness Equipment,478,USD,693,3054066626701,Teal,XS,out_of_stock,68
|
||||
58,Silent Powerbank Radio Smart Plus,Listen maybe arrive other outside shake black west.,Lawrence LLC,Health & Wellness,871,USD,196,5772715035664,PaleGreen,XL,limited_stock,75
|
||||
59,Clean Speakerphone Edge Rechargeable Max,Yes many nation.,"Zimmerman, Esparza and Andrews",Smartphones,196,USD,937,9822542327121,MediumSpringGreen,M,pre_order,77
|
||||
60,Silent Heater Stove Scanner,Action positive skin Congress pressure begin return.,Chavez-Preston,"Accessories (Bags, Hats, Belts)",747,USD,646,1263475720975,PaleGoldenRod,M,discontinued,30
|
||||
61,Smart Mixer Bicycle Fridge,Dinner soldier name model cup physical.,Williams-Morrison,Men's Clothing,63,USD,535,8041785529098,LightBlue,XS,discontinued,82
|
||||
62,Smart Freezer Clean,Bank cover pattern since issue hear particularly bank.,"Costa, Mcneil and Stafford",Office Supplies,361,USD,340,5109263445780,Orchid,M,in_stock,23
|
||||
63,Automatic Blender Toaster Camera,Carry real agree outside major.,Conrad Group,Haircare,329,USD,416,5161284787010,BlanchedAlmond,5x7 in,limited_stock,66
|
||||
64,Premium Mouse Lamp Ultra Touch Compact,Someone raise lot let more list.,Page and Sons,Cycling,38,USD,29,5153484969624,MediumTurquoise,Large,out_of_stock,46
|
||||
65,Ultra Drone Wireless Go Clean,Project impact possible both.,Hurst Inc,Kitchen Appliances,119,USD,346,9613973317726,RosyBrown,S,pre_order,84
|
||||
66,Smart Monitor Cooler Dock Automatic Lite Prime,Skin quite serve kind themselves player so.,"Russell, Vance and Ortiz",Automotive,379,USD,787,6890202499702,Crimson,XXL,pre_order,47
|
||||
67,Automatic Fridge Freezer,While everybody war simply plan social.,Hogan Ltd,Furniture,918,USD,959,7998660897333,Tomato,XS,discontinued,1
|
||||
68,Rechargeable Router Keyboard,Chance start number accept.,Bautista Ltd,Fishing & Hunting,242,USD,974,2863748603180,LightGoldenRodYellow,50x70 cm,discontinued,14
|
||||
69,Digital Microphone Camera,Life your gas thus event.,"Davila, Bowman and Flynn",Home Decor,71,USD,100,3272423264049,LightSeaGreen,Extra Large,out_of_stock,3
|
||||
70,Smart Stove Iron,Think feel office pretty trade room.,"Harding, Frederick and Holloway",Toys & Games,689,USD,210,0761286910840,Blue,12x18 in,out_of_stock,4
|
||||
71,Ultra Treadmill,West against people general themselves young likely.,Alvarado Ltd,Toys & Games,65,USD,250,7977249259236,SlateBlue,50x70 cm,pre_order,18
|
||||
72,Mini Shaver Mouse Fast Mini X,Meet think hope per.,Robbins-Duffy,Toys & Games,84,USD,703,3570230765743,Cornsilk,8x10 in,pre_order,53
|
||||
73,Wireless Fridge Cooker Portable Edge,Church line feeling down maintain.,Henson-Ware,Clothing & Apparel,712,USD,966,6944904013299,HoneyDew,50x70 cm,discontinued,83
|
||||
74,Fan Iron Cooker,Process finish right star.,Avery-Meadows,Health & Wellness,795,USD,272,5139271989938,PowderBlue,M,pre_order,41
|
||||
75,Eco Fridge Printer Mouse,He effort though machine standard.,"Jones, Weber and Pitts",Cycling,367,USD,204,1631900897637,Salmon,Medium,limited_stock,73
|
||||
76,Wireless Scanner Tablet Radio,Plan mention fight focus research set health.,"Valenzuela, Mahoney and Lowery",Clothing & Apparel,594,USD,172,4697368151459,DeepSkyBlue,M,in_stock,99
|
||||
77,Pro Stove Light Air Mini,News design site able before candidate air.,Huffman-Washington,Camping & Hiking,976,USD,374,8439220109668,DarkRed,Medium,out_of_stock,18
|
||||
78,Shaver,Who someone training consumer Mr eight.,"Torres, Christensen and Edwards",Laptops & Computers,955,USD,466,7444904942852,MintCream,XL,limited_stock,11
|
||||
79,Smart Grill Trimmer,Both old letter national remain of.,"Pacheco, Villanueva and Hubbard",Smartwatches,787,USD,277,6855621726839,GoldenRod,50x70 cm,backorder,10
|
||||
80,Portable Vacuum Printer Go,Say minute type others.,Espinoza-Bowman,Makeup,321,USD,766,9824059449136,PapayaWhip,50x70 cm,in_stock,98
|
||||
81,Projector,City food wind tax by woman talk.,Haynes LLC,Automotive,556,USD,896,7629500644465,LightPink,S,in_stock,81
|
||||
82,Compact Powerbank Radio,Finish note quickly appear than do.,Espinoza-Bond,Skincare,551,USD,573,2986694250021,LightSkyBlue,Large,backorder,89
|
||||
83,Pro Freezer Prime,Within what question instead politics.,Perez Group,Kids' Clothing,713,USD,62,4547536554059,Indigo,5x7 in,pre_order,57
|
||||
84,Digital Printer Webcam Wireless Edge Air,Professor fish oil wait enter because.,"Wilkinson, Dawson and Berger",Fragrances,200,USD,51,9730310602717,LavenderBlush,L,pre_order,87
|
||||
85,Trimmer Cooler,Enter plant painting.,Roth-James,Smartphones,862,USD,216,2617594893505,Chocolate,8x10 in,pre_order,86
|
||||
86,Portable Projector Portable Air,He ball common attention visit.,Bradley Inc,Bedding & Bath,560,USD,637,0533350984435,YellowGreen,XXL,out_of_stock,63
|
||||
87,Portable Powerbank,Exactly eight entire mean stuff already.,Weeks and Sons,Haircare,766,USD,284,9090165135243,OliveDrab,Extra Large,pre_order,87
|
||||
88,Smart Lock Premium,Such accept shoulder medical bill world.,Hebert Group,Headphones & Earbuds,452,USD,96,4520822883545,MidnightBlue,Medium,pre_order,85
|
||||
89,Automatic Printer Premium,Cause hit candidate.,Park-Huffman,Fitness Equipment,472,USD,108,5364368037098,MediumSpringGreen,XS,backorder,61
|
||||
90,Eco Trimmer Touch,Film simply medical parent family first.,Christensen Inc,Skincare,566,USD,277,8479741829249,OrangeRed,10x10 cm,in_stock,39
|
||||
91,Compact Powerbank Radio Lite Digital Digital,Professional kitchen move hold pay.,Brown-Berg,Beauty & Personal Care,455,USD,8,7242294927431,LightSeaGreen,Extra Large,in_stock,27
|
||||
92,Automatic Vacuum Fan,Career my difficult may court policy.,Yates-Blankenship,Sports & Outdoors,264,USD,604,9657890857804,Salmon,12x18 in,in_stock,17
|
||||
93,Digital Iron Heater 360 Clean Edge,Cell grow instead top million item might ready.,"Frazier, Mitchell and Maxwell",Kids' Clothing,65,USD,683,4795373245672,Maroon,12x18 in,discontinued,60
|
||||
94,Silent Scanner Mouse Digital Edge,Key reality hair identify third situation blue dream.,Hale Inc,Grooming Tools,711,USD,178,3621597259700,RosyBrown,Large,in_stock,15
|
||||
95,Silent Freezer Projector Webcam,Say benefit civil woman work national involve north.,Serrano PLC,Toys & Games,717,USD,962,8309548019669,Orchid,XL,pre_order,98
|
||||
96,Clean Monitor Light Plus,Whom medical five face ok believe.,Ortiz LLC,Smartwatches,668,USD,46,7586501720683,SlateGray,Extra Large,backorder,84
|
||||
97,Rechargeable Freezer Powerbank Watch Wireless Rechargeable Prime,Significant six whole different.,Casey Ltd,Furniture,411,USD,373,0917441923631,IndianRed,Extra Large,backorder,55
|
||||
98,Rechargeable Mixer Drone Fan Sense Wireless,Instead age difference you.,"Mcknight, Parsons and Haley",Laptops & Computers,784,USD,901,8807432053671,Cornsilk,M,discontinued,82
|
||||
99,Wireless Brush,Do week wall control structure.,"Pennington, York and Roberson",Cameras & Accessories,330,USD,154,1245607220621,Linen,100x200 mm,out_of_stock,72
|
||||
|
22
tests/data/test.json
Normal file
22
tests/data/test.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"glossary": {
|
||||
"title": "example glossary",
|
||||
"GlossDiv": {
|
||||
"title": "S",
|
||||
"GlossList": {
|
||||
"GlossEntry": {
|
||||
"ID": "SGML",
|
||||
"SortAs": "SGML",
|
||||
"GlossTerm": "Standard Generalized Markup Language",
|
||||
"Acronym": "SGML",
|
||||
"Abbrev": "ISO 8879:1986",
|
||||
"GlossDef": {
|
||||
"para": "A meta-markup language, used to create markup languages such as DocBook.",
|
||||
"GlossSeeAlso": ["GML", "XML"]
|
||||
},
|
||||
"GlossSee": "markup"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
245
tests/data/test.md
Normal file
245
tests/data/test.md
Normal file
@@ -0,0 +1,245 @@
|
||||
---
|
||||
__Advertisement :)__
|
||||
|
||||
- __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image
|
||||
resize in browser.
|
||||
- __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly
|
||||
i18n with plurals support and easy syntax.
|
||||
|
||||
You will like those projects!
|
||||
|
||||
---
|
||||
|
||||
# h1 Heading 8-)
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
___
|
||||
|
||||
---
|
||||
|
||||
***
|
||||
|
||||
|
||||
## Typographic replacements
|
||||
|
||||
Enable typographer option to see result.
|
||||
|
||||
(c) (C) (r) (R) (tm) (TM) (p) (P) +-
|
||||
|
||||
test.. test... test..... test?..... test!....
|
||||
|
||||
!!!!!! ???? ,, -- ---
|
||||
|
||||
"Smartypants, double quotes" and 'single quotes'
|
||||
|
||||
|
||||
## Emphasis
|
||||
|
||||
**This is bold text**
|
||||
|
||||
__This is bold text__
|
||||
|
||||
*This is italic text*
|
||||
|
||||
_This is italic text_
|
||||
|
||||
~~Strikethrough~~
|
||||
|
||||
|
||||
## Blockquotes
|
||||
|
||||
|
||||
> Blockquotes can also be nested...
|
||||
>> ...by using additional greater-than signs right next to each other...
|
||||
> > > ...or with spaces between arrows.
|
||||
|
||||
|
||||
## Lists
|
||||
|
||||
Unordered
|
||||
|
||||
+ Create a list by starting a line with `+`, `-`, or `*`
|
||||
+ Sub-lists are made by indenting 2 spaces:
|
||||
- Marker character change forces new list start:
|
||||
* Ac tristique libero volutpat at
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
- Nulla volutpat aliquam velit
|
||||
+ Very easy!
|
||||
|
||||
Ordered
|
||||
|
||||
1. Lorem ipsum dolor sit amet
|
||||
2. Consectetur adipiscing elit
|
||||
3. Integer molestie lorem at massa
|
||||
|
||||
|
||||
1. You can use sequential numbers...
|
||||
1. ...or keep all the numbers as `1.`
|
||||
|
||||
Start numbering with offset:
|
||||
|
||||
57. foo
|
||||
1. bar
|
||||
|
||||
|
||||
## Code
|
||||
|
||||
Inline `code`
|
||||
|
||||
Indented code
|
||||
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
|
||||
|
||||
Block code "fences"
|
||||
|
||||
```
|
||||
Sample text here...
|
||||
```
|
||||
|
||||
Syntax highlighting
|
||||
|
||||
``` js
|
||||
var foo = function (bar) {
|
||||
return bar++;
|
||||
};
|
||||
|
||||
console.log(foo(5));
|
||||
```
|
||||
|
||||
## Tables
|
||||
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
Right aligned columns
|
||||
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
[link text](http://dev.nodeca.com)
|
||||
|
||||
[link with title](http://nodeca.github.io/pica/demo/ "title text!")
|
||||
|
||||
Autoconverted link https://github.com/nodeca/pica (enable linkify to see)
|
||||
|
||||
|
||||
## Images
|
||||
|
||||

|
||||

|
||||
|
||||
Like links, Images also have a footnote style syntax
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
With a reference later in the document defining the URL location:
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
|
||||
## Plugins
|
||||
|
||||
The killer feature of `markdown-it` is very effective support of
|
||||
[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).
|
||||
|
||||
|
||||
### [Emojies](https://github.com/markdown-it/markdown-it-emoji)
|
||||
|
||||
> Classic markup: :wink: :cry: :laughing: :yum:
|
||||
>
|
||||
> Shortcuts (emoticons): :-) :-( 8-) ;)
|
||||
|
||||
see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.
|
||||
|
||||
|
||||
### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup)
|
||||
|
||||
- 19^th^
|
||||
- H~2~O
|
||||
|
||||
|
||||
### [\<ins>](https://github.com/markdown-it/markdown-it-ins)
|
||||
|
||||
++Inserted text++
|
||||
|
||||
|
||||
### [\<mark>](https://github.com/markdown-it/markdown-it-mark)
|
||||
|
||||
==Marked text==
|
||||
|
||||
|
||||
### [Footnotes](https://github.com/markdown-it/markdown-it-footnote)
|
||||
|
||||
Footnote 1 link[^first].
|
||||
|
||||
Footnote 2 link[^second].
|
||||
|
||||
Inline footnote^[Text of inline footnote] definition.
|
||||
|
||||
Duplicated footnote reference[^second].
|
||||
|
||||
[^first]: Footnote **can have markup**
|
||||
|
||||
and multiple paragraphs.
|
||||
|
||||
[^second]: Footnote text.
|
||||
|
||||
|
||||
### [Definition lists](https://github.com/markdown-it/markdown-it-deflist)
|
||||
|
||||
Term 1
|
||||
|
||||
: Definition 1
|
||||
with lazy continuation.
|
||||
|
||||
Term 2 with *inline markup*
|
||||
|
||||
: Definition 2
|
||||
|
||||
{ some code, part of Definition 2 }
|
||||
|
||||
Third paragraph of definition 2.
|
||||
|
||||
_Compact style:_
|
||||
|
||||
Term 1
|
||||
~ Definition 1
|
||||
|
||||
Term 2
|
||||
~ Definition 2a
|
||||
~ Definition 2b
|
||||
|
||||
|
||||
### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)
|
||||
|
||||
This is HTML abbreviation example.
|
||||
|
||||
It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.
|
||||
|
||||
*[HTML]: Hyper Text Markup Language
|
||||
|
||||
### [Custom containers](https://github.com/markdown-it/markdown-it-container)
|
||||
|
||||
::: warning
|
||||
*here be dragons*
|
||||
:::
|
||||
1
tests/data/test.txt
Normal file
1
tests/data/test.txt
Normal file
@@ -0,0 +1 @@
|
||||
test
|
||||
7
tests/data/test_embeddings.json
Normal file
7
tests/data/test_embeddings.json
Normal file
File diff suppressed because one or more lines are too long
5
tests/data/toy_chat_fine_tuning.jsonl
Normal file
5
tests/data/toy_chat_fine_tuning.jsonl
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user