Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
# 社会気象工学の課題用
# 各年の12,1,2月の平均湿度と7,8,9月の平均湿度を求めるプログラム
# csvファイルは気象庁からダウンロードしてくる
# 決めうちにしてるのどうにかしたいけど取りあえず動く
import csv
# 平年の湿度,冬季の湿度の平均,夏季の湿度の平均
place_names = {
# -*- coding: utf-8 -*-
# 社会気象工学の課題用
import csv
from urllib.request import urlopen
from bs4 import BeautifulSoup
# 集めるデータ
place_names = {
"安芸":["0755", 17.2, 21.3, 13.4],
# -*- coding: utf-8 -*-
# 社会気象工学の課題用
import csv
from urllib.request import urlopen
from bs4 import BeautifulSoup
import pandas as pd
# 集めるデータ
place_names = {
{
"profile1": {
"first": "Taro",
"banana": 3,
"last": "Tanaka",
"old":20,
"date":"2018-04-22"
},
"profile2": {
"first": "Hanako",
if( ( fd = open( "/dev/mem", ( O_RDWR | O_SYNC ) ) ) == -1 ) {
printf( "ERROR: could not open \"/dev/mem\"...\n" );
return( 1 );
}
virtual_base = mmap( NULL, HW_REGS_SPAN, ( PROT_READ | PROT_WRITE ),
MAP_SHARED, fd, HW_REGS_BASE );
if( virtual_base == MAP_FAILED ) {
printf( "ERROR: mmap() failed...\n" );
#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace cv;
int main (int argc, char **argv)
{
// (1)load a specified file as a grayscale image
const char *imagename = argc > 1 ? argv[1] : "testMono.png";
/*imageProcessing.hpp*/
#ifndef _IMAGEPROCESSING_H_
#define _IMAGEPROCESSING_H_
#include <iostream>
#include <fstream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "Labeling.h"
#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "Labeling.h"
class ImageProcessing{
private:
cv::Mat element;
int median_size;
int morpho_n;
int morpho;
#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
void colorExtraction(cv::Mat* src, cv::Mat* dst,
int code,
int ch1Lower, int ch1Upper,
int ch2Lower, int ch2Upper,
int ch3Lower, int ch3Upper
)
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
#define SERIAL_PORT "/dev/ttyUSB0"