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
while True: | |
N, M = map(int, input().split()) | |
if N == 0 and M == 0: | |
break | |
table = [i for i in range(1, N+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 | |
$link = "https://twitter.com/memanskywalker/status/991649182090903552"; | |
$headers = [ | |
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", | |
"Accept-Language: en-US,en;q=0.5", | |
"Cache-Control: no-cache", | |
"Connection: keep-alive", | |
"DNT: 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
''' | |
Logic expression evaluation. | |
Examples: | |
1) a and b or c | |
2) a and (c or (c and d and e)) | |
3) ((b and c) and c) or a |
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 bash | |
# | |
# This is a script that can automatically | |
# setup DOMjudge server & judgehost, inside a same server. | |
# | |
# As a bonus, this script will also setup a beautiful DOMjudge | |
# interface made using React, which it will listen on port 8080. | |
# | |
# This script assumes that: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[Unit] | |
Description=DOMJudge's judgehost service | |
After=mysql.service | |
[Service] | |
ExecStart=/home/shahril/domjudge/judgehost/bin/judgedaemon | |
KillMode=process | |
Restart=on-failure | |
RestartPreventExitStatus=255 | |
Type=forking |
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 -*- | |
"""Clone all gists of GitHub username given on the command line.""" | |
import subprocess | |
import sys | |
import requests | |
if len(sys.argv) > 1: | |
gh_user = sys.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
#!/usr/bin/env python | |
import sys | |
import re | |
import textwrap | |
try: import urllib.request as urllib_request # for python 3 | |
except ImportError: import urllib2 as urllib_request # for python 2 | |
try: from html.parser import HTMLParser # for python 3 |
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
''' | |
Note: | |
Sometimes when you have too many cousin celebrating | |
Eid Al-Fitr in your house, with the limited and slow internet, thing | |
can go rage fast. | |
Here is the script, to automatically block all wireless MAC by | |
sending all the MACs into the block list of D-Link DSL-2640B. |