This function takes an array of objects and executes a method in each object in parallel in multiple threads
How many times you have been looking for a function that does one
thing and you end up using a gem just for one function?
Here we'll fix that, consider rubyfunctions.com is your repository
for useful functions, you can get back to it any time
We all have seen the problem with too many dependencies, here we'll try to be as minimal as we can, we'll build off of ruby core and standard library only, making our functions as independent as possible, this means you'll be able to use it any project regardless of its framework
Now that you have a useful repository of functions you have wrote, show it to other developers, your function maybe useful for other people, Also you will get feedback from other developers to improve your knowledge, And you'll have the chance to also give feedback to others and learn something new from their functions
Emad Elsaid · @emad-elsaid · over 3 years
This function takes an array of objects and executes a method in each object in parallel in multiple threads
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Calculates the n-th Catalan number, (2N)! / (N! * (N + 1)!), in a mathematical operations efficient way.
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Floyd-Warshall (all pairs shortest path) algorithm implementation.
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Crawl a web page and extract URLs from its HTML using naive loop implementation. Its running time is comparable or less than using URI.extract().
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Calculates N choose K, N! / (K! * (N - K)!), in a mathematical operations efficient way.
Ahmed Khaled · @nemoload · over 3 years
Calculating the n-th number in Fibonacci sequence with dynamic programming.
ahmadabdelhalim · @ahmadabdelhalim · over 3 years
a function that accepts a string as an argument, and returns a new string where streaks of consecutive characters are compressed. For example “aaabbc” is compressed to “3a2bc”.
Ahmed Magdy · @a7madM · over 3 years
calculates factorial of a number recursively
Functional way for implementing reduce.
it invokes function for each element in the enumerable with the accumulator.
Abd Elrahman Telb · @abdoutelb · over 3 years
Take a number and return the its factorial in Iterative way.
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Calculates the n-th Fibonacci number iteratively.
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Takes a string and return true if it is a palindrome, false otherwise.
Ali Hamdi Ali Fadel · @AliOsm · over 3 years
Return true if two number are relatively prime (co-prime), false otherwise.
Ahmed Khaled · @nemoload · about 2 years
Creates a thread pool that takes a block and run it in parallel with different jobs and returns a list of the results