Skip to content

Instantly share code, notes, and snippets.

View nefanov's full-sized avatar
🦝
very-very slow to respond...

nefanov

🦝
very-very slow to respond...
View GitHub Profile
@nefanov
nefanov / xbox_carcontroller.py
Created July 4, 2019 16:00 — forked from energee/xbox_carcontroller.py
User xbox controller to command openpilot
#!/usr/bin/env python
from evdev import InputDevice
from select import select
import time
import numpy as np
import zmq
from cereal import car
import selfdrive.messaging as messaging
@nefanov
nefanov / can_replay.py
Created July 4, 2019 16:00 — forked from energee/can_replay.py
CAN Replay
#!/usr/bin/env python
import sys
import time
import struct
from panda import Panda
DEBUG = False
def main():
logfile = sys.argv[1]
@nefanov
nefanov / tornadoauth_1.py
Created October 10, 2017 16:05 — forked from cjgiridhar/tornadoauth_1.py
Tornado - Authentication - tornado.web.authenticated
import tornado.ioloop
import tornado.web
class Main(tornado.web.RequestHandler):
def get_current_user(self):
return self.get_secure_cookie("user")
@tornado.web.authenticated
def get(self):
## This work is achieved by decorator @tornado.web.authenticated