Skip to content

Instantly share code, notes, and snippets.

View hokkun-dayo's full-sized avatar

Hokuto Kagaya hokkun-dayo

View GitHub Profile
@hokkun-dayo
hokkun-dayo / TestTarget.java
Created November 7, 2019 03:43
annotation test
package net.hokkun;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
public class TestTarget {
@TestAnnotation1 private final String foo;
@TestAnnotation2 private final String bar;
@TestAnnotation3 private final String baz;
interface EnumInterface {
}
enum Test1 implements EnumInterface {
Test1EnumA,
Test1EnumB
}
enum Test2 implements EnumInterface {
Test2EnumA,
public class テスト {
@Data
static class Name {
String name;
}
private static <T> List<T> test1(Class<T> clazz) throws IOException {
val mapper = new ObjectMapper();
return mapper.readValue("[{\"name\": \"hokuto\"}]", new TypeReference<List<T>>() {});
"""
Written by Hokuto Kagaya, Dec. 2015
ver 0.1
"""
import numpy
from chainer import cuda
@hokkun-dayo
hokkun-dayo / MayFes.py
Last active August 29, 2015 14:20
MayFes.py
# -*- coding: utf-8 -*-
import pandas as pd
import datetime
import sys
from collections import defaultdict
import matplotlib.pyplot as plt
import argparse
# define constants
MAX_MEMBER = 6 # excluding band master
@hokkun-dayo
hokkun-dayo / convert_imageset_sets.cpp
Created April 20, 2015 05:48
Convert Imageset for caffe when your images is multipled
#include <string>
#include <vector>
#include <utility>
#include <string>
#include <opencv2/opencv.hpp>
#include <leveldb/db.h>
#include <pficommon/text/json.h>
#include <pficommon/math/random.h>
#include <gflags/gflags.h>
#include <glog/logging.h>