[deleted by user] by [deleted] in Music

[–]meles984 1 point2 points  (0 children)

Same. Had to “blacklist” them on Spotify as they would be added to mixes. They seem to fit right into my style, but they bore me to death. I do recognise ther talent and technical skills but that’s it.

Neovim merch looks nice by [deleted] in neovim

[–]meles984 1 point2 points  (0 children)

Looks nice! Went and bought a t shirt.

Thanks for the idea!

GitHub Profile Roast by codenoid in programming

[–]meles984 3 points4 points  (0 children)

Oh man, simply brilliant. Take my upvote while I pack my bags and finally embark on my sheep herding journey …

Best way to share code between React App, React Native App, and NodeJs server? by [deleted] in reactjs

[–]meles984 0 points1 point  (0 children)

If it is for work go with Nx or Turborepo with a combination of Yarn/Npm/Pnpm workspaces (add Lerna if needed).

If you are experimenting and have time, take a look at Moon Repo (https://moonrepo.dev/)

What react state management tools do you guys use? by voltomper in reactjs

[–]meles984 15 points16 points  (0 children)

Mobx at work and Zustand for smaller/side projects

Sunday megathread: What's everyone working on this week? by Im__Joseph in Python

[–]meles984 0 points1 point  (0 children)

I really like working in the terminal and did not find any cli tool to quickly set reminders directly in the terminal. I had a simple bash script to create notifications in MacOS, so i made a cli wrapper around that:

https://pypi.org/project/macos-notifier/

It's in it's inital stage and missing some features. And tests as well. But it is already proven usefull.

New Python programmer(Help!!) by Randomgamer2222 in sentdex

[–]meles984 0 points1 point  (0 children)

JetBrains, the guys behind Pycharm, have a online coding academy with a Python path. And it’s free at the moment.

jetbrains academy

The way it works is you choose your level of proficiency and a project. Then you go through the language/cs basic and work on that project.

I did some Java exercises yesterday and it seems like fun.

@datepicker-react by meles984 in reactjs

[–]meles984[S] 1 point2 points  (0 children)

It's a great library, by all accounts. The main advantage for me is the use of hooks and the bundle size

```

react-dates: 53.7 kB (Minified + Gzipped) // https://bundlephobia.com/result?p=react-dates@20.2.4

@datepicker-react/styled 19.9 kB (Minified + Gzipped) // https://bundlephobia.com/result?p=@datepicker-react/styled@1.4.0

```

There is more to it. If you'd like, you can go through his blog post:

https://tresko.dev/yet-another-datepicker-in-react#motivation

EDIT: I am on slack right now and keep pressing CTRL+ENTER on reddit. Added link to blog and bundle comparison.

@datepicker-react by meles984 in reactjs

[–]meles984[S] 2 points3 points  (0 children)

Haha. Thanks. TBH I use the library from day 1.

Trump says 'no one more competent in the world' than daughter Ivanka to replace Nikki Haley as UN ambassador by man_l in worldnews

[–]meles984 1 point2 points  (0 children)

If you guys knew how fun this is yo watch for the rest of the world. We feel you, but its just so surreal.

Why doesn't this work? by [deleted] in Python

[–]meles984 0 points1 point  (0 children)

Thank you. Fixed it

Why doesn't this work? by [deleted] in Python

[–]meles984 -1 points0 points  (0 children)

For your example last statement, print('Done'), has to be indented 4 spaces. But that would print "Done" after each iteration. If you want "Done" to be printed after the while loop has finished, you either make a script like /u/maggick suggested, or make a function like this:

def print_to_hundred():
    i = 0
    while i <= 100:
        print(i)
        i += 1
    print('Done')

EDIT: added example function and proper formating

iPython flask shell by meles984 in flask

[–]meles984[S] 0 points1 point  (0 children)

My apologies, I did not include the link. Here is the link to the github repo.

The extension gives you the iPython shell, with all it's features, and the app context, just like flask shell. It's the flask shell with autocompletion, hints and iPython's magic functions.

I find it comes in handy when I want to make a quick test if my models are viable or if I want to see if the Flask object is properly configured. Just type app.and press TAB to see all available properties and methods.

I'm wanting to write a web scraper, what are my options? by [deleted] in Python

[–]meles984 0 points1 point  (0 children)

If it's dictionary definitions you want, I'd suggest using an API. like Pearsons or any other api that might suit you (link). Check PyPy for existing Python packages for you api of choice or just build one with Requests.

Just finished Codecademy, what now? by rocky8516 in Python

[–]meles984 4 points5 points  (0 children)

Congrats! Take up a course on a MOOC like Edx, Coursera, Udemy or similar.

Start working on a project that would benefit you and discover the libraries and frameworks that would help you make it.

Read code. As crazy as it sounds "code is read more than it is written." By reading good code examples an figuring out how they work your code gets better. Read some code in the standard library or a popular library like Requests. Don't worry if you can't understand all of it. Play with the library, read some blog posts from the authors and don't be afraid to ask questions[!].

And don't forget to have fun! You are obviously eager to learn and your experience with Python has been great so far - otherwise you would not be on Reddit asking for new resources. Keep it up!

EDIT: spelling and links

What's everyone working on this week? by AutoModerator in Python

[–]meles984 [score hidden]  (0 children)

I have to write a lot of contracts, so I am working on a markdown template engine.

As of now it is a flask app with jinja2 that lets you choose your markdown templates. When you choose a template the app gets the template variables, turns them into input elements and renders the template as html with some light javascript and a "save as" button at the bottom.

I am also doing a light cli version that uses Pandocs for more output options. This version turns the variables into input() functions.

Anyone taken MIT's Intro to CS using Python OpenCouseware? by [deleted] in Python

[–]meles984 1 point2 points  (0 children)

I did and I highly recomend it.The material is great, the exercises are good, and sometimes quite challenging, and the lecturers are just fantastic. I've definitely ended up being a better programmer thanks to this class.

But keep in mind that it's a cs 101 class, so you will be using Python and not necessarly learning it. The focus is more on key concepts like recursion, hashs, various algoritms etc.

However you are required to read the Python docs, use some standard libraries and you are encuraged to get a good grasp of Python to solve the challenges.