diff --git a/snippets/add_days.md b/snippets/add_days.md index 954e1d72f..425e6ce94 100644 --- a/snippets/add_days.md +++ b/snippets/add_days.md @@ -1,5 +1,5 @@ --- -title: add_days +title: Add days to date tags: date,intermediate firstSeen: 2020-10-28T16:19:04+02:00 lastUpdated: 2020-10-28T16:19:04+02:00 diff --git a/snippets/all_equal.md b/snippets/all_equal.md index 79f6d063b..b3a0d1e6b 100644 --- a/snippets/all_equal.md +++ b/snippets/all_equal.md @@ -1,5 +1,5 @@ --- -title: all_equal +title: Check if list elements are identical tags: list,beginner firstSeen: 2019-08-20T11:39:18+03:00 lastUpdated: 2020-10-11T13:40:42+03:00 diff --git a/snippets/all_unique.md b/snippets/all_unique.md index ce7d5c178..1a11f1987 100644 --- a/snippets/all_unique.md +++ b/snippets/all_unique.md @@ -1,5 +1,5 @@ --- -title: all_unique +title: Check if a list has no duplicates tags: list,beginner firstSeen: 2018-04-01T11:03:09+03:00 lastUpdated: 2021-01-07T23:30:28+02:00 diff --git a/snippets/arithmetic_progression.md b/snippets/arithmetic_progression.md index 2fb19fa30..74cdcda0b 100644 --- a/snippets/arithmetic_progression.md +++ b/snippets/arithmetic_progression.md @@ -1,5 +1,5 @@ --- -title: arithmetic_progression +title: Arithmetic progression tags: math,beginner firstSeen: 2020-07-28T13:57:33+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 @@ -15,5 +15,5 @@ def arithmetic_progression(n, lim): ``` ```py -arithmetic_progression(5, 25) # [5, 10, 15, 20, 25] +arithmetic_progression(5, 25) # [5, 10, 15, 20, 25] ``` diff --git a/snippets/average.md b/snippets/average.md index 9d6267dfc..d0d223e81 100644 --- a/snippets/average.md +++ b/snippets/average.md @@ -1,5 +1,5 @@ --- -title: average +title: Average tags: math,list,beginner firstSeen: 2018-01-27T07:16:41+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/average_by.md b/snippets/average_by.md index 6c4e464ba..bab64e73e 100644 --- a/snippets/average_by.md +++ b/snippets/average_by.md @@ -1,5 +1,5 @@ --- -title: average_by +title: Mapped list average tags: math,list,intermediate firstSeen: 2019-08-20T11:55:10+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/bifurcate.md b/snippets/bifurcate.md index 0092af1e6..db5e58806 100644 --- a/snippets/bifurcate.md +++ b/snippets/bifurcate.md @@ -1,11 +1,11 @@ --- -title: bifurcate +title: Bifurcate list based on values tags: list,intermediate firstSeen: 2019-08-20T12:37:06+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 --- -Splits values into two groups, based on the result of the given `filter` list. +Splits values into two groups, based on the result of the given `filter` list. - Use a list comprehension and `zip()` to add elements to groups, based on `filter`. - If `filter` has a truthy value for any element, add it to the first group, otherwise add it to the second group. diff --git a/snippets/bifurcate_by.md b/snippets/bifurcate_by.md index 6d6fefcd9..10a6ff40b 100644 --- a/snippets/bifurcate_by.md +++ b/snippets/bifurcate_by.md @@ -1,5 +1,5 @@ --- -title: bifurcate_by +title: Bifurcate list based on function tags: list,intermediate firstSeen: 2019-08-20T12:41:21+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/binomial_coefficient.md b/snippets/binomial_coefficient.md index e33f64c0c..efa08a3dd 100644 --- a/snippets/binomial_coefficient.md +++ b/snippets/binomial_coefficient.md @@ -1,5 +1,5 @@ --- -title: binomial_coefficient +title: Binomial coefficient tags: math,beginner firstSeen: 2020-10-04T11:56:31+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/byte_size.md b/snippets/byte_size.md index d3f955048..b56db38e3 100644 --- a/snippets/byte_size.md +++ b/snippets/byte_size.md @@ -1,5 +1,5 @@ --- -title: byte_size +title: Byte size of string tags: string,beginner firstSeen: 2018-02-01T10:19:59+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/camel.md b/snippets/camel.md index b79248151..68274d68a 100644 --- a/snippets/camel.md +++ b/snippets/camel.md @@ -1,5 +1,5 @@ --- -title: camel +title: Camelcase string tags: string,regexp,intermediate firstSeen: 2019-08-21T08:59:54+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/capitalize.md b/snippets/capitalize.md index 0e38e70d8..f3a6d5cf9 100644 --- a/snippets/capitalize.md +++ b/snippets/capitalize.md @@ -1,5 +1,5 @@ --- -title: capitalize +title: Capitalize string tags: string,intermediate firstSeen: 2018-02-01T10:19:59+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/capitalize_every_word.md b/snippets/capitalize_every_word.md index 784d4b6ca..669e015b7 100644 --- a/snippets/capitalize_every_word.md +++ b/snippets/capitalize_every_word.md @@ -1,5 +1,5 @@ --- -title: capitalize_every_word +title: Capitalize every word tags: string,beginner firstSeen: 2018-02-01T10:19:59+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/cast_list.md b/snippets/cast_list.md index d077c0ef8..f7b12984a 100644 --- a/snippets/cast_list.md +++ b/snippets/cast_list.md @@ -1,5 +1,5 @@ --- -title: cast_list +title: Cast to list tags: list,intermediate firstSeen: 2019-08-20T12:47:43+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/celsius_to_fahrenheit.md b/snippets/celsius_to_fahrenheit.md index 39aac29b4..152415a9c 100644 --- a/snippets/celsius_to_fahrenheit.md +++ b/snippets/celsius_to_fahrenheit.md @@ -1,5 +1,5 @@ --- -title: celsius_to_fahrenheit +title: Celsius to Fahrenheit tags: math,beginner unlisted: true firstSeen: 2020-04-05T12:29:03+03:00 diff --git a/snippets/check_prop.md b/snippets/check_prop.md index dff5991f8..f192388d0 100644 --- a/snippets/check_prop.md +++ b/snippets/check_prop.md @@ -1,13 +1,13 @@ --- -title: check_prop +title: Check property tags: function,intermediate firstSeen: 2020-01-02T16:49:25+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 --- -Creates a function that will invoke a predicate function for the specified property on a given object. +Creates a function that will invoke a predicate function for the specified property on a given dictionary. -- Return a `lambda` function that takes an object and applies the predicate function, `fn` to the specified property. +- Return a `lambda` function that takes a dictionary and applies the predicate function, `fn` to the specified property. ```py def check_prop(fn, prop): diff --git a/snippets/chunk.md b/snippets/chunk.md index b6c584289..3f17053cf 100644 --- a/snippets/chunk.md +++ b/snippets/chunk.md @@ -1,5 +1,5 @@ --- -title: chunk +title: Split list into chunks tags: list,intermediate firstSeen: 2018-01-09T06:39:42+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/chunk_into_n.md b/snippets/chunk_into_n.md index 211c53f72..c8165b8dd 100644 --- a/snippets/chunk_into_n.md +++ b/snippets/chunk_into_n.md @@ -1,5 +1,5 @@ --- -title: chunk_into_n +title: Split list into n chunks tags: list,intermediate firstSeen: 2020-10-12T22:11:30+03:00 lastUpdated: 2020-10-23T05:35:06+03:00 diff --git a/snippets/clamp_number.md b/snippets/clamp_number.md index ba17926fe..39d5117c3 100644 --- a/snippets/clamp_number.md +++ b/snippets/clamp_number.md @@ -1,5 +1,5 @@ --- -title: clamp_number +title: Clamp number tags: math,beginner firstSeen: 2019-08-20T12:50:38+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/collect_dictionary.md b/snippets/collect_dictionary.md index d380b6d73..8e09635e5 100644 --- a/snippets/collect_dictionary.md +++ b/snippets/collect_dictionary.md @@ -1,5 +1,5 @@ --- -title: collect_dictionary +title: Invert dictionary tags: dictionary,intermediate firstSeen: 2020-04-07T21:15:06+03:00 lastUpdated: 2020-11-02T19:27:07+02:00 @@ -7,7 +7,7 @@ lastUpdated: 2020-11-02T19:27:07+02:00 Inverts a dictionary with non-unique hashable values. -- Create a `collections.defaultdict` with `list` as the default value for each key. +- Create a `collections.defaultdict` with `list` as the default value for each key. - Use `dictionary.items()` in combination with a loop to map the values of the dictionary to keys using `dict.append()`. - Use `dict()` to convert the `collections.defaultdict` to a regular dictionary. diff --git a/snippets/combine_values.md b/snippets/combine_values.md index 4164e6cfb..2a72ea82a 100644 --- a/snippets/combine_values.md +++ b/snippets/combine_values.md @@ -1,5 +1,5 @@ --- -title: combine_values +title: Combine dictionary values tags: dictionary,intermediate firstSeen: 2021-03-07T12:30:47+02:00 lastUpdated: 2021-04-04T14:32:35+03:00 diff --git a/snippets/compact.md b/snippets/compact.md index ad3d06673..defe3cfd6 100644 --- a/snippets/compact.md +++ b/snippets/compact.md @@ -1,5 +1,5 @@ --- -title: compact +title: Compact list tags: list,beginner firstSeen: 2018-01-19T12:17:06+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/compose.md b/snippets/compose.md index d4401050d..dfb34db72 100644 --- a/snippets/compose.md +++ b/snippets/compose.md @@ -1,5 +1,5 @@ --- -title: compose +title: Compose functions tags: function,advanced firstSeen: 2020-01-02T15:51:20+02:00 lastUpdated: 2020-11-02T19:27:07+02:00 diff --git a/snippets/compose_right.md b/snippets/compose_right.md index 73a2ee1a9..fd9fe8e01 100644 --- a/snippets/compose_right.md +++ b/snippets/compose_right.md @@ -1,5 +1,5 @@ --- -title: compose_right +title: Reverse compose functions tags: function,advanced firstSeen: 2020-01-02T15:51:26+02:00 lastUpdated: 2020-11-02T19:27:07+02:00