Skip to content

Instantly share code, notes, and snippets.

View akehoyayoi's full-sized avatar

Yohei Okaya akehoyayoi

View GitHub Profile
@akehoyayoi
akehoyayoi / main.c
Last active September 5, 2018 08:42
[Rust]所有権、所有権、所有けんけんけけんけん ref: https://qiita.com/akehoyayoi/items/abe58c8d7be198587a34
#include <stdio.h>
#include <string>
#include <iostream>
#include <vector>
int main(){
auto s = new std::vector<std::string>();s->push_back("udon");s->push_back("ramen");s->push_back("soba");
auto t = s; s = NULL;
auto u = s; s = NULL;
std::cout << (*s)[0] << std::endl;
// under construction ...
sealed trait BusinessDaySpec
case object WorkDay extends BusinessDaySpec
case object Holiday extends BusinessDaySpec
sealed trait MovieDaySpec
case object MovieDay extends MovieDaySpec
@akehoyayoi
akehoyayoi / index.ts
Created June 2, 2021 06:34
PubSub typescript sample
// "dependencies": {
// "@google-cloud/pubsub": "^2.3.0",
// "firebase-admin": "^9.8.0",
// "firebase-functions": "^3.14.1"
// },
import * as functions from "firebase-functions";
import { PubSub } from '@google-cloud/pubsub';
@akehoyayoi
akehoyayoi / image-padder.py
Last active June 17, 2022 05:50
簡易画像データ水増しツール
import glob
import cv2
import numpy as np
import os
import tqdm
from PIL import Image, ImageChops
def effect_gamma(image):
gamma = 1.5
gamma_cvt = np.zeros((256,1),dtype = 'uint8')