Existem algumas maneiras diferentes de desfazer as coisas no git, mas para o propósito deste…
Read MoreCategory: Uncategorized
How to revert a commit in git
UncategorizedThere are a few different ways to undo things in git but for the purpose…
Read MoreHow to permit nested parameters in Rails
UncategorizedThe context Rails 5 introduced a big change in how it handles ActionController::Parameters (the parameters…
Read MoreHow to upgrade Rails
UncategorizedI don’t write much about Rails here but whoa, two posts in a row! Well,…
Read MoreDo I need to indent my Python code? What about JavaScript?
UncategorizedYes! Indentation, or leading white space at the beginning of a line is required in…
Read MoreDifference among list, tuple and set in Python and when to use each one
UncategorizedPython has three similar data structures that can hold an unordered collection of elements: list,…
Read MoreAdd a filename in the command line when running a Python script
UncategorizedOR: Run a Python script with arguments You can add arguments to the command line…
Read MoreDisplay nested dictionary content sorted by key in Python
UncategorizedGiven a nested dictionary like this: dog_breeds = { 'Labrador Retriever': {'life_span': 14, 'male_weight': '36…
Read MoreProfiling: check how long it takes to run a Python script
UncategorizedFrom Python’s official documentation: “A profile is a set of statistics that describes how often and for…
Read MoreMap a string in Python with enumerate
UncategorizedProblem: create a map of the letters and indices in a string. My first approach was…
Read More