Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork [email protected] |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| texts =[u"ΰ€΅ΰ€Ύΰ€°ΰ€Ύΰ€£ΰ€Έΰ₯", u"ΰ€ΰ₯ΰ€ΰ₯ΰ€²ΰ€Ώΰ€", u"ΰ€ΰ€ͺΰ€¦ΰ€°ΰ₯ΰ€Άΰ€¨"] | |
| signs = [ | |
| u'\u0902', u'\u0903', u'\u093e', u'\u093f', u'\u0940', u'\u0941', | |
| u'\u0942', u'\u0943', u'\u0944', u'\u0946', u'\u0947', u'\u0948', | |
| u'\u094a', u'\u094b', u'\u094c', u'\u094d'] | |
| limiters = ['.','\"','\'','`','!',';',',','?'] | |
| virama = u'\u094d' |
| def fizzbuzz(n): | |
| if n % 3 == 0 and n % 5 == 0: | |
| return 'FizzBuzz' | |
| elif n % 3 == 0: | |
| return 'Fizz' | |
| elif n % 5 == 0: | |
| return 'Buzz' | |
| else: | |
| return str(n) |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)