Skip to content

Instantly share code, notes, and snippets.

View dyigitpolat's full-sized avatar
🌛

Yigit Polat dyigitpolat

🌛
View GitHub Profile
@dyigitpolat
dyigitpolat / LIS_C.c
Last active November 8, 2016 22:12
selam
#include <stdlib.h>
#include <stdio.h>
int main()
{
int* randoms;
long max_length = 0;
long cur_length = 0;
int range = 10000;
long i;
#include "stdlib.h"
#include "stdio.h"
#include "math.h"
int main()
{
int num, temp;
int digits;
int i;
long sum;
int compare( const void* a, const void* b)
{
TYPE aval;
TYPE bval;
aval = *( TYPE*)a;
bval = *( TYPE*)b;
if( aval > bval)
{
int* getCaseArr( int* isFilled, int h, int w)
{
int* caseArr;
caseArr = (int*) malloc( h*w*sizeof(int));
for( int i = 0; i < h-1; i++)
{
for( int j = 0; j < w-1; j++)
caseArr[ i*w + j] = 0xFF & (isFilled[ (i+1)*w + j] |
isFilled[ (i+1)*w + j + 1] << 1 |
<?php
include('config.php');
session_start();
$myusername = $_SESSION['myusername'];
$mypassword = $_SESSION['mypassword'];
$myuser_id = $_SESSION['myuser_id'];
$profile_id = $_GET['user'];
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "time.h"
#define N 9
double in1, in2;
double w[N];
//
// inside the main class
//
public void trainNetwork()
{
for( int i = 0; i < 1000000; i++)
{
int r = (int) (Math.random() * 100000) % 4;
int a = r % 2;
int b = (r >> 1) % 2;
package neuralnetworkdemo;
import java.text.DecimalFormat;
import java.text.NumberFormat;
/**
*
* @author yigitpolat
*/
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package neuralnetworkdemo;
import java.util.ArrayList;
import java.util.Arrays;
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// CUDA kernel. Each thread takes care of one element of c
__global__ void elementWiseMult(double *a, double *b, double *c, int n)
{
// Get our global thread ID
int id = blockIdx.x*blockDim.x+threadIdx.x;