top of page
ToucanSway


PYTHON CODING
import folium # Create a map centered at a specific location m = folium.Map(location=[40.7128, -74.0060], zoom_start=12) # Add a marker to the map folium.Marker([40.7128, -74.0060], popup="New York City").add_to(m) # Save the map as an HTML file m.save("New York.html") #Python #PythonCoding #VSC

waclaw_koscielniak
Nov 61 min read


PYTHON CODING
import sympy as sp x = sp.Symbol('x') f = x + sp.exp(1 - x) integral = sp.integrate(f, x) print("f(x) =", f) print("ʃf(x)dx =", integral) [Running] python3 -u "/Users/name/test/test427.py" f(x) = x + exp(1 - x) ʃf(x)dx = x**2/2 - exp(1 - x) [Done] exited with code=0 in 0.555 seconds #Python #PythonCoding #VSC Try to run your own function.

waclaw_koscielniak
Nov 11 min read


PYTHON CODING
import plotly.express as px import pandas as pd data = pd.DataFrame({"City":["New York", "Paris", "London", "Cairo", "Melbourne", "Tokyo"], "Temperature":[19, 17, 16, 23, 24, 20]}) fig = px.bar(data, x="City", y="Temperature", title="Average Temperature in Cities (°C)") fig.show() Are temperatures correct? If not, you can always change them. #Python #PythonCoding #VSC

waclaw_koscielniak
Oct 271 min read


PYTHON CODING
from calendar import TextCalendar year = 2025 cal = TextCalendar() print(cal.formatyear(year, 2, 1, 8, 3)) Year 2025. #Python #PythonCoding #VSC #calendar

waclaw_koscielniak
Oct 271 min read


PYTHON CODING
from collections import deque dq = deque([10, 21, 34, 46]) dq.append(57) dq.appendleft(1) print(dq[0], dq[-1]) [Running] python3 -u "/Users/name/test/test937.py" 1 57 [Done] exited with code=0 in 0.051 seconds #Python #PythonCoding #VSC Try to run it.

waclaw_koscielniak
Oct 231 min read


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
Oct 221 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
Oct 221 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
Oct 201 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
Oct 181 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
Oct 171 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
Oct 161 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
bottom of page