r/learnpython • • Apr 11 '20

A recommendation for people with projects that they're really proud of!

Upload it to github, create a README with some explanation and instructions, then post it in r/python with the flair "I Made This". When I did this myslef (check my post on my profile) I got a lot of constructive criticism and encouragment!

It doesn't only feel great getting "nice job OP" and similar stuff but you also get a lot of ideas and improvements that you can work on.

409 Upvotes

37 comments sorted by

2

u/Mamba_Grey Apr 12 '20

I have another doubt. How do I explicitly specify on my GitHub project as to what all libraries/dependencies are required to run the project. (Talking specifically for python) (I am very used to anaconda managing my packages and I feel that is limiting me now.) -> Do I have to make some sort of a file that lists all this ? -> Can I automate this process ?

A good resource would help too!

2

u/real_confusedswede Apr 12 '20

I'm not 100, but maybe take a look at pipenv!

40

u/AkiraYuske Apr 11 '20

Ok, dumb question (just starting) - how do you actually see other people's projects? Download all the files, read the read me then like run a .Py file? How do you find interesting ones? Are all the specific versions of modules used in a project contained in the files somehow?

7

u/CityofWalls Apr 11 '20 edited Apr 11 '20

You can find other people’s projects on remote version control websites, ie GitHub, and explore them (code and all) to your heart’s content! What you’re looking at is a folder with all of the files that make up their project. These can be separated into other folders for clarity/consistency/encapsulation, they can all be in the top folder, or even just a single file like mycoolproject.py.

If you wanted to interact with the project, you have a couple options. First, notice that there is a big green button on GitHub that says “clone or download” that shows links when you click on it. You’ll use one of these to download your own copy of the project. GitHub has a desktop client that’s got some cool features, but I just download the project using ssh.

Next, make sure you have git installed and open the terminal (on Mac) or command prompt (on Windows) and navigate to the place you would like the project to be on your machine. This is done using the change directory command (cd [dir] -> cd [dir] -> ..., or cd [path to target dir]) and then typing git clone [that ssh link from github] and bam! you have the whole project.

Lastly, you can run it/install it or mess around with the files any way you like. If you end up with some improvement you can always send it back to github for the owner of the code to consider and possibly merge. The procedure for doing this is a little more complicated, but still pretty strait forward. I would recommend looking into making a branch, git add, git commit, git push, and then how to make a pull request on github when you’re ready for that.

Hope this helps!

3

u/AkiraYuske Apr 11 '20

Definitely does. Really really helpful. Looking forward to trying it out 😊 thanks!

0

u/[deleted] Apr 16 '20

[deleted]

1

u/CityofWalls Apr 16 '20

Yes, forgot to mention this! It’s good practice to have your own “version” of the repo if you’re planning on contributing to an open source project.

3

u/truthseeker1990 Apr 11 '20

The read me should contain instructions on how to run the project

1

u/thrallsius Apr 12 '20

How do you find interesting ones?

go to github and search for relevant keywords

80

u/[deleted] Apr 11 '20

[removed] — view removed comment

19

u/AkiraYuske Apr 11 '20

Absolutely has. I have to say ppl on here are amazing. Have helped fill in the blanks loads of times now. Thanks 😊

10

u/DrMikeAucksbiggPhD Apr 11 '20

This post is fantastic but it scrapes over one important detail that is ever-so-common; requirements.txt. If you see a file called “requirements.txt,” open the Terminal / CMD, move to the directory containing all of the project files and the requirements file, and do “pip install -r requirements.txt” - this will make sure you have any and all dependencies needed to run the project. If they don’t include a requirements.txt, it could mean that it either 1) runs off of default Python libraries or 2) you’ll need to open the files and manually pip install the non-default libraries and modules. I hope this helped some!

5

u/AkiraYuske Apr 11 '20

Thanks - looking forward to trying all this out. Seen lots of 'check this out on github' things and honestly didn't have the first clue how. The requirements thing I was particularly baffled by, as I'm only just becoming aware of virtual environments and wondered how this worked when you actually finished smth...

0

u/[deleted] Apr 12 '20

[deleted]

1

