This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Required: Visual Studio 2015 or 2017 (or probably later works) | |
Setup | |
1. Clone/download OpenSSL 1.1.1 source to a folder | |
2. Download / install Perl (They recommend Active perl) | |
I recommend using Chocolatey so for me: choco install activeperl | |
3. Ensure Perl is in the system path. (Choco appears to do this by default) | |
4. Download / install NASM | |
I recommend using Chocolatey so for me: choco install nasm | |
5. Ensure NASM is in the system path. (For me the directory to add was C:\Program Files\NASM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vscode-keybindings for navigation with I/J/K/L and additional functionality with surrounding characters | |
// Place your key bindings in this file to overwrite the defaults | |
// ALT + I/J/K/L: up/left/down/right | |
// ALT + SHIFT + I/J/K/L: mark text up/left/down/right | |
// CTRL + J/L: send cursor to start/end of line | |
// CTRL + ALT + J/L: send cursor to start/end of word | |
// CTRL + ALT + U/O: send cursor to "wordPartLeft"/"wordPartRight" | |
// CTRL + ALT + SHIFT + U/O: mark from cursor to "wordPartLeft"/"wordPartRight" | |
// CTRL + ALT + Y: got to declaration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
terms = (int(sys.argv[1]) + 1) // 2 | |
pi = 4 + sum(4/-(v*4+3) + 4/(v*4+5) for v in range(terms)) | |
print(pi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// live demo: https://graphx-gesture-simple.surge.sh | |
import 'package:flutter/material.dart'; | |
import 'package:graphx/graphx.dart'; | |
import 'package:graphx_zoompan/simple_zoom.dart'; | |
void main() { | |
runApp(AppSimpleZoom()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:graphx/graphx.dart'; | |
import 'zoom_scene.dart'; | |
/// Live demo: | |
/// https://graphx-gesture-sample.surge.sh | |
/// | |
void main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
from PyQt5.QtCore import (QCoreApplication, QObject, QRunnable, QThread, | |
QThreadPool, pyqtSignal) | |
# Subclassing QThread | |
# http://qt-project.org/doc/latest/qthread.html | |
class AThread(QThread): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt4 import QtCore, QtGui | |
import sys, time | |
class mythread(QtCore.QThread): | |
total = QtCore.pyqtSignal(object) | |
update = QtCore.pyqtSignal() | |
def __init__(self, parent, n): | |
super(mythread, self).__init__(parent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyQt5.QtCore import * | |
from PyQt5.QtWidgets import * | |
from itertools import count, islice | |
class Threaded(QObject): | |
result=pyqtSignal(int) | |
def __init__(self, parent=None, **kwargs): | |
super().__init__(parent, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using QThreads in PyQt5 using worker model | |
# There is so many conflicting posts on how QThreads should be used in pyqt. I had | |
# been subclassing QThread, overriding the run function, and calling start to run | |
# the thread. I did it this way, because I couldn't get the worker method (where | |
# an object is moved to a thread using moveToThread) to do what I wanted. It turns | |
# out that I just didn't understand why. But, once I worked it out I have stuck with | |
# the moveToThread method, as this is recommended by the official docs. | |
# | |
# The key part for me to understand was that when I am running a heavy calculation in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code to show two plots of simulated streamed data. Data for each plot is processed (generated) | |
# by separate threads, and passed back to the gui thread for plotting. | |
# This is an example of using movetothread, which is the correct way of using QThreads | |
# Michael Hogg, 2015 | |
import time, sys | |
from pyqtgraph.Qt import QtGui, QtCore | |
from PyQt4.Qt import QMutex | |
import pyqtgraph as pg |
NewerOlder