[CHORE] Cleanup scripts, setup most of Travis

Also updated logos!
This commit is contained in:
Angelos Chalaris
2019-08-21 10:12:42 +03:00
parent 3ea7237658
commit c0d36df01c
12 changed files with 1145 additions and 729 deletions

View File

@ -1,16 +1,12 @@
sudo: false
language: python
cache: pip
python:
- "3.6"
language: node_js
cache:
directories:
- node_modules
node_js:
- lts/*
script:
- python scripts/lint.py
- python scripts/readme.py
- python website/main.py
- python scripts/auto-lint.py
- npm run extractor
- npm run builder
after_success:
- sed -i -e 's/\r$//' .travis/push.sh
- .travis/push.sh
env:
global:
- secure: RucoyHikFKD7yQq7FBHxOpwYSHSFYUO7QS/5VEXvU55AMnHwB97aI0DcQSMa+XHaSFVsqd4fR7nAP+5H6GMW/lUhIdeXIGzehgBTfuNeQmng2djGgS1lWY9fEOsn2XEL7JlXMi2P5YdZDpOAfiiLqT3W8EaCWDdV60tkizbSQhig2R3exI/649AjmGkIws+NqoYqrEfNpnTvgxJkp2jNuKfBkr0aaVdYuxdI6Kf2KnipEeuKsKJFds+tTjduEUKTg7I8lNSB+tQ9wIHNTDZffZrzODzE2esAZtnflxhkGQ6q7fW8DEj0rheuer+yD4WBWfph1CIxTL6B3VZgT6XQXCu09XzqgRUack0KIS6SBRKjRYJymH3eKNlxZGPpk4s90bX0Qo0a0vvcT4g/iejyVb917pcn2LjRZmmsFQUfJOcCJgU6EUvqNpfM9SWV8fJhaPOacvUnzDxFav3eRdDHaZYgXf0tzJfLAjsTv7rFbLZEnpqtvyKbHrXYLf9sICyPlHbCy4L5KAfguu735v0YPXko5Aabl6PvGcfafyLxVUb/0Y5ot3pLtGVJflfHeqYz8qbkoqp5RovSvTXntx/vVlx20TSE/rQP2l6JUNt98sGFJ+yOZ3SkMnyMdjE1YqeEngxZdzukec2SM3PtnaWxSbxV8Ue1XnM8D5nzhTf4UI8=
- chmod +x .travis/push.sh
- .travis/push.sh

View File

@ -1,17 +1,15 @@
#!/bin/bash
setup_git() {
git config --global user.email "mst10041967@gmail.com"
git config --global user.name "Rohit Tanwar"
git config --global user.email "30secondsofcode@gmail.com"
git config --global user.name "30secondsofcode"
}
commit_website_files() {
if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [ $TRAVIS_BRANCH == "master" ]; then
git checkout master
echo "Committing to master branch..."
git add -A
echo "All files added"
git status
git checkout master
git add *
if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [cron]"
elif [ $TRAVIS_EVENT_TYPE == "api" ]; then
@ -19,8 +17,6 @@ commit_website_files() {
else
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
fi
echo "Files commited"
git status
fi
fi
}
@ -29,12 +25,7 @@ upload_files() {
if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [ $TRAVIS_BRANCH == "master" ]; then
echo "Pushing to master branch..."
git push --force "https://${GH_TOKEN}@github.com/kriadmin/30-seconds-of-python-code.git" master > /dev/null 2>&1
echo "Pushing done"
echo "Pushing to website"
git subtree push --prefix website "https://${GH_TOKEN}@github.com/kriadmin/30-seconds-of-python-code.git" website
echo "Pushed to master branch"
git status
git push --force --quiet "https://${GH_TOKEN}@github.com/30-seconds/30-seconds-of-python-code.git" master > /dev/null 2>&1
fi
fi
}

1005
README.md

File diff suppressed because it is too large Load Diff

1
advanced.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="78" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect height="20" rx="3" fill="#fff" width="64"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h65v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110"><text x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">advanced</text><text x="325" y="140" transform="scale(.1)" textLength="530">advanced</text></g> </svg>

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,6 +1,6 @@
module.exports = {
// Project metadata
name: `30 seconds of python code`,
name: `30 seconds of python`,
description: `A curated collection of useful Python snippets that you can understand in 30 seconds or less.`,
shortName: `30s`,
repositoryUrl: `https://github.com/30-seconds/30-seconds-of-python-code`,
@ -11,5 +11,5 @@ module.exports = {
pagePath: `src/docs/pages`,
staticPartsPath: `src/static-parts`,
// General information
language: `python`,
language: `py`,
};

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -116,7 +116,7 @@ try {
output += misc.collapsible(
'Examples',
`\`\`\`${config.language}\n${snippet.attributes.codeBlocks.examples}\n\`\`\``,
`\`\`\`${config.language}\n${snippet.attributes.codeBlocks.example}\n\`\`\``,
);
output +=

View File

@ -12,7 +12,7 @@
]
},
"meta": {
"hash": "6bf29cb176e4e9ce664ad04c6d262b6848f26639624dbb812eb1074d1c68b82a"
"hash": "650f05b1f5d4420f6e44546b34fbb1dc381e9500b4c64adf7598651d5c188223"
}
},
{
@ -27,7 +27,7 @@
]
},
"meta": {
"hash": "ca101c9e623105dc857f1484fcea9211dda0dffc224834a5609d125257a7040f"
"hash": "9b1bdbb130a4fa6301e994359bf162bec262a35fdfd3f00519f7f6a59f1137c0"
}
},
{
@ -43,7 +43,7 @@
]
},
"meta": {
"hash": "78bfdea5946774504eea1ba100974ad48ce8cb0a1ce1404cee8d885f35bb93a1"
"hash": "ff65e9a114f47afb53e56a54588e418ef886f8bc508ed32543c97bd1d5966aae"
}
},
{
@ -60,7 +60,7 @@
]
},
"meta": {
"hash": "8de876b55fd8b75ec395a5d70c29d83c7515d3ae2d59b9c7848e66e6cb854af0"
"hash": "360d3b11343373558e25575401add239d4ab85154b72bfae347b19a487df35f3"
}
},
{
@ -75,7 +75,7 @@
]
},
"meta": {
"hash": "22c836b50fafc995904cc69096235ef9fb4c77a6faf38c4c5a4a88b2ed2126a8"
"hash": "49c7d4e1f7175d460074d776cfb0b534ddf753001b66d0e3cacc4177c59e994c"
}
},
{
@ -91,7 +91,7 @@
]
},
"meta": {
"hash": "2e62d552ca03ff9bc39f920f4e24745945729ba35acc8ba75267b315a9b43563"
"hash": "0975a7d514bc4f5c1c13731165b1a43e43b9dc0eff289fffdfdd4d67af92e23b"
}
},
{
@ -106,7 +106,23 @@
]
},
"meta": {
"hash": "ff655042992e2a6cded2c39439eca6a6542e4d7b4d019c9c8721fa61be6ccdb8"
"hash": "a80c7f1115762fffeaee2b4d75e36ce88dd288bdb4a99ae9c68c038223cbe00e"
}
},
{
"id": "camel",
"type": "snippetListing",
"title": "camel",
"attributes": {
"text": "Converts a string to camelcase.\n\nBreak the string into words and combine them capitalizing the first letter of each word, using a regexp.\n\n",
"tags": [
"string",
"regexp",
"intermediate"
]
},
"meta": {
"hash": "e003dc4980414b0731c01d4b4bf3f08774c3588de95bf38c17ad0e08bb1bd838"
}
},
{
@ -121,7 +137,7 @@
]
},
"meta": {
"hash": "f4b0ecfe5d6eb18a65699fbe706737723c2c0de6a16e07e4c7686e9ecbad29c5"
"hash": "830372b0e6a7a008c1ee9ec4ef11c6063ff14b94b09b4b081d220079fa89e2aa"
}
},
{
@ -136,7 +152,7 @@
]
},
"meta": {
"hash": "ec399b1f2bcb0888956d1ecb40fd509f22ba902cd7f3c53af02729d52f021f86"
"hash": "699eb144ef3a23fbc4375096ac28535f809b4fc5bd4a493dfbf0f7e8df61a446"
}
},
{
@ -152,7 +168,7 @@
]
},
"meta": {
"hash": "4a9cb79c384099543163d3b1b7e2fa389a4cc373b2b76b17563a4597ed29a4c7"
"hash": "9403a0321a9fcb907a18cadf8283be3ecf89a7a51e8679978e26cfb050918ced"
}
},
{
@ -167,7 +183,7 @@
]
},
"meta": {
"hash": "f8c9cdb2261bfe2932bc7d3d11853a3d42d468a88ad515e9f15d9abffe9b30a6"
"hash": "3a27343fc9afa6666e7ab4b015ebe883c083fbd37841058a37bb0e143d11b1ff"
}
},
{
@ -182,7 +198,7 @@
]
},
"meta": {
"hash": "7e3dc4519a629ec87f72e5b495227733735c9c2262e5f6a89264191967cfad31"
"hash": "20549e07442c96474df3db5824f7ac9eb8f1763234ef4abb0b500845cb71383d"
}
},
{
@ -197,7 +213,7 @@
]
},
"meta": {
"hash": "6b98c58b6aecf1b58ed36f55a407bf2f2d68938723d37472fe43d9e652d93fe6"
"hash": "2cef075bcbeb781fdfd9a2284f04281922c50c79273e90b1d6fa858b06c8fb60"
}
},
{
@ -212,7 +228,7 @@
]
},
"meta": {
"hash": "e78cb9229a2bc4c882fa7d901dbdee6ca9c33bde348650210afb210d3b98e1f6"
"hash": "b5b6656857a0c11b88b579c1f91451b78f7f2bd5c9eb209df7f15d4885d6bbc0"
}
},
{
@ -227,7 +243,7 @@
]
},
"meta": {
"hash": "eee88217431699369070beb38ca0265d963c78321bfd98de9e3a38533c6ee90e"
"hash": "9bd71bbccb9b18b35856360e4ccc7ae477ec7cd7e8363fc851ec3eac49813334"
}
},
{
@ -242,7 +258,7 @@
]
},
"meta": {
"hash": "aea9a271d47a5606912e2482b8cc6bfb7b7382c4d0c86545b194cc0ad5f342b5"
"hash": "05d4132e66af5a615c220781d247b7050445e001e76455343760a85e62edd106"
}
},
{
@ -258,7 +274,7 @@
]
},
"meta": {
"hash": "a100d5704afe48a7dce26871bc50c993670d7388d8e4958c02c07efe07884167"
"hash": "3f0192a6f20dd5c0d4635f3e6f736fefbfe433f2cf4f36b3da12f8467f7704c0"
}
},
{
@ -273,7 +289,7 @@
]
},
"meta": {
"hash": "479fcdba73e7429ccb82649a354159ad9008c63f852c960d6733c10ecafceae3"
"hash": "4b7b9afe16e5ffb48c84f267364ff5041598e59dce5fb7f3f165ad9835fb5175"
}
},
{
@ -289,7 +305,7 @@
]
},
"meta": {
"hash": "a240b4f3152f847cb5f3877ab2fa1f4b75259c5ce11e28a773ad34bdba14f0a8"
"hash": "67fcb3f28272e5c105374ce43a42382eba8ddb1c327989c102f82cc441ea0fe1"
}
},
{
@ -305,7 +321,7 @@
]
},
"meta": {
"hash": "576de2896d2565d44da5d42b4b57b37cf1b2e5fc69103ab48a9ed532040ffaf2"
"hash": "be2a8632262614ee14126e69efedbfb6517fdcc5c3453f859d8cd161d44e8b6e"
}
},
{
@ -321,7 +337,7 @@
]
},
"meta": {
"hash": "8356afa6609f21bef9f48c7fb4b82553cae27d67c4bb4e31bfda98ee814cf269"
"hash": "1a444727bf46de6441f3ebc87508c8cd2b1280dc1d0659d00e46a012e703d9d6"
}
},
{
@ -336,7 +352,7 @@
]
},
"meta": {
"hash": "d5c51547b66fcd9d42def2a6d92ba98429a12c6bec56a0dca8e4c0289525d5de"
"hash": "b0e4ab30cc730950401ab4291ce404b37132bc32bdeebbac1de871c581a55919"
}
},
{
@ -352,7 +368,7 @@
]
},
"meta": {
"hash": "3241103df06912913bbcfb51e03c1d355a7329e367aa9d4f6a770683bc196df8"
"hash": "e22b08efd49d4bba2cef3f7d2315e55a36223d7c861c19eaa23ca1b2ba72dc5b"
}
},
{
@ -383,7 +399,7 @@
]
},
"meta": {
"hash": "05679ae115d276830ec769a04b0800d92eabc6a09678fc1a9cf6013c813cc650"
"hash": "1bbae73c12dc8ee2bf80e93b2328d8f5138e603fa0ea381999fc388a25cdb107"
}
},
{
@ -398,7 +414,7 @@
]
},
"meta": {
"hash": "dbb01e7253dbb6f3e2f53271fc14fb7b3ee9816fe56266f78a54b4ca21c94cd7"
"hash": "ab1de2550801b4c4c2ab773912ea60553a9ef46d5928c879964432825aa6e7e3"
}
},
{
@ -414,7 +430,7 @@
]
},
"meta": {
"hash": "e103229c295cbfcbf26b5529b068e382bb0a1a04e080311e46302721841bbfe0"
"hash": "592f01a019379e6e1eeca55406a923930ab77133a5653febb585847ed387df58"
}
},
{
@ -429,7 +445,7 @@
]
},
"meta": {
"hash": "762663e25e978ee96720d6fd977e4ca42b328150fa654d0e600c636284552712"
"hash": "8aa2f1de87b94cb1eb6cdc0c048d051aae9d5561b8e6ca92b66c4543c8e24cd5"
}
},
{
@ -444,7 +460,7 @@
]
},
"meta": {
"hash": "6c86b52c2c7a56a4527114736664a3720b2026d2419b87daf36de6877ad0e4b0"
"hash": "079183a15856f39a61ea1c375a272565e3f70826f2579eaa66683f06aca7205b"
}
},
{
@ -459,7 +475,7 @@
]
},
"meta": {
"hash": "f65d098189837551aef365c68bd9389a0c1e84e89233fa5a886e889ce6981f9f"
"hash": "d3d40fb3ff5df9a9bb70b825b91952ca16ed4033fae94a1ea0eac7f64566a989"
}
},
{
@ -474,7 +490,7 @@
]
},
"meta": {
"hash": "cf0229dd484711e5847d85952841a13800bb5e0767c1de40e219f63cfed3e0f1"
"hash": "792086091d9aa9180f447ee3fb0d606f2dbc38c2b917d1c7a610d32071d40cc2"
}
},
{
@ -489,7 +505,7 @@
]
},
"meta": {
"hash": "a848fc33363ab533f745e081d885b4c981716ae063867ea9a2b471fd8fc92ac7"
"hash": "e141f00ba64f6308c0563ff6132191a798a14fe7783be884ab46bf698892c8cc"
}
},
{
@ -504,7 +520,7 @@
]
},
"meta": {
"hash": "b68fef168bb92503e54278a95753fd48b3cb9f5151e17d36ce69c7eae298683c"
"hash": "729784a5d236cb13fde71cab421a1487481d34f26e8acc3c923695ff972a965a"
}
},
{
@ -519,7 +535,7 @@
]
},
"meta": {
"hash": "87604b968fccbc3d60399619b388f5939d646059db467fc2c86f99138f68b952"
"hash": "a86132d77e383748415b694deff0f452f1ee22763a47ee8fa95a938faceec926"
}
},
{
@ -534,7 +550,7 @@
]
},
"meta": {
"hash": "a332cce7b7d7e303469e8c39c4926bf92ecb12847c3932985cc633e3a85a23bb"
"hash": "50509c3103ce76585b558ecd98a8833568795ecb260e5b9bf955245078a49af8"
}
},
{
@ -550,7 +566,7 @@
]
},
"meta": {
"hash": "eb4bff1a92a7848c8184531fee590e8f060a6d4f6ffe214aec4ccda7a5e18031"
"hash": "cde08163638452f63975589a3341c69e4621b364db22f6ab3d205bd895ad8b9a"
}
},
{
@ -565,7 +581,7 @@
]
},
"meta": {
"hash": "3080e22832c2a393f1546f4cff18b15b701fbe27dc2368fd26700a05f2f109a2"
"hash": "47c878d10f937760d9096ccedb10357df3ba1e87333fdc8256c9a6938994eef8"
}
},
{
@ -580,7 +596,7 @@
]
},
"meta": {
"hash": "e6272becc36195e4b76f62baa61d43d9de5472201d1fb589e18bd5f47d6d57b0"
"hash": "0502ded5a0a750f7d4f03940d046a9f41ad0189a79ad7f42d9fe8ce9333b81e8"
}
},
{
@ -595,7 +611,7 @@
]
},
"meta": {
"hash": "354d3fcfa67b5df106c0ff528246bfacd2d7cec4942a7c3a904d87e76d7dae11"
"hash": "0579f16d399d4ed57a52e6575633fe924d1b269268c2b1afe830f34ff0cf9a09"
}
},
{
@ -611,7 +627,7 @@
]
},
"meta": {
"hash": "ed6b313aaf87ba7ea9515679eea19f395f7bbd90b9f8b85ef54ca527115fa690"
"hash": "d84277f13e3250c2e9d8a6afd693d52a7383f29ea1fdf71bd5dd1f3d8d3a5baf"
}
},
{
@ -626,7 +642,7 @@
]
},
"meta": {
"hash": "2670b3500855c72812593fd30692701798be1bb3a7a68c2bb65a273fdee5c95a"
"hash": "b112c57fecf98765d44027b570c3f9b9fb304d450584bdee477b558861380ab9"
}
},
{
@ -642,7 +658,23 @@
]
},
"meta": {
"hash": "106225722752b199f974c06aec91721344499e46dbf643e9f2ce990ee8c2d3c1"
"hash": "fd01ad582630e68200df9317aa68877d4942412fab8ce123533460f4937203f2"
}
},
{
"id": "kebab",
"type": "snippetListing",
"title": "kebab",
"attributes": {
"text": "Converts a string to kebab case.\n\nBreak the string into words and combine them adding `-` as a separator, using a regexp.\n\n",
"tags": [
"string",
"regexp",
"intermediate"
]
},
"meta": {
"hash": "35f4a0ae7433cef616f137b696b909d7f5046685e64af70d59934f4d34e6c5d7"
}
},
{
@ -658,7 +690,7 @@
]
},
"meta": {
"hash": "4e4a5b4892fcccb2982e7ae352f9d61fa0234c209431c9461ea47d503feaaf49"
"hash": "f8cf88c53dd53b702bc504a2d36f9c9bddbe3bfdc0c2946909b9fd6de2370122"
}
},
{
@ -673,7 +705,7 @@
]
},
"meta": {
"hash": "7fc339fbdb18e993fc93950b307fe2ec792c3f010f5dee0971d02288af16d67b"
"hash": "7cefc731b24f3979e93354686c1ca91adebd7cfadc8cd903cbb784730fcce0d3"
}
},
{
@ -690,7 +722,7 @@
]
},
"meta": {
"hash": "a0cf166fd37f16c6bcaef46345ff11af0dadb488160168a0915e665550f7a669"
"hash": "0365d1bab90dcf808af1c31671e3bb712b4fa0a975e95fb97450a1db6eb8e7f2"
}
},
{
@ -707,7 +739,7 @@
]
},
"meta": {
"hash": "dd1a2d1300f23bb8f8618f9ab20dad11062f4476be80081e3cefc535717da818"
"hash": "fea8c001eb0d4a9c2bcd37b3e5fe5b636fec2fe0e937f1195bf1fec357d42e53"
}
},
{
@ -723,7 +755,7 @@
]
},
"meta": {
"hash": "91f93e124e2f1fb9d25b62db478f91503330947a7c212dc97215dec8c4b225fe"
"hash": "8478ad6fd73b9c7c15d7243b0be989ada0159c694471a520076f953ebf986258"
}
},
{
@ -731,7 +763,7 @@
"type": "snippetListing",
"title": "max_by",
"attributes": {
"text": "Returns the maximum value of a list, after mapping each element to a value using the provided function.\n\nuse `map()` with `fn` to map each element to a value using the provided function, convert to a `list` and use `max()` to return the maximum value.\n\n",
"text": "Returns the maximum value of a list, after mapping each element to a value using the provided function.\n\nUse `map()` with `fn` to map each element to a value using the provided function, convert to a `list` and use `max()` to return the maximum value.\n\n",
"tags": [
"math",
"list",
@ -740,7 +772,7 @@
]
},
"meta": {
"hash": "b6758923ca701c9248e39ad2fd866c00af60dcdb670eb9845729b50bc2c59131"
"hash": "3538fe0c61f5ba76adc478a7a03603e227ae49209ff345f1a65e8163844e7024"
}
},
{
@ -756,7 +788,7 @@
]
},
"meta": {
"hash": "572897e2101454c75554f182d31b02182f296be88e10d8b41c15c7ac1e74ce25"
"hash": "779eb91b49e8f15d476fa067c4892bac0c63c962afa82ab42e7ef416c4a3d5a2"
}
},
{
@ -764,7 +796,7 @@
"type": "snippetListing",
"title": "min_by",
"attributes": {
"text": "Returns the minimum value of a list, after mapping each element to a value using the provided function.\n\nuse `map()` with `fn` to map each element to a value using the provided function, convert to a `list` and use `min()` to return the minimum value.\n\n",
"text": "Returns the minimum value of a list, after mapping each element to a value using the provided function.\n\nUse `map()` with `fn` to map each element to a value using the provided function, convert to a `list` and use `min()` to return the minimum value.\n\n",
"tags": [
"math",
"list",
@ -773,7 +805,7 @@
]
},
"meta": {
"hash": "9b63955e5c0c0723f55213a88f052e97a297f042b162dc4b6507a87317615c9c"
"hash": "72812142d33c4328a3c69764b1ddde2ba4a64e0a6c10107b38835e1ef9d0655a"
}
},
{
@ -789,7 +821,7 @@
]
},
"meta": {
"hash": "c920b58f01c63346e65eab83a60c4635d4c104e41767b9d41ad94029e662b902"
"hash": "653535ca2eb51b2f792c529c4e8e96f99dcaceaf63b72c486c9b072fb5ea1a41"
}
},
{
@ -805,7 +837,7 @@
]
},
"meta": {
"hash": "2f345a768997fb0523dfbb775281ca0338a849032b5d8671d313c08f46f9b26e"
"hash": "50d683ab59844b8de41fee0fb2ed3267e68c5c3020265b51b2f49f75bc3bd85e"
}
},
{
@ -820,7 +852,7 @@
]
},
"meta": {
"hash": "86c03a0d8ea80a203414f79670fec491b232acd5448108c1858058df68833f42"
"hash": "e86853e988f5c40cd8ef95ef80da49fe9e40626ea754db4a83f5b68d9713afe9"
}
},
{
@ -835,7 +867,7 @@
]
},
"meta": {
"hash": "e707d6b2f27bcc3dda322b114199b2b22ea916871b1c657c43648ecb5b21240b"
"hash": "2da6734174e371587baeebba432bc0f441f024211e900c4852fca7eeb08f89df"
}
},
{
@ -850,7 +882,7 @@
]
},
"meta": {
"hash": "c3008a44f2eb31adaca3e4f91c29a56a955e3105f9c187aa055fc55c35874b41"
"hash": "b5eac6740b6b78892d5978c26e44dc2747898c179f6d1e2c6f181f716ed4ee97"
}
},
{
@ -866,7 +898,7 @@
]
},
"meta": {
"hash": "68c3a2f20c4969324199dc6005be573d95ec4d08747586bf26d0bf06b571c94c"
"hash": "d8cf3ead7fde16fd0886baa5469ef55844848d25629c4fff011d1e27496b75ad"
}
},
{
@ -882,7 +914,7 @@
]
},
"meta": {
"hash": "8c6e1dafadd78f04b11d412b7b8db01e1275339adf906e2637129d761117e480"
"hash": "e50c5b8daa558ff5ea7f2516a3e382f4e91bcf8ab5999041376020080dd916c0"
}
},
{
@ -897,7 +929,23 @@
]
},
"meta": {
"hash": "51e5a4fc0b3376f24804b51f71c3daed109b1e60535aa39bca44c1918fedaacf"
"hash": "54faf1a5edfa2e6c1508635fa2492ad22978ac988b250acedd2cdb64670fc019"
}
},
{
"id": "snake",
"type": "snippetListing",
"title": "snake",
"attributes": {
"text": "Converts a string to snake case.\n\nBreak the string into words and combine them adding `_-_` as a separator, using a regexp.\n\n",
"tags": [
"string",
"regexp",
"intermediate"
]
},
"meta": {
"hash": "c2a90128c4edf395cf659da0b2ad9ddccbf13eb19c900d4a8734bc98613096d8"
}
},
{
@ -913,7 +961,7 @@
]
},
"meta": {
"hash": "5052bf5e5a38a8a928ea6b3e42cecda2027d2123dd5e47764b354eafd3310dee"
"hash": "aada6496416fff036ff40ae4a8555d4bc27d56a0ce869d0d4366c410beada2bc"
}
},
{
@ -928,7 +976,7 @@
]
},
"meta": {
"hash": "9c8d9abb223e26561b4278e5b29c373a9196297143a504d353c7fbcd8c5102b2"
"hash": "aa12646b6b9629fe38eb7b04bdc5a9fbff64b012d5b65fcac1e8d0a42a14fd05"
}
},
{
@ -944,7 +992,55 @@
]
},
"meta": {
"hash": "db09a105c21df08d2d580e95dd9d3f895a38e2e9b29818f78a671203ab94df38"
"hash": "5e9cf0033df73310e23800b6d41677a8607342717d23ef661f17f559cae7a8d8"
}
},
{
"id": "sum_by",
"type": "snippetListing",
"title": "sum_by",
"attributes": {
"text": "Returns the sum of a list, after mapping each element to a value using the provided function.\n\nUse `map()` with `fn` to map each element to a value using the provided function, convert to a `list` and use `sum()` to return the sum of the values.\n\n",
"tags": [
"math",
"list",
"function",
"beginner"
]
},
"meta": {
"hash": "d97b4f2c69fafe781e6a0a72f2e41a2041ae960b2cb078b40a89ebba7464adab"
}
},
{
"id": "symmetric_difference",
"type": "snippetListing",
"title": "symmetric_difference",
"attributes": {
"text": "Returns the symmetric difference between two iterables, without filtering out duplicate values.\n\nCreate a `set` from each list, then use list comprehension on each one to only keep values not contained in the previously created set of the other.\n\n",
"tags": [
"list",
"beginner"
]
},
"meta": {
"hash": "b1b608eac070e1c51ded6494ba0a5291e3f2afaced5ea026201dac0a1ebdbe73"
}
},
{
"id": "symmetric_difference_by",
"type": "snippetListing",
"title": "symmetric_difference_by",
"attributes": {
"text": "Returns the symmetric difference between two lists, after applying the provided function to each list element of both.\n\nCreate a `set` by applying `fn` to each element in every list, then use list comprehension in combination with `fn` on each one to only keep values not contained in the previously created set of the other.\n\n",
"tags": [
"list",
"function",
"intermediate"
]
},
"meta": {
"hash": "d6b4f42c3d08fee38e8674c6059e01deffeb74d943e9d89e0836a39fe19309cc"
}
},
{
@ -959,7 +1055,38 @@
]
},
"meta": {
"hash": "f06acf219bcdfbacb9e86b01f91c7d68f6f8fa8a5a043c37cf33de4969c62eae"
"hash": "819f20907ca5f906b185988f32e06c1c39e9a39786dac76a3421c55c7f5327b1"
}
},
{
"id": "union",
"type": "snippetListing",
"title": "union",
"attributes": {
"text": "Returns every element that exists in any of the two lists once.\n\nCreate a `set` with all values of `a` and `b` and convert to a `list`.\n\n",
"tags": [
"list",
"beginner"
]
},
"meta": {
"hash": "cf3bd4a569cce91769a1e4781a4317d93a023ec04658389532b00572fc3d2b7a"
}
},
{
"id": "union_by",
"type": "snippetListing",
"title": "union_by",
"attributes": {
"text": "Returns every element that exists in any of the two lists once, after applying the provided function to each element of both.\n\nCreate a `set` by applying `fn` to each element in `a`, then use list comprehension in combination with `fn` on `b` to only keep values not contained in the previously created set, `_a`.\nFinally, create a `set` from the previous result and `a` and transform it into a `list`\n\n",
"tags": [
"list",
"function",
"intermediate"
]
},
"meta": {
"hash": "0da21f57e2c6eb4efedcbcf555b00843c03df3f5c505de421a4b4d226a1f081e"
}
},
{
@ -974,7 +1101,7 @@
]
},
"meta": {
"hash": "1f28461c8bbf4ce0195c756b2f013e519a43fbdef8b6a3640eafab2a6cb20bc9"
"hash": "3a1e3b5eb2b223a3b7b8cdcf96b961724d72ddd7d9e276f9fcd730572bd1bba2"
}
},
{
@ -990,7 +1117,7 @@
]
},
"meta": {
"hash": "15dec93f30e55d25c07f9d5456d5e96f9b6a5a794d9a0874a39be0359a42c10f"
"hash": "be7662f58cb7e4a29f719939f58214192107a86d764cd2ef9fbf583ee6dc5f59"
}
},
{
@ -1006,7 +1133,7 @@
]
},
"meta": {
"hash": "8c0dea46f260c7edfa363a0a295683d858c2011c9220b2d4fc53025a684388f0"
"hash": "44281b36c4ae79373b6266790741f21225e47c989e3bbfe232b939f5b69270c6"
}
}
],

File diff suppressed because it is too large Load Diff

View File

@ -5,5 +5,4 @@
## Credits
*Icons made by [Smashicons](https://www.flaticon.com/authors/smashicons) from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/).*
*This README is built using [markdown-builder](https://github.com/30-seconds/markdown-builder).*