Skip to content

Instantly share code, notes, and snippets.

Daisuke Takahashi dtak1114

Block or report user

Report or block dtak1114

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dtak1114
dtak1114 / amagif_watcher.py
Created Dec 24, 2018
Amazonギフト券売買価格監視用puthonista widget
View amagif_watcher.py
#!python3
import appex, ui
import webbrowser
import requests
from datetime import datetime as dt
import time
NOTIF_RATE = 90.5
ON_CLICK_URI = 'safari-https://amaten.com/exhibitions/amazon'
View crawler1.c
#include "time.h"
#include <stdio.h>
#define EXPIRATION 3600*24
#define WAIT_TIME 10
typedef struct _url_list
{
char *url,*host;
int port;
time_t access_time;
@dtak1114
dtak1114 / create_data.s
Created Jul 31, 2013
homework2 quick sort
View create_data.s
.text
.global _start
.code 16
.syntax unified
.type _start, function
_start:
@ clear registers
mov r0, #0
mov r1, #0
View gist:5632118
public class Stack {
int stack[];
int unsigned nelem;
public Stack(){ //Constructor
nelem = 0;
stack = new int[1000];
}
public synchronized void push(int d){
View gist:5632066
public synchronized void get() {
while( buf == null ){
wait();
}
notify();
return buf;
}
@dtak1114
dtak1114 / rotate.hs
Last active Dec 17, 2015
rotate function in haskell from mid-term 2010 exam
View rotate.hs
rotate x n
| n == 0 = x
| n >= (length x) = rotate x (mod n (length x))
| otherwise = rotate (tail x) (n-1) ++ [head x]
list = [5..8]
@dtak1114
dtak1114 / pair.hs
Created May 21, 2013
pair func in haskell
View pair.hs
pair f [] = []
pair f (x:[]) = []
pair f (x:xs:xss) = [f x xs] ++ pair f xss
-- assure that pair returns list
list = [1,2,3,4,5,6]
View tarai.c
#include "stdio.h"
#include "time.h"
int main(int argc, char const *argv[])
{
clock_t t1, t2;
t1 = clock();
tarai(13,5,0);
t2 = clock();
printf("finished in %d ms\n",(int)(t2-t1));
You can’t perform that action at this time.