- Follow the general instructions as discussed in the class creation of conda env β requirements.txt β setting up github repo using command line [Using web upload will result in a penalty of 30 Marks!]
- Submit a PDF file only [YourRollNo_A1.pdf]
- Marks Distribution: Total 50
- Code+Git: 10 Marks
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
// ==UserScript== | |
// @name GitHub Error Remover | |
// @version 0.0.1 | |
// @description Remove the first error displayed on the website. | |
// @author bhargav3 | |
// @match https://*.github.com/* | |
// @license MIT | |
// ==/UserScript== | |
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
#!/bin/bash | |
# Include any branches for which you wish to disable this script | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master release qa develop staging test) | |
fi | |
# Get the current branch name and check if it is excluded | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$") |
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
SELECT | |
SO.Name | |
,SS.name | |
,SO.type_desc | |
,SO.create_date | |
,SO.modify_date | |
FROM sys.objects AS SO | |
INNER JOIN sys.schemas AS SS | |
ON SS.schema_id = SO.schema_id | |
WHERE DATEDIFF(D,modify_date, GETDATE()) < 50 |
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
<?php | |
//https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/monk-visits-coderland-4/ | |
//Read inputs | |
$inputs = []; | |
while ($f = fgets(STDIN)) { | |
$inputs[] = $f; |
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
#Docker β Clean Up After Yourself! | |
#http://blog.yohanliyanage.com/2015/05/docker-clean-up-after-yourself/ | |
docker rm -v $(docker ps -a -q -f status=exited) | |
docker rmi $(docker images -f "dangling=true" -q) | |
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
</body> | |
<!DOCTYPE html> |
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
#!/bin/bash | |
tail -n0 -F "$1" | while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
"payload={\"text\": \"$(echo $LINE | sed "s/\"/'/g")\"}" "$2"; | |
done |
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
<?php | |
if ( ! class_exists( 'WP_List_Table' ) ) { | |
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); | |
} | |
if ( ! class_exists( 'Snapshot_View_Table_Archives' ) ) { | |
class Snapshot_View_Table_Archives extends WP_List_Table { | |
var $item; |
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
function r5(){ | |
return parseInt(Math.floor(Math.random()*5)); | |
} | |
function r8() { | |
var z = r5() + r5(); | |
if (z > 8) { | |
r8(); | |
} else { | |
return z; | |
} |
NewerOlder