A script to fix EDID problems on external monitors in macOS.
-
Connect only the problem display.
-
Create this directory structure (if it doesn't already exist):
| { | |
| "name": "fenicsx", | |
| "image": "ghcr.io/fenics/dolfinx/lab:v0.10.0", | |
| "containerEnv": { | |
| "PKG_CONFIG_PATH": "/usr/local/dolfinx-complex/lib/pkgconfig", | |
| "PETSC_DIR": "/usr/local/petsc/", | |
| "PETSC_ARCH": "linux-gnu-complex128-32", | |
| "PYTHONPATH": "/usr/local/dolfinx-complex/lib/python3.12/dist-packages:/usr/local/lib:", | |
| "LD_LIBRARY_PATH": "/usr/local/dolfinx-complex/lib:" | |
| }, |
| # A simple generator wrapper, not sure if it's good for anything at all. | |
| # With basic python threading | |
| from threading import Thread | |
| try: | |
| from queue import Queue | |
| except ImportError: | |
| from Queue import Queue | |
| import multiprocessing | |
| import numpy as np | |
| from scipy import signal as sgn | |
| def _minimum_phase(signal, n_fft=None, truncate=True): | |
| """Calculate the minimum phase equivalent of a finite impulse response. | |
| The method is based on the Hilbert transform of the real-valued cepstrum | |
| of the finite impulse response, that is the cepstrum of the magnitude | |
| spectrum only. As a result the magnitude spectrum is not distorted. | |
| Potential aliasing errors can occur due to the Fourier transform based |
| mkdir /tmpnew | |
| mount -t tmpfs tmpfs /tmpnew | |
| TMPDIR=/tmpnew make |
Add the virtualenv plugin to ~/.zshrc and make sure these lines are in ~/.oh-my-zsh/plugins/virtualenv/virtualenv.plugin.zsh
# disables prompt mangling in virtual_env/bin/activate
export VIRTUAL_ENV_DISABLE_PROMPT=1
#Disable conda prompt changes#https://conda.io/docs/user-guide/configuration/use-condarc.html#change-command-prompt-changeps1
| dir_name = 'my_dir' | |
| try: | |
| os.makedirs(dir_name) | |
| except OSError: | |
| if os.path.exists(dir_name): | |
| pass | |
| else: | |
| # Raise the exception on everything other than OSError | |
| raise |
| import urllib3 | |
| import shutil | |
| http = urllib3.PoolManager() | |
| with open(filename, 'wb') as out: | |
| r = http.request('GET', url, preload_content=False) | |
| shutil.copyfileobj(r, out) |
| $remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
| $found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
| if( $found ){ | |
| $remoteport = $matches[0]; | |
| } else{ | |
| echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
| exit; | |
| } |
| # -*- mode: python -*- | |
| # SCons build file | |
| import os | |
| # If using dot2tex, uncomment the following. | |
| # | |
| # LaTeX will not error out if dot2tex is not found, but without it, we can't | |
| # generate our Graphviz graphs. Don't let execution continue if it isn't found. |