StackOverflow.com

VN:F [1.9.22_1171]
Rating: 9.4/10 (10 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

Weird interaction with Python PIL image.save quality parameter

12 August 2022 @ 9:00 pm

This is just a part of the project I'm currently working on. I am trying to convert picture into text, then from text back to the picture without any loss or extra size. First, I open the picture, read the pixels, and write them down. Pictures are size NxN. from PIL import Image import sys import zlib def rgb_to_hex(rgb): return '%02x%02x%02x' % rgb N = im.width im = Image.open(r"path\\pic.png") px = im.load() read_pixels = "" for i in range(N): for j in range(N): read_pixels += rgb_to_hex(px[j, i,]) Then, transform the string into bytes. data = bytes.fromhex(read_pixels) img = Image.frombytes("RGB", (N,N), data) img.save("path\\new.png",quality = 92) According to the Pillow official documentation they are saying that quality goes from 0 -

Unit root test on lagged variables

12 August 2022 @ 9:00 pm

guys! I'm using this sintaxe but when I use the last part ("modelo = ...") it shows the following: "Error in merge.zoo(difetanol, detanol, mes2, mes3, mes4, mes5, mes6, mes7, : all(sapply(args, function(x) is.zoo(x) || !is.plain(x) || (is.plain(x) && .... is not TRUE" ethidra = (tsrelatorio[,"etanol"]) ethidra length(ethidra) acuavhp = (tsrelatorio[,"avhp"]) acuavhp length(acuavhp)``` matr <- matrix(0, nr = 12, nc = 12) matr[row(matr) == col(matr)] <- 1 matr Djt <- rbind(matr,matr,matr,matr); Djt dim(Djt) names(Djt) dimnames(Djt) = list(c(),c("M1", "M2", "M3", "M4","M5","M6","M7","M8","M9","M10","M11","M12")) Djt dim(Djt)``` teste=data.frame(Djt) attach(teste) mes2= teste[1:47,2] mes2 length(mes2) mes3= teste[1:47,3] mes3 length(mes3) mes4= teste[1:47,

Scheduling Multiple Cron Jobs for a REST API connector in Fivetran

12 August 2022 @ 9:00 pm

We use a Fivetran connector that pulls our data every five minutes. We do not need the data pulled that frequently during non working hours. The connector we have does not allow for customization, but a REST API was suggested if paired with a cron job. Is it possible to set up a schedule like this? Monday 4:00am to 11:55pm, run every five minutes. 12:00am to 4:00am, run on the hour Tuesday 4:00am to 11:55pm, run every five minutes. 12:00am to 4:00am, run on the hour Wednesday 4:00am to 11:55pm, run every five minutes. 12:00am to 4:00am, run on the hour Thursday 4:00am to 11:55pm, run every five minutes. 12:00am to 4:00am, run on the hour Friday 4:00am to 11:55pm, run every five minutes. 12:00am to 4:00am, run on the hour Saturday run every hour Sunday run every hour Thank you.

How do I maintain the state of my request data between GET and POST requests in one flask route?

12 August 2022 @ 8:59 pm

I have some user response data that is posted from the front end to my /post end route and then one piece of that data (user id) is posted to another flask route /stats. That is working properly, when I print to the console I am getting the correct user_id I want to get. The problem is that in this /stats end route I am performing a query of the database to gather some important stats and then I am grabbing those on the front end through a get request. The problem is that when I perform the get request, the state of my request_data is lost and throws the error: line 67, in stats user = request_data['user'] TypeError: 'NoneType' object is not subscriptable the app works perfectly until I perform the get request. here is my code for the flask route /stats: @app.route('/stats', methods=['GET', 'POST']) def stats(): request_data = request.get_json() user = request_data['user'] def get_total_percent_correct(user_id): correct =

Python globals() - how do variables get added/ updated to this global dictionary in the below example?

12 August 2022 @ 8:59 pm

In this line, how does name get populated to the globals dictionary? Method gets invoked here

Tailwind classes are not working after installed

12 August 2022 @ 8:59 pm

I'd like to begin with stating that this question's title is similar to this question but I tried the answers there but they won't work. I first tried Tailwind from their official CLI guide, but that wouldn't work so I followed this youtube tutorial for the set-up but Tailwind still won't work. In the previously mentioned question someone noted that you need to be very specific in the path from tailwind.cofig.js to your HTML, but I did this. My tailwind.config.js: module.exports = { content: ['./*.html'], theme: { extend: {}, }, plugins: [], } And here is a screenshot of my folder:

calling a function with a sublist inside another function

12 August 2022 @ 8:59 pm

I'm trying to run this code: list1 = [4,5,6,7,8] def func1(x,list1): return x*list1 def func2(x,list1): return func1(x,list[1:]) func2(3,list1) I got the following error message: TypeError Traceback (most recent call last) <ipython-input-25-5e4e46f738ca> in <module>() 7 return func1(x,list[1:]) 8 ----> 9 func2(3,list1) <ipython-input-25-5e4e46f738ca> in func2(x, list1) 5 6 def func2(x,list1): ----> 7 return func1(x,list[1:]) 8 9 func2(3,list1) TypeError: 'type' object is not subscriptable I want to know if it's possible to call a function inside another function but calling a sublist of the list called in the main function

system design vs system architecture

12 August 2022 @ 8:59 pm

I have seen many examples of system designs. For example, design a URL shortener or Twitter in Grokking the System Design Interview. But then, what is system architecture? Are those two the same things?

How can i backup mssql to microsoft azure sql?

12 August 2022 @ 8:58 pm

I have MSSQL sql backup and I want to use this backup of this file with .bak extension on microsoft azure server, how can I do it?

Stock Investment Experiment in OTree - no template

12 August 2022 @ 8:58 pm

I am working on an experiment in Otree/ Python and kindly ask for your help. I am a newbie in programming and Otree. In my experiment, participants either design their own portfolio (or get one assigned to them - whichever is easiest in the beginning) and observe changes to their portfolio in later rounds. After every round and change, they have the opportunity to buy/sell positions. On Otree's website, I found experiments titled "Stock game" or "Investment game" (links: https://www.otreehub.com/projects/otree-stock-trade/ and https://www.otreehub.com/projects/investment-game/), however, there was no template that I could adapt to my own experiment. I would be most grateful for guidance on a template with a stock investment game similar to mine. I am also very t

wolframalpha.com

VN:F [1.9.22_1171]
Rating: 9.4/10 (5 votes cast)

Access to the world’s facts and data and calculates answers across a range of topics, including science, nutrition, history, geography, engineering, mathematics, linguistics, sports, finance, music…

Discrete-Time Systems to FIR Filter Design: Explore Signal Processing in the New MOOC from Wolfram U

5 August 2022 @ 10:49 pm

Recognizing the importance of the topics and the powerful capabilities in the Wolfram Language for signal processing, we set out to develop a fully interactive course about signal and system processing to make the subject accessible to a wide audience. After sharing and reviewing the course materials, notes and experiences we’ve collected from university undergraduate-level […]

Four Things about Wolfram|Alpha You May Not Know

29 July 2022 @ 9:40 pm

What is the 56th digit of π? (Nine.) How fast is a wolf’s heartbeat? (It’s 80–110 beats per minute.) What is the estimated average airspeed velocity of an unladen European swallow? (Wait a sec….) Where did these answers come from? Wolfram|Alpha. This knowledge engine has been around since 2009 and is often associated with mathematics, […]

¡Wolfram|Alpha ahora en español!

22 July 2022 @ 6:12 pm

Nos es muy grato anunciar que Wolfram|Alpha, el primer motor de inteligencia computacional del mundo, ya está disponible en español. (Click here to read this post in English.)

Animating Surfaces in the Wolfram Language Bringing Geometric Design to Life

15 July 2022 @ 9:44 pm

Around the beginning of the first COVID-19-related lockdown in Austria, I was confronted with the problem of keeping my motivation up. From 2012–2016, my main tool for creating several Wolfram Demonstrations in 3D was Mathematica. Now, in addition to the Wolfram Language, Blender offered the possibility for physically based rendering (PBR) and high dynamic range […]

Launching Version 13.1 of Wolfram Language & Mathematica 🙀🤠🥳

30 June 2022 @ 3:31 am

The Epic Continues... Last week it was 34 years since the original launch of Mathematica and what’s now the Wolfram Language. And through all those years we’ve energetically continued building further and further, adding ever more capabilities, and steadily extending the domain of the computational paradigm. In recent years we’ve established something of a rhythm, delivering the fruits of our development efforts roughly twice a year. We released Version 13.0 on December 13, 2021. And now, roughly six months later, we’re releasing Version 13.1. As usual, even though it’s a “.1” release, it’s got a lot of new (and updated) functionality, some of which we’ve worked on for many years but fina

New in 13: Geometric Computation

24 June 2022 @ 2:17 pm

Two years ago we released Version 12.0 of the Wolfram Language. Here are the updates in geometric computation since then, including the latest features in 13.0. The contents of this post are compiled from Stephen Wolfram’s Release Announcements for 12.1, 12.2, 12.3 and 13.0.   Euclidean Geometry Goes Interactive (December 2020) One of the major […]

New in 13: Cloud & Webpage Construction

16 June 2022 @ 5:59 pm

Two years ago we released Version 12.0 of the Wolfram Language. Here are the updates in cloud and webpage construction since then, including the latest features in 13.0. The contents of this post are compiled from Stephen Wolfram’s Release Announcements for 12.1, 12.2, 12.3 and 13.0.   WSTPServer: A New Deployment of Wolfram Engine (December […]

New in 13: Data & Function Repositories

10 June 2022 @ 8:06 pm

Two years ago we released Version 12.0 of the Wolfram Language. Here are the updates to the Data and Function Repositories since then, including the latest features in 13.0. The contents of this post are compiled from Stephen Wolfram’s Release Announcements for 12.1, 12.2, 12.3 and 13.0.   Making the Data Repository Easy (March 2020) […]

Computational Art: 2022 Wolfram Language Winners

2 June 2022 @ 6:28 pm

The Wolfram Language is incredibly versatile, and while it is most closely associated with mathematics, it has powerful features in a range of areas. As a challenge to our users on Wolfram Community, the 2022 Wolfram Computational Art Contest prompted participants to use Wolfram technology to flex their creativity to generate art. The requirements for […]

off-guardian.org

VN:F [1.9.22_1171]
Rating: 9.3/10 (3 votes cast)

OffGuardian is one of the only media news outlets to trust. True journalism unlike the MSM.

Facts really should be sacred. Unlike the Guardian, off-guardian is NOT funded by Bill & Melinda Gates, or any other NGO or government.

Repression, Terror, Fear: The Government Wants to Silence the Opposition

12 August 2022 @ 5:00 am

John W. Whitehead & Nisha Whitehead “Once a government is committed to the principle of silencing the voice of opposition, it has only one way to go, and that is down the path of increasingly repressive measures, until it becomes a source of terror to all its citizens and creates a country where everyone lives …

Is the Bank of Russia buying gold?

11 August 2022 @ 7:00 am

Riley Waggaman On March 25, the Bank of Russia announced it would buy gold at a fixed price of 5,000 rubles per gram. Less than two weeks later, on April 7, Russia’s central bank canceled its new gold-buying policy, opting instead for a negotiated price (at a discount). The logic behind this move, according to …

UK to reverse “accidental” ban on edible insect farming

10 August 2022 @ 10:00 pm

Kit Knightly Good news guys, UK companies will soon be free to start producing and selling several species of “edible insects” again. Apparently, one effect of Brexit is that the UK no longer belonged to the European Union’s “novel foods” programme, which approved many varieties of insects for human consumption. Because of this the farming …

The BBC’s “Unvaccinated”: Undisclosed Conflicts of Interest – Part 2

10 August 2022 @ 7:00 am

Iain Davis Part II of Iain’s series breaking down the BBC’s “Unvaccinated” documentary – Read Part I here. I speculated in a previous article that the BBC would attempt to establish a narrative that would promote and support the UK government’s proposed Online Safety Act. And that is precisely what it did in its would-be documentary, “Unvaccinated …

Covid, Ukraine & the real “enemy”: an open letter to Vanessa Beeley

9 August 2022 @ 8:00 pm

Catte Journalist Vanessa Beeley wrote this today on her Telegram channel “When are people going to realise we all face one enemy and that there is no time for “neutrality”? There is no time for division over the concepts created by the enemy to divide and distract. Focus on the enemy” This is my response… …

The “Unvaccinated” Question – Revisited

9 August 2022 @ 6:00 am

CJ Hopkins On 1 September, 1941, Chief of Reich Security Reinhard Heydrich, one of the most fanatical, mass-murdering Nazis, issued a now notorious decree ordering Jews above the age of six to wear an identifying badge in public. The Jewish Badge, a yellow Star of David with the word “Jew” inscribed inside the star, was meant …

WATCH: A Mass Media Reading List

8 August 2022 @ 9:00 pm

On the latest Questions for Corbett, Jackie writes in to ask for another book list, so James obliges by going through the reading list for the new Mass Media: A History online course. You can see the full reading list, as well shownotes and other links, here.

12 Memes to Get You Through the Day – Part 19

8 August 2022 @ 10:00 am

Well it’s Monday again and, for now at least, that means more memes. Yes, Meme Mondays two weeks in a row! Isn’t that a treat? Don’t get used to it. You just know there’s an unhealthy dose of reality out there ready to ruin the fun sometime soon. 1. Some of you may have noticed …

This Week in the New Normal #41

7 August 2022 @ 3:00 pm

Our successor to This Week in the Guardian, This Week in the New Normal is our weekly chart of the progress of autocracy, authoritarianism and economic restructuring around the world. 1. VISA TO be held liable for payments it processes? A California judge has ruled that VISA is potentially liable as a co-defendent in a …

Itchy Boots

VN:F [1.9.22_1171]
Rating: 9.0/10 (5 votes cast)

Motorcycle adventures from a single perspective.

Red Letter Media

VN:F [1.9.22_1171]
Rating: 9.0/10 (4 votes cast)

Movie reviews from VCR repair men.
Continue reading

A Wolf in VR

VN:F [1.9.22_1171]
Rating: 9.0/10 (3 votes cast)

Sample VR gaming via a Wolf.

ukcolumn.org

VN:F [1.9.22_1171]
Rating: 9.0/10 (3 votes cast)

Independent press real researchers, real journalists, real news. Fighting the corrupt mainstream view.

UK Column News - 12th August 2022

1 January 1970 @ 12:00 am

UK Column News - 10th August 2022

1 January 1970 @ 12:00 am

UK Column News - 8th August 2022

1 January 1970 @ 12:00 am

UK Column News - 5th August 2022

1 January 1970 @ 12:00 am

UK Column News - 3rd August 2022

1 January 1970 @ 12:00 am

David Scott: UK Column and the Mainstream Media

1 January 1970 @ 12:00 am

David Scott gives a Scottish audience a large-scale overview of his calling to the work of UK Column and the experiences he has gleaned from working for truth in the media.

Debi Evans Blog: 2 August 2022

1 January 1970 @ 12:00 am

Debi Evans' weekly blog of startling events in healthcare.

The BBC's Psychology Behind Conspiracy Theories

1 January 1970 @ 12:00 am

An intellectually risible corpus of "experimental psychology" is laid bare to reveal the abject terror of mainstream academics and broadcasters at the very thought that their society might actually be being misruled.

Disturbing roots of Big Pharma, social credit and Great Reset illuminated in Indiana

1 January 1970 @ 12:00 am

Mark Anderson continues to report the speeches of some of the world's most compelling anti-globalist figures given at a recent conference.

UK Column News - 29th July 2022

1 January 1970 @ 12:00 am

44Teeth

VN:F [1.9.22_1171]
Rating: 9.0/10 (3 votes cast)

Motorcycle vblog and chat with challenges.
Continue reading

joeybtoonz

VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)

One man’s look at clown world (tiktok/narcissistic culture).

Best of TikTok and #IDIOCRACY

11 August 2022 @ 1:47 pm

Narcissists and #SOCIALMEDIA 14

2 August 2022 @ 1:40 pm

Humans and #FURRIES

21 July 2022 @ 2:00 pm

Why Is She Like This!? 2

19 June 2022 @ 1:48 pm

Who Is This Man!? 3

10 June 2022 @ 1:39 pm

What Am I Looking At!?

3 June 2022 @ 12:25 pm

Wackjobs and #PROTESTS

26 May 2022 @ 1:42 pm

kubuntu.org

VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)

Kubuntu is a free, complete, and open-source alternative to Microsoft Windows and Mac OS X which contains everything you need to work, play, or share.

Kubuntu 22.04.1 LTS Update Available

12 August 2022 @ 11:34 am

The first point release update to Kubuntu 22.04 LTS (Jammy Jellyfish) is out now. This contains all the bug-fixes added to 22.04 since its first release in April 2022. Users of 22.04 can run the normal update procedure to get these bug-fixes. The first point release is also significant because...

Plasma 5.25 Beta available for testing

20 May 2022 @ 5:06 pm

Are you using Kubuntu 22.04 Jammy Jellyfish, our current Stable release? Or are you already running our development builds of the upcoming 22.10 Kinetic Kudu? We currently have Plasma 5.24.90 (Plasma 5.25 Beta)  available in our Beta PPA for Kubuntu 22.04, and in the Ubuntu archive and daily ISO build...

Kubuntu 22.04 LTS Released

21 April 2022 @ 5:36 pm

The Kubuntu Team is happy to announce that Kubuntu 22.04 LTS has been released, featuring the beautiful KDE Plasma 5.24 LTS: simple by default, powerful when needed. Codenamed “Jammy Jellyfish”, Kubuntu 22.04 continues our tradition of giving you Friendly Computing by integrating the latest and greatest Free Software technologies into...

Plasma 5.24.3 available on Kubuntu 21.10

9 March 2022 @ 1:15 pm

We are pleased to announce that Plasma 5.24.3 is now available in our backports PPA for Kubuntu 21.10 (Impish Indri). The release announcement detailing the new features and improvements in Plasma 5.24.3 can be found here. To upgrade: Add the following repository to your software sources list: ppa:kubuntu-ppa/backports or if...

Plasma 5.24.2 available on Kubuntu 21.10

23 February 2022 @ 6:15 pm

We are pleased to announce that Plasma 5.24.2 is now available in our backports PPA for Kubuntu 21.10 (Impish Indri). The release announcement detailing the new features and improvements in Plasma 5.24.2 can be found here. To upgrade: Add the following repository to your software sources list: ppa:kubuntu-ppa/backports or if...

Plasma 5.24 available on Kubuntu 21.10

9 February 2022 @ 11:22 am

We are pleased to announce that Plasma 5.24 is now available in our backports PPA for Kubuntu 21.10 (Impish Indri). The release announcement detailing the new features and improvements in Plasma 5.24 can be found here. To upgrade: Add the following repository to your software sources list: ppa:kubuntu-ppa/backports or if...

Kubuntu 21.04 (Hirsute Hippo) Reaches End of Life

25 January 2022 @ 11:50 am

Kubuntu Hirsute Hippo was announced on April 22, 2021 with 9 months support. As of January 20, 2022, 21.04 reached ‘end of life’. No more package updates will be accepted to 21.04, and it will be archived in the coming weeks. You can read the official end of life announcement...

Plasma 5.23 available for Kubuntu 21.10 (Impish Indri) in backports PPA

20 October 2021 @ 7:18 pm

We are pleased to announce that Plasma 5.23.1 is now available in our backports PPA for Kubuntu 21.10 (Impish Indri). The release announcement detailing the new features and improvements in Plasma 5.23 can be found here. To upgrade: Add the following repository to your software sources list: ppa:kubuntu-ppa/backports or if...

Kubuntu 21.10 Impish Indri Released

15 October 2021 @ 1:01 pm

The Kubuntu Team is happy to announce that Kubuntu 21.10 has been released, featuring the ‘beautiful’ KDE Plasma 5.22: simple by default, powerful when needed. Codenamed “Impish Indri”, Kubuntu 21.10 continues our tradition of giving you Friendly Computing by integrating the latest and greatest open source technologies into a high-quality,...

Kubuntu Impish Indri (21.10) Beta Released

24 September 2021 @ 10:37 am

The Beta of Impish Indri (to become 21.10 in October) has now been released, and is available for download. This milestone features images for Kubuntu and other Ubuntu flavours. Pre-releases of the Impish Indri release are not recommended for: Anyone needing a stable system. Regular users who are not aware...