Why do you like Python

Yo, I'm writing an essay on Python. Why do you fuckers like it?

Or hate it?

idc

Attached: python-logo.png (256x256, 7K)

Other urls found in this thread:

github.com/ccxt/ccxt/wiki/Manual
learnxinyminutes.com/docs/python3/
matplotlib.org/
twitter.com/NSFWRedditImage

Because it's easy to read

It's easy to read

It makes scripting faster

It promises quick and easy scripting, but never delivers. I'm fine to use it whenever I have to, but I'd rather just use have type safety.

>likes
Easy syntax
Tons of useful libraries
Tons of resource online

>no likes
Slow as hell

retrieving and parsing a json is 5 lines max

I love it cuz my bot built with it made me 500k this year trading crypto.

Attached: Selection_001.png (2553x2128, 505K)

Y-yeah can I see

Even better, start here:github.com/ccxt/ccxt/wiki/Manual
and make something that blows me out the water. I could use the competition. Man, shit's getting boring.

you're a good man, user

Do Python users have a lines-of-code fetish? Because I can just plug a sample JSON into a website and get a plain-old data contract that I can copy-paste into my code and parse into using an imported JSON deserialization library. Difference is, _I_ actually parsed the JSON rather than turning it into some dynamic data blob that I still have to interpret to get anything out of.

>json.loads(open("muh_json.js").read())
or
>requests.get("example.com/?get_json").json()
Literally that easy. Do non-Pythonistas have a masochistic need to type more characters or something? Or is your time so worthless it just doesn't matter

Hate Powershell all you want but I can get Json data use it transform it export it all in one line and it snot as ugly and funky as python.

See fucking dope

I can do nearly everything I want to do with it, and do it fast.

>Powershell
More like PowerBottom, amiright

Pseudo code is literally the actual syntax.

You haven't parsed JSON, you have just acknowledged that the thing is in JSON form.

val data = Json.Deserialize(line)
There, I actually parsed, validated, and formatted JSON and my code can make type-safe assumptions about its format.

>You haven't parsed JSON, you have just acknowledged that the thing is in JSON form.
Wow, look at this dumbfuck. That line literally reads the json from either a file in the first instance or a website in the second instance and parses it completely into either a dictionary or a list. Fucking kill yourself for being a dumbass pajeet who doesn't know shit about what he's talking about.
HAHAHAHAHAHAHAhahahahahahaHAHAHAHAHAH

i neither like it nor hate it

You can talk about python's history, who developed it, why it became popular, and it's influence on data science, machine learning, and AI.

For me? I think Python is fine, but I prefer JS. It really bothers me that true and false in python are "True" and "False."

You can use it to do shit fast when performance doesn't matter and then sell your idea and re-write it in C. Ask anyone who prototypes in C how many of their ideas materialized and they'll sperg off about type safety kek

Meaningful whitespace.

Everylanguagehasmeaningfulwhitespace
You mean True and False

is this real?

>is this real?
yup. It's my own personal 'tism factory

Attached: Selection_003.png (3083x2022, 657K)

Useful lang for scripting.
Terrible for everything else.

How do you get into competently trading crypto via programmatic methods?

Step 1 is to trade manually until you have a good feel for how the market works and you can actually make money. When you figure out a method that has positive expected value, i.e., you make more than you lose, then you can start reducing it to a series of logical steps a program can execute for you.
If you're starting from scratch with no programming experience, learn python here: learnxinyminutes.com/docs/python3/
Then familiarize yourself with the exchange API's. Find out what they are capable of, what kind of orders you can set, what kind of information they can provide you. This will cause ideas to start forming in your head. Go here: github.com/ccxt/ccxt/wiki/Manual
If you need charting to go along with your bot, learn how to use matplotlib. Here: matplotlib.org/
That's what I did/do and it's been well worth it. Starting from scratch, it should take you no more than 6 months before you get profitable.

Oh and whatever you do, don't ever go here: And if you see the word chainlink anywhere you do what I do. You run

