Skip to content

Instantly share code, notes, and snippets.

@ginrou
ginrou / download_cvpr2021_papers.py
Created June 19, 2021 06:47
Script to download all CVPR2021 papers.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
from html.parser import HTMLParser
import urllib.request, time
from pathlib import Path
class PDFFileListParser(HTMLParser, object):
def __init__(self, *argv, **kwargs):
@ginrou
ginrou / objectdetection_kitti_ssd_resnet50_v1_fpn_640x640.ipynb
Created September 3, 2020 23:00
ObjectDetection_KITTI_ssd_resnet50_v1_fpn_640x640
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ginrou
ginrou / main.cpp
Created February 19, 2019 07:24
Eigen Rotations
#include <random>
#include <ros/ros.h>
#include <Eigen/Geometry>
#include <tf_conversions/tf_eigen.h>
int main(int argc, char* argv[]) {
@ginrou
ginrou / construct_lenna.py
Last active August 14, 2023 09:27
DCTでlennaを再構成する
#!/bin/env python
import numpy as np
import scipy.misc
from scipy.fftpack import dct, idct
import sys
H = 128
W = 128
lenna = scipy.misc.imresize(scipy.misc.lena(), (H, W)).astype(float)
@ginrou
ginrou / README.md
Created January 4, 2015 01:45
Fast Bilateral Filter

Fast Bilateral Filter implementation for OpenCV

Algorithm and implementation is based on http://people.csail.mit.edu/sparis/bf/ Please cite above paper for research purpose.

Sample Code

#include <iostream>
#include "fastBilateral.hpp"
@ginrou
ginrou / UIImageView+CircleMask.h
Last active December 30, 2015 09:29
UIImageViewを円形にマスクをかける
#import <UIKit/UIKit.h>
@interface UIImageView (CircleMask)
- (void)circleMask;
- (void)circleMaskBorderWitdh:(CGFloat)width color:(CGColorRef)color;
@end
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// vc1をrootにしてUINavigationControllerの初期化
UIViewController *vc1 = [[UIViewController alloc] init];
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc1];
// vc2で切り替える
UIViewController *vc2 = [[UIViewController alloc] init];
[nc setViewControllers:@[vc2]];
@ginrou
ginrou / outline.md
Last active September 18, 2021 06:46
パーフェクトPython 読書会 10章 コマンドラインユーティリティ

10章 コマンドラインユーティリティ

目次

  • 1 Pythonでのファイルの取扱と文字コード
  • 1 単純なファイルの読み込み
  • 2 少しずつ読み取る
  • 3 文字コードを指定して開く
  • 4 バイナリで開く
  • 5 bytesとstrの関係
  • 6 特定の文字列の出現回数を数える
@ginrou
ginrou / gist:5618880
Created May 21, 2013 10:32
Perfect Python 10章 コマンドラインユーティリティ

ファイルの読み込み

bytes, str

文字列のフォーマット

その他のファイル処理モジュールなど

10.4 TODO リストを作る

データ構造