👷♂️
This file contains 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
<script> | |
s=Math.sin;z=0;d=document;function | |
a(){for(i=0;i<50;i++){z?0:d.write('<b id=x'+i+' style=position:absolute>&#'+(3333+i)+';</b>');w=i*s(z);o=d.all['x'+i];if(o!=null){r=o.style;r.top=s(w)*i*4+230;r.left=s(w+2)*i*4+230;}}z+=.015;setTimeout('a()',50)}a() | |
</script> |
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
texts =[u"वाराणसी", u"भौगोलिक", u"उपदर्शन"] | |
signs = [ | |
u'\u0902', u'\u0903', u'\u093e', u'\u093f', u'\u0940', u'\u0941', | |
u'\u0942', u'\u0943', u'\u0944', u'\u0946', u'\u0947', u'\u0948', | |
u'\u094a', u'\u094b', u'\u094c', u'\u094d'] | |
limiters = ['.','\"','\'','`','!',';',',','?'] | |
virama = u'\u094d' |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
This file contains 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 fontforge | |
font = fontforge.open("/usr/share/fonts/truetype/ttf-malayalam-fonts/Meera_04.ttf", 4) | |
print "Glyphs" | |
for (i,g) in enumerate(font.glyphs()): | |
print "%s\t%s\t%s\t%s\t%s\t%s\t%s"%(i,g.glyphname,g.glyphclass,g.script,g.encoding,g.unicode,g.getPosSub("*")) | |
print "GSUB Lookups" | |
for (i,g) in enumerate(font.gsub_lookups): | |
print "%s\t%s"%(i,g) | |
print "GPOS Lookups" | |
for (i,g) in enumerate(font.gpos_lookups): |
This file contains 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 | |
function formatNumber($format, $string) | |
{ | |
$numMatches = preg_match_all("/(#+)/", $format, $matches); | |
preg_match("/\d+/", $string, $numberpart); | |
preg_match("/\.\d*/", $string, $decimalpart); | |
$groupedNumber = (count($decimalpart)>0)?$decimalpart[0]:""; | |
$start = $end = strlen($numberpart[0]); | |
if($numMatches==0){ | |
return $string; |
This file contains 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 | |
if ( PHP_SAPI !== 'cli' ) | |
{ | |
exit( 1 ); | |
} | |
if( !isset($argv[1]) || $argv[1] === "-h" ){ | |
echo "Usage: php undocumentedmessages.php i18nfile \n"; | |
exit( 0 ); | |
} | |
$i18nfile = $argv[1]; |
This file contains 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 | |
function levenshtein_php($str1, $str2){ | |
$length1 = mb_strlen( $str1, 'UTF-8'); | |
$length2 = mb_strlen( $str2, 'UTF-8'); | |
if( $length1 < $length2) return levenshtein_php($str2, $str1); | |
if( $length1 == 0 ) return $length2; | |
if( $str1 === $str2) return 0; | |
$prevRow = range( 0, $length2); | |
$currentRow = array(); | |
for ( $i = 0; $i < $length1; $i++ ) { |
This file contains 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
var levenshteinDistance = function(u, v) { | |
var m = u.length; | |
var n = v.length; | |
var D = []; | |
for(var i = 0; i <= m; i++) { | |
D.push([]); | |
for(var j = 0; j <= n; j++) { | |
D[i][j] = 0; | |
} | |
} |
This file contains 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
# Number of contributors to the project | |
git log --pretty='%aN'|sort -u|wc -l | |
# Total commits made | |
git log --oneline | wc -l | |
# NUmber of lines written/modified | |
git log --stat|perl -ne 'END { print $c } $c += $1 if /(\d+) insertions/;' | |
# Top 5 contributos all time |
This file contains 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="11"> | |
<profile kind="CodeFormatterProfile" name="mediawiki" version="11"> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_empty_lines" value="false"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/> |
OlderNewer