Skip to content

Instantly share code, notes, and snippets.

satomacoto satomacoto

Block or report user

Report or block satomacoto

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 rm-docker.sh
docker images | awk '/<none/{print $3}' | xargs docker rmi
docker ps -f "status=exited" -q | xargs docker rm
@satomacoto
satomacoto / dsdr.py
Created Dec 10, 2012
[He 2012] Document Summarization based on Data Reconstruction
View dsdr.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
class DSDR:
"""Z He, et al. Document Summarization based onData Reconstruction (2012)
http://www.aaai.org/ocs/index.php/AAAI/AAAI12/paper/viewPaper/4991
"""
@satomacoto
satomacoto / create.py
Last active Apr 27, 2018
kNN on xvideos.com-db.csv
View create.py
# -*- coding:utf-8 -*-
from pymongo import MongoClient
client = MongoClient()
db = client.xvideos
def create_db():
f = open('xvideos.com-db.csv')
for line in f:
View README.md
curl -fsSL https://gist.githubusercontent.com/satomacoto/b27dc3f871938d2614819bba3c589b45/raw/setup1.sh | bash
curl -fsSL https://gist.githubusercontent.com/satomacoto/b27dc3f871938d2614819bba3c589b45/raw/setup2.sh | bash
@satomacoto
satomacoto / mparser.py
Created Apr 12, 2012
Parser with MeCab
View mparser.py
#! /usr/bin/python
# -*- encoding: utf-8 -*-
'''
Parser with MeCab
'''
import MeCab
import glob
import re
import os
View lda.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys,getopt
from numpy import array,matrix,diag
from scipy import sum,log,exp,mean,dot,ones,zeros
from scipy.special import polygamma
from scipy.linalg import norm
from random import random
View how-to-install-miniconda-with-pyenv-on-fish.sh
pyenv install miniconda3-latest
pyenv local miniconda3-latest
conda create -n myenv anaconda
source (conda info --root)/etc/fish/conf.d/conda.fish
conda activate myenv
View Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
@satomacoto
satomacoto / labeledarrow.html
Created Aug 18, 2012
labeled arrow w/ D3.js
View labeledarrow.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://d3js.org/d3.v2.js"></script>
<style>
line.arrow {
stroke: #666;
@satomacoto
satomacoto / cooccur-top20.txt
Last active Mar 24, 2017
count tag occurrence and cooccurrence on xvideos.com-db.csv
View cooccur-top20.txt
('blowjob', 'hardcore') 594241
('blowjob', 'brunette') 336485
('blowjob', 'teen') 334746
('amateur', 'teen') 322670
('brunette', 'hardcore') 320892
('hardcore', 'teen') 302974
('blonde', 'brunette') 282348
('blonde', 'blowjob') 272567
('blowjob', 'oral') 269461
('blonde', 'hardcore') 252474
You can’t perform that action at this time.