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
clc, clear, close all | |
for i=1:6 | |
x = imread(strcat(num2str(i), '.jpg')); | |
% x= imread('2.jpg'); % read image | |
image = rgb2gray(x); | |
%g=medfilt2(image,[2 2]); % Median filtering to remove noise. | |
H = padarray(2,[2 2]) - fspecial('gaussian' ,[5 5],2); % create unsharp mask | |
sharpened = imfilter(image,H); % create a sharpened version of the image using that mask | |
BW2 = edge(sharpened,'prewitt'); |
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
/* Copyright 2013 Chris Wilson | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
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 pyaudio | |
import wave | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 | |
CHUNK = 1024 | |
RECORD_SECONDS = 5 | |
WAVE_OUTPUT_FILENAME = "file.wav" | |
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/env python | |
import os | |
import sys | |
import re | |
def read_env(): | |
"""Pulled from Honcho code with minor updates, reads local default | |
environment variables from a .env file located in the project root | |
directory. |
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/env python | |
# Copyright (c) 2008 Carnegie Mellon University. | |
# | |
# You may modify and redistribute this file under the same terms as | |
# the CMU Sphinx system. See | |
# http://cmusphinx.sourceforge.net/html/LICENSE for more information. | |
# Edited by: Mahmoud Abdrabo on Wed Dec 25 2013 |
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
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |
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> | |
<title>DC motor calculator</title> | |
<script> | |
function calculate () { | |
mass = document.getElementById('mass').value; | |
acceleration = document.getElementById('acceleration').value; | |
speed = document.getElementById('speed').value; |
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 | |
#Author: Mahmoud Abdrabo | |
#Date: 2012 Sat Aug 4, 3:06:45 | |
clear | |
echo "Do you want to install missing stuff? (y,n)" | |
read installation | |
if [ "$installation" = "y" ]; then | |