Skip to content

Instantly share code, notes, and snippets.

View saccadic's full-sized avatar
🌎
Maybe on Earth. Maybe in the future.

Katsuyoshi Hotta saccadic

🌎
Maybe on Earth. Maybe in the future.
  • Osaka
  • 17:31 (UTC +09:00)
View GitHub Profile
@saccadic
saccadic / polyfit.ipynb
Last active January 22, 2021 10:11
polyfit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saccadic
saccadic / opencv_solver.ipynb
Last active January 23, 2021 13:17
opencv_solver
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saccadic
saccadic / polyfit.cs
Last active January 24, 2021 12:14
Unityで回帰曲線を求めるサンプル(4次方程式)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using OpenCvSharp;
namespace OpenCvSharp
{
public class polyfit : MonoBehaviour
{
@saccadic
saccadic / multiprocess.py
Created March 2, 2021 05:43
マルチプロセス処理のサンプル
import pandas as pd
import cv2
from tqdm import tqdm
import numpy as np
from scipy.stats import multivariate_normal
import matplotlib.pyplot as plt
import time
import pathlib
from multiprocessing import Process, Queue
import multiprocessing
@saccadic
saccadic / DrawCross.hpp
Created March 14, 2021 07:59
opencvで十字を表示する
void DrawCross(cv::Mat &src, cv::Point p, float r, cv::Scalar col, float lw) {
cv::line(src, cv::Point(p.x, p.y + r), cv::Point(p.x, p.y - r), col, lw);
cv::line(src, cv::Point(p.x + r, p.y), cv::Point(p.x - r, p.y), col, lw);
}
@saccadic
saccadic / my_format.csl
Created April 11, 2021 15:32
良く使用する文献フォーマット
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>my format</title>
<id>https://csl.mendeley.com/styles/566334571/ieee-2</id>
<link href="http://www.zotero.org/styles/ieee" rel="self"/>
<link href="https://ieeeauthorcenter.ieee.org/wp-content/uploads/IEEE-Reference-Guide.pdf" rel="documentation"/>
<link href="https://journals.ieeeauthorcenter.ieee.org/your-role-in-article-production/ieee-editorial-style-manual/" rel="documentation"/>
<author>
<name>Michael Berkowitz</name>
@saccadic
saccadic / DownloadGoogleDriveFile.py
Created June 10, 2021 04:36
GoogleDriveの共有ファイルをダウンロードするPythonスクリプト
## https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url
import requests
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(URL, params = { 'id' : id }, stream = True)
@saccadic
saccadic / speaker-segmentation-tool.ipynb
Last active July 12, 2021 01:01
Speaker Segmentation Tool
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
using namespace std;
static cv::Mat readCsv(string path, int w, int h) {
std::vector<std::vector<float>> vv;
@saccadic
saccadic / hash_authentication.py
Created February 25, 2022 07:02
ハッシュによるパスワード認証
import bcrypt
password = b"test123456"
salt = bcrypt.gensalt()
hashed = bcrypt.hashpw(password,salt)
print(hashed)