u/Sbvv Apr 12 '20

By one hand, you should mantain your global as clean as you can. Your system use Python, if you install a dependency as global you can make your system corrupted.

Be careful.

On the other hand, you should create a new isolated environment for every project you work. A good reason for this is that you can use different version of the same library in two different projects, and you are going to get an annoying error.

3

u/garlic_bread_thief Apr 12 '20

Is there a guide to how to organise files and what files to upload on GitHub?

2

u/Sbvv Apr 12 '20

Look for a scaffolding tool for python, that are going to help you.

2

u/garlic_bread_thief Apr 12 '20

Thank you. I'll look into it.

4

u/acrobaticenglishman Apr 11 '20

Just did it! Thanks for the tip!

2

u/Capitalpunishment0 Apr 12 '20

I want to do this but I'm kind of scared haha

1

u/real_confusedswede Apr 12 '20

Don't be! But if you really feel like you don't want to share it, could you please comment it here or just dm me it? :P

3

u/b10011 Apr 12 '20

I added a tiny project of mine and would be grateful to get any feedback on things to improve.

2

u/Winning__ Apr 12 '20

This was perfect timing. I just heard about using github today

2

u/LTGIV Apr 12 '20

DONE! Thanks for suggesting this.

If y'all don't know how to create and release a package for PyPi, I gave a talk at the Austin Python Meetup in January about how to do so, and will try to answer any questions on here, or on LinkedIn.

2

u/U5efull Apr 12 '20

I don't do this because everything I make is garbage.

1

u/garlic_bread_thief Apr 12 '20

What have you made so far?

2

u/thrallsius Apr 12 '20

create a README with some explanation and instructions

and a screenshot, unless it's a library or a CLI program that doesn't output anything to screen

2

u/vezeli Apr 13 '20

i would juat add LICENSE file if you want people to reuse your stuff, make PRs and do anything with changeing or using your code in any way. Otherwise, no license = no right to do anything.

1

u/whatacareerdebut Apr 12 '20

Thanks OP will do that.

1

u/insane_playzYT Apr 12 '20

I would, but because I'm running it on my own local web server, I am worried that a lot of people will check it out and crash the server

1

u/[deleted] Apr 12 '20

I don’t list projects on github anymore. But a friend of mine applied for a job and he didn’t have any real world projects. He did have a CS degree.

So he followed someone on github and grabbed their code. He retyped it and made comments then asked the creator about how this and that works. He studied it.

Then he applied for a SDE1 job using that project as his own. Project was a big deal. He bombed leet code questions but bc of that project it got one engineer to say push him through bc leetcode is trash anyway and doesn’t predict performance.

Now he’s a SDE2 at FAANG. He’s got his own projects now but he doesn’t post on github. Haha

0

u/[deleted] Apr 11 '20

[deleted]

14

u/real_confusedswede Apr 11 '20

Will do, i'll follow you!

0

u/[deleted] Apr 11 '20

[deleted]

3

u/real_confusedswede Apr 11 '20

Sweet! Saving it for later, might take a shot at some html/css and Bootstrap 4 :D

Currently making a bitly clone in flask!

0

u/[deleted] Apr 11 '20

[deleted]

1

u/real_confusedswede Apr 11 '20

Thanks! I don't mean any bad here but the the website kiinda looks like a 2010s design if you know what I mean :P

I myself get put off by those webpages but to each their own! The backend part is really impressive!!

2

u/landrykid Apr 11 '20

True, but the UI is simple and easy to use, so points for that. An increasing number of "modern" websites are way over-designed and over-engineered and a pain to use, or may not even load. Yes, there's a happy medium. <g>

1

u/real_confusedswede Apr 11 '20

Exactly :P The website may not look "modern and "sleek" but it's easy to navigate!

0

u/[deleted] Apr 12 '20

[deleted]

1

u/real_confusedswede Apr 12 '20

:D, btw I've gotten quite far with the bitly clone that I talked about yesterday! https://github.com/Vincent-Gustafsson/bytely

1

u/insane_playzYT Apr 12 '20

Nice game as well.

Currently getting like 1.4 hits a second on average