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
$fn = 16; | |
curveModifier = 40; | |
curveModifier2 = 10; | |
module uncutVase(width,height,curveModifier,curveModifier2){ | |
for(i=[0:1:height]){ | |
translate([50,50,i]) cylinder(1,sin(i+curveModifier) * curveModifier2+width/2- curveModifier2,sin(i+1+curveModifier)* curveModifier2+width/2-curveModifier2); | |
} | |
} | |
module vase(width,height,wallWidth){ | |
difference(){ |
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 <Servo.h> | |
Servo s1; | |
Servo s2; | |
Servo s3; | |
void setup() { | |
// put your setup code here, to run once: | |
s1.attach(9); | |
s2.attach(10); |
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 serial | |
import time | |
ser = serial.Serial('COM12',115200, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE) # open serial port | |
print(ser.name) # check which port was really used | |
def set_servo(leg,servo,position): | |
ser.write(serial.to_bytes([0xff,leg*3+servo,position]))#1 | |
LIFT_DELAY = 0.1 |
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
RESOLUTION = 8; | |
$fn = RESOLUTION; | |
SECTIONS_FACTOR = 1; | |
SECTIONS = 256/SECTIONS_FACTOR; | |
RADIUS = 1; | |
RING_RADIUS = 18/2; | |
BAND_WIDTH = 4; | |
SEGMENT_LENGTH = ((2 * 3.14159 * RING_RADIUS + RADIUS)/SECTIONS+0.0452)*SECTIONS_FACTOR;//0.27; | |
HOLE_RADIUS = 0.5; | |
PATTERN_OFFSET=HOLE_RADIUS; |
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
async function onCollision() { | |
stopRoll(); | |
setMainLed({ r: 255, g: 0, b: 0 }); | |
await setHeading(getRandomInt(0,359)); | |
await delay(0.5); | |
setMainLed({ r: 255, g: 22, b: 255 }); | |
setSpeed(100); | |
} | |
registerEvent(EventType.onCollision, onCollision); | |
async function startProgram() { |
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 zip = new JSZip(); | |
function en(text, callback){ | |
var thefile = zip.file("file.zip", text); | |
var reader = new FileReader(); | |
reader.onload=callback // e.target.result | |
thefile.generateAsync({ type: "blob" }).then(function (content) { | |
reader.readAsDataURL(content); | |
}); | |
} |
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 cv2 | |
from shell.execute import run_command | |
from django.conf import settings | |
import numpy as np | |
import os, sys | |
from importlib import reload | |
from cv2 import dnn_superres | |
from importlib import import_module | |
from threading import Thread | |
import traceback |
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 cv2, pytesseract | |
import numpy as np | |
AVERAGE = 100 | |
EXTRA = 1 | |
MIN_TEXT = 4 | |
def censor_image(input_file): | |
image = cv2.imread(input_file) | |
transparent_img = np.zeros((image.shape[0], image.shape[1], image.shape[2]), dtype=np.uint8) | |
data = pytesseract.image_to_data(image, output_type='dict') |
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 cv2, pytesseract | |
import numpy as np | |
from moviepy.editor import * | |
FREQUENCY = 200 # The frequency by which the software checks for text and censors it | |
AVERAGE = 100 # The amount of blur applied to the text | |
EXTRA = 1 # Space to the sides of the text to be censored, in proportion to the size of the text | |
MIN_TEXT = 4 # Minumum umber of characters in each place to be censored | |
def censor_video(input_file, output_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
<IfModule mod_ssl.c> | |
<VirtualHost *:80> | |
Redirect permanent / https://mamasheen.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this |
OlderNewer