Skip to content

Instantly share code, notes, and snippets.

View Danushka96's full-sized avatar

Danushka Herath Danushka96

View GitHub Profile
@RavinduSachintha
RavinduSachintha / gpa.py
Created July 24, 2019 14:34
Calucate the GPA according to the given grade values. Both files should be in the same folder. In results file, use the same structure to add more records. (structure :- <SUBJECT_CODE> <GRADE> <CREDIT> )
f = open("results.txt","r");
globalGPA = 0
localGPA = 0
localCreditValues = 0
localCreditNumber = 0
totalCreditNumber = 0
numberOfSems = 0
def convertGradeToValue(grade):
@jpillora
jpillora / search-example.json
Last active February 3, 2022 03:08
Torrent cloud search provider specification
{
"mininova": {
"name": "Mininova",
"type": "screen-scraper",
"list": {
"url": "http://www.mininova.org/search/{query}/seeds/{page}",
"items": ".maintable > tr",
"item": {
"name":"td:nth-child(3) > a:nth-child(2)",
"url":"td:nth-child(3) > a:nth-child(2)@href",