{"id":17982592,"url":"https://github.com/hubertroy/pythontricks","last_synced_at":"2025-10-14T08:04:30.884Z","repository":{"id":99929989,"uuid":"109267393","full_name":"HuberTRoy/pythonTricks","owner":"HuberTRoy","description":"Python tricks. Take your Python skills to the next level. :snake: :cake:","archived":false,"fork":false,"pushed_at":"2017-12-27T08:33:24.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T08:03:19.842Z","etag":null,"topics":["python","python-trick","skill","tricks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HuberTRoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-02T13:19:01.000Z","updated_at":"2019-12-18T04:18:07.000Z","dependencies_parsed_at":"2023-03-11T07:30:34.972Z","dependency_job_id":null,"html_url":"https://github.com/HuberTRoy/pythonTricks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HuberTRoy/pythonTricks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuberTRoy%2FpythonTricks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuberTRoy%2FpythonTricks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuberTRoy%2FpythonTricks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuberTRoy%2FpythonTricks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HuberTRoy","download_url":"https://codeload.github.com/HuberTRoy/pythonTricks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HuberTRoy%2FpythonTricks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018303,"owners_count":26086333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python-trick","skill","tricks"],"created_at":"2024-10-29T18:14:36.015Z","updated_at":"2025-10-14T08:04:30.855Z","avatar_url":"https://github.com/HuberTRoy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐍 Take your Python skills to the next level 🐍\n\nThese tricks come from \u003ca href=\"https://dbader.org/\"\u003eDan Bader\u003c/a\u003e and myself.\n\nTitle:\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/merge_two_dicts.py\"\u003eMerging two dicts in Python 3.5+ with a single expression. \u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/test_multiple_flags_at_once.py\"\u003eDifferent ways to test multiple flags at once in Python\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/sort_dict_by_value.py\"\u003eHow to sort a Python dict by value\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/get_on_dict_and_its_default.py\"\u003eThe get() method on Python dicts and its 'default' arg\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/define_a_class_manually_by_namedtuple.py\"\u003ePython's namedtuples can be a great alternative to defining a class manually\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/use_json_pretty_print_dict.py\"\u003eYou can use \"json.dumps()\" to pretty-print Python dicts\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/unpack_function_argument.py\"\u003eFunction argument unpacking in Python\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/import_this.py\"\u003e\"import this\"\u003c/a\u003e\n\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/measure_the_execution_time_with_the_timeit_module.py.py\"\u003eMeasure the execution time of small bits of Python code with the \"timeit\" module\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/is_vs_==.py\"\u003e\"is\" VS \"==\"\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/shorthand_for_in-place_value_swapping.py\"\u003ePython's shorthand for in-place value swapping\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/use_dict_to_replace_swich_case_statements.py\"\u003eDicts can be used to emulate switch/case statements\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/finding_the_most_common_elements_in_an_iterable.py\"\u003eFinding the most common elements in an iterable\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/fun.py\"\u003eFun\u003c/a\u003e\n\n\u003ca href=\"https://github.com/HuberTRoy/pythonTricks/blob/master/tricks/type_annotations.py\"\u003eType annotations\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubertroy%2Fpythontricks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubertroy%2Fpythontricks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubertroy%2Fpythontricks/lists"}