• 59 Posts
  • 595 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2023

help-circle


  • Yep, if you are running any type of Linux python is already installed.

    I always have a path in my python files to allow for direct running rather than calling python first. This only works on Linux.

    If you put
    #!/usr/bin/env python3
    as the very first line, you can make the file executable and it will just run

    otherwise you will have to call python first, e.g. python yourFile.py


  • You could do this with python and a couple of libraries. This is just an example, but you could import the data from a DB or use a CSV file.

    import matplotlib.pyplot as plt
    import numpy as np
    
    # Pie chart data
    labels = ['Category A', 'Category B', 'Category C', 'Category D', 'Category E']
    sizes = [30, 25, 20, 15, 10]
    colors = ['#ff9999','#66b3ff','#99ff99','#ffcc99','#c2c2f0']
    
    # Pie chart
    plt.figure(figsize=(8, 8))
    plt.pie(sizes, labels=labels, colors=colors, autopct='%1.1f%%', startangle=140)
    plt.title('Sample Pie Chart')
    plt.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
    plt.show()
    
    # Histogram data
    data = np.random.normal(0, 1, 1000) # Generate 1000 random data points with a normal distribution
    
    # Histogram
    plt.figure(figsize=(10, 6))
    plt.hist(data, bins=30, color='#66b3ff', edgecolor='black')
    plt.title('Sample Histogram')
    plt.xlabel('Value')
    plt.ylabel('Frequency')
    plt.show()
    








  • There are a few parts that I found interesting

    Tanya Lees from the group Kāpiti CALM (Calm Alarming Law Madness) said people were worried insurance companies would use the report as an excuse to refuse to cover their homes.

    Sorry Tanya, the insurance companies don’t need a publicly funded report. They are already consulting with (the same) experts, they will set their rates as they see fit.

    Also from Tanya

    There are a lot of people, a lot of experts, who do not agree with this,

    Who are these experts? People yes, because they have an emotional and financial investment, but experts…not very likely.

    This is a strange way to think

    Salima Padamsey from Coastal Ratepayers United said the panel’s report should be taken as an advisory - nothing more.

    "Council never vested the advisory committee with any statutory authority under the Resource Management Act.

    "The committee’s mandate did not encompass providing expert perspectives on policy matters.

    When has an advisory committee ever been vested with powers, the clue is in the name…they are to advise. That last bit about “providing expert perspective” is so strange. One would hope that; when spending public money; only expert opinion would be sought, what is the other option? Just some random off the street?


  • Outside your comfort zone / different culture: The Last Ringbearer by Kirill Yeskov. It examines the events of The Lord of The Rings, from the perspective of Mordor and the orcs. Written by a Russian author. Super good, almost better than LotR.

    As a suggestion form me (a random on the internet) ultraprocessed people, the science of food that isn’t food.