Skip to content

Instantly share code, notes, and snippets.

View myui's full-sized avatar

Makoto YUI myui

View GitHub Profile
@myui
myui / constraints.txt
Created February 26, 2021 02:13
constraints.txt for digdag-python:3.9.1
alembic==1.5.3
attrs==20.3.0
boto3==1.15.18
botocore==1.18.18
certifi==2020.12.5
chardet==4.0.0
click==7.1.2
cliff==3.5.0
cloudpickle==1.6.0
cmaes==0.7.0
@myui
myui / pget.sh
Last active February 25, 2021 06:42
#!/usr/bin/env bash
# based on https://github.com/z3r0n3t/pkget
# copyright 2020 enp0s10
# Licensed under GNU GPLv3
echo "starting install..."
USER=`whoami`
echo "curent user is $USER"
#!/bin/bash
# Set up CPAN
# Append the following lines to .bashrc / .profile
# PERL_DIR=$HOME/.perl
# export PERL_LOCAL_LIB_ROOT=$PERL_DIR:${PERL_LOCAL_LIB_ROOT}
# export PATH=$PERL_DIR/bin:$PATH
# export PERL5LIB=$PERL_DIR/lib/perl5
# PERL_MB_OPT="--install_base \"${PERL_DIR}\""; export PERL_MB_OPT;
# PERL_MM_OPT="INSTALL_BASE=${PERL_DIR}"; export PERL_MM_OPT;
Deletion from a leaf node
 1. search for the key to delete
 2. if the key in leaf nodes, simply delete it
 3. if underflow happens, rebalancing
    Rebalancing starts from a leaf toward the root until the tree is balanced.
Triggered when underflow happens through remove()
from memory_profiler import profile
@profile()
def my_func():
a = [1] * (10 ** 6)
b = [2] * (2 * 10 ** 7)
del b
return a
my_func()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hivemall v0.6.0 update

Hivemall version is updated to v0.6.0-201912-r03 based on Apache Hivemall v0.6.0.

Major new features in this release includes:

  • xgboost (v0.90) support (find usage)
  • Improvements on tokenize_ja
    • Part-of-Speech (PoS) support in tokenze_ja (find usage)
    • new stoptag_excludes UDF (find usage)

Followed this document for release verification.

Install required softwares

brew install gpg gpg-agent pinentry-mac
brew install maven md5sha1sum

Import GPG KEYS for verification

@myui
myui / max_by.md
Created November 22, 2019 09:59
max_by.sql
WITH data as (
  select 'jake' as name, 18 as age
  union all
  select 'tom' as name, 64 as age
  union all
  select 'lisa' as name, 32 as age
  union all
  select 'justin' as name, 43 as age
)
@myui
myui / blogpost.md
Last active October 31, 2019 03:21
blogpost gender age prediction