mirror of
https://github.com/3dmol/3Dmol.js.git
synced 2026-06-04 08:39:49 +09:00
edit for newer python
This commit is contained in:
@@ -4,7 +4,7 @@ import json, random, datetime, argparse
|
|||||||
|
|
||||||
# for socketio
|
# for socketio
|
||||||
import eventlet
|
import eventlet
|
||||||
eventlet.monkey_patch()
|
#eventlet.monkey_patch()
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SECRET_KEY'] = 'secret!'
|
app.config['SECRET_KEY'] = 'secret!'
|
||||||
@@ -34,7 +34,7 @@ def handleCreateSession(json):
|
|||||||
print("Invalid name",name)
|
print("Invalid name",name)
|
||||||
emit('create session response', 0)
|
emit('create session response', 0)
|
||||||
else:
|
else:
|
||||||
secret = random.randint(1,4e9)
|
secret = random.randint(1,int(4e9))
|
||||||
emit('create session response', secret)
|
emit('create session response', secret)
|
||||||
print("Session Created",name,request.sid)
|
print("Session Created",name,request.sid)
|
||||||
sessions[name] = {'cnt': 0,
|
sessions[name] = {'cnt': 0,
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "3dmol",
|
"name": "3dmol",
|
||||||
"version": "2.5.0",
|
"version": "2.5.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "3dmol",
|
"name": "3dmol",
|
||||||
"version": "2.5.0",
|
"version": "2.5.2",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"iobuffer": "^5.0.0",
|
"iobuffer": "^5.0.0",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#this script gets pinged everytime 3dmol.js is loaded,
|
#this script gets pinged everytime 3dmol.js is loaded,
|
||||||
#this allows us to report usage to our funding agencies
|
#this allows us to report usage to our funding agencies
|
||||||
import os,MySQLdb,sys
|
import os,MySQLdb,sys
|
||||||
|
sys.exit()
|
||||||
host = os.environ["REMOTE_ADDR"]
|
host = os.environ["REMOTE_ADDR"]
|
||||||
domain = host
|
domain = host
|
||||||
if "HTTP_REFERER" in os.environ:
|
if "HTTP_REFERER" in os.environ:
|
||||||
|
|||||||
Reference in New Issue
Block a user