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 <assert.h> | |
#include <stdio.h> | |
void in_emu_add(int *z, const int x, const int y) | |
{ | |
*z = x + y; | |
} | |
void in_asm_add(int *z, const int x, const int y) | |
{ |
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
## Problem: Do not use symbol 'e'. | |
## see http://homepage1.nifty.com/herumi/diary/1110.html#14 | |
var('x t a b c d g') # we can not use symbol 'e' instead of 'g'. | |
assume(t > 0) | |
f = ((exp(x) - (a + b*x + c*x^2 + d*x^3 + g*x^4))^2).integral(x,0,t) | |
ans = solve([f.diff(a), f.diff(b), f.diff(c), f.diff(d), f.diff(g)], [a,b,c,d,g]) | |
## work around |
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
/* | |
* The author and original source code are from: | |
* 機械学習序曲(仮) > 数値計算の実行速度 - Python, C, Rの比較 | |
* http://hawaii.naist.jp/~kohei-h/my/python-numeric-comp.html | |
* | |
* It is modified version in above Web page. | |
* | |
* This program needs data files to construct matrix. | |
* A generating data files program is published in | |
* original author's Web page. |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
struct Stack { | |
uint32_t used; | |
int *array; | |
}; |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
struct Stack { | |
uint32_t used; | |
int *array; | |
}; |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <setjmp.h> | |
sigjmp_buf return_point; | |
/* 適切で無いハンドラ */ |
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 -*- | |
import datetime | |
from threading import Thread | |
from Queue import Queue as queue | |
import SocketServer | |
import logging | |
import logging.handlers | |
class UTC(datetime.tzinfo): |
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
package com.github.tell.gmp; | |
import java.util.logging.ConsoleHandler; | |
import java.util.logging.Handler; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import com.github.tell.gmp.JNAGMP.GMPLib.mpz_struct; | |
import com.sun.jna.Library; | |
import com.sun.jna.Native; |
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
package com.github.gist._3802655; | |
public interface EventCall <LISTENER> { | |
public void addListener(LISTENER listener); | |
public void removeListener(LISTENER listener); | |
} |
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/sh | |
if [ -n "$PYTHONPATH" ]; then | |
echo WARNING: unset PYTHONPATH 1>&2 | |
unset PYTHONPATH | |
fi | |
SAGE_ROOT=/path/to/directory/of/sage | |
$SAGE_ROOT/sage "$@" |
OlderNewer