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
| #install postgres | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get -y install postgresql-9.5 python-psycopg2 | |
| #install postgis | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" >> /etc/apt/sources.list' | |
| wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.5-postgis-2.2 postgresql-contrib-9.5 |
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 pprint | |
| import requests | |
| from bs4 import BeautifulSoup | |
| ''' | |
| JSON Format: {"Dhaka":{"Motijheel":{"BangabhabanTSO":"1222","DilkushaTSO":"1223"}}} | |
| ''' | |
| url_list = { | |
| 'Barisal': 'http://www.bangladeshpost.gov.bd/PostCodeList.asp?DivID=1', |
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 | |
| #try to compile the file | |
| gcc -lm main.c -o main | |
| #if compile successful then go on | |
| if [[ $? = 0 ]]; then | |
| #try to run program with time limite | |
| timeout 1s ./main < input.txt | |
| RV=$? |
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
| \curl -L https://get.rvm.io | bash -s stable && source ~/.rvm/scripts/rvm && rvm requirements && rvm install ruby && rvm use ruby --default && rvm rubygems current && gem install rails && sudo apt-get install nodejs |
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 csv | |
| import requests | |
| from bs4 import BeautifulSoup | |
| def initDataFile(): | |
| with open('data.csv', 'wb') as fp: | |
| writer = csv.writer(fp, delimiter = ',') | |
| header = ['Name', 'Address', 'Email', 'Mobile No', 'University Name', 'Division Name', 'National ID No./Birth Registration No.', 'Date of Birth', 'Attend 5 days Training', '1st Preferred Training Venue', '2nd Preferred Training Venue', '3rd Preferred Training Venue', 'Status'] | |
| writer.writerows([header]) |
NewerOlder