This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Soppost you have a file list like that | |
Step 1 on Seller.png Step 14 on Seller.png Step 19 on Seller.png Step 23 on Seller.png Step 28 on Seller.png Step 5 on Seller.png | |
Step 10 on Seller.png Step 15 on Seller.png Step 2 on Seller.png Step 24 on Seller.png Step 29 on Seller.png Step 6 on Seller.png | |
Step 11 on Seller.png Step 16 on Seller.png Step 20 on Seller.png Step 25 on Seller.png Step 3 on Seller.png Step 7 on Seller.png | |
Step 12 on Seller.png Step 17 on Seller.png Step 21 on Seller.png Step 26 on Seller.png Step 30 on Seller.png Step 8 on Seller.png | |
Step 13 on Seller.png Step 18 on Seller.png Step 22 on Seller.png Step 27 on Seller.png Step 4 on Seller.png Step 9 on Seller.png | |
You can format the output vertically and sort it like bellow | |
ls -1 | sort -t' ' -n -k2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Run this code to see the result | |
# | |
import timeit | |
def memoize_fib(func): | |
cache = {} | |
def inner(arg): | |
if arg not in cache: | |
cache[arg] = func(arg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sorting an array order by frequency of occurence and removing Duplicates in javascript | |
* @param {array} array An array to sort | |
* @returns {array} array of item order by frequency | |
**/ | |
function sortByFrequencyRemoveDuplicates(array) { | |
var frequency = {}; | |
var newArr = []; | |
array.forEach(function(value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Have the function SearchingChallenge(str) take the str parameter being | |
* passed and return the first word with the greatest number of repeated letters. | |
* For example: "Today, is the greatest day ever!" should return greatest because it has | |
* 2 e's (and 2 t's) and it comes before ever which also has 2 e's. If there are no words with | |
* repeating letters return -1. Words will be separated by spaces. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
def _generate_dic_letters(): | |
return dict(zip(list(string.ascii_uppercase),list(range(1, len(list(string.ascii_uppercase))+1)))) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_leap(year): | |
leap = False | |
if year not in range(1, 10**5): | |
print("Year must be witin range") | |
exit() | |
if(year % 4) == 0: | |
if (year % 100) == 0: | |
if (year % 400) == 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
@param low int | |
@param high int | |
Finds and prints on the screen | |
all odd numbers within the range; defined by to | |
variables low and high | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param $low int | |
* @param $high int | |
* | |
* Finds and prints on the screen | |
* all odd numbers with in the range provided by two | |
* variables $low and $high | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <author> janis.janovskis@gmail.com | |
*/ | |
var csv = [ | |
["https://api.soundcloud.com/tracks/910291", "https://api.different-embed.com/12345"], | |
["https://api.soundcloud.com/tracks/5678", "https://api.different-embed.com/562222278"], | |
["https://api.soundcloud.com/tracks/12345", "https://api.different-embed.com/89999999"] | |
] | |
var strings = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
soundcloud | different_url | |
---|---|---|
https://api.soundcloud.com/tracks/910291 | https://api.different-embed.com/12345 | |
https://api.soundcloud.com/tracks/5678 | https://api.different-embed.com/562222278 | |
https://api.soundcloud.com/tracks/12345 | https://api.different-embed.com/89999999 |
NewerOlder