• 0 Posts
  • 3 Comments
Joined 3 years ago
cake
Cake day: July 30th, 2023

help-circle
  • So now Hungary deals with a potentially less mafia like leader, who still isn’t very pro EU nor Ukraine and might still bloc the 90 Billion Euro. However he’ll have his own mess to clean up and possibly stop blocking the EU from more functionally operating as well as hopefully stop being a Putin conduit/advocate.

    Trump and the US shit is world affecting, but get your head out of your US ass. The EU is where the free world game is, and China is still the player to watch. Trump just made the US more irrelevant and your ignorance is part of why that is.


  • This is the author’s post at Oxford: https://www.rsc.ox.ac.uk/news/global-poverty-trends-through-a-new-lens-olivier-sterck-article-for-voxdev

    Has global poverty fallen since 1990? Depending on which poverty line you use, the answer ranges from “we’ve made huge progress” to “nothing has changed”.

    Using the World Bank’s extreme poverty line of US$2.15/day (in 2017 PPP), the share of people in poverty fell from 38% of the world’s population in 1990 (about 2 billion people) to 8.5% in 2024 (690 million people) (Figure 1). This is often cited as a historic success.

    But raise the line – say to $21.5/day, as suggested by Pritchett and Viarengo (2025), or $30/day, as argued by Roser (2024) – and the picture changes entirely. The poverty rate is then extremely high, above 75%, and has barely budged since 1990. In absolute terms, the poverty headcount has even increased, from over 4 billion poor people in 1990 to over 6 billion poor people in 2024. Based on these numbers, the fight against global poverty appears to have failed.

    This divergence is not just a statistical quirk. All mainstream poverty measures share the same fundamental feature: they ignore everyone above the chosen line. With the extreme poverty line of the World Bank ($2.15/day), someone earning $2.16/day is treated as equally non-poor as someone earning $10, $100, or $1,000/day. Billions of low-income people – who most would agree still live in poverty – are therefore excluded from the statistics. And because there is no consensus on where to set the line, it is tempting to pick the one that tells the story you want.

    In Sterck (2026), I propose to measure income poverty without a poverty line. The idea is to measure poverty across the entire income distribution, rather than classifying people as poor or non-poor based on an arbitrary threshold.

    The measure’s key intuition is simple: if person A earns half as much as person B, then A is twice as poor. Poverty is therefore simply measured as the reciprocal of income, and its unit is simply inverted. If incomes are measured in dollars per day ($/day), poverty is measured in days per dollar (days/$).

    Average poverty is simply the average time it takes to earn $1 in a given population.

    In 2024, that value was equivalent to:

    • 1 day in DR Congo, Madagascar, South Sudan, and Mozambique
    • 12 hours in Haiti
    • 2 hours in China
    • 85 minutes in the US
    • 25 minutes in Switzerland.

  • Try this Python script:

    from PIL import Image, ImageDraw, ImageFont
    import os
    from pathlib import Path
    
    def watermark_from_filename(input_dir, output_dir=None, 
                               position='bottom-right', 
                               font_size=36,
                               color='white',
                               opacity=200):
        """
        Add watermark to images using their filename (without extension)
        
        Args:
            input_dir: Directory containing images
            output_dir: Output directory (if None, creates 'watermarked' subfolder)
            position: 'bottom-right', 'bottom-left', 'top-right', 'top-left', 'center'
            font_size: Size of the watermark text
            color: Color of the text ('white', 'black', or RGB tuple)
            opacity: Transparency (0-255, 255 is fully opaque)
        """
        
        # Setup directories
        input_path = Path(input_dir)
        if output_dir is None:
            output_path = input_path / 'watermarked'
        else:
            output_path = Path(output_dir)
        
        output_path.mkdir(exist_ok=True)
        
        # Supported image formats
        supported_formats = {'.jpg', '.jpeg', '.png', '.tiff', '.bmp'}
        
        # Process each image
        for img_file in input_path.iterdir():
            if img_file.suffix.lower() not in supported_formats:
                continue
                
            print(f"Processing: {img_file.name}")
            
            # Open image
            img = Image.open(img_file)
            
            # Convert to RGBA if needed (for transparency support)
            if img.mode != 'RGBA':
                img = img.convert('RGBA')
            
            # Create transparent overlay
            txt_layer = Image.new('RGBA', img.size, (255, 255, 255, 0))
            draw = ImageDraw.Draw(txt_layer)
            
            # Get filename without extension
            watermark_text = img_file.stem
            
            # Try to load a nice font, fall back to default if not available
            try:
                font = ImageFont.truetype("arial.ttf", font_size)
            except:
                try:
                    font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", font_size)
                except:
                    font = ImageFont.load_default()
            
            # Get text size using textbbox
            bbox = draw.textbbox((0, 0), watermark_text, font=font)
            text_width = bbox[2] - bbox[0]
            text_height = bbox[3] - bbox[1]
            
            # Calculate position
            margin = 20
            if position == 'bottom-right':
                x = img.width - text_width - margin
                y = img.height - text_height - margin
            elif position == 'bottom-left':
                x = margin
                y = img.height - text_height - margin
            elif position == 'top-right':
                x = img.width - text_width - margin
                y = margin
            elif position == 'top-left':
                x = margin
                y = margin
            elif position == 'center':
                x = (img.width - text_width) // 2
                y = (img.height - text_height) // 2
            else:
                x = img.width - text_width - margin
                y = img.height - text_height - margin
            
            # Convert color name to RGB if needed
            if color == 'white':
                rgb_color = (255, 255, 255, opacity)
            elif color == 'black':
                rgb_color = (0, 0, 0, opacity)
            else:
                rgb_color = (*color, opacity) if isinstance(color, tuple) else (255, 255, 255, opacity)
            
            # Draw text
            draw.text((x, y), watermark_text, font=font, fill=rgb_color)
            
            # Composite the watermark onto the image
            watermarked = Image.alpha_composite(img, txt_layer)
            
            # Convert back to RGB for JPEG
            if img_file.suffix.lower() in {'.jpg', '.jpeg'}:
                watermarked = watermarked.convert('RGB')
            
            # Save
            output_file = output_path / img_file.name
            watermarked.save(output_file, quality=95)
            print(f"Saved: {output_file.name}")
        
        print(f"\nDone! Watermarked images saved to: {output_path}")
    
    # Example usage:
    if __name__ == "__main__":
        # Watermark all images in current directory
        watermark_from_filename(
            input_dir=".",
            position='bottom-right',
            font_size=48,
            color='white',
            opacity=200
        )
    

    To use this script:

    1. Install Pillow: pip install Pillow

    2. Save the script as watermark_dates.py

    3. Run it in your image directory:

      python watermark_dates.py
      

    Customization options:

    • position: Choose where the watermark appears
    • font_size: Adjust text size
    • color: ‘white’, ‘black’, or RGB tuple like (255, 0, 0) for red
    • opacity: 0-255 (lower = more transparent)