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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> | |
| <script defer src="https://pyscript.net/alpha/pyscript.js"></script> | |
| <title>Imports in Pyscript, Numpy,Random in the Browser !</title> | |
| <py-env> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Fibs be cool yo !</title> | |
| <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> | |
| <script defer src="https://pyscript.net/alpha/pyscript.js"></script> | |
| </head> |
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
| # print fibonacci numbers | |
| def fib(n): | |
| a, b = 0, 1 | |
| while b < n: | |
| print(b, end=' ') | |
| a, b = b, a + b | |
| print() | |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Hello World</title> | |
| <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> | |
| <script defer src="https://pyscript.net/alpha/pyscript.js"></script> | |
| </head> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Hello World</title> | |
| </head> | |
| <body> | |
| Such Content Very Wow |
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
| """WIFI SCANNER for OSX GUI Integration Example from a Medium Article by @_k3no | |
| Should scan and return a list of networks and their strength via GUI. | |
| """ | |
| import PySimpleGUI as sg | |
| import subprocess | |
| import re |
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 PySimpleGUI as sg | |
| import subprocess | |
| import re | |
| _VARS = {'Networks': [], | |
| 'NetworkStrength': []} | |
| EDGE_OFFSET = 8 # offset from the left edge for first bar |
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 PySimpleGUI as sg | |
| _VARS = {'Networks': ['Network 01', 'Network 02', 'Network 03', 'Network 04'], | |
| 'NetworkStrength': ['-84', '-91', '-53', '-100']} | |
| EDGE_OFFSET = 8 # offset from the left edge for first bar | |
| GRAPH_SIZE = DATA_SIZE = (600, 600) # size in pixels | |
| GLOBAL_FONT = ('Helvetica', 14) | |
| sg.theme('DarkAmber') |
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 subprocess | |
| import re | |
| # pipe stdout from subprocess to a string | |
| process = subprocess.run(["airport", "en0", "--scan"], | |
| check=True, | |
| stdout=subprocess.PIPE, | |
| universal_newlines=True) | |
| # Split string by rows | |
| processRows = process.stdout.split("\n") |
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 subprocess | |
| import re | |
| # pipe stdout from subprocess to a string | |
| process = subprocess.run(["airport", "en0", "--scan"], | |
| check=True, | |
| stdout=subprocess.PIPE, | |
| universal_newlines=True) | |
| # Split string by rows | |
| processRows = process.stdout.split("\n") |