Skip to content

Instantly share code, notes, and snippets.

View AlexJoz's full-sized avatar

Alex Joz AlexJoz

  • uk
  • 20:29 (UTC +01:00)
View GitHub Profile
@AlexJoz
AlexJoz / gist:f6c3599421db57dbb6b1dbf96a4c045c
Created March 23, 2017 09:42
compile tensorflow with sse3, sse4.1\2, avx, cuda support
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mfpmath=both --copt=-msse4.2 --config=cuda -k //tensorflow/tools/pip_package:build_pip_package
@AlexJoz
AlexJoz / gist:0f55e6dc46b9a2f2e49bf29618cda1fb
Created April 14, 2017 07:48
JSON ENCODER for ObjectID from MongoDB
class JSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, ObjectId):
return str(o)
return json.JSONEncoder.default(self, o)
@AlexJoz
AlexJoz / gist:c3a39ad13cba2f2492240eed5b0fbc2c
Created April 20, 2017 13:38
Python Twisted call func every minute =)
from twisted.internet import task
from twisted.internet import reactor
timeout = 60.0 # Sixty seconds
def doWork():
#do work here
pass
l = task.LoopingCall(doWork)
@AlexJoz
AlexJoz / gist:dbea2d2385f79505efa1fa36f3372815
Created May 11, 2017 12:12
Python locale error: unsupported locale setting
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
@AlexJoz
AlexJoz / gist:924de4f9aedc8ac03e3b9c65eb2c2dea
Created June 22, 2017 08:00
SSH usecases and examples
https://habrahabr.ru/post/331348/
@AlexJoz
AlexJoz / gist:82512ccc641d424a8c21cca9c100094b
Created March 31, 2019 00:37
index.html example sample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HelloWorld</title>
</head>
<body>
<h1> Hello World! </h1>
<script>
console.log("Hello Console!")