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
#include <stdlib.h> | |
#include <stdio.h> | |
int main() | |
{ | |
int* randoms; | |
long max_length = 0; | |
long cur_length = 0; | |
int range = 10000; | |
long i; |
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
#include "stdlib.h" | |
#include "stdio.h" | |
#include "math.h" | |
int main() | |
{ | |
int num, temp; | |
int digits; | |
int i; | |
long sum; |
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
int compare( const void* a, const void* b) | |
{ | |
TYPE aval; | |
TYPE bval; | |
aval = *( TYPE*)a; | |
bval = *( TYPE*)b; | |
if( aval > bval) | |
{ |
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
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 | |
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
<?php | |
include('config.php'); | |
session_start(); | |
$myusername = $_SESSION['myusername']; | |
$mypassword = $_SESSION['mypassword']; | |
$myuser_id = $_SESSION['myuser_id']; | |
$profile_id = $_GET['user']; |
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
#include "stdio.h" | |
#include "stdlib.h" | |
#include "math.h" | |
#include "time.h" | |
#define N 9 | |
double in1, in2; | |
double w[N]; |
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
// | |
// 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; |
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
package neuralnetworkdemo; | |
import java.text.DecimalFormat; | |
import java.text.NumberFormat; | |
/** | |
* | |
* @author yigitpolat | |
*/ |
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
/* | |
* 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; |
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
#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; |
OlderNewer