This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
#include <sys/mman.h> | |
#include "lms2012.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <sys/ioctl.h> | |
#include <linux/fb.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* OpenCVのチュートリアルにあるサンプルでassertionエラーになるので | |
* カメラが動き出すまで待たないといけないのかと思いコードを追加したら | |
* ビンゴだった・・・ | |
*/ | |
#include "opencv2/opencv.hpp" | |
using namespace cv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 画像処理をparallel_forを使って並列にしてみた例 | |
* mosaicはプラットフォーム(VS2013)依存な方法 | |
* mosaic2はOpenCVの方法をぱくったのだがparallel_for_ってユーザが使っていいのだろうか | |
*/ | |
#include "opencv2/opencv.hpp" | |
using namespace cv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: create_db_seed(Person) => "Person.first_or_create([{name: \"Jon\",age:23},{name: \"Mary\",age:31}])" | |
def create_db_seed(model) | |
records = model.all.map {|r| | |
attrs = r.attributes.map {|k,v| | |
next if /^id|created_at|updated_at$/ =~ k | |
"#{k}: #{v.inspect}" | |
}.compact.join(',') | |
"{#{attrs}}" | |
}.join(",\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.configuration.database_configuration[Rails.env]['adapter'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from polls.models import Question, Choice | |
>>> from django.utils import timezone | |
>>> question = Question(question_text="What's new?", pub_date=timezone.now()) | |
>>> question.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import numpy | |
from deap import algorithms | |
from deap import base | |
from deap import creator | |
from deap import tools | |
creator.create("FitnessMax", base.Fitness, weights=(1.0,)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css" rel="stylesheet"> | |
<style type="text/css"> | |
#network { | |
width: 400px; | |
height: 400px; | |
border: 1px solid #000; | |
} | |
</style> |
OlderNewer