Skip to content

Instantly share code, notes, and snippets.

View YoshihitoAso's full-sized avatar
🐼

Yoshihito Aso YoshihitoAso

🐼
  • BOOSTRY Co., Ltd.
  • Tokyo
  • X @y_asoh
View GitHub Profile
@YoshihitoAso
YoshihitoAso / gist:5e8763f1c18a3b5f6c05
Last active August 29, 2015 14:03
[OpenAM][Ubuntu]ubuntu上にopenamをインストール

Ubuntu(on VirtualBox)上にOpenIGをインストールする手順

VagrantでUbuntuのイメージを作成

$ vagrant box add ubuntu http://cloud-images.ubuntu.com/quantal/current/quantal-server-cloudimg-vagrant-amd64-disk1.box
$ vagrant init ubuntu

OSを起動する。

@YoshihitoAso
YoshihitoAso / gist:f15261abb6de18dff960
Last active August 29, 2015 14:03
[OpenAM][Ubuntu]ubuntu上にopenamをインストール

Ubuntu(on VirtualBox)上にOpenAMをインストールする手順

VagrantでUbuntuのイメージを作成

$ vagrant box add ubuntu http://cloud-images.ubuntu.com/quantal/current/quantal-server-cloudimg-vagrant-amd64-disk1.box
$ vagrant init ubuntu

OSを起動する。

@YoshihitoAso
YoshihitoAso / gist:0c48e058e7b0dfa3cf34
Last active January 13, 2019 01:47
[Java][Jad]jadでディレクトリ配下を一括デコード

jadでディレクトリ配下を一括デコード

jad -8 -d src -s .java -r dist **/*.class

でOK。

srcディレクトリ配下にデコードされたソースが格納される。

@YoshihitoAso
YoshihitoAso / gist:9632814
Last active August 29, 2015 13:57
[Hive][HiveServer2][Python]pythonからhiveserver2に接続する方法
@YoshihitoAso
YoshihitoAso / gist:9632091
Last active September 16, 2021 04:20
[MongoDB][Python]pythonからmongodbを操作する

PythonからMongoDBを操作する

PyMongoのインストール方法

pythonから利用するためのモジュールとしてPyMongoを利用する。

インストール方法は簡単で、pipであれば以下でOK。

$ pip install pymongo

サンプル

@YoshihitoAso
YoshihitoAso / gist:9631889
Last active August 29, 2015 13:57
[MongoDB][Ubuntu]ubuntuにmongodbをインストールする手順

UbuntuにMongoDBをインストールする

※参考情報:OSのバージョン

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"
@YoshihitoAso
YoshihitoAso / gist:9444292
Last active August 29, 2015 13:57
[Hadoop][Hive][CDH4][Ubuntu]ubuntu上にhadoop擬似分散モード環境を構築

Ubuntu上にCDH4(Hadoop)擬似分散モード環境を構築する手順

※参考情報:OSのバージョン

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"
@YoshihitoAso
YoshihitoAso / jma_temp.py
Created February 27, 2014 11:39
[Python][PyQuery]pyqueryでスクレイピングを行うサンプル(気象庁:過去の気温データ)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyquery import PyQuery as pq
def main():
# 気象庁 東京 2014年1月データ
url = ('http://www.data.jma.go.jp/obd/stats/etrn/view/daily_s1.php?'
'prec_no=44&block_no=47662&year=2014&month=1&day=&view=')
# pyquery
query = pq(url, parser='html')
@YoshihitoAso
YoshihitoAso / gist:9248476
Created February 27, 2014 11:31
[Python][PyQuery]pyqueryでスクレイピングを行うサンプル(毎日新聞のアーカイブ)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyquery import PyQuery
import json
q = PyQuery(url='http://mainichi.jp/select/biz/archive/')
url = 'http://mainichi.jp/select/news/'
links = []
@YoshihitoAso
YoshihitoAso / gist:9248451
Created February 27, 2014 11:28
[Python][PyQuery]pyqueryでスクレイピング

pyqueryでスクレイピング

pyqueryを使ってスクレイピングしてみたのでメモ

インストールは

pip install pyquery

でOK。pyqueryが依存しているlxmlもあわせてインストールされる。