Mojo 🔥 couples Python‑level ergonomics with MLIR‑level performance. This document tracks the Mojo v25.3 manual (published 2025‑05‑06) and includes corrections up to the May 9 2025 errata.
This configuration worked for me, hope it helps
It is based on: https://becominghuman.ai/deep-learning-gaming-build-with-nvidia-titan-xp-and-macbook-pro-with-thunderbolt2-5ceee7167f8b
and on: https://stackoverflow.com/questions/44744737/tensorflow-mac-os-gpu-support
This file contains hidden or 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
__all__ = ( | |
####### Class Objects | |
#CoGetClassObject - Normal, not wrapped | |
'CoDllGetClassObject', #Get ClassObject from a DLL file | |
####### ClassFactory::CreateInstance Wrappers | |
'CoCreateInstanceFromFactory', #Create an object via IClassFactory::CreateInstance | |
'CoCreateInstanceFromFactoryLicenced', #Create a licenced object via IClassFactory2::CreateInstanceLic |
This file contains hidden or 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 numpy as np | |
import pylab as pl | |
from numpy import fft | |
def fourierExtrapolation(x, n_predict): | |
n = x.size | |
n_harm = 10 # number of harmonics in model | |
t = np.arange(0, n) | |
p = np.polyfit(t, x, 1) # find linear trend in x | |
x_notrend = x - p[0] * t # detrended x |
This file contains hidden or 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
To run a command as administrator (user "root"), use "sudo <command>". | |
See "man sudo_root" for details. | |
testlab@testlab-VirtualBox:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
[sudo] password for testlab: | |
Executing: /tmp/tmp.KcbNJmuzBI/gpg.1.sh --keyserver | |
hkp://keyserver.ubuntu.com:80 | |
--recv-keys | |
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
gpg: requesting key D3D831EF from hkp server keyserver.ubuntu.com |
This file contains hidden or 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
def openfile_dialog(): | |
from PyQt5 import QtGui | |
from PyQt5 import QtGui, QtWidgets | |
app = QtWidgets.QApplication([dir]) | |
fname = QtWidgets.QFileDialog.getOpenFileName(None, "Select a file...", '.', filter="All files (*)") | |
return str(fname) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, this is too big to display.
Often, you want the user to choose n options (where n is small-ish) from a very large (hundreds or thousands) number of possibilities. Good UX around this dictates that the user should be able to search for the options they want.
This gist puts together a minimal example of binding a search field with multiple checkboxes using ipywidgets.
NewerOlder