VoiceAttack 2 is a .NET 8 application, so you need the dotnetdesktop8 runtime when you create the prefix.
WINEPREFIX=/home/yourname/Games/DCS/Prefixes/voiceattack WINEDLLOVERRIDES=mscoree=d winetricks -q dotnetdesktop8
| """ | |
| this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python | |
| all credits go to alko and arturomp @ stack overflow. | |
| basically, it's a big find/replace. | |
| """ | |
| import re | |
| cList = { | |
| "ain't": "am not", |
An incomplete list of people in the Python community to follow on Twitter and Mastodon.
With the risk that Twitter dies, I'd be sad to lose links to interesting people in the community, hence this list.
I would love you to comment below with links to people I've missed.
More context and comments at the end of the list.
| #NoEnv | |
| #Warn All | |
| #Warn LocalSameAsGlobal, Off | |
| #Persistent | |
| /* | |
| Speech Recognition | |
| ================== | |
| A class providing access to Microsoft's SAPI. Requires the SAPI SDK. |
There are three main concepts with Rust:
These are fairly simple concepts, but they are often counter-intuitive to concepts in other languages, so I wanted to give a shot at
| def get_count(q): | |
| count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
| count = q.session.execute(count_q).scalar() | |
| return count | |
| q = session.query(TestModel).filter(...).order_by(...) | |
| # Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
| print q.count() |
This is a small demo of how to create a library in Rust and call it from Python (both CPython and PyPy) using the CFFI instead of ctypes.
Based on http://harkablog.com/calling-rust-from-c-and-python.html (dead) which used ctypes
CFFI is nice because:
ctypes| /***************************************************************** | |
| * onMessage from the extension or tab (a content script) | |
| *****************************************************************/ | |
| chrome.runtime.onMessage.addListener( | |
| function(request, sender, sendResponse) { | |
| if (request.cmd == "any command") { | |
| sendResponse({ result: "any response from background" }); | |
| } else { | |
| sendResponse({ result: "error", message: `Invalid 'cmd'` }); | |
| } |
| 'use strict'; | |
| var express = require('express'), | |
| app = express(), | |
| http = require('http'), | |
| server = http.createServer(app), | |
| path = require('path'), | |
| io = require('socket.io').listen(server), | |
| fs = require('fs'), | |
| zmq = require('zmq'), |