top of page
ToucanSway


PYTHON CODING
import speedtest def check_speed(): st = speedtest.Speedtest() st.get_best_server() download_speed = st.download() / 1000000 upload_speed = st.upload() / 1000000 print(f"Download Speed: {download_speed: .2f} MBps") print(f"Upload Speed: {upload_speed: .2f} MBps") check_speed() [Running] python3 -u "/Users/name/test/test847.py" Download Speed: 138.91 MBps Upload Speed: 60.06 MBps [Done] exited with code=0 in 25.254 seconds #Python #PythonCoding #VSC Determine your spee

waclaw_koscielniak
8 hours ago1 min read
Â
Â
Â


PYTHON CODING
from sklearn.preprocessing import MinMaxScaler import numpy as np scaler = MinMaxScaler() data = np.array([[2], [4]]) print(scaler.fit_transform(data)[0][0]) [Running] python3 -u "/Users/name/test/test947.py" 0.0 [Done] exited with code=0 in 1.531 seconds #Python #PythonCoding #VSC Try to verify it.

waclaw_koscielniak
13 hours ago1 min read
Â
Â
Â


PYTHON CODING
import statsmodels.api as sm X = sm.add_constant([1,2,3,4]) Y = [2,4,6,8] model = sm.OLS(Y, X).fit() print(model.params.tolist()) [Running] python3 -u "/Users/name/test/test485.py" [0.0, 1.9999999999999996] [Done] exited with code=0 in 1.967 seconds #Python #PythonCoding #VSC Try to run it.

waclaw_koscielniak
2 days ago1 min read
Â
Â
Â


PYTHON CODING
import turtle t = turtle.Turtle() screen = turtle.Screen() screen.bgcolor("black") colors = ["red", "blue", "orange", "DarkViolet", "green", "purple", "brown", "cyan", "DarkBlue"] for i in range(9): t.color(colors[i]) for _ in range(25): t.forward(100) t.right(64) t.right(100) turtle.done() #Python #PythonCoding #VSC Try your own version.

waclaw_koscielniak
4 days ago1 min read
Â
Â
Â


PYTHON CODING
import time from datetime import datetime while True: now = datetime.now() current_time = now.strftime("%H:%M:%S") print("Digital Clock:", current_time) time.sleep(10) #Python #PythonCoding #VSC [Running] python3 -u "/Users/name/test/test935.py" Digital Clock: 15:56:31 Digital Clock: 15:56:41 [Done] exited with code=null in 11.946 seconds Try to run it.

waclaw_koscielniak
5 days ago1 min read
Â
Â
Â


PYTHON CODING
import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 15, 1000) y1 = np.exp(-0.1*x) * np.sin(x) y2 = np.cos(x + np.pi/2) + 0.1 plt.fill_between(x, y1, y2, color='yellow', alpha=0.4) plt.plot(x, y1, color='blue') plt.plot(x, y2, color='red') plt.title("Filled Area") plt.xlabel("x") plt.ylabel("y1 & y2") plt.show () #Python #PythonCoding #VSC Try your own version.

waclaw_koscielniak
6 days ago1 min read
Â
Â
Â


PYTHON CODING
import matplotlib.pyplot as plt import numpy as np theta = np.linspace(0, 12*np.pi, 500) r = theta**(np.cos(theta/4)) plt.polar(theta, r, color='red', linewidth=3) plt.title("Polar Plot") plt.show() #Python #PythonCoding #VSC Try to run it.

waclaw_koscielniak
Oct 151 min read
Â
Â
Â


PYTHON CODING
import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from sklearn.cluster import KMeans image = mpimg.imread('Baby_dinosaur.jpg') w, h, d = image.shape pixels = image.reshape(w * h, d) n_colors = 16 kmeans = KMeans(n_clusters=n_colors, random_state=42).fit(pixels) palette = np.uint8(kmeans.cluster_centers_) plt.imshow([palette]) plt.axis('off') plt.show() #Python #PythonCoding #VSC Baby_dinosaur.jpg Color strip.

waclaw_koscielniak
Oct 151 min read
Â
Â
Â


PYTHON CODING
from sklearn.linear_model import LinearRegression import numpy as np X = np.array([[1], [2], [3]]) Y = np.array([2, 4, 6]) model = LinearRegression().fit(X, Y) print(model.predict([[4]])[0]) [Running] python3 -u "/Users/name/test/test638.py" 7.999999999999998 [Done] exited with code=0 in 1.378 seconds #Python #PytonCoding #VSC Try to verify it.

waclaw_koscielniak
Oct 141 min read
Â
Â
Â


PYTHON CODING
import wifi_qrcode_generator.generator qr_code = wifi_qrcode_generator.generator.wifi_qrcode( ssid='Home WiFi', hidden=False,...

waclaw_koscielniak
Oct 121 min read
Â
Â
Â


PYTHON CODING
import tkinter as tk, random root = tk.Tk() root.title("AI Symbol Particles") canvas = tk.Canvas(root, width=800, height=800, bg="black")...

waclaw_koscielniak
Oct 111 min read
Â
Â
Â


PYTHON CODING
import turtle t=turtle.Turtle() t.speed(0) s=turtle.Screen() s.bgcolor("black") for i in range(144): t.color("red") t.penup()...

waclaw_koscielniak
Oct 101 min read
Â
Â
Â


PYTHON CODING
from functools import reduce nums = [2, 3, 4] product = reduce(lambda x, y: x * y, nums) nums.append(5) total = reduce(lambda x, y: x +...

waclaw_koscielniak
Oct 91 min read
Â
Â
Â


PYTHON CODING
import pygame, math pygame.init() screen = pygame.display.set_mode((600,600)) clock = pygame.time.Clock() angle = 0 running = True while...

waclaw_koscielniak
Oct 91 min read
Â
Â
Â


PYTHON CODING
import numpy as np import matplotlib.pyplot as plt xdim = 502; ydim = 302 matrix = [[np.sin(x/20) * np.cos(y/15) for x in range(xdim -...

waclaw_koscielniak
Oct 71 min read
Â
Â
Â


PYTHON CODING
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111,...

waclaw_koscielniak
Oct 41 min read
Â
Â
Â


PYTHON CODING
from functools import reduce nums = [2, 3, 4] product = reduce(lambda x, y: x * y, nums) nums.append(5) s = reduce(lambda x, y: x + y,...

waclaw_koscielniak
Oct 31 min read
Â
Â
Â


PYTHON CODING
import yfinance as yf from datetime import datetime symbol = input("Enter symbol: ").upper() stock = yf.Ticker(symbol) try: price =...

waclaw_koscielniak
Oct 21 min read
Â
Â
Â


PYTHON CODING
from cryptography.fernet import Fernet key = Fernet.generate_key() print("Encryption Key:", key.decode()) cipher = Fernet(key) message =...

waclaw_koscielniak
Sep 301 min read
Â
Â
Â


QR CODE GENERATOR IN PYTHON
import qrcode from PIL import Image qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=10,...

waclaw_koscielniak
Sep 291 min read
Â
Â
Â
bottom of page