Run NIXPKGS_ALLOW_UNFREE=1 nix develop --impure
to enter the shell, then conda update conda
.
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
# Get a ppc64le-compatible branch and build cross (this takes a long time) | |
git clone https://github.com/ChadSki/nixpkgs.git -b nixos-22.05-small-ppc64le | |
nix-build './nixpkgs' -A pkgsCross.powernv.nix | |
# Get a donor copy of the installer | |
wget https://releases.nixos.org/nix/nix-2.8.1/nix-2.8.1-x86_64-linux.tar.xz | |
tar xf nix-2.8.1-x86_64-linux.tar.xz | |
# Copy the cert package to our new installer | |
mkdir -p nix-2.8.1-ppc64le-linux/store |
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
#!/usr/bin/env bash | |
# Toggle for debug echoing | |
# set -x | |
# Turn some bugs into errors | |
set -o errexit -o pipefail -o noclobber -o nounset | |
# Shellcheck is a utility which checks bash scripts for common errors and weak | |
# points in the language. If you need to suppress an error, put a suppression |
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
while [ true ]; do | |
while [ $(jobs | wc -l) -ge 4 ]; do | |
echo sleep | |
sleep 2 | |
done | |
echo "smoke" | |
(sleep 10; echo "fire") & | |
done |
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
open System | |
// returns: median value of a list | |
let inline median input = | |
let sorted = input |> Seq.toArray |> Array.sort | |
let m1,m2 = | |
let len = sorted.Length-1 |> float | |
len/2. |> floor |> int, len/2. |> ceil |> int | |
(sorted.[m1] + sorted.[m2] |> float)/2. |
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
// Learn more about F# at http://fsharp.org | |
// See the 'F# Tutorial' project for more help. | |
open System | |
open Microsoft.Xna.Framework | |
open Microsoft.Xna.Framework.Graphics | |
type Tile = Grass | Rock | Sand | |
type GameState = { |
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 win32api | |
import win32con | |
import win32gui | |
from ctypes import windll, pointer | |
from ctypes.wintypes import MSG | |
class MyWindow: |
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
from ctypes import * | |
from ctypes.wintypes import * | |
WNDPROCTYPE = WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM) | |
WS_EX_APPWINDOW = 0x40000 | |
WS_OVERLAPPEDWINDOW = 0xcf0000 | |
WS_CAPTION = 0xc00000 |
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
from PyQt5 import QtCore, QtGui, QtWidgets | |
from PyQt5.QtWidgets import ( | |
QTreeView, QListView, QFileSystemModel, QApplication) | |
class Main(QTreeView): | |
def __init__(self): | |
QTreeView.__init__(self) | |
# self.setWindowFlags(QtCore.Qt.FramelessWindowHint) | |
model = QFileSystemModel() | |
model.setRootPath('C:\\') |
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
Red/System [ | |
Title: "Hello" | |
File: %messagebox.reds | |
] | |
; --- lib imports ----- | |
#import [ | |
"user32.dll" stdcall [ | |
MessageBox: "MessageBoxA" [ |
NewerOlder