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 | |
header('Content-type: text/xml'); | |
$gendate = date('r', time()); | |
$config = array( | |
'gplusid' => '116783522121096138585', | |
'gplusname' => 'Janith Leanage', | |
'hosturl' => 'http://janith.vacau.com/gplus' |
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
/* | |
Silly program to lap time and stuff, by Janith Leanage. | |
Uses signal handling code. :P | |
*/ | |
#include<stdio.h> | |
#include<signal.h> | |
int count[100]; | |
int c = 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (C) 2012 | |
Author: Bernhard Posselt <[email protected]> | |
Henrique C. Alves <[email protected]> | |
Janith Leanage | |
This file is free software; you can redistribute it and/or |
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
/* New Style Beta Header */ | |
#header{background-image:url(%%disp3%%);height:110px;background-color:#540f12;background-repeat:no-repeat;background-position:right;border-bottom:3px solid #f8c221} | |
.user a,.separator,.pref-lang,.logout a{color:#fff} | |
#header-bottom-right{background:none} | |
#header-bottom-left{position:absolute;bottom:0} | |
.tabmenu li{display:inherit} | |
.tabmenu li a{font-size:20px;font-weight:100;color:#fff;background:none;border:none;} | |
.tabmenu li.selected a{background:none;border:none;} | |
.formtab li{display:inline; padding-left:0;} | |
.formtab li a{font-size:100% !important;font-weight:100;color: #369 !important;background:none;border:none;} |
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
/** | |
* Sinhala transliterator class | |
* Based on the UCSC Real Time Unicode Converter | |
* http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t1.html | |
The MIT License (MIT) | |
Copyright (c) 2014 Janith Leanage | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
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
"Post ID", | |
Permalink, | |
"Post Message", | |
Type, | |
Countries, | |
Languages, | |
Posted, | |
"Lifetime Post Total Reach", | |
"Lifetime Post organic reach", | |
"Lifetime Post Paid Reach", |
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
Election | Leader | Valid Votes | Votes Won | % Votes | Total Seats | Seats Won | % Seats | W/L | Diff | |
---|---|---|---|---|---|---|---|---|---|---|
1947 | D. S. Senanayake | 1887364 | 751432 | 39.81 | 95 | 42 | 44.21 | W | 4.40 | |
1952 | Dudley Senanayake | 2327626 | 1026005 | 44.08 | 95 | 54 | 56.84 | W | 12.76 | |
1956 | John Kotelawala | 2647247 | 738810 | 27.91 | 95 | 8 | 8.42 | L | 19.49 | |
March 1960 | Dudley Senanayake | 3041420 | 909043 | 29.89 | 151 | 50 | 33.11 | W | 3.22 | |
July 1960 | Dudley Senanayake | 3076869 | 1144166 | 37.19 | 151 | 30 | 19.87 | L | 17.32 | |
1965 | Dudley Senanayake | 4046720 | 1590929 | 39.31 | 151 | 66 | 43.71 | W | 4.39 | |
1970 | Dudley Senanayake | 4991798 | 1892525 | 37.91 | 151 | 17 | 11.26 | L | 26.65 | |
1977 | J. R. Jayewardene | 6243573 | 3179221 | 50.92 | 168 | 140 | 83.33 | W | 32.41 | |
1989 | R. Premadasa | 5596468 | 2838005 | 50.71 | 225 | 125 | 55.56 | W | 4.84 |
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
from collections import defaultdict | |
UNICODE_BLOCKS = { | |
'en': range(0x0000, 0x02AF), | |
'si': range(0x0D80, 0x0DFF), | |
'ta': range(0x0B80, 0x0BFF), | |
'dv': range(0x0780, 0x07BF) | |
} | |
def getlang(text): |
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 unittest | |
from getlang import getlang | |
class TestLang(unittest.TestCase): | |
"""Tests for `getlang.py`.""" | |
def test_is_english(self): | |
self.assertTrue(getlang('hello') == 'en') | |
self.assertTrue(getlang('<2323$(@*(*&^&@^#>e') == 'en') | |
self.assertTrue(getlang('a') == 'en') |
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
package main | |
import "net/http" | |
import "fmt" | |
import "io/ioutil" | |
import "encoding/json" | |
// Artist is a struct to hold artist values | |
type Artist struct { | |
Name, Shortname, Reknown, Bio string |
OlderNewer