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 requests | |
import string | |
link = 'https://www.reddit.com/r/DarkHumor/.json' | |
subreddit = requests.get(link, headers = {'User-agent': 'nexttechbot'}) | |
posts = subreddit.text.split() | |
post_list = [] |
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
from PyPDF2 import PdfFileMerger | |
pdfs = ['one.pdf', 'two.pdf'] | |
merger = PdfFileMerger() | |
for pdf in pdfs: | |
merger.append(open(pdf, 'rb')) | |
with open('final.pdf', 'wb') as fout: | |
merger.write(fout) |
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
cat > ~/.local/share/applications/postman.desktop <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman | |
Exec=postman | |
Icon=/opt/Postman/resources/app/assets/icon.png | |
Terminal=false | |
Type=Application | |
Categories=Development; | |
EOL |
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
sudo tar -xzf postman.tar.gz -C /opt | |
rm postman.tar.gz | |
sudo ln -s /opt/Postman/Postman /usr/bin/postman |
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 os | |
counter = 1 | |
for file in os.listdir("."): | |
if file.endswith(".pdf"): | |
os.rename(file, "resume" + str(counter) + ".pdf") | |
counter += 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
contract Escrow{ | |
mapping (address => uint) public balances; | |
address public seller; | |
address public buyer; | |
address public escrow; | |
bool sellerApprove; | |
bool buyerApprove; | |
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
const http = require('http'); | |
const fs = require('fs'); | |
const express = require('express') | |
const path = require('path'); | |
const app = express(); | |
app.use(express.static(path.resolve(`${__dirname}/web/public`))); | |
console.log(`${__dirname}/web`); | |
app.use('*', (req, res, next) => { |
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 time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
driver = webdriver.Chrome() | |
usr = "" | |
pwd = "" | |
driver.get("http://www.facebook.org") | |
assert "Facebook" in driver.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 floating_header = function() { | |
this.header = document.createElement('table'); | |
this.header_height = 0; | |
this.getkeys = function(obj) { | |
var keys = new Array(); | |
for ( var key in obj ) { | |
keys.push(key); | |
} |
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'; | |
const http = require('http') | |
const fs = require('fs'); | |
const express = require('express'); | |
const path = require('path'); | |
const bodyParser = require('body-parser'); | |
const request = require('request'); | |
const cookieParser = require('cookie-parser'); |
OlderNewer