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 "wasm4.h" | |
const uint8_t smiley[] = { | |
0b11110000, 0b00001111, | |
0b11000000, 0b00000011, | |
0b00000100, 0b00010000, | |
0b00000100, 0b00010000, | |
0b00000000, 0b00000000, | |
0b00001100, 0b00110000, | |
0b11000011, 0b11000011, |
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 | |
# Built and tested for instagram | |
cat followers.txt | grep -E '^\s*\S+\s*$' | uniq | sort > followers.sorted | |
cat following.txt | grep -E '^\s*\S+\s*$' | uniq | sort > following.sorted | |
diff followers.sorted following.sorted | grep '>' |
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
#! /usr/bin/python3 | |
from peercoin_rpc import Client | |
number_of_blocks = 100 | |
ppcnode = Client(testnet=True, username="testnet", password="testnetpw", ip="localhost", port=8888) | |
last_block_hash = ppcnode.getblockhash(ppcnode.getblockcount()) | |
block_versions = [] |
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
var bitcore = require("bitcore-lib"); | |
var Buffer = require("buffer").Buffer; | |
var value = new Buffer.from("test", "utf8"); | |
var hash = bitcore.crypto.Hash.sha256(value); | |
// Compressed Key (nu skool) | |
var bn = bitcore.crypto.BN.fromBuffer(hash); | |
var privateKey = new bitcore.PrivateKey(bn); |
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
// reduce json floating point precision to reduce size | |
#include <iostream> | |
#include <string> | |
#include <regex> | |
#include <vector> | |
const std::string foil = "{\"foil\":{\"history\":[],\"layerCount\":6,\"outline\":{\"area\":0.0094394211977858536,\"height\":0.10000000000000001,\"path\":[[\"M\",0,0],[\"C\",-0.8090161000000009,-1.065339999999992,146.79888589999996,-14.155744000000027,159.50071800000001,-92.968964000000028],[\"C\",328.158458,-105.34453400000007,441.98747800000001,-231.89464399999997,445.60909800000002,-144.481404],[\"C\",340.96483799999999,-107.30037800000002,411.20925799999998,-72.230819999999994,411.10157800000002,-73.084100000000007],[\"C\",173.75719790000005,-73.240800000000007,353.8799179999998,-1,353.87991799999986,0]],\"sweep\":0.96055560932291262,\"uuid\":\"{76d2a5ae-8d14-4617-8b6a-122401df6f20}\"},\"profile\":{\"botProfile\":[[\"M\",0,0],[\"C\",0,0,-26,69,114,34],[\"C\",91,9,300,0,300,0]],\"symmetry\":\"Asymmetric\",\"thickness\":0.01,\"thicknessRatio\":1.0249374147947978,\"topProfile\":[[\" |
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
//hexcut(5, 3, 10, 10); | |
module hexcut (radius, depth, height, width) { | |
for (i = [0:ceil(height/(radius*2))]) { | |
for (j = [0:ceil(width/(radius*2))]) { | |
x = i*radius*2; | |
y = j*radius*1.75; | |
translate([x+(j%2*radius),y,0]) | |
rotate([0,0,30]) |
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
// Parameters | |
length = 10; | |
rocker_curve = 3; | |
thick_rot = 7; | |
$fn = 100; | |
include<rocker.scad> | |
include<outline.scad> |
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
// Parameters | |
length = 10; | |
rocker_curve = 3; | |
$fn = 100; | |
dia=length/PI; | |
include<rocker.scad> | |
// pic 11: intersect |
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
{"foil":{"history":[],"layerCount":6,"outline":{"area":0.0075541228622360655,"height":0.1,"path":[["M",0,0],["C",32.1909839,-63.06534,140.7988859,-227.155744,269.500718,-228.968964],["C",296.158458,-229.344534,336.987478,-220.894644,340.609098,-194.481404],["C",342.964838,-177.300378,269.209258,-156.23082,247.101578,-124.0841],["C",199.7571979,-55.2408,226.879918,-13,232.879918,0]],"sweep":0.72123963587739,"uuid":"{332b1de1-40b7-4b62-8b62-f261459d3144}"},"profile":{"symmetry":"Symmetric","thicknessRatio":1,"topProfile":{"cont":[0,1,0],"path":[["M",0,0],["C",-0.7973325173393278,-38.44668892785932,127.23264139117433,-73.35296904484017,361.0792383645382,-73.93534393137202],["C",712.9901941467928,-74.81174797400323,1207.8759716711122,-6.185557024727501,1235.6814732167798,0]]},"uuid":"{dd88cfd2-805e-4f23-beeb-24a3bd219028}"},"thick":0.01,"thickness":{"topProfile":[["M",0,-30],["C",0,-30,300,-30,300,0]],"uuid":"{31f91e08-b353-4d72-ae76-f642dca24898}"},"uuid":"{b3ea71cf-9d29-4037-9dd0-c5ee3b8e9b3c}"}} |
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
// Get the polyData object to write | |
vtkSmartPointer<vtkPolyData> polydata = polyData(); | |
vtkSmartPointer<vtkSTLWriter> stlWriter = | |
vtkSmartPointer<vtkSTLWriter>::New(); | |
#if VTK_MAJOR_VERSION <= 5 | |
stlWriter->SetInput(polydata); | |
#else | |
stlWriter->SetInputData(polydata); |
NewerOlder