Skip to content

Instantly share code, notes, and snippets.

View katkamrachana's full-sized avatar

Rachana Katkam katkamrachana

View GitHub Profile
@woodRock
woodRock / daily-coding-problem-51.rb
Last active March 11, 2021 00:16
Given a function that generates perfectly random numbers between 1 and k (inclusive), where k is an input, write a function that shuffles a deck of cards represented as an array using only swaps. It should run in O(N) time. Hint: Make sure each one of the 52! permutations of the deck is equally likely.
#!/usr/bin/env ruby
def deck
ranks = ['A',*(2..10),'J','Q','K']
suits = ['♠','♦','♣','♥']
deck = []
suits.product(ranks).map { |rank, suit| deck << "#{rank}#{suit}" }
deck
end
@katkamrachana
katkamrachana / README-Template.md
Last active February 13, 2018 10:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

ChirayuAestheticDental

A service based web for Dr. Rajlaxmi Katkam Ghone, Spl in Aesthetic Dentistry(New York), B.D.S(Mumbai).

Deployment

Heroku

Built With

list_obj = [[1,2,[3]],4]
result = []
def flatten_list(input_ele, list_obj=[]):
if isinstance(input_ele, list):
flatten_list(input_ele, list_obj)
else:
list_obj.append(input_ele)
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active September 18, 2024 00:16
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.