I hereby claim:
- I am ofan on github.
- I am zfeng (https://keybase.io/zfeng) on keybase.
- I have a public key ASD8WcPiffrknboEg8emKPLfkwaIcssn3saUisuHJ3XTmQo
To claim this, I am signing this object:
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 <cstdlib> | |
using namespace std; | |
int main(int argc, char* argv[]){ | |
string in(argv[1]); | |
long res=0; | |
int pn = 0; | |
for(auto i=in.begin(); i!=in.end(); ++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
import Control.Monad.State.Lazy | |
import Control.Monad.Error | |
import Data.Char | |
type BalanceT e s m a = ErrorT e (StateT s m) a | |
type Balance a = BalanceT BalanceError Double IO a | |
data BalanceError = AmountIsNegative | NotEnoughBalance | InvalidCommand String | BalanceError String deriving Show | |
instance Error BalanceError where |
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
vpn.ofan.me |
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 <mpi.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char* argv[]){ | |
MPI_Init(&argc, &argv); | |
int size, rank; | |
MPI_Comm_size(MPI_COMM_WORLD, &size); | |
MPI_Comm_rank(MPI_COMM_WORLD, &rank); | |
int data; |
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 <math.h> | |
#include <mpich-devel-clang/mpi.h> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char* argv[]){ | |
int n, rank, size, i; | |
// PI25DT is used for computing error |
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 logging | |
import os | |
import errno | |
import shutil | |
from urlparse import urlparse, urlunparse | |
from bs4 import BeautifulSoup | |
from . import types | |
from .base import _BaseParser | |
import re |
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> | |
int doAdd(int (*call)(int,int)) { | |
return call(1,2); | |
} | |
int main() { | |
struct Add { | |
static int add(int a, int b) { | |
return a + b; |
NewerOlder