Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
px3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
px3
Commits
3a4f6416
Commit
3a4f6416
authored
Nov 29, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换环境
parent
d9ab480a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
1 deletion
+61
-1
main.py
src/main.py
+61
-1
No files found.
src/main.py
View file @
3a4f6416
...
@@ -21,7 +21,67 @@ from utils import PxUtils
...
@@ -21,7 +21,67 @@ from utils import PxUtils
# jsCode = f.read()
# jsCode = f.read()
# # ctx = execjs.compile(jsCode)
# # ctx = execjs.compile(jsCode)
# # ctxPC = execjs.compile(open('pc.js').read())
# # ctxPC = execjs.compile(open('pc.js').read())
ctxStep2
=
execjs
.
compile
(
open
(
'../step2.js'
)
.
read
())
ctxStep2
=
execjs
.
compile
(
'''function genUuid(t, e, n, r) {
function l(t) {
return l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
return typeof t;
} : function (t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, l(t);
}
var nr;
try {
if (("undefined" == typeof crypto ? "undefined" : l(crypto)) !== "undefined" && crypto && crypto.getRandomValues) {
var ar = new Uint8Array(16);
(nr = function () {
return crypto.getRandomValues(ar), ar;
})();
}
} catch (t) {
nr = void 0;
}
function xt() {
return +new Date();
}
var sr = nr();
var hr = [1 | sr[0], sr[1], sr[2], sr[3], sr[4], sr[5]];
var vr = 16383 & (sr[6] << 8 | sr[7]);
var dr = 0;
var pr = 0;
// uuid
// return '6172b081-7040-1031-9ca8-44e6194ad09a'
var a = "";
if (r) try {
for (var o = (new Date().getTime() * Math.random() + "").replace(".", ".".charCodeAt()).split("").slice(-16), i = 0; i < o.length; i++) o[i] = parseInt(10 * Math.random()) * +o[i] || parseInt(Math.random() * 36);
a = $C_gLP(o, 0);
} catch (t) {
}
var c = e && n || 0;
var u = e || [];
var l = void 0 !== (t = t || {}).clockseq ? t.clockseq : vr;
var f = void 0 !== t.msecs ? t.msecs : xt();
var s = void 0 !== t.nsecs ? t.nsecs : pr + 1;
var h = f - dr + (s - pr) / 1e4;
if (h < 0 && void 0 === t.clockseq && (l = l + 1 & 16383), (h < 0 || f > dr) && void 0 === t.nsecs && (s = 0), s >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
dr = f, pr = s, vr = l;
var v = (1e4 * (268435455 & (f += 122192928e5)) + s)
% 4294967296
;
u[c++] = v >>> 24 & 255, u[c++] = v >>> 16 & 255, u[c++] = v >>> 8 & 255, u[c++] = 255 & v;
var d = f / 4294967296 * 1e4 & 268435455;
u[c++] = d >>> 8 & 255, u[c++] = 255 & d, u[c++] = d >>> 24 & 15 | 16, u[c++] = d >>> 16 & 255, u[c++] = l >>> 8 | 128, u[c++] = 255 & l;
for (var p = t.node || hr, m = 0; m < 6; m++) u[c + m] = p[m];
for (var ir = [], cr = {}, ur = 0; ur < 256; ur++) ir[ur] = (ur + 256).toString(16).substr(1), cr[ir[ur]] = ur;
function $C_gLP(t, e) {
var n = e || 0;
return ir[t[n++]] + ir[t[n++]] + ir[t[n++]] + ir[t[n++]] + "-" + ir[t[n++]] + ir[t[n++]] + "-" + ir[t[n++]] + ir[t[n++]] + "-" + ir[t[n++]] + ir[t[n++]] + "-" + ir[t[n++]] + ir[t[n++]] + ir[t[n++]] + ir[t[n++]] + ir[t[n++]] + ir[t[n++]];
}
var g = e || $C_gLP(u);
return a === g ? a : g;
}'''
)
def
get_timestamp
():
def
get_timestamp
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment