Skip to content

Instantly share code, notes, and snippets.

View arms22's full-sized avatar

arms22

  • Switch Science, Inc.
  • Kyoto, Japan
View GitHub Profile
@arms22
arms22 / Coincheck年間取引損益計算(標準フォーマット用).ipynb
Created January 14, 2022 02:41
Coincheck年間取引損益計算(標準フォーマット用)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
■中二病っぽいセリフ
「私は失敗したことがありません。
ただ、うまくいかない方法を1万通り発見しただけです。」
狂気:それは、同じことを何度も何度も繰り返し行い、
違う結果を予測することである。
■わすれないこと
・家族を大事に大切にする
・友達を大事に大切にする
# -*- coding: utf-8 -*-
import asyncio
import ccxt.async_support as ccxt
from random import gauss, uniform
async def main():
api = ccxt.bitflyer({'apiKey':'xxxx','secret':'xxxx'})
async def wabi(no):
while True:
@arms22
arms22 / CMakeLists.txt
Last active September 12, 2017 08:14
マイクロマウス迷路解析プログラム
cmake_minimum_required(VERSION 2.8)
add_definitions("-Wall -std=c++11")
add_executable(main main.cpp)
add_executable(search search.cpp)
#include <stdio.h>
int main(void){
unsigned long in = 0x00000003;
unsigned long out;
out = in;
out = ((out & 0x0000ff00) << 8) | (out & 0x000000ff);
out = ((out & 0x00f0f0f0) << 4) | (out & 0x000f0f0f);
out = ((out & 0x0ccccccc) << 2) | (out & 0x03333333);
out = ((out & 0xaaaaaaaa) << 1) | (out & 0x55555555);
printf("in %lx out %lx\n",in, out);
#include <iostream>
#include <cmath>
using namespace std;
class Ramp {
public:
Ramp(float v_start, float v_max, float v_end, float acceleration, float L, float T)
{
/* 加速時間と減速時間を計算
http://keisan.casio.jp/exec/system/1164005431 */
#include <iostream>
#include <cmath>
using namespace std;
class Ramp {
public:
Ramp(float v_start, float v_max, float v_end, float acceleration, float L)
{
/* 加速時間と減速時間を計算
http://keisan.casio.jp/exec/system/1164005431 */
#include <functional>
#include <stdio.h>
typedef struct {
    unsigned int state;
} co_state_t;
#define co_begin(T)\
    {\
        co_state_t *__current = &(T);\