Skip to content

Instantly share code, notes, and snippets.

View Hirosaji's full-sized avatar
🍙
Working@paper company

Hiroya Kato Hirosaji

🍙
Working@paper company
View GitHub Profile
@sonots
sonots / runs-on: ubuntu-latest.txt
Last active August 26, 2022 09:46
Environment Variables on Github Actions
GOROOT_1_11_X64=/usr/local/go1.11
ANDROID_HOME=/usr/local/lib/android/sdk
JAVA_HOME_11_X64=/usr/lib/jvm/zulu-11-azure-amd64
ImageVersion=20190930.2
LANG=C.UTF-8
INVOCATION_ID=029524e610de4329ac57a8f3e8b21281
JAVA_HOME_12_X64=/usr/lib/jvm/zulu-12-azure-amd64
ANDROID_SDK_ROOT=/usr/local/lib/android/sdk
RUNNER_TOOL_CACHE=/opt/hostedtoolcache
JAVA_HOME=/usr/lib/jvm/zulu-11-azure-amd64
@3panda
3panda / notes-lambda-apigateway-ajax.md
Last active February 15, 2023 11:05
Lambda、APIGateway、Ajaxの作業メモ

htmlのWebフォームの入力内容をAjaxで通信しLambdaに送り結果をまた受け取るありがちな処理を実装 その際に色々と躓いたのでまとめたメモ ※ 注意:メモを書いてから少し時間が経っているので一部で怪しい部分があり

前提・実現したいことの流れ

  1. HTMLのフォームに名前とメールアドレスを入力しAPIGatewayへ
  2. APIGatewayが受け取りLambdaへフォーム内容を渡す
  3. Lambdaは受け取った名前やアドレスを扱ってなんらかの処理(例えばDB書き込みやメールを送るなどだがここの処理は割愛)
  4. Lambdaは通信結果をAPIGatewayへ
@wllhf
wllhf / VOClabelcolormap.py
Last active March 28, 2024 09:11
Python implementation of the color map function for the PASCAL VOC data set.
"""
Python implementation of the color map function for the PASCAL VOC data set.
Official Matlab version can be found in the PASCAL VOC devkit
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit
"""
import numpy as np
from skimage.io import imshow
import matplotlib.pyplot as plt
def color_map(N=256, normalized=False):
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 17, 2024 22:50
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@indexzero
indexzero / ISC.md
Created April 13, 2014 21:00
ISC vs. MIT

Copyright (c) 4-digit year, Company or Person's Name

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Source: http://opensource.org/licenses/ISC

@toshihikoyanase
toshihikoyanase / twitter_streaming_filter_with_retry.py
Created June 12, 2013 22:19
Twitter Streaming APIを叩いて、Geoタグ付きのツイートを収集するPythonスクリプト
#!/usr/bin/env python
import tweepy
import datetime
import time
# See http://blog.unfindable.net/archives/4257
locationsL=[-180,-90,180,90]
class StreamListener(tweepy.StreamListener):
def __init__(self, api=None):