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
/***************************************************************************** | |
MIT License | |
Copyright (c) 2017 Bae jiun, Maybe | |
@see also https://choosealicense.com/licenses/mit/ | |
*****************************************************************************/ |
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
import numpy as np | |
import tensorflow as tf | |
DEFAULT_PADDING = 'SAME' | |
def layer(op): | |
'''Decorator for composable network layers.''' | |
def layer_decorated(self, *args, **kwargs): |
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
/* Some test definition here */ | |
#define DEFINED_BUT_NO_VALUE | |
#define DEFINED_INT 3 | |
#define DEFINED_STR "ABC" | |
/* definition to expand macro then apply to pragma message */ | |
#define VALUE_TO_STRING(x) #x | |
#define VALUE(x) VALUE_TO_STRING(x) | |
#define VAR_NAME_VALUE(var) #var "=" VALUE(var) |
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> | |
/*extern "C"*/ int sum(int a, int b) | |
{ | |
return 2 * a + 3 * b; | |
} | |
/*extern "C"*/ int entry() | |
{ |
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 <string.h> | |
void copy(char * to, char * from, int count) | |
{ | |
int n = (count + 7 ) / 8 ; | |
switch (count % 8 ) { | |
case 0 : do { *to++ = *from++; | |
case 7 : *to++ = *from++; | |
case 6 : *to++ = *from++; |
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 <time.h> | |
#define CUTOFF 8 | |
/** | |
* sort elements in range array[begin, ..., end], | |
* both edge are closed. | |
*/ |
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 <string.h> | |
// define the alpha table size | |
#define ASIZE 128 | |
static int jump_table[ASIZE]; | |
void preprocess(char * pattern, int m) | |
{ |
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 <iostream> | |
#include <vector> | |
// rank based union, with path compressed | |
class UnionFindSet | |
{ | |
public: | |
UnionFindSet(const int N); | |
void Union(int p, int q); |