Set the base image to Ubuntu must be first instruction - use docker search to find images
FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)Set the maintainer info
| from pyspark.sql import SparkSession | |
| spark = SparkSession.builder.getOrCreate() | |
| spark |
| !apt-get update | |
| !wget -q https://mirror.softaculous.com/apache/spark/spark-3.0.2/spark-3.0.2-bin-hadoop2.7.tgz | |
| !tar xf spark-3.0.2-bin-hadoop2.7.tgz | |
| !pip install -q findspark | |
| import os | |
| # Optional JDK look up step | |
| # os.environ["JAVA_HOME"] = "/usr/lib/jvm/java-11-openjdk-amd64" | |
| os.environ["SPARK_HOME"] = "/content/spark-3.0.2-bin-hadoop2.7" |
Set the base image to Ubuntu must be first instruction - use docker search to find images
FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)Set the maintainer info
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.keys import Keys | |
| import os | |
| chrome_driver = os.path.join(os.getcwd(), "chromedriver") | |
| urls = [] | |
| pages = 100 | |
| for page in range(1, pages+1): |
| # Run this script using following command | |
| # $ python generate-iconset.py icon.png | |
| # Then execute the following command to create .icns | |
| # $ iconutil -c icns icon.iconset | |
| import os | |
| import sys | |
| import pathlib | |
| import subprocess |
| var http = require('http'), | |
| fs = require('fs'); | |
| var server = http.createServer().listen(3000); | |
| server.on('request', function (request, response) { | |
| fs.readFile('file.txt', 'utf-8', function (err, data) { | |
| response.end(data); | |
| }); | |
| }); |
| var http = require('http'); | |
| var server = http.createServer().listen(3000); | |
| server.on('request', function (request, response) { | |
| response.end('Hello World!'); | |
| }); | |
| console.log("Listening on port 3000...") | |
| // Note: যদিও এভাবে এই কোডটি লেখা হয়ে থাকে না কিন্তু request ইভেন্টের অস্তিত্ব বোঝাতে এভাবে লেখা |
| console.log(“Hello”); | |
| setTimeout(function(){ | |
| alert("JS"); | |
| }, 3000); | |
| console.log(“World”); |
| function init() { | |
| var link = document.getElementById("foo"); | |
| link.addEventListener("click", function changeColor() { | |
| this.style.color = "burlywood"; | |
| }); | |
| } | |
| init(); |
| name: myenv | |
| channels: | |
| - defaults | |
| dependencies: | |
| - beautifulsoup4=4.6.0=py36_0 | |
| - certifi=2016.2.28=py36_0 | |
| - openssl=1.0.2l=0 | |
| - pip=9.0.1=py36_1 | |
| - python=3.6.2=0 | |
| - readline=6.2=2 |