Discover and read the best of Twitter Threads about #Python

Most recents (24)

Let's learn about Correlation the most important statistical measure that is also a key tool in machine learning.

#MachineLearning #100DaysOfCode #Python

Correlation, as the name suggests, gives the measure of the relationship between two variables.

In statistical terms, it is the measure using which statisticians figure out how much two things are related.

Two things could be related in different extend and ways. For eg:
1) If one variable increases, the other variable might increase(+ve correlation), decreases(-ve correlation) or remain unchanged/have no defined pattern( uncorrelated ).

2) Also, this behavior could remain the same for all the values(monotonic) or can vary with the values.
Read 13 tweets
#Python factlet: The dict.popitem() method is guaranteed to remove key/value pairs in LIFO order.

>>> d = dict(red=1, green=2, blue=3)
>>> d.popitem()
('blue', 3)
>>> d.popitem()
('green', 2)
>>> d.popitem()
('red', 1)

In contrast, OrderedDict.popitem() supports both FIFO and LIFO extraction of key/value pairs.

>>> from collections import OrderedDict
>>> d = OrderedDict(red=1, green=2, blue=3)

>>> d.popitem(last=False) # FIFO
('red', 1)

>>> d.popitem() # LIFO
('blue', 3)

OrderedDict can efficiently move entries to either end without a hash table update.

>>> d = OrderedDict(red=1, green=2, blue=3)

>>> d.move_to_end('green')
>>> list(d)
['red', 'blue', 'green']

>>> d.move_to_end('green', last=False)
>>> list(d)
['green', 'red', 'blue']

Read 4 tweets
How can I start a career in #risk management in the financial services industry?
@GARP_Risk @PRMIA @RIMSorg @actuarynews @SOActuaries @CQFInstitute @CFAinstitute
I believe they are many degrees that can be a good value for money, provided you know where you would like to work in the long run.
In the developing world markets, employers still don't appreciate highly technical education in risk, actuarial sciences, financial engineering, quantitative economics, machine learning, etc.

For them, an #MBA is a be-all and an end-all troubleshooter.
Read 22 tweets
Kia ora from New Zealand! In this thread I will share some Pacific climate observation & prediction developments that I have been working on with my @niwa_nz colleagues from time to time over the last few years.
One important goal: provide an improved regional overview of potential water stress in the Pacific, building on the @ICU_NIWA's Island Climate Update
To do this, we leverage @NASA’s GPM (IMERG) for realtime rainfall monitoring in concert with monthly & seasonal climate forecasts from @CopernicusECMWF.
Read 10 tweets
Modern #data platforms are emerging as the answer to the holy grail: creating a truly data-driven organization. With this, “how” we use data has changed.

Many vendors today brand themselves as the be-all and end-all... but this isn’t true. 🙅
It’s impossible to work today with a single modern data platform from one vendor! A modern #data platform is a collection of tools and processes. 🧰

In this thread, I’ll break down what a modern data platform means in practice today. 2/n
Today, data platforms have basic building blocks that look something like this. 👇 3/n…
Read 9 tweets
#Python user poll: Would you like str.join() to work like print() and automatically coerce its arguments to strings?


data = [10, 20, 30, 40, 50]

Which do you prefer?
Besides being more compact, the second form can be made more efficient than the first.

Still there isn't yet a consensus on whether to proceed.

BTW, if you're against the proposed short, fast form, it would be helpful to know why.