I took a computational physics course in Python. The syntax is simple, so you can think about the actual function of the code without worrying too much about misplacing a semicolon and bricking the program, and both python and numpy are free to use so you don't have to shell out for mathematica or Matlab

Because it's fast as fuck to develop and to the surprise is most neets and CS freshmen in Jow Forums, program execution "speed" doesn't actually matter that much.

I've made $500,000 so far this year selling "satellite software" to boomer companies (basically companies that have SAP systems to fucking huge and monstrous it's cheaper/faster to contract a smaller company and whip out some code that just runs off csv/excel exports and sends pdf via email; basically shit that was already implemented (usually badly) on excel spreadsheets), we have just basic bitch pyqt5 or flask apps that crunch some data using pandas/numpy and maybe sprinkle a little keras/nltk for the data science memes and executives from boomer companies cream their pants and pay me a shit ton. I just work with 2 other dudes and we're making bad bank.

And do tho think that shit runs slow? Fuck no it doesn't. I just run them in $80/m quad-core Azure instances. They process millions of records in a few minutes, stuff that took their VBA/excel shit like a 4 hours is done in 10 minutes. If that isn't fast your just you get the fuck out of my face, there's no point on spending a shitload of money more to develop something similiar in C++ and have it run in a Pentium fucking III.

Attached: 1434846302665.gif (331x255, 1.73M)

Do you hace any nice guide for starting in cripto?

It's scheme for this generation

it tongue my anus

Do a youtube search for quickfingersluc. Dude is a God of price action trading in crypto (my style of trading). He isn't selling anything and doesn't hold back, he just seems to be so successful and bored he makes videos teaching people how to trade. I started there.

Easy language.
Tons of librairies.
Can do things in short lines of code.

It's "get your shit done" language.

For performance, C++ is better for that.

Tanks sempai

how about you first research a bit and then make stupid assumptions user

It has gotten lots of incompetent normies into """programming""" and now they are trying to shove it down everyone's throat, including fucking embedded shit like microcontrollers
- It's dynamically typed and hence complete cancer, because you can't tell whether something is an object, a primitive type or a function
- Because it's dynamically typed, passing arguments is a huge pain in the ass, since you can't know what type of variable you have to pass to make the function work! If you're writing a library, you have to use "type hints"??? WTF?
- "Pythonic" code is a bad joke where you write so fucking much in so few lines that it takes years to read somebody else's work. Compare it with something more verbose like Java or C++ where you can get an idea of someone's code after skimming through it a couple of times
- It uses fucking INDENTATION to denote nesting, because braces were "too ugly". So now if you want to rewrite your code to look a little bit differently, well turns out, YOU CAN'T! You have this shit shoved down your throat
- It won't fucking run if you mix tabs and spaces, because it's too fucking hard for the interpreter to sort it out
- It's slow as shit, even JVM languages beat it by fucking MILES
- The fucking 2.7 vs 3 debacle, which happened 10 YEARS AGO and people are STILL arguing on whether "print" is a statement or method

There's probably loads more shit if I sat down and learned it properly, but why the fuck would I do this to myself? I'm much better off writing something in C# than this bullshit.
I can't fucking stand it when I'm writing something in a proper language and some retard will come along and tell me "oh hurr durr why not write it in PYTHON? it's sooooo much better"

Everything this guy just said.

But I also don't like the "unclarity" in it's import features.

Pycucks think that you can import specific functions from python libraries but that's not true.

When you do an import turd from shit, you get the whole library in your program but it's "unreachable" for you so you can't use it tmu.

Whats the point other than making things less clear?

Python uses Generational Garbage collection, and won't collect those unused objects until the third phase. It's forking method is stupid, have you ever used Ansible to do real work? I instrument a set of 20,000 nodes at work. Ansible is not fast enough because of how it handles forking of long running processes.

>It's slow as shit, even JVM languages beat it
>even JVM
You had me going until this. The JVM is a shining star of speed on the server. Using the word "even" to describe its speed relative to anything the other side of Go and C++ indicates you know nothing and are to be ignored henceforth.
Good day sir.
I said good DAY

