Skip to content

Instantly share code, notes, and snippets.

Kenta Murata mrkn

Block or report user

Report or block mrkn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View new_api_on_plotly.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View new_box_plot.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View charty_new_bar_plot_api.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrkn
mrkn / lambda_function.rb
Created Aug 24, 2019
The lambda function of daily_prime_check
View lambda_function.rb
require 'json'
require 'prime'
require 'net/http'
require 'uri'
SLACK_URL = 'https://hooks.slack.com/services/....'
def post_to_slack(url, message)
uri = URI.parse(url)
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
View first_commits.sh
git log --pretty=format:'%ct %h %cn' | \
sort -n | \
ruby -e "gets;c={};while line = gets;t, _, n = line.chomp.split(' ');puts %Q(#{c[n] = n} #{Time.at(t.to_i).strftime('%Y%m%dT%H%M%S')}) unless c[n];end"
View iruby_folium_sample_ja.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:8319b4c4b6b8477f519fc9504e7ab90d
===== LIMIT=1000 =====
Calculating -------------------------------------
Mysql2Test.test_pluck_by_arrow(n) 64.717M bytes - 100.000 times
Mysql2Test.test_pluck(n) 154.227M bytes - 100.000 times
Comparison:
Mysql2Test.test_pluck_by_arrow(n): 64716800.0 bytes
Mysql2Test.test_pluck(n): 154226688.0 bytes - 2.38x larger
===== LIMIT=2000 =====
View julia-dot-optimize
julia> function dot(a, b)
s = zero(eltype(a))
for i in 1:endof(a)
s += a[i] * b[i]
end
return s
end
dot (generic function with 1 method)
julia> a = ones(100000); b = ones(100000);
View gist:98e4bd96068a02b173cdd5e9e4c0df2a
```
$ python
Python 3.6.4 (default, Apr 3 2018, 09:35:44)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mxnet.gluon.parameter import ParameterDict
>>> pd1 = ParameterDict()
>>> pd2 = ParameterDict()
>>> pd1.get('a')
Parameter a (shape=None, dtype=<class 'numpy.float32'>)
View gist:549e82c47f5ffe407dc1fce29b657be2
compiling arrow-nmatrix.c
arrow-nmatrix.c: In function ‘garrow_type_to_nmatrix_dtype’:
arrow-nmatrix.c:57:8: error: ‘GARROW_TYPE_BOOL’ undeclared (first use in this function)
case GARROW_TYPE_BOOL:
^
arrow-nmatrix.c:57:8: note: each undeclared identifier is reported only once for each function it appears in
arrow-nmatrix.c:34:3: warning: enumeration value ‘GARROW_TYPE_BOOLEAN’ not handled in switch [-Wswitch-enum]
switch (arrow_type) {
^
arrow-nmatrix.c: In function ‘nmatrix_dtype_to_garrow_data_type’:
You can’t perform that action at this time.