Skip to content

Instantly share code, notes, and snippets.

View Evgenus's full-sized avatar
🇺🇦
Ukraine

Eugene Chernyshov Evgenus

🇺🇦
Ukraine
View GitHub Profile
@Evgenus
Evgenus / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Created February 7, 2018 09:54 — forked from IamAdiSri/Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@Evgenus
Evgenus / test_flask_sqlalchemy_txns.py
Last active February 27, 2024 12:45
Proper SQLAlchemy transactions example
from contextlib import contextmanager
import threading
from thread import get_ident
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
@Evgenus
Evgenus / drawtools.json
Created December 25, 2015 12:49
Ёлка
[{"type":"polyline","latLngs":[{"lat":50.454245,"lng":30.499996},{"lat":50.454245,"lng":30.499996}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":50.451308,"lng":30.50488},{"lat":50.449099,"lng":30.503641},{"lat":50.449428,"lng":30.508716},{"lat":50.451308,"lng":30.50488},{"lat":50.451316,"lng":30.509528},{"lat":50.449428,"lng":30.508716},{"lat":50.448679,"lng":30.515753},{"lat":50.451316,"lng":30.509528},{"lat":50.448448,"lng":30.517231},{"lat":50.449428,"lng":30.508716}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":50.451316,"lng":30.509528},{"lat":50.449083,"lng":30.514222},{"lat":50.449428,"lng":30.508716},{"lat":50.449333,"lng":30.512701},{"lat":50.451316,"lng":30.509528}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":50.459574,"lng":30.50742},{"lat":50.45901,"lng":30.507094},{"lat":50.459263,"lng":30.506062},{"lat":50.458944,"lng":30.506551},{"lat":50.458039,"lng":30.506115},{"lat":50.458493,"lng":30.506868},{"lat":50.458064,"lng":30.507402},{"lat":50.458625,"lng":30.50771
[{"type":"polyline","latLngs":[{"lat":50.597393,"lng":27.647339},{"lat":51.054575,"lng":31.891872}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":51.054575,"lng":31.891872},{"lat":48.89199,"lng":30.698538}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":50.586994,"lng":27.673792},{"lat":51.054575,"lng":31.891872}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":48.897729,"lng":30.698306},{"lat":50.619837,"lng":28.977153},{"lat":51.044747,"lng":31.880108}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":51.045073,"lng":31.880767},{"lat":48.897729,"lng":30.698306}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":48.894009,"lng":30.69687},{"lat":51.046279,"lng":31.88249}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":51.046808,"lng":31.884026},{"lat":48.89199,"lng":30.698538}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":51.045073,"lng":31.880767},{"lat":48.897729,"lng":30.698306}],"color":"#a24ac3"},{"type":"polyline","latLngs":[{"lat":48.894009,"l
using System;
using System.IO;
using System.Diagnostics;
public class HelloWorld
{
static public void Main ()
{
Console.CursorVisible = false;
import io
import time
import threading
import picamera
from PIL import Image
from PIL import ImageOps
# Create a pool of image processors
done = False
lock = threading.Lock()
icrosoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
o:\overelay\test>npm install git+https://github.com/TrueLink/chat-rooms-example.git
chat-rooms-example@0.0.0 node_modules\chat-rooms-example
├── typed-react@3.2.0
├── node-uuid@1.4.2
├── browser-relay-client@0.1.15
├── express@4.10.6 (utils-merge@1.0.0, merge-descriptors@0.0.2, fresh@0.2.4, escape-html@1.0.1, cookie@0.1.2, range-parser@1.0.2, cookie-signature@1.0.5, finalhandler@0.3.2, vary@1.0.0, media-typer@0.3.0, methods@1.1.0, parseurl@1.3.0, serve-static@1.7.1, content-disposition@0.5.0, path-to-regexp@0.1.3, depd@1.0.0, qs@2.3.3, debug@2.1.0, on-finished@2.1.1, proxy-addr@1.0.4, etag@1.5.1, send@0.10.1, type-is@1.5.4, accepts@1.1.4)
├── react@0.12.2 (envify@3.2.0)
@Evgenus
Evgenus / CPU-20141106T011802.cpuprofile
Created November 5, 2014 23:19
SPA load CPU Profile
{"head":{"functionName":"(root)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":0,"callUID":23441074,"children":[{"functionName":"(program)","scriptId":"0","url":"","lineNumber":0,"columnNumber":0,"hitCount":12203,"callUID":2428329776,"children":[],"deoptReason":"","id":2},{"functionName":"(anonymous function)","scriptId":"793","url":"http://localhost:8010/build/","lineNumber":59,"columnNumber":25436,"hitCount":33,"callUID":2674748834,"children":[{"functionName":"Loader.emit","scriptId":"793","url":"http://localhost:8010/build/","lineNumber":59,"columnNumber":19506,"hitCount":13,"callUID":3224097764,"children":[{"functionName":"loader.onModuleDownloaded","scriptId":"793","url":"http://localhost:8010/build/","lineNumber":325,"columnNumber":39,"hitCount":8,"callUID":2311199204,"children":[{"functionName":"malfunction.reset","scriptId":"793","url":"http://localhost:8010/build/","lineNumber":250,"columnNumber":18,"hitCount":6,"callUID":3309539828,"children":[{"functionName":"malfunction.start"
@Evgenus
Evgenus / bad.yaml
Created November 3, 2014 01:55
Damaged source files in spa
testimonial:
source:
a.js: |
var b = require("b");
module.exports = function() { return "a" + b; };
spa.yaml: |
pretty: true
grab: true
root: "."
manifest: "../build/manifest.json"
@Evgenus
Evgenus / module.js
Created October 29, 2014 13:23
browserified sample
;
(function(e, t, n) {
function i(n, s) {
if (!t[n]) {
if (!e[n]) {
var o = typeof require == "function" && require;
if (!s && o) return o(n, !0);
if (r) return r(n, !0);
throw new Error("Cannot find module '" + n + "'")
}