This file contains hidden or 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/sh | |
# Kullanımı | |
# ./ppt2jpg <dosya-adı>.ppt | |
fullpath="$1" | |
dosyaname="${fullpath##*/}" | |
basename="${dosyaname%.*}" | |
loimpress -convert-to pdf "$dosyaname" |
This file contains hidden or 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
function [J,N,K,D] = compress() | |
f = double(rgb2gray(imread('g.png'))); | |
[R C] = size(f); | |
J = zeros(R,C); | |
N = zeros(R,C); | |
D = {}; | |
K = {}; |
This file contains hidden or 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
function Q = zigzag(I) | |
A = 16; | |
Q = [0]; | |
buyuk = 2; | |
katman = buyuk; | |
kucuk = 1; i = 1; j = 1; | |
while A > 0 | |
if (i ==1 & j == 1) |
This file contains hidden or 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
function R = rle(Q) | |
len = length(Q); | |
son_eleman = len; | |
i = 1; eleman = 1; | |
R = {}; | |
tmp = str2mat('PXX'); | |
while len > 0 |
This file contains hidden or 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
class Myclass: | |
def __init__(self,x): | |
self.ozellik = x | |
def foomethodu(self,x,y): | |
self.x = x | |
self.y = y | |
nesne1 = Myclass(2) | |
nesne1.foomethodu(1,8) | |
nesne2 = Myclass(3) |
This file contains hidden or 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
function [compres, J] = four(image,oran) | |
I = imread(image); | |
J = I; | |
[R C L] = size(I); | |
for i = 1:L | |
inversF = zeros(R,C); | |
imF = fftshift(fft2(double(I(:,:,i)))); | |
compres(:,:,i) = imF(oran:(R-oran),oran:(C-oran)); |
This file contains hidden or 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/sh | |
for f in *[fFmM][lLpP][vV4] | |
do | |
basename="${f%.*}" | |
ffmpeg -i "$f" "$basename".mp3 | |
done |
This file contains hidden or 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 bash | |
if [ $# = 0 ]; then | |
echo "Kullanimi: ./derle <derlenecek isim> <dosya ismi>" | |
exit 0 | |
fi | |
gcc `gnustep-config --objc-flags` -o $1 $2 -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base | |
if [ $? = 0 ]; then |
This file contains hidden or 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
from rest_framework import serializers, pagination | |
# view.py | |
if request.method == 'GET': | |
queryset = Feed.objects.all() | |
paginator = Paginator(queryset, 5) | |
page = request.GET['page'] | |
try: | |
feeds = paginator.page(page) | |
except PageNotAnInteger: |
This file contains hidden or 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 getpass, imaplib | |
M = imaplib.IMAP4_SSL('imap.googlemail.com', '993') | |
M.login('semihozkoroglu', getpass.getpass()) | |
M.select() | |
typ, data = M.search(None, 'ALL') | |
for num in data[0].split(): | |
typ, data = M.fetch(num, '(RFC822)') | |
print 'Message %s\n%s\n' % (num, data[0][1]) | |
M.close() |