Install updates and upgrade your system:
$ sudo apt update
$ sudo apt upgrade
Install required libraries:
import json | |
import argparse | |
import html | |
import os | |
from datetime import datetime | |
def generate_html(json_file, html_file="chat.html", metadata=None, date=None): | |
with open(json_file, 'r') as file: | |
data = json.load(file) |
from PIL import Image | |
from PIL import ImageFont | |
from PIL import ImageDraw | |
import math | |
#Self contain this for easy single clicking | |
from PIL import Image | |
def image_grid(imgs, rows, cols): | |
#assert len(imgs) == rows*cols | |
w, h = imgs[0].size | |
grid = Image.new('RGB', size=(cols*w, rows*h)) |
using System; | |
using System.Collections.Concurrent; | |
using System.Threading.Tasks; | |
using Den.Tools; | |
using Den.Tools.GUI; | |
using Den.Tools.Matrices; | |
using MapMagic.Products; | |
using MapMagic.Nodes; |
#!/usr/bin/env python | |
# coding: utf-8 | |
# You need PIL <http://www.pythonware.com/products/pil/> to run this script | |
# Download unifont.ttf from <http://unifoundry.com/unifont.html> (or use | |
# any TTF you have) | |
# Copyright 2011 Álvaro Justen [alvarojusten at gmail dot com] | |
# License: GPL <http://www.gnu.org/copyleft/gpl.html> | |
from image_utils import ImageText |
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format | |
Copyright (C) 2014, Wolf Walter. | |
Copyright (C) 2013, Stefan Helmert. | |
Copyright (C) 2018, Kicad developers. | |
Copyright (C) 2019, arturo182. | |
GPL v2. | |
Functionality: | |
Generation of JLCPCB PCBA compatible BOM |
function debugLog(/* ... args */) { | |
var result = ""; | |
for (var i = 0; i < arguments.length; i++) { | |
result += (i !== 0 && i < arguments.length ? " " : "") + debugPost(arguments[i], ""); | |
} | |
post(result + "\r\n"); | |
} | |
function debugPost(val, res) { | |
if (Array.isArray(val)) { |
A collection of useful C# extension methods for the Unity engine. |
''' | |
@author AlexHuleatt | |
Generate a simple, connected dungeon. Focus is on rooms, not maze-like features. | |
Output of get_dungeon is two sets: | |
1. A set of (y,x) tuples representing the position of walls | |
2. A set of (y,x) tuples representing the walls removed to make doors | |
''' | |
from random import randint, sample |
// http://www.sebaslab.com/how-to-compress-and-decompress-binary-stream-in-unity/ | |
using ICSharpCode.SharpZipLib.BZip2; | |
using System.Runtime.Serialization.Formatters.Binary; | |
using System.IO; | |
static void Compress (string nameOfTheFileToSave, ISerializable objectToSerialize) | |
{ | |
using (FileStream fs = new FileStream(nameOfTheFileToSave, FileMode.Create)) | |
{ |