Skip to content

Instantly share code, notes, and snippets.

View ferhatelmas's full-sized avatar
🚀

ferhat elmas ferhatelmas

🚀
View GitHub Profile
@ferhatelmas
ferhatelmas / Tokenizer.java
Created November 22, 2012 01:06
A class to find the words from a sentence that is a concatenation of the permutation of the words
package com.ferhatelmas;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
public class Tokenizer {
private HashMap<String, String> dict;
@ferhatelmas
ferhatelmas / pquotes.md
Created November 22, 2012 01:30
Programming related popular quotes

Programming Related Must-Know Quotes

  1. "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - Hoare

  2. "If debugging is the process of removing software bugs, then programming must be the process of putting them in." - Dijkstra

  3. "Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Gates

  4. "Nine people can’t make a baby in a month." - Brooks

@ferhatelmas
ferhatelmas / nb.sage
Created December 21, 2012 23:01
Sage drill 2
import hashlib
####Exercise 1###
#Inputs:
# sciper: the fixed prefix of the hash function
# input: the message to hash
#Returns
# trunc_40(MD5(sciper||input))
def modified_md5(sciper, input):
@ferhatelmas
ferhatelmas / what_to_have.md
Created February 18, 2013 12:53
What should be in entrepreneurs' presentations?

The most essential headings of a product presentation

  • Which problem is solved?
  • The size of the user market, is it really big or getting bigger quickly?
  • Team
  • What is done differently in the current competition?
  • Milestones of the product so far
@ferhatelmas
ferhatelmas / default.py
Last active December 16, 2015 05:59
Usage of environment variables to show a better way of handling settings in django
import os
exec("from .{0} import *".format(os.environ.get("NAR_ENVIRONMENT", "dev")))

Python Number Conversion Chart

From To Expression
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
@ferhatelmas
ferhatelmas / music.md
Last active December 16, 2015 16:29
Cool Music Services
@ferhatelmas
ferhatelmas / results.txt
Last active December 24, 2015 15:59
Performance comparison of different string concatenation methods in Python
Results: 5 for tree height, 40 for max branching (seems reasonable for current db)
Naive execution 5.043222
Mutable_string execution 38.200823
Char_array execution 7.517328
List execution 5.424522
Stringio execution 7.733451
List_comprehension execution 6.065958
Naive execution 7.540310