In your view, what makes the map(str, data) form better?
Read 3 tweets
Massive new #QGIS plugin: #GEE Timeseries Explorer offers instant access to #EarthEngine image collections! Fetch #Landsat, #Sentinel2, or #MODIS #timeseries for any location and visualize images: 🧵
Choose from our predefined collections, for instance merged & #cloud masked #Landsat TM, ETM+, OLI surface reflectance, cloud masked Sentinel2AB L2A, or just define your awesome custom collection in the built-in #Python editor.
Extract time series profiles for #training / #validation by clicking on map, or by navigating through vector point file. Download raw time series data for #sample-based workflows efficiently with parallel download.
Read 6 tweets
How to combine Virtual Laser Scanning (#VLS) and Open Government Data (#OGD) of @swisstopo? A thread on how the #OpenSource HELIOS++ laser scanning simulator can be used to scan #Säntis 🇨🇭(2502m) and test different scan strategies or generate training data for #MachineLearning. Digital terrain model coloured by elevation (left), real poi
With the #OGD step, @swisstopo is making large volumes of high quality geodata freely accessible. We are most excited about the 3D data, which includes digital surface models (DSM), digital terrain models (DTM) and classified 3D laser point clouds!
As believe that the combination of #OpenData and #OpenSource software is a key element to promote more transparent, inclusive and effective research, we thought to ourselves: Let’s combine @swisstopo #OpenData and our own #OpenSource software HELIOS++.
Read 12 tweets
🎉 Happy #RSTwittorial Thursday with @saksters 🥳

Analyzing Google Search Console Data with #Python 🐍🔥

Here’s the output 👇
What you’ll learn:

🔎 How to clean and analyze GSC data, from creating basic pivot tables to graphing a CTR (Click-Through Rate) curve
How is this useful?

📌 This can be helpful in automating analyses designed to a specific client or domain that is being worked on
Read 10 tweets
Introducing Wiki Topic Grapher! 👾🐍🔥

Leverage the power of Google #NLP to retrieve entity relationships from Wikipedia URLs or topics!

+ Get interactive graphs of connected entities
+ Export results w/ ent. types+salience to CSV!


h/t @Streamlit 🧵
Many cool #SEO use cases! 🔥

+ Research any topic then get entity associations that exist from that seed topic
+ Map out related entities with your product, service or brand
+ Find how well you've covered a specific topic on your website
+ Differentiate your pages!

About the stack, it's 100% #Python! 🐍🔥

+ @GCPcloud Natural Language API
+ PyWikibot
+ Networkx
+ PyVis
+ @Streamlit
+ Streamlit Components ->

Read 9 tweets
Como depurar programas #Python 🐍 através da linha de comando. 🐛 #debugging #debug


A maneira mais fácil de interagir com um script Python é usando o argumento `-i` (interactive) no python ou no ipython.

$ ipython -i

O script é executado e então o terminal interativo abre permitindo a inspeção do estado das variáveis.
Para uma depuração mais estruturada o melhor é o pdb que é o debugger built-in do Python…

Executar e parar na linha 5
$ python -m pdb -c "until 5"

O script é executado e então ao chegar na linha 5 o interpretador pausa.
Read 20 tweets
#Python is seriously lacking a product vision with priorities that align with user needs. Instead of spending so much bandwidth on controversial and overly complex features like pattern matching, the standard distribution should include some pretty obvious missing features: 🧵
1) asyncio is great; yet, years after its adoption, the standard library still lacks async http client and server modules;
2) type hints are great; yet, mypy--an official project and reference implementation, still lacks support for built-in generics; 🧵
These are just 2 examples. Threads or subinterpreters not tied to a single GIL would probably be more welcome than pattern matching. BTW, I love pattern matching in #Elixir, but the way it's shaping up in #Python is too complicated and full of corner cases. Please don't rush it.
Read 6 tweets
I think it's better for beginners to start with #Python than with the holy trinity of HTML, CSS, and JS. Here's why: 🧵

#CodeNewbie #100DaysOfCode
Python is considered to be one of the easiest programming languages to learn.

It's almost like reading English.
Python is very versatile. You're not limited only to creating webpages.

You can use it for building web applications, machine learning, data analysis, web scraping...
Read 8 tweets
#OSINT Tool Tuesday 🚨

Another week, another set of tools. This week let's look at Snapchat, Google Earth, and YouTube today. This will include 2 #python tools and 1 web app. Shall we?

The first #OSINT tool is made by @djnemec and it's a #python tool called Snapchat Story Downloader. It allows you to create a db of locations of interest then extract Snapchat stories from those locations indefinitely. Classifier too. Great!…

The second #OSINT tool is a #python tool I made in response to @raymserrato who was looking to automate screenshot capturing of Google Earth. Earthshot will open and screenshot a list of coordinates you specify on a CSV. It's slow though!…

Read 5 tweets
#rstats users who are planning to learn #python, welcome to another edition of tweetorial.

