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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Simple bootstrap and js tweetbox without React.js"> | |
<script src="http://fb.me/react-0.13.1.js"></script> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"> | |
</script> | |
<meta charset="utf-8"> |
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
<div id="curtain1"></div> | |
<div id="curtain2"></div> | |
<div id="key"></div> | |
<div id="mask"></div> | |
<div class="title">Delve Into My...</div> | |
<div class="wrapper"> |
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 spawn = require("child_process").spawn; | |
var fs = require('fs'); | |
var runPythonFile = function (filepath, fileName, stdin, callback, process_list) { | |
var proc1 = spawn('python3', [filepath + fileName + '.py']); | |
var stdout1 = ""; | |
var stderr1 = ""; | |
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 re | |
def derivative(polynomial): | |
coefficient = re.findall(r'-?[\d]*[x$]', polynomial) | |
power = re.findall(r'[\^][-]?[\d$]+', polynomial) | |
derivative_polynomial = [] |
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
test |
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
# Random number generator setup | |
var rng = RandomNumberGenerator.new() | |
func _ready(): | |
rng.randomize() |
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
func _input(event): | |
if Input.is_key_pressed(KEY_SPACE): | |
_init_grid() | |
_clear_tilemaps() | |
_create_random_path() | |
_spawn_tiles() |
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
func _init_walkers(): | |
... | |
walker.pos = Vector2(width/2, height/2) | |
... | |
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
extends Node2D | |
onready var dirt_tilemap = $DirtTileMap | |
onready var wall_tilemap = $WallTileMap | |
var rng = RandomNumberGenerator.new() | |
var CellSize = Vector2(32, 32) | |
var width = 2048/CellSize.x | |
var height = 1216/CellSize.y |
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
'''This python code performs face tracking and simulates scrolling. First, the image feed is recieved from the camera. A facial detection algorithm is applied | |
once in every 5 frames. On detecting the face, a rectangular frame is drawn around the detected face, and the deviation from the center of the screen to the center of the face is taken as the scroll delta. | |
Requires Python + OpenCV''' | |
import cv2 | |
from pynput.mouse import Button, Controller | |
mouse = Controller() | |
HAAR_CASCADE_PATH = "haarcascade_frontalface_alt.xml" |
OlderNewer