testing coc
This commit is contained in:
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
class Test:
|
||||
def __init__(self, salut):
|
||||
self.machin:int = salut
|
||||
|
||||
t = Test('bidule')
|
||||
print(t.machin)
|
||||
|
||||
|
||||
a = 'test'
|
||||
print(a.center)
|
||||
|
||||
print(1, 2, 2, 3)
|
||||
@@ -0,0 +1,6 @@
|
||||
import network
|
||||
# enable station interface and connect to WiFi access point
|
||||
nic = network.WLAN(network.STA_IF)
|
||||
nic.active(True)
|
||||
nic.connect('your-ssid', 'your-password')
|
||||
# now use sockets as usual
|
||||
@@ -0,0 +1,3 @@
|
||||
from pythonwifi.iwlibs import Wireless
|
||||
wifi = Wireless('ISEP ELEVES EAP')
|
||||
print wifi.getEssid()
|
||||
@@ -0,0 +1,3 @@
|
||||
import who_is_on_my_wifi
|
||||
|
||||
print(who_is_on_my_wifi.help())
|
||||
@@ -0,0 +1,10 @@
|
||||
from wireless import Wireless
|
||||
import os
|
||||
PASSWORD = os.environ['ISEP_HYPERPLANNING_PASSWORD']
|
||||
wireless = Wireless()
|
||||
print(wireless.interfaces())
|
||||
if wireless.connect(ssid='en0', password=PASSWORD):
|
||||
print('success')
|
||||
else:
|
||||
print('error')
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import time
|
||||
import pywifi
|
||||
from pywifi import const
|
||||
|
||||
wifi = pywifi.PyWiFi()
|
||||
|
||||
print(wifi.interfaces)
|
||||
|
||||
# iface = wifi.interfaces()[0]
|
||||
|
||||
# iface.disconnect()
|
||||
# time.sleep(1)
|
||||
# assert iface.status() in\
|
||||
# [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
|
||||
|
||||
# profile = pywifi.Profile()
|
||||
# profile.ssid = 'testap'
|
||||
# profile.auth = const.AUTH_ALG_OPEN
|
||||
# profile.akm.append(const.AKM_TYPE_WPA2PSK)
|
||||
# profile.cipher = const.CIPHER_TYPE_CCMP
|
||||
# profile.key = '12345678'
|
||||
|
||||
# iface.remove_all_network_profiles()
|
||||
# tmp_profile = iface.add_network_profile(profile)
|
||||
|
||||
# iface.connect(tmp_profile)
|
||||
# time.sleep(30)
|
||||
# assert iface.status() == const.IFACE_CONNECTED
|
||||
|
||||
# iface.disconnect()
|
||||
# time.sleep(1)
|
||||
# assert iface.status() in\
|
||||
# [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
|
||||
@@ -0,0 +1,7 @@
|
||||
from simple_notifications import notify
|
||||
import os
|
||||
notify(os.environ['SOCIAL_SECURITY_NUMBER'])
|
||||
# notify("Your task is done!", sound=True) # This will invoke the default notification sound
|
||||
# notify("Your task is done!", subtitle="Status: Success")
|
||||
# notify("Your task is done!", informative_text="Task took 128ms")
|
||||
# notify("Your task is done!", sound='Glass')
|
||||
+1
-1
@@ -22,7 +22,7 @@ import sys
|
||||
import math
|
||||
import errno
|
||||
import signal
|
||||
import scket
|
||||
import socket
|
||||
import timeit
|
||||
import datetime
|
||||
import platform
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
a = 1
|
||||
print(a)
|
||||
a-='truc'
|
||||
|
||||
def bidule(a:int):
|
||||
return 3
|
||||
|
||||
bidule('salut')
|
||||
Reference in New Issue
Block a user