pffft no trading view api hooks no care

Why would you need that when you can just
from scipy import stats

and write your own superior indicators from scratch designed specifically for the volatility and time decay inherent to crypto instead of using the sloppy seconds left over from boomer stock fags that accomplish nothing but insta-rektage?
SHIGGYDIGGY

Attached: file.png (695x547, 484K)

hey I remember when I made a python hating thread a couple of months ago and wrote this OP, thanks for copying it and spreading it around

This. A million times. There is always some retarded gotcha or runtime error

>This. A million times. There is always some retarded gotcha or runtime error
Only if you are a complete fucking idiot. Of course then you'll get the same thing in any language

>What's the point other than making things less clear?
Python can't tell if the thing you're importing has references to other things in the module or not, so it just takes the lazy route and imports the whole thing then gives you a reference to what you want.
Not only that, if you import an object from a module, and the module overwrites that object with something else, your imports won't be updated so you'll be stuck with the old object, and the only way around this is to either change all imports to use the entire module via module.thing, or export some other wrapper object.
God I wish I could just have a fucking pointer sometimes.

I hate it for many reasons:

- exceptions for flow control will just lead to subtle bugs
- truthy and falsy types will just lead to subtle bugs
- variable initialization and assignment using the same syntax will just lead to subtle bugs
- no proper encapsulation will just lead to subtle bugs
- functions reaching their end without a return statement returning None implicitly will just lead to subtle bugs
- philosophy of duck typing instead of checking types at the closest binding border will just lead to subtle bugs
- silent exceptions will just lead to subtle bugs


Basically everything about Python's design will lead to subtle bugs from very easy to overlook errors that every programmer will sooner or later make out of sloppiness that would be very easy to catch. Weirdly enough the language did have this thing of not allowing "=" as an expression to avoid the subtle bug of accidentally using it in a conditional expression but they go with truthy/falsy values all the same which leads to just as many subtle bugs.

Python codebases in general are filled with bugs that would not be there if the language design was somewhat sane.

how do I work with u irl senpai

Attached: Selection_005.png (540x569, 393K)

I hate it and like it for several reasons.

Hate:
- The userbase asking faggy questions like "How do i make this more pythonic"
- The userbase referring to themselves as pythonistas, I feel physically ill every time I read that word.
- No proper multithreading support
- Every keyword except True and False are written in all lowercase, why not true and false as well?
- No type safety
- No variable declarations, assigning a value to a misspelled variable causes subtle bugs because whoops you just created a new variable there.
- Has classes but is very lacking in that department. Impossible to properly hide data and expose a public API while hiding the internals.
- Duck typing is the intended way to handle control flow which leads to messy code
- Slow execution speed makes it unusable for real time systems.

Like:
+ List comprehensions
+ A lot of useful libraries
+ Quick to whip up a working prototype for most things

I use Blender and believe it's the best software in the whole world, Blender uses Python for scripting, so I use Python. Had Blender chose anything, lua, perl, or even fucking javascript, I would've learned any of them instead.

It runs my file manager and browser

absolutely all of this
couple it with most people trying to shit out code as quickly as possible without giving a shit about code quality / testing and you'll have yourself a Pythonic fucking disaster

For a "dynamic" language it's pretty fuckin strict and tedious to write

Not to mention that given that it's "pythonic" to not declare types in the function itself and the syntax to do that with 8 lines of asserts is unwieldy, testing in and of itself becomes a nightmare in how involved it is.

If "type hints" actually triggered an assertion error or at least a decorator existed that made it so that would eliminate many bugs.

Hey dude, I've seen you post elsewhere before and you inspired me to start my own trading project. Do you have any technical literature that you could recommend for this (either trading related or programming related)?

Buy high sell low.

Thanks.

It makes it super easy to wrote ADS that are easily expandable. That combined with the easy operator overloading makes for a super powerful language.

