Skip to content

Instantly share code, notes, and snippets.

@kailashbuki
kailashbuki / ieee_icdm_authors.py
Created March 17, 2019 22:53
extract authors of research papers from all editions of the IEEE ICDM so far
#!/usr/bin/python3
import requests
from collections import Counter
from bs4 import BeautifulSoup
top_k = 10
authors = list()
for year in range(2001, 2019):
print(year)
@kailashbuki
kailashbuki / dcor.py
Last active May 14, 2024 02:18
Computes the distance correlation between two matrices in Python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Computes the distance correlation between two matrices.
https://en.wikipedia.org/wiki/Distance_correlation
"""
import numpy as np
from scipy.spatial.distance import pdist, squareform
#!/usr/bin/python2.6
#
# Copyright (C) 2011 by kailash.buki@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@kailashbuki
kailashbuki / poppler_error
Created September 27, 2011 11:05
poppler error
In file included from poppler-image.cpp:26:
../goo/PNGWriter.h:23:17: error: png.h: No such file or directory
In file included from poppler-image.cpp:26:
../goo/PNGWriter.h:53: error: 'png_structp' does not name a type
../goo/PNGWriter.h:54: error: 'png_infop' does not name a type
make[2]: *** [libpoppler_cpp_la-poppler-image.lo] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1