Skip to content

Instantly share code, notes, and snippets.

View mustafaxfe's full-sized avatar
💭
I may be slow to respond.

mustafa mustafaxfe

💭
I may be slow to respond.
View GitHub Profile
@mustafaxfe
mustafaxfe / Raspberry_Pi_Servo_Motor.py
Created September 29, 2018 17:14 — forked from elktros/Raspberry_Pi_Servo_Motor.py
Python Script for controlling a Servo Motor (Tower Pro SG90) using Raspberry Pi.
import RPi.GPIO as GPIO
import time
control = [5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10]
servo = 22
GPIO.setmode(GPIO.BOARD)
GPIO.setup(servo,GPIO.OUT)
@mustafaxfe
mustafaxfe / main.cpp
Created July 31, 2018 21:31
Edited interactive_face_detection_sample code to work with Intel Realsense R200 Camera
/*
// Copyright (c) 2018 Intel Corporation
//
// 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
from PIL import Image
for i in range(5,360, 5):
img = Image.open("frame2163.jpg")
img2 = img.rotate(i)
img2.save("img_1_%d.jpg"%i)
@mustafaxfe
mustafaxfe / divideFrames algoritması
Last active February 21, 2018 19:14
Hazırladığım frame(kare) bölen betiğin algoritması
Adım 1: cap = " ", start = 1.0, end = 2.0, frames = 0, counter = 0, gap = 0 değişkenlerini tanımla
Adım 2: Kaçıncı saniye frame (kare) alınmaya başalaycağını sor ve "start" değişkenini tanımla
Adım 3: Kaçıncı saniye frame (kare) alınması bitirileceğini sor ve "end" değişkenini tanımla
Adım 4: Kaç saniye aralığında frame (kare) alınacağını sor ve "gap" değişkenini tanımla
Adım 5: Kaç frame (kare) alınacağını sor ve "frame" değişkenini tanımla
Adım 6: Bekleme fonksiyonunu kullanarak "start" değişkeni kaç saniye ise sistemi beklet
Adım 7: Kamerayı aç ve kare alınımına hazırla
Adım 8: "frame"'e kadar i değişkenini birer birer artıracak "for" döngüyü başlat
Adım 9: Görüntü al ve counter (sayaç) "gap" (kaç saniye aralıklı görüntü alınacak) üzerine ekleyerek arttır.
9.1: Eğer counter (sayaç) "end" - "start" değişkenlerinden büyükse
@mustafaxfe
mustafaxfe / divideFrames.py
Last active February 20, 2018 20:45
It is one of the works for UTI project of MIPS Medical. It simply captures frame from your camera and divide them into (.png)s...
# -*- coding: utf-8 -*-
# ============================================================================================================================================
# Name : divideFrames.py
# Author : Mustafa Sarialp
# Version : 1.0
# Copyright : Apache Licence V2
# Description : This is a python script to handle dividing video into frames without recording it. It using sleep function to handle dividing.
# Description (TR): Bu betik vidyo kaydetmeden sleep fonksiyonunu kullanarak kareler elde etmeye yarar.
# ============================================================================================================================================
import cv2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from google.cloud import translate
from picamera import PiCamera
from time import sleep
from gpiozero import Button
from google.cloud import speech
import io
import time
import picamera
@mustafaxfe
mustafaxfe / create_password2.py
Last active November 16, 2015 07:19
Hi, I updated my Python script to use it for some sites that accepts just letters, and numbers. You can use it while sing up... It is written by Mustafa Sarialp and its licence Public Domain.
#!/usr/bin/env python3
# ====================================================================================================================================================
# Name : create_password.py
# Author : Mustafa Sarialp
# Version : 2.0.2
# Copyright : Public Domain
# Description : Updated version of my Python 3 script "create_password" which you can create a password without special charecters for using with some
# web sites which don't support special characters like "#, &, %, !, ...". This script creates simpler passwords than version 1.0.
# ====================================================================================================================================================
@mustafaxfe
mustafaxfe / create_password.py
Last active November 16, 2015 07:16
Hi, I have created a python script for creating strong passwords for singing a website. You can use it for creating a strong password easily. It is written by Mustafa Sarialp and its licence Public Domain.
#!/usr/bin/env python3
# ===============================================================================================================================
# Name : create_password.py
# Author : Mustafa Sarialp
# Version : 1.0.2
# Copyright : Public Domain
# Description : A python 3 script which creates strong passwords ( 12 character long) to use like singup... You can use it freely.
# ================================================================================================================================
import random