Also, while I was learning it the access to a large asortment of libraries and the flexibility of the language itself made it much easier to focus on the conept I was learning and not pitfalls and nuances of the language itself.

I will also say, that while forced indentation can be a pain sometimes, it forces everbody's code to adopt the same style for the most part. That makes reading somebody elses code that much easier.

Because comprehension lists and generators.

This will take forever to understand and implement

get good lol

Its too late for you Im afraid , you had your chance to buy in.

Attached: 1558874406524 (2019_05_26 14_44_10 UTC).png (690x313, 133K)

Syntax is easy as fuck to learn, functions are easy to write, loops are easy to write, it doesn't yell at me for not having a colon.

tab indentation

so at least someone in Jow Forums isn't a larper. nice

I need to teach Python to high schoolers in a few days from the very basics. Any tips or advice? This will also be the first time I teach anyone formally.

cos its intuitive

study extensively. know the ins and outs. know your shit

have fun paying taxes on each of those trades :^)

alert(typeof(NaN));
That's why I hate JavaScript. Python at least correctly infers the types. JavaScript doesn't understand its own underlying types.

>write bad code
>get errors
>pikachu.gif

>There, I actually parsed, validated, and formatted JSON
What a coincidence, that's exactly what that line of Python does as well

lmao you don't pay taxes on a per trade basis, you pay on net capital gains

Out of curiosity, is your algorithm rules based, machine learning based, or both?

>Like
Easy to read and tons of good libraries
>Dislike
Good libraries take a really long time to be, well, good. And obviously you depend a lot on them if you actually want to do any productive work on Python. By itself, even with the standard library, you can't go too far.

>like
it's zero-effort easy
>hate
it's absurdly slow
pypy is useful for pure python loads (I've seen a literal 10x speedup) at least
I don't actually like the syntax and "pythonic" idioms are often really fucking nasty

Easy to read
Fast to write some simple shit with
Or write some advanced shit

Absolutely based.

Hey, it's me, I just woke up. Man, there isn't really any technical literature per se that I've found for this mainly because crypto trades so much differently than stocks and most trading books are biased toward stocks or futures. Your best bet is to dive in manually and learn to trade that way. Find something you can execute profitably by hand and then translate that to code. Any specific questions let me know.

>This will take forever to understand and implement
If you're already a decent Python programmer (or javascript or PHP as CCXT works with those also), it shouldn't take more than a couple of months to get something going. It's just a library so you will only use from it the few things you need. As you read through it, the creative juices will flow and you'll start to have ideas on what to do. Funny that.
It's not as bad as it seems. I uploaded everything to bitcoin.tax last year and it does all the math for me. I just had to attach form 8949 to my taxes and pay the bottom line number. The percentage was pretty much in line with capital gains had I just subtracted what I started with from the end. And it was about half what I expected.
>Out of curiosity, is your algorithm rules based, machine learning based, or both?
Rules based. I've looked deep into using ML for this and everything I've found so far is a meme. When I say "rules based" though understand I use some tools that people might consider in the realm of ML like linear regression and r-squared to get an idea of how predictable a chart is in the near term (too much predictability means everything is priced in and I won't touch it), of course mean and standard deviation play a huge part but this is crypto so just overlaying bollinger bands isn't gonna cut it as 2 standard deviations and then calling it a day is the wrong answer. Also the way BB traditionally calculates the exponential moving average is wrong for crypto in my opinion. I also look at the derivative of the curve when I'm evaluating the last few candles of a chart and I'm about to make my move. I won't mention why but it matters.
The upshot is it isn't machine learning but it is highly statistical.

any forums for this kind of shit?

Python's are snakes. Snakes are cool.

Not that I can think of that are open and people are actually making money. People tend to keep this stuff close to their chest, trading being something like a zero sum game and all. Your best bet is find a trading strategy that works manually you can then automate. The funny thing is most programmers don't trade and most traders aren't profitable so finding a programmer who trades and is profitable is more rare than you think. Lots of bot makers lose money for instance. I'd say start with the "being profitable" part first and if you an manage that then making a bot will be easy.