This file contains hidden or 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 timeit | |
| from terminaltables import SingleTable | |
| def bubble_sort(arr): | |
| for i in range(len(arr) - 1): | |
| for j in range(0, len(arr) - i - 1): | |
| if arr[j] > arr[j + 1]: | |
| arr[j], arr[j + 1] = arr[j + 1], arr[j] |
This file contains hidden or 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
| let stars = () => 1 + Math.round(Math.random() * 4); | |
| // uncomment this if you want fixed stars | |
| // stars = () => 3; | |
| // 'SUBJECT_CODE': [COURSE_STARS, FACULTY_STARS] | |
| // for example `'CSE356': [1, 1]` | |
| const specialSubjects = { | |
| } | |
| if (window.location.pathname == '/Feedback') { |
This file contains hidden or 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
| "use strict"; | |
| class GpaService { | |
| constructor() { | |
| this.s1Weight = 10; | |
| this.s2Weight = 15; | |
| this.finalWeight = 50; | |
| this.quizWeight = 15; | |
| this.assignWeight = 10; | |
| } | |
| calcTotal(entity) { |
This file contains hidden or 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
| String[] words = {"that", "this", "with", "from", "your", "have", "more", "will", "home", "page", "free", "time", "they", "site", "what", "news", "only", "when", "here", "also", "help", "view", "been", "were", "some", "like", "than", "find", "date", "back", "list", "name", "just", "over", "year", "into", "next", "used", "work", "last", "most", "data", "make", "them", "post", "city", "such", "best", "then", "good", "well", "info", "high", "each", "very", "book", "read", "need", "many", "user", "said", "does", "mail", "full", "life", "know", "days", "part", "real", "item", "ebay", "must", "made", "line", "send", "type", "take", "area", "want", "long", "code", "show", "even", "much", "sign", "file", "link", "open", "case", "same", "both", "game", "care", "down", "size", "shop", "text", "rate", "form", "love", "john", "main", "call", "save", "york", "card", "jobs", "food", "sale", "teen", "room", "join", "west", "look", "left", "team", "week", "note", "live", "june", "plan", "cost", "july", "test", "come", "cart" |
This file contains hidden or 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 argparse | |
| import calendar | |
| import re | |
| import pdfplumber | |
| class TableCell: | |
| def __init__(self, rect, text): | |
| self.left = rect[0] |
This file contains hidden or 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
| class McqParser { | |
| getQuestionNode(doc) { | |
| return doc.querySelector('.question_box>h3>p'); | |
| } | |
| getOption(labelEl) { | |
| return new McqChoice( | |
| labelEl.innerHTML, | |
| labelEl.title |
This file contains hidden or 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 handlers = { | |
| "GetAttemptedQuizDetails": detailPageHandler, | |
| "PopulateSingleQuiz": McqPageHandler, | |
| } | |
| String.prototype.hashCode = function () { | |
| var hash = 0, i, chr; | |
| if (this.length === 0) return hash; | |
| for (i = 0; i < this.length; i++) { | |
| chr = this.charCodeAt(i); |
This file contains hidden or 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
| class TabularParser { | |
| getNthCol(row, n) { | |
| return row.querySelector(`td:nth-child(${n})`); | |
| } | |
| getNthColText(row, n) { | |
| return this.getNthCol(row, n).innerText; | |
| } |
This file contains hidden or 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
| class McqParser { | |
| getQuestionNode(doc) { | |
| return doc.querySelector('.question_box>h3>p'); | |
| } | |
| getOption(labelEl) { | |
| return new McqChoice( | |
| labelEl.innerHTML, | |
| labelEl.title |
This file contains hidden or 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
| wget "https://www.bing.com$(curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" |\ | |
| python3 -c "import sys, json; print(json.loads(sys.stdin.read())['images'][0]['url'])")" -O ./images/background.jpg -q | |
| gsettings set org.gnome.desktop.background picture-uri ./images/background.jpg |