Skip to content

Instantly share code, notes, and snippets.

shader_type canvas_item;
void fragment() {
vec2 iRes = (1.0/ SCREEN_PIXEL_SIZE);
float offset = (TIME- floor(TIME))/TIME;
float CurrentTime = (TIME)*(offset);
vec3 WaveParams = vec3(.5, 0.1, 0.1);
@ahmetilgin
ahmetilgin / matrixproduct.cpp
Last active January 13, 2018 19:42
Cuda Matrix Product Vector
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <time.h>
#include "boost/lexical_cast.hpp"
using namespace std;
//Fonksiyon Prototipleri
void readMatrix(string, double *&, int &);
void vectorInit(double *x , int boyut);
@ahmetilgin
ahmetilgin / forgery.py
Created January 13, 2018 19:24
Copy-Move image forgery detection
import numpy as np
import cv2
from scipy.fftpack import fft, dct
import math
import os
def euclidianDistance(a, b):
e = []
for i in range(0, len(a)):
@ahmetilgin
ahmetilgin / vektör.cpp
Last active July 14, 2017 18:41
3 boyutlu Sınırsız Veri kapasitesi Vektör Struct kullanımı
#include <iostream>
#include <vector>
using namespace std;
struct Noktalar
{
double X;
double Y;
double Z;
@ahmetilgin
ahmetilgin / possibleMoves.c
Created April 19, 2017 00:13
Find the Knight Moves in chess
#include <stdio.h>
#include <stdlib.h>
#define gercekTahtaBoyu 12
#define fazlalik 4
#define sinirX 1
#define sinirY 10
void printTable(char **x);
@ahmetilgin
ahmetilgin / bisectionMethod.c
Last active March 24, 2017 16:10
Bisection method find root in c
#include <stdio.h>
#include <math.h>
float fonksiyon(float x){
return ((x*x*x)-4*x*x+4*x+16);
}
float biSectionMethod(){
float hataMiktrari = 5;
float ilkAralik = 50.0;
string urlAddress = "http://google.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlAddress);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
Stream receiveStream = response.GetResponseStream();
StreamReader readStream = null;
@ahmetilgin
ahmetilgin / fillsurfacepolygon.cpp
Last active August 25, 2016 16:53
Trying fill inside polygon
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
dizi<-NULL
sınır<-1000
for(i in sınır:2)
a<-b/(b+a)
b<-i-1
}
a<-2+a
cat(a)