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
#!/bin/bash | |
# Require argument for the package name | |
if [ -z "$1" ]; then | |
# only show script name in usage | |
echo "Usage: $(basename $0) <package_name>" | |
exit 1 | |
fi | |
pkgname="$1" |
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 build123d import * | |
from ocp_vscode import * | |
C, MIN, MAX = Align.CENTER, Align.MIN, Align.MAX | |
pip_count = 6 | |
brick_unit_size = 8 | |
pip_height = 1.8 | |
pip_diameter = 4.8 |
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 ml4k | |
import random | |
import tkinter as tk | |
from copy import copy | |
from tkinter import messagebox | |
API_KEY = "PASTE-API-KEY-HERE" | |
AI_MODE = "random" | |
TRAINING = False |
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 tkinter as tk | |
from tkinter import messagebox | |
# We can make a "virtual" game board as a list of lists. The list contains 3 other lists (rows). | |
# Each row list contains 3 string values representing spaces. The spaces will be populated with | |
# either "X" or "O", but we start with empty strings to denote an empty space. | |
# | |
# We can access a space on the board using row and column indexes. For example, the top-left space | |
# is `board[0][0]`, the center space is `board[1][1]`, and the bottom-right space is `board[2][2]`. |
The CAPS
key can be mapped to an escape key when pressed once, and a super
(mod4) key when used in combination with other keys.
Create the file /usr/share/X11/xkb/symbols/custom_opts
with the following:
// Make Caps an additional Escape
hidden partial modifier_keys
xkb_symbols "super_esc" {
key { [ Escape ] };
These instructions should work on any Ubuntu-based OS, but have only been tested on GalliumOS.
Copy and paste the following line into a terminal and press enter to install all the dependencies (you might already have some installed):
sudo apt update
sudo apt install python-software-properties python3 python3-pip idle3 git
sudo apt install openjdk-8-jre-headless openjdk-8-jdk maven
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
/* global THREE */ | |
(function() { | |
function getBoundingBox(obj) { | |
var min = obj.position.clone(); | |
var max = obj.position.clone(); | |
if (obj.geometry) { | |
if (!obj.geometry.boundingBox) { |
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 sys | |
import random | |
results = [] | |
strategy = 'stay' | |
if len(sys.argv) > 1: | |
strategy = sys.argv[1] | |
for i in range(0, 100): | |
# Shuffle doors |
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
<body></body> | |
<script src="http://gamingJS.com/Three.js"></script> | |
<script src="http://gamingJS.com/ChromeFixes.js"></script> | |
<script> | |
// This is where stuff in our game will happen: | |
var scene = new THREE.Scene(); | |
// This is what sees the stuff: | |
var aspect_ratio = window.innerWidth / window.innerHeight; | |
var camera = new THREE.PerspectiveCamera(75, aspect_ratio, 1, 10000); |
NewerOlder