This file contains 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 bpy | |
import numpy as np | |
from scipy.spatial import Delaunay | |
points = np.random.rand(20,3) | |
tri = Delaunay(points) | |
mesh = bpy.data.meshes.new("myUnrulyMess") # add the new mesh | |
obj = bpy.data.objects.new(mesh.name, mesh) | |
col = bpy.data.collections.get("Collection") |
This file contains 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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"type": "shell", | |
"label": "g++ build active file", | |
"command": "/usr/bin/g++", | |
"args": [ | |
"-g", | |
"${file}", |
This file contains 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
/* | |
OneLoneCoder.com - What are Cellular Automata? John Conway's Game Of Life | |
"Get lost..." - @Javidx9 | |
License | |
~~~~~~~ | |
Copyright (C) 2018 Javidx9 | |
This program comes with ABSOLUTELY NO WARRANTY. | |
This is free software, and you are welcome to redistribute it | |
under certain conditions; See license for details. |
This file contains 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
#include "mbed.h" | |
#include "Adafruit_SSD1306.h" | |
// Instantiate OLED | |
class I2CPreInit : public I2C | |
{ | |
public: | |
I2CPreInit(PinName sda, PinName scl) : I2C(sda, scl) | |
{ | |
frequency(400000); |
This file contains 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
#install.packages("httr") | |
#install.packages("jsonlite") | |
#install.packages("tidyverse") | |
#install.packages("stringr") | |
require(httr) | |
require(jsonlite) | |
require(tidyverse) | |
require(stringr) | |
base <- "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=linkshere&lhlimit=500" |
This file contains 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
#install.packages("httr") #install.packages("jsonlite") #install.packages("tidyverse") | |
#install.packages("stringr") #install.packages("furrr") #install.packages("igraph") | |
require(httr) | |
require(jsonlite) | |
require(tidyverse) | |
require(stringr) | |
#require(furrr) #require(igraph) | |
url_base <- "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=linkshere&lhlimit=500" | |
articles <- c("Maximal and minimal elements", "Maxima and minima") |
This file contains 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
// Usage: java kotgombinate.jar Dir1 Dir2 Dir3 startOfRange endOfRange | |
// Output: Dir1(A, B) * Dir2(C, D) = Dir3 (A_C, A_D, B_C, B_D) | |
// Range is line-numbers so files in Dir1 and Dir2 need to correspond 1-to-1 | |
import java.io.File | |
import kotlin.system.exitProcess | |
data class Butt(var fileContents: MutableList<List<String>>, var fileName: MutableList<String>) | |
var dir1 = Butt(ArrayList(), ArrayList()) | |
var dir2 = Butt(ArrayList(), ArrayList()) | |
var dir3 = Butt(ArrayList(), ArrayList()) |
This file contains 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 java.io.File | |
var file: MutableList<List<String>> = ArrayList() //list of lists | |
var file2: MutableList<List<String>> = ArrayList() //list of lists | |
fun main(args: Array<String>) { | |
file = readDir(args[0]) | |
file2 = readDir(args[1]) | |
for (e in file) println(e) |
This file contains 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 | |
# | |
# For reference: | |
# VT330/VT340 Programmer Reference Manual | |
# Volume 2: Graphics Programming | |
# | |
# | |
# This script plots vector graphics in the terminal emulator mlterm when mlterm is compiled with ./configure --with-tools | |
# The graph is generated by gnuplot compiled with ./configure --with-regis | |
# |
This file contains 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
struct TwoNibbles | |
{ | |
byte v1:4; | |
byte v2:4; | |
}; | |
union Nibble | |
{ | |
TwoNibbles nibble; | |
byte Nibble[sizeof(TwoNibbles)]; |
NewerOlder