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
| #include "chardev.h" | |
| #include <linux/kernel.h> | |
| #include <linux/module.h> | |
| #include <linux/fs.h> | |
| #include <linux/uaccess.h> | |
| //global varibles | |
| static int unused=1; | |
| static int number=0; | |
| static char msg[N]="13111387\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
| #include <stdio.h> /* printf() */ | |
| #include <stdlib.h> /* exit(), malloc(), free() */ | |
| #include <unistd.h> | |
| #include <sys/types.h> /* key_t, sem_t, pid_t */ | |
| #include <sys/wait.h> | |
| #include <sys/shm.h> /* shmat(), IPC_RMID */ | |
| #include <errno.h> /* errno, ECHILD */ | |
| #include <semaphore.h> /* sem_open(), sem_destroy(), sem_wait().. */ | |
| #include <fcntl.h> /* O_CREAT, O_EXEC */ |
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/bash | |
| g++ -std=c++11 `pkg-config --libs tesseract opencv lept` $1 -o ${1}.out |
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
| Loading data ... | |
| Loading dev ... | |
| 10000 | |
| 10000 | |
| 9842 | |
| Loading test ... | |
| 10000 | |
| 10000 | |
| 9824 | |
| num_epochs: 20 |
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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <semaphore.h> | |
| #include <fcntl.h> | |
| #include <sys/stat.h> | |
| #include <sys/wait.h> | |
| #include <mqueue.h> | |
| #define N 1 | |
| #define BUFSIZE 1024 |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <pthread.h> | |
| #include <semaphore.h> | |
| int count = 0; | |
| int share=0; | |
| pthread_t maintid; | |
| sem_t roomEmpty; | |
| sem_t mutex; |
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
| def makebold(fn): | |
| def wrapped(): | |
| return "<b>" + fn() + "</b>" | |
| return wrapped | |
| def makeitalic(fn): | |
| def wrapped(): | |
| return "<i>" + fn() + "</i>" | |
| return wrapped |
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
| DFA={"A":{0:"B",1:"C"},"B":{0:None,1:"D"},"C":{0:"D",1:None},"D":{0:"A",1:"B"}} | |
| def genstr(n,s,inputs): | |
| if n==0: | |
| inputs.append(s) | |
| return | |
| genstr(n-1,s+"0",inputs) | |
| genstr(n-1,s+"1",inputs) | |
| def simulate(): | |
| for n in range(1,15): |
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
| var name="Window"; | |
| var Top={ | |
| name:"top", | |
| Inner:{ | |
| name:"inner", | |
| getName:function(){ | |
| var that=this; | |
| var i=0; | |
| function increase(){ | |
| var rt="this binding:"+this.name+"\n\n"+"number i:"+i; |
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
| # coding: utf-8 | |
| cache = dict() | |
| def f(n): | |
| if n <= 0: | |
| return 0 | |
| prev = cache.get(n-1) | |
| if not prev: | |
| s = 1; | |
| for i in range(1, n+1): | |
| s *= i |
NewerOlder