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
Attribute VB_Name = "Module1" | |
Sub get_image_path_and_current_cell() | |
Dim pic As Shape, TCht As Object | |
Dim ACWidth As Long, ACHeight As Long | |
For Each pic In ActiveSheet.Shapes | |
Debug.Print (pic.AlternativeText) | |
Range(pic.TopLeftCell.Address).Offset(0, 1) = pic.AlternativeText | |
ACWidth = pic.Width | |
ACHeight = pic.Height |
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
mkdir -p umihico_gist | |
git clone git@github.com:umihico/aws.git ./aws | |
git clone git@github.com:umihico/calc_effective_keymap.git ./calc_effective_keymap | |
git clone git@bitbucket.org:umihico/dj_webserver.git ./dj_webserver | |
git clone git@gist.github.com:96b18f481ebc41c8df6e5c54b19ccf78.git ./google_search_backup | |
git clone git@github.com:umihico/ipo_autoapplier.git ./ipo_autoapplier | |
git clone git@github.com:umihico/passpacker.git ./passpacker | |
git clone git@bitbucket.org:umihico/crowdworks.git ./crowdworks | |
git clone git@bitbucket.org:umihico/private.git ./private | |
git clone git@bitbucket.org:umihico/scrap_ochan.git ./scrap_ochan |
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
#!/bin/bash -eu | |
all_ids=`aws ec2 describe-instances --query "Reservations[].Instances[].InstanceId" --output text | tr '\t' ' '` | |
echo terminating... $all_ids | |
aws ec2 terminate-instances --instance-ids $all_ids --query "TerminatingInstances[].CurrentState[].Name" --output text |
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 io import BytesIO | |
from requests import get | |
from umihico_commons.xlsx_wrapper import _load_xlsx | |
import xlrd | |
def get_stock_metadata(): | |
url = "https://www.jpx.co.jp/markets/statistics-equities/misc/tvdivq0000001vg2-att/data_j.xls" | |
response = get(url) | |
with BytesIO(response.content) as f: |
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
def gen_url(stock_code="8604"): | |
fundamental_url = f"https://profile.yahoo.co.jp/fundamental/{stock_code}" | |
consolidate_url = f"https://profile.yahoo.co.jp/consolidate/{stock_code}" | |
independent_url = f"https://profile.yahoo.co.jp/independent/{stock_code}" | |
urls = [fundamental_url, consolidate_url, independent_url] | |
return urls | |
def get_stock_info_yahoo(lxmltrees): |
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 umihico_commons.chrome_wrapper import Chrome | |
def get_investment_urls_wikipedia(): | |
parent_url_dict = { | |
"札証上場企業": "https://ja.wikipedia.org/wiki/Category:%E6%9C%AD%E8%A8%BC%E4%B8%8A%E5%A0%B4%E4%BC%81%E6%A5%AD", | |
"ジャスダック上場企業": "https://ja.wikipedia.org/wiki/Category:%E3%82%B8%E3%83%A3%E3%82%B9%E3%83%80%E3%83%83%E3%82%AF%E4%B8%8A%E5%A0%B4%E4%BC%81%E6%A5%AD", | |
"東証PRO上場銘柄": "https://ja.wikipedia.org/wiki/Category:%E6%9D%B1%E8%A8%BCPRO%E4%B8%8A%E5%A0%B4%E9%8A%98%E6%9F%84", | |
"東証一部上場企業": "https://ja.wikipedia.org/wiki/Category:%E6%9D%B1%E8%A8%BC%E4%B8%80%E9%83%A8%E4%B8%8A%E5%A0%B4%E4%BC%81%E6%A5%AD", | |
"東証二部上場企業": "https://ja.wikipedia.org/wiki/Category:%E6%9D%B1%E8%A8%BC%E4%BA%8C%E9%83%A8%E4%B8%8A%E5%A0%B4%E4%BC%81%E6%A5%AD", |
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
def get_info_wikipedia(lxml_htmltree): | |
result = {} | |
title = lxml_htmltree.xpath( | |
"//h1[@id='firstHeading']")[0].text_content() | |
result = {"title": title} | |
result.update(_get_righttop_infobar(lxml_htmltree)) | |
return result | |
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
[0715/123734.075:ERROR:process_reader_win.cc(123)] NtOpenThread: {アクセス拒否} プロセスはオブジェクトのアクセスを要求しましたが、アクセス権が与えられていません。 (0xc0000022) | |
[0715/123734.077:ERROR:exception_snapshot_win.cc(88)] thread ID 3176 not found in process | |
[0715/123916.407:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.409:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.409:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.409:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.409:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.410:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.410:ERROR:process_reader_win.cc(151)] SuspendThread: アクセスが拒否されました。 (0x5) | |
[0715/123916.410:ERROR:process_reader_win.cc(123)] NtOpenThread: {アクセス拒否} プロセスはオブジェクトのアクセスを要求しましたが、アクセス権が与えられていません。 (0xc0000022) |
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 requests import get | |
from lxml import html | |
def get_all_company_urls_wiki(): | |
base_url = "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E4%BC%81%E6%A5%AD%E4%B8%80%E8%A6%A7" | |
url_dict = { | |
"水産・農林の企業の一覧": "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E4%BC%81%E6%A5%AD%E4%B8%80%E8%A6%A7_(%E6%B0%B4%E7%94%A3%E3%83%BB%E8%BE%B2%E6%9E%97)", | |
"鉱業の企業の一覧": "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E4%BC%81%E6%A5%AD%E4%B8%80%E8%A6%A7_(%E9%89%B1%E6%A5%AD)", | |
"建設の企業の一覧": "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E3%81%AE%E4%BC%81%E6%A5%AD%E4%B8%80%E8%A6%A7_(%E5%BB%BA%E8%A8%AD)", |
OlderNewer