Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
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 python2 | |
import usbtmc | |
import time | |
from math import sin | |
listOfDevices = usbtmc.getDeviceList() | |
dn = listOfDevices[0] | |
d = usbtmc.UsbTmcDriver(dn) | |
print d.getName() |
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 python | |
'Generate Time Table' | |
from __future__ import print_function | |
import sys | |
import argparse | |
from collections import defaultdict | |
START_TIME = 8 | |
# Time when classes start |
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
#!/bin/bash | |
# IP address to cycle through (in order of priority) | |
ip=( "192.168.20.102" "192.168.20.103" ) | |
# Check if synergy is already connected | |
if pgrep "synergyc"; then | |
# Synergy already connected | |
echo "Synergy is already running." | |
else |
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
[Unit] | |
Description=HP Elitebook Folio G1 fixes | |
[Service] | |
ExecStart=/sbin/fix-my-stupid-folio | |
[Install] | |
WantedBy=basic.target |
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 math | |
import numpy as np | |
import cv2 | |
cam = cv2.VideoCapture(0) | |
cam.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) | |
cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 720) | |
cam.set(cv2.CAP_PROP_CONVERT_RGB, False) # turn off RGB conversion | |
# cam.set(cv2.CAP_PROP_FOURCC('Y', '1', '6', '')) |
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
# TESTING HARDWARE | |
# see3CAM_CU40 | |
# raspberry Pi 3 bf8 | |
# Raspbian Stretch 13-03-2018 | |
# Python 3.5.3 | |
# OpenCV 3.4.1 | |
# load required libraries | |
import math | |
import numpy as np |
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
# stl-surface.py | |
# Generate a 3D model based on a 2D equation | |
# The model will be rectangular with a flat base. The top surface is based on | |
# a provided equation in "surface_function". The file name can be set with the | |
# output_filename variable. The x and y width of the model and the grid spacing | |
# is defined by the following parameters. | |
# x_spacing |
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 python | |
import math | |
import sys | |
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips | |
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb) | |
# Assumes x1 < x2, y1 < y2 |
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 json | |
import os | |
import zlib | |
import requests | |
from base45 import b45decode | |
import cwt | |
from cwt import load_pem_hcert_dsc |
OlderNewer