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 selenium.webdriver import Chrome | |
# import the Chrome class | |
import time | |
driver = Chrome() | |
# create driver instance | |
driver.get("https://www.seleniumeasy.com/test/basic-first-form-demo.html") | |
time.sleep(3) | |
close_button = driver.find_element_by_id('at-cv-lightbox-close') | |
close_button.click() |
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 | |
url = "https://type.fit/api/quotes" | |
data = requests.get(url).json() | |
for i in data: | |
print(i['text']) | |
print(i['author']) | |
print() | |
print() | |
# Have fun |
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 matplotlib.pyplot as plt | |
y_axis = [4, 6, 7, 5, 9, 10] | |
# create y_axis list for y axis | |
x_axis = list(range(len(y_axis))) | |
# create x_axis list for x axis | |
plt.plot(x_axis, y_axis) | |
# plot the lists on the graph | |
plt.title("My first Matplotlib Graph") |
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 selenium.webdriver import Chrome | |
from selenium.webdriver.chrome.options import Options | |
import time | |
options = Options() | |
options.add_argument("--disable-notifications") | |
options.add_argument("--headless") | |
driver = Chrome(chrome_options=options) | |
driver.get("https://facebook.com") |
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 viewer # Python Beat C# | |
# Python WON 🎉🎉🎉 | |
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
// Sample express app | |
const express = require('express') | |
const app = express() | |
const port = 3000 | |
app.get('/', (req, res) => { | |
res.send('Hello World!') | |
}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 convert_char_to_binary(char){ | |
const code = char.charCodeAt(0); // convert the char to ASCII (UTF-16) | |
return code.toString(2); // convert ASCII integer to binary | |
} | |
const binary = convert_char_to_binary("a") | |
console.log(binary) // logs '1100001' |
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 convertToBinary(text) { | |
var result = ''; | |
for (var i = 0; i < text.length; i++) { | |
var char = text[i]; | |
var code = char.charCodeAt(0); | |
result += code.toString(2) + ' '; | |
} | |
return result; | |
} |