Run the following:
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen > /dev/null
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf > /dev/null
sudo locale-gen en_US.UTF-8
| import time | |
| import random | |
| from multiprocessing import Process, Queue, JoinableQueue, cpu_count | |
| """ Adjust time.sleep() values to see action of consumer """ | |
| def work(id, jobs, result): | |
| while True: | |
| task = jobs.get() | |
| if task is None: |
| #deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
| deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
| ## Major bug fix updates produced after the final release of the | |
| ## distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted |
| gst-launch-0.10 ximagesrc use-damage=0 ! video/x-raw-rgb,framerate=15/1 ! ffmpegcolorspace ! video/x-raw-yuv ! jpegenc ! multipartmux ! tcpserversink host=0.0.0.0 port=11111 |
Run the following:
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment > /dev/null
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen > /dev/null
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf > /dev/null
sudo locale-gen en_US.UTF-8
| """Downloads and extract the Visual C++ Redistributables. | |
| This is useful when working with minidump files as the user may be running | |
| with a new different version of the runtime. This script aims to maintain | |
| a copy of the various versions. | |
| Versions are normally added once I encounter them. | |
| This requires dark.exe from Wix (http://wixtoolset.org/releases/) and | |
| expand.exe (File Expansion Utility - this comes with Microsoft Windows). |
| """ | |
| Tested on Linux with python 3.7 | |
| Must have portaudio installed (e.g. dnf install portaudio-devel) | |
| pip install pyqtgraph pyaudio PyQt5 | |
| """ | |
| import numpy as np | |
| import pyqtgraph as pg | |
| import pyaudio | |
| from PyQt5 import QtCore, QtGui |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| from PyQt5.QtCore import QEvent | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtWidgets import QApplication | |
| from PyQt5.QtWidgets import QMainWindow |
| #!/usr/bin/env python | |
| import sys | |
| import vtk | |
| from PyQt5 import QtCore, QtWidgets | |
| from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor | |
| class MainWindow(QtWidgets.QMainWindow): | |
| def __init__(self, parent = None): |
| #!/usr/bin/python3 | |
| # -*- coding: utf-8 -*- | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtGui import QImage, QPixmap, QPalette, QPainter | |
| from PyQt5.QtPrintSupport import QPrintDialog, QPrinter | |
| from PyQt5.QtWidgets import QLabel, QSizePolicy, QScrollArea, QMessageBox, QMainWindow, QMenu, QAction, \ | |
| qApp, QFileDialog |
| // Copyright 2017. All Rights Reserved. | |
| // Author: csukuangfj@gmail.com (Fangjun Kuang) | |
| #include <QtGui> | |
| #include <QGraphicsRectItem> | |
| #include <QGraphicsView> | |
| #include <QApplication> | |
| #include <QGraphicsSceneMouseEvent> | |
| class CustomItem : public QGraphicsEllipseItem |