This file contains 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> | |
<head> | |
<link rel="stylesheet"> | |
<meta charset="utf-8"> | |
<title>python console</title> | |
</head> | |
<body> | |
<button onclick="clo();alert('shell closed');window.close()">close shell</button> | |
<style type="text/css"> |
This file contains 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
def show_m(path): | |
from tkinter import Text, Tk | |
from idlelib.colorizer import color_config, ColorDelegator | |
root = Tk() | |
root.title(path) | |
text = Text(root) | |
text.pack(expand=1, fill="both") | |
with open(path, encoding='utf-8') as f: | |
text.insert("insert", f.read()) | |
text.focus_set() |
This file contains 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
for i in range(0, 0x110000): | |
globals()[chr(i)] = chr(i) | |
print(你+好=='你好') | |
print(H+e+l+l+o+globals()[' ']+w+o+r+l+d) |
This file contains 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
_ = BaseException | |
__ = dir | |
___ = exec | |
for i in __(__builtins__): | |
try: | |
___(f"{i}=...") | |
except _: | |
... | |
i=... | |
_ = ... |
This file contains 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
# compile nim c --threads:on --hints:off --run main.nim | |
import locks, random | |
from os import sleep | |
var | |
supplier, consumer: Thread[void] | |
repeat = 0 | |
lock: Lock | |
cond: Cond |
This file contains 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
#include <windows.h> | |
#include <stdio.h> | |
constexpr auto DWORD_size(){ | |
return sizeof(DWORD); | |
} | |
#define BUFZ 101 | |
char buf[BUFZ]; |
This file contains 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
#include <windows.h> | |
#pragma comment (lib, "shell32.lib") | |
#pragma comment (lib, "User32.lib") | |
static UINT uID = 0; | |
void notifyUser() | |
{ | |
uID += 1; |
This file contains 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
#include <Windows.h> | |
#include <stdio.h> | |
typedef struct _PER_SOCKET_CONTEXT { | |
OVERLAPPED ol; | |
char buf[100]; | |
HANDLE hFile; | |
} PER_IO_CONTEXT, * PPER_IO_CONTEXT; | |
DWORD WINAPI Worker(LPVOID param); |
This file contains 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
#include <windows.h> | |
#include <assert.h> | |
#include <stdio.h> | |
struct Stdio; | |
typedef void (*Callback)(struct Stdio* self, DWORD len); | |
struct Stdio { | |
OVERLAPPED ol; |
This file contains 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 socket | |
from hashlib import sha1 | |
from base64 import b64encode | |
from sys import stdout | |
client = None | |
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
server.bind(('', 80)) | |
server.listen(5) |
OlderNewer