The idea is to leverage your experience with R to explain python concepts w/o going into too much detail. For details, refer the links attached at the bottom.
For today, I am covering the data types in python (except complex, binary types). R has data types: integer, double, character and boolean. Well python too has the same data types, although some names are different. In R `integer` cannot be a fractional and is written by
suffixing L, in python it's `int`. In R fractionals are called `double` (like 1.2), In python they are called `float`. In both R python it is not necessary to specify the type. While in R the type of a number is `double` unless specified by `L`, python infers it automatically. Image
Read 13 tweets
Flask or Django?

Read thread...
If you've a bit of Python experience, yu know exactly what yu want, & its a fairly standard web application that involves displaying some content, storing some stuff in a database, having users register, & having administrators b able to control what's on the website: use Django.
If you are a Python beginner: use Flask.
Read 7 tweets
#OSINT Tool Tuesday

It’s time for another round of OSINT tools to help you improve your efficiency and uncover new information. A quick overview:

[+] Reversing Information
[+] Automating Searches with #Python
[+] Testing/Using APIs

RT for Reach! 🙏

(1/5) 👇
The first #OSINT tool is called Mitaka. It’s a browser extension that will reverse multiple data points right from your browser. Right-click what you want to reverse and Mitaka will show you what sources are available. Improve your efficiency!

(2/5) 👇
The second #OSINT tool is called Sitedorks from @zarcolio. It’s a #Python tool to automate your Google queries. Enter a query and it’ll open up to 25+ tabs—checking your parameters across a variety of website categories.…

Read 6 tweets
thread: Sorting algorithms visualized
some famous algo visualized using python, numpy and matplotlib😋

first is Odd-even sort!

#Algorithm #python #visualization
Heap sort up next!
Bubble sort 🎈🐡
Read 13 tweets
How many bots can you trigger in a single tweet?
I'll make this a thread for testing purposes.
Read 5 tweets
#Python tip: Hard-coded constants should use the optional underscore as a thousands separator:

>>> x = 1_234_567

Also, you can output numbers in that format:

>>> f'{x:_d}'

Or with commas:

>>> f'{x:,d}'

European style takes more effort

>>> x = 1_234_567.89
>>> f'{x:_.2f}'.replace('.', ',').replace('_', '.')

After the decimal place, a common convention is to put digits in groups of five:


The statistics module follows this convention:…

Read 3 tweets
Thread: That time of year for survey results, the @cloudfoundry foundation user survey came out recently, as always a few interesting findings #CloudNative /1
Usual caveats first, the survey is implicitly biased as it is drawn from the CF user community, sample size is v. small (n=176 after screening questions). This is always a problem for CF as the scale its used it is large, but by a smaller number of orgs #CloudNative /2
First off the org size, 66% of orgs with @cloudfoundry are 1K+ employees, 48% greater than 10K. Inquiries I have related to CF are almost exclusively with this 48%, but we will always have that bias with Gartner clients. #CloudNative /3 Image
Read 9 tweets
How seriously is past volatility a fair estimate of future volatility or risk useful in financial models?
Historical Volatility based on empirical data sample observations.
Data Sample Observations can be historic baseline data for a particular asset class/exposure or simulated data derived from iterations using some historical data sets.
Another branch of data which can be used to observe future volatility is exploratory data drawn from within a sample or a population using data #visualization tools.

This technique is becoming popular as data science and machine learning advancements are taking place
Read 22 tweets



②中心極限定理には、モーメント母函数や特性函数を使わずに、Taylorの定理のみを使う初等的な証明があります(概略は添付画像2)。この証明法はもっと普及するべき。 ImageImage
#統計 学部レベルの統計学入門の教科書の多くが、なぜか、(Fourier解析の知識を要求する)モーメント母函数や特性函数を経由する中心極限定理の証明またはその概略をコピー&ペーストのごとく載せているのは不思議なことです。

#数楽 Taylorの定理の証明も数十年以上コピペが蔓延している疑いが強い。


g(x) = g(a) + ∫_a^x g'(t)dt をn回使う。

Read 41 tweets
Awesome Thread 🧵 on Python 🐍 Communities...

It's gonna be SUPER HELPFUL for those who are looking for

~ Getting help
~ Staying Updated with Latest 🐍 News
~ Networking with Pythonistas and,
~ Learning stuff 🔥

This Thread 🧵 contains direct links to awesome 🐍 communities ❤️
1. Python (🐍🔥) on Discord (from the official site)
2. Python (🔥) on Slack (from the official site)
Read 8 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!