This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| using System; | |
| using System.ComponentModel; | |
| using System.Runtime.InteropServices; | |
| namespace ComWithoutRegisteringExample | |
| { | |
| internal static class ComHelper | |
| { | |
| private delegate int DllGetClassObject(ref Guid clsid, ref Guid iid, [Out, MarshalAs(UnmanagedType.Interface)] out IClassFactory classFactory); |
| WM_KEYDOWN = 0x100 | |
| GoSub, GetHTML | |
| OnMessage(WM_KEYDOWN, "WM_KeyDown") | |
| Gui Add, ActiveX, w350 h300 x0 y0 vdoc, HTMLFile | |
| doc.write(html) | |
| Gui, Show, w310 h265 Center, HTML Based GUI | |
| doc.all.type.focus | |
| ComObjConnect(doc, "Doc_") | |
| return |
| // Usage: | |
| // Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread | |
| // then use as follows: | |
| // | |
| // query(term | [term, term, ...], term | [term, term, ...], ...) | |
| // | |
| // When arguments are in an array then that means an "or" and when they are seperate that means "and" | |
| // | |
| // Term is of the format: | |
| // ((-)text/RegExp) ( '-' means negation ) |
| # GL interoperability example, by Peter Berrington. | |
| # Draws a rotating teapot, using cuda to invert the RGB value | |
| # each frame | |
| from OpenGL.GL import * | |
| from OpenGL.GLUT import * | |
| from OpenGL.GLU import * | |
| from OpenGL.GL.ARB.vertex_buffer_object import * | |
| from OpenGL.GL.ARB.pixel_buffer_object import * |
| from contextlib import contextmanager | |
| import numpy as np | |
| import torch | |
| from torch import Tensor, ByteTensor | |
| import torch.nn.functional as F | |
| from torch.autograd import Variable | |
| import pycuda.driver | |
| from pycuda.gl import graphics_map_flags | |
| from glumpy import app, gloo, gl |
https://gist.github.com/victor-shepardson/5b3d3087dc2b4817b9bffdb8e87a57c4
I'm using Ubuntu 16.04 with a GTX 1060
https://github.com/aancel/admin/wiki/VirtualGL-on-Ubuntu
https://virtualgl.org/About/Introduction
When you use ssh with X forwarding, you might have noticed that you cannot execute programs that require 3D acceleration. That's where VirtualGL comes into play.
| from fastai import * | |
| from fastai.tabular import * | |
| from fastai.vision import * | |
| PATH = os.path.abspath('..') | |
| # distinguish categorical and continuous variables, and dependent variable | |
| cat_names = ['cat1', 'cat2', 'cat3'] | |
| cont_names =['cont1', 'cont2'] | |
| dep_var = 'target' |
Note
If you want to use pure WSLg, you can try the new WSLg (XWayland) tutorial or the WSLg (Wayland) tutorial.
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.
For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample