Skip to content

Instantly share code, notes, and snippets.

View 4geru's full-sized avatar
🐼
Please send message to me in Twitter DM, if you want to contact.

koichi uchinishi 4geru

🐼
Please send message to me in Twitter DM, if you want to contact.
View GitHub Profile
@4geru
4geru / get_through_pass_save_cvs.py
Created February 7, 2017 11:06
It is the source code used for data analysis with Ri-one participating in the RoboCup simulation league.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
import pylab
import math
import copy
import glob
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class PlayerScript : MonoBehaviour {
// ここから
public float speed = 5.0f;
public float slideSpeed = 2.0f;
8 06, 2017 12:50:16 午前 org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry loadTestEngines
情報: Discovered TestEngines with IDs: [junit-jupiter]
Exception in thread "main" java.lang.NoSuchMethodError: org.junit.platform.commons.util.AnnotationUtils.findAnnotatedMethods(Ljava/lang/Class;Ljava/lang/Class;Lorg/junit/platform/commons/util/ReflectionUtils$MethodSortOrder;)Ljava/util/List;
at org.junit.jupiter.engine.descriptor.LifecycleMethodUtils.findBeforeAllMethods(LifecycleMethodUtils.java:41)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.<init>(ClassTestDescriptor.java:88)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.<init>(ClassTestDescriptor.java:77)
at org.junit.jupiter.engine.discovery.TestContainerResolver.resolveClass(TestContainerResolver.java:98)
at org.junit.jupiter.engine.discovery.TestContainerResolver.resolveElement(TestContainerResolver.java:47)
at org.junit.jupiter.engine.discovery.JavaElementsResolver.tryToResolveWithResolver(JavaElementsResolver.jav
@4geru
4geru / 575チェッカー
Created October 22, 2017 11:30
575かどうかmecabで判定してくれます
import sys
import MeCab
def judge_five_seven_five(word):
m = MeCab.Tagger ("-Ochasen")
print(m.parse (word))
check = [5, 7, 5] # 5, 7, 5
check_index = 0
word_cnt = 0
node = m.parseToNode(word)
@4geru
4geru / azure_vision_face.rb
Created November 5, 2017 12:43
AzureVisionAPIから顔の部分を抽出しました。
require 'net/http'
require 'json'
# NOTE: You must use the same location in your REST call as you used to obtain your subscription keys.
# For example, if you obtained your subscription keys from westus, replace "westcentralus" in the
# URL below with "westus".
uri = URI('https://westcentralus.api.cognitive.microsoft.com/vision/v1.0/analyze')
uri.query = URI.encode_www_form({
# Request parameters
'visualFeatures' => 'Faces',
def image_upload_local(img)
if img
# contents = Contribution.last
# id = contents.id
logger.info img
ext = File.extname(img[:filename])
# img_name = "#{id}-bbs#{ext}"
img_name = "img#{ext}"
class Product
def use
raise NotImplementedError
end
end
class Factory
def create(owner)
p = create_product(owner)
register_product(p)
User.create(name: 'しげる')
Recipe.create(name: 'カレー', url: 'https://_cookpad_の_url')
RecipeMaterial.create(recipe_id: 1, material_id: 1)
Material.create(name: 'じゃがいも', amount: 5)
{"apiFields":[{"idValue":"z-2OeHTwbJ","fieldId":"userId","name":"LINE ユーザーID","kind":"text","required":true,"isUnique":true},{"fieldId":"title","name":"タイトル","kind":"text","isUnique":false},{"fieldId":"content","name":"本文","kind":"textArea"}],"customFields":[]}
@4geru
4geru / LINE Rev UP 2022 事前準備
Last active October 15, 2022 08:18
LINE Rev UP 2022 「LINE API 総集編。ReactとmicroCMSで作るLINEミニアプリハンズオン」 の事前準備です。
## イベント情報
[LINE API開発者向けカンファレンス「REV UP 2022」](https://linedevelopercommunity.connpass.com/event/260460/)
[LINE API 総集編。ReactとmicroCMSで作るLINEミニアプリハンズオン](https://revup.jp/session/zo58ff17id)
## 事前準備
- node.js インストールをおねがいします。
- [Download | Node.js](https://nodejs.org/en/download/)