Skip to content

Instantly share code, notes, and snippets.

View mugwort-rc's full-sized avatar

mugwort_rc mugwort-rc

  • Japan
View GitHub Profile
@mugwort-rc
mugwort-rc / gist:5771876
Last active December 18, 2015 10:58
google-api-python-client httplib2 certificate routin error fix.
>>> flow.step2_exchange(code)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/client.py", line 1283, in step2_exchange
headers=headers)
File "/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/local/lib/python2.7/dist-packages/httplib2-0.8-py2.7.egg/httplib2/__init__.py", line 1317, in _request
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SHA384Test
[ RUN ] SHA384Test.test_sha384_short_msg
test_sha384.cpp:292: Failure
Value of: SHA384_SHORT_MSG_HEXDIGEST[i]
Actual: "aead8688c58c6ba4e9cadb4756b465dce0fb06f1cfaa478197f2ea89414e47e9572034adfed160703c79b82b3fd7ab78"
Expected: sha384.hexdigest()
Which is: "46779ca1f33c5679a7fd777fa115aaeffca3baf426a411c702b88f635e528b654c0f4dcd0b838f0d0350e159ad92eaf2"
test_sha384.cpp:292: Failure
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from SHA512Test
[ RUN ] SHA512Test.test_sha512_short_msg
test_sha512.cpp:292: Failure
Value of: SHA512_SHORT_MSG_HEXDIGEST[i]
Actual: "c00926a374cde55b8fbd77f50da1363da19744d3f464e07ce31794c5a61b6f9c85689fa1cfe136553527fd876be91673c2cac2dd157b2defea360851b6d92cf4"
Expected: sha512.hexdigest()
Which is: "59134d25244d1cb03c9b2e8ebd718d7b82ef232175ae423b87d7651149c339cac1bdd9cd64533d38f9d792a251fa7fb1be59c705b6cf114d7f65188dc6a531f0"
test_sha512.cpp:292: Failure
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from IDEATest
[ RUN ] IDEATest.test_idea_ecb
test_idea.cpp:17: Failure
Value of: CIPHER
Actual: "\xB1\xF5\xF7\xF8y\x1" "7\xF"
Expected: idea.encrypt(PLAIN)
Which is: "\xF\xE4\xF7\xF3v\xED\x87\f"
test_idea.cpp:18: Failure
template <class SharedVector>
class shared_vector_def_visitor :
public boost::python::def_visitor<SharedVectorDefVisitor<SharedVector> >
{
friend class boost::python::def_visitor_access;
public:
template <class T>
void visit(T &class_) const
{
"""
Graphviz IPython magic extensions
Magic methods:
%dot <dot graph>
%%dot <dot ...
... graph>
%dotstr "<dot graph>"
%dotobj obj.to_dot()
%dotobjs obj[0].to_dot(), obj[1].to_dot(), ...
@mugwort-rc
mugwort-rc / README.md
Last active January 31, 2016 04:34
patch for mecab-0.996 build on MinGW48_32

変更点

  • MinGW32が-municodeオプションを認識しないため、オプション削除。
  • wmainが使えないのでwinmain.hを無効化。
  • WPATHを無効化。
  • unicode版はCreateFileW時にMeCab::Utf8ToWide(filename).c_str()としたが、日本語を含むパスをUTF-8で渡しても失敗する
  • ansi版はCreateFileWCreateFileAにした。日本語を含むパスはShiftJISで渡せば成功する。

参考

@mugwort-rc
mugwort-rc / fftsspp.hpp
Last active February 10, 2016 14:52
FFTSS C++ wrapper.
/*
* Copyright (c) 2016, mugwort_rc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
@mugwort-rc
mugwort-rc / file0.txt
Last active February 13, 2017 09:31
WARCファイルフォーマット翻訳(仮) ref: http://qiita.com/mugwort_rc/items/459d4872168e2cc28ba1
warc-file = 1*warc-record
warc-record = header CRLF
block CRLF CRLF
header = version warc-fields
version = "WARC/1.0" CRLF
warc-fields = *named-field CRLF
block = *OCTET
@mugwort-rc
mugwort-rc / ascii.txt.detach.asc
Created February 12, 2017 09:37
python-gnupg failure on detached sign
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJYoCabAAoJEMuvobDi3WQkqEYIAJNYvg46PO3L3bQICmihZj3t
Zhd6cdY19yXLgYVgCtdOXK88EDvdm1lDY7XeWrLuBEIw0pEhHuHRjdF7fbpZK4IC
EJqHhgARs8iEn+Crqq4r+nTw8fCyHV2K2fRE5KGeIr/J2Os1oqJ3IPAlinBQaSwp
rNF0Jb5/y+Hj1bvZmNxeqmeklzJrirA4bEwfU9/u2u6hSDvaj8mGkOg6MW3gLG83
YeOjiEBfz54zQmaBoqxfPwacy7MkSIAP7Bk32SzLGKZKvvz5YaHUrwMbz3QGoVNJ
I+9TVeQ6KtvbeD4H73n0xw73yD9hJlkZ22JECkplWd2Wu1e6qvt1FXC8pHK8WY0=
=hGhZ