Skip to content

Instantly share code, notes, and snippets.

View alexplesoiu's full-sized avatar
🇹🇩

Alexandru-Ioan alexplesoiu

🇹🇩
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
h1 {
font-size: 20px;
color: green;
text-transform: uppercase;
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
h1 {
font-size: 20px;
color: green;
text-transform: uppercase;
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
h1 {
font-size: 20px;
color: green;
text-transform: uppercase;
text-align: center;
import js
from js import document
def main():
element = document.getElementById("my-id")
element.innerHTML = 'PyScript is awesome!'
main()
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
- matplotlib
</py-env>
<style>
h1 {
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
h1 {
font-size: 20px;
color: green;
text-transform: uppercase;
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<table class="table table-dark">
<thead>
<tr>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<style>
h1 {
font-size: 20px;
color: green;
text-transform: uppercase;
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
Python with Functions and Classes <br>
<py-script>
class Person:
class Person:
def __init__(self, first_name, last_name):
self.firstname = first_name
self.lastname = last_name
class Student(Person):
def __init__(self, first_name, last_name, university):
self.university = university
super().__init__(first_name, last_name)