Skip to content

Instantly share code, notes, and snippets.

@sangheestyle
sangheestyle / build_atlas_ubuntu.md
Last active July 25, 2024 02:40
Build ATLAS in ubuntu

How to build ATLAS in uruntu

We can build ATLAS on a ubuntu machine.

Steps

First above all, you need to do disable 'Intel SpeedStep' in BIOS if you use Intel CPU. Then do the following:

# cpufreq-set -g performance -c  <CPU>

For example, I did the following because I used i5 which has quad cores.

@sangheestyle
sangheestyle / vb.py
Created April 9, 2015 16:12
Variational Bayes(not implemented yet). Just part.
from scipy import array
from scipy.special import psi as digam
from math import exp
words = ["cat", "dog", "hamburger", "iron", "pig"]
beta = array([[.26, .185, .185, .185, .185],
[.185, .185, .26, .185, .185],
[.185, .185, .185, .26, .185]])
gamma = [2.0, 2.0, 2.0]
@sangheestyle
sangheestyle / getreviews.js
Last active September 23, 2019 13:36
Get reviews from google play
var request = require('request');
var cheerio = require('cheerio');
// Set the headers
var headers = { 'User-Agent': 'Wild/0.0.1'
, 'Content-Type': 'application/x-www-form-urlencoded'
}
// Configure the request
var options = { url: 'https://play.google.com/store/getreviews'
"{0: '', 1: u'painters', 2: u'indulgence', 4: u'visual', 5: u'fantasy', 7: u'appreciation', 9: u'different', 10: u'historic', 11: u'architectural', 12: u'styles', 15: u'seen', 18: u'1840', 19: u'architects', 20: u'dream', 23: u'series', 25: u'paintings', 28: u'last', 31: u'mohicans', 33: u'made', 35: u'three', 36: u'year', 37: u'trip', 39: u'europe', 41: u'1829', 45: u'better', 46: u'known', 49: u'trip', 50: u'four', 51: u'years', 52: u'earlier', 56: u'journeyed', 59: u'hudson', 60: u'river', 63: u'catskill', 64: u'mountains', 65: u'ftp', 66: u'name', 68: u'this_painter', 71: u'oxbow', 74: u'voyage', 76: u'life', 77: u'series'}"
@sangheestyle
sangheestyle / some.md
Created April 1, 2015 11:53
crawl google play store review
<html><head><link rel="stylesheet" href="http://sindresorhus.com/github-markdown-css/github-markdown.css"/></head><body><article class="markdown-body">
<h1 id="analysing-fcq-data">Analysing FCQ Data</h1>
<p>Here is the data set for FCQ. You can get FCQ data from <a href="http://www.colorado.edu/fcq/">FCQ</a>.</p>
<pre>
var data = loader.json('examples/fcq/fcq.2014.json', {multiLines: true})
var fields = _.keys(data[0]).join(', ')
</pre>
<h2 id="exploring-lodash">Exploring lodash</h2>
<p><a href="https://lodash.com">lodash</a> is A JavaScript utility libray to manipulate data. Let&#39;s do it.</p>
var _ = require('lodash');
var github = require('octonode');
var Rx = require('rx');
// repos :: Search -> Options -> Observable Data
// callback style is converted to Promise and then to Observable
function repos(search, options) {
return Rx.Observable.fromPromise(new Promise(function (resolve, reject) {
search.repos(options, function (err, body, header) {
/**
* @fileoverview Pearson correlation score algorithm.
* @author [email protected] (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.
@sangheestyle
sangheestyle / fcq_sample.json
Last active August 29, 2015 14:16
FCQ Data Sample
{"YearTerm":"20141"
,"CrsPBADept":"CSCI"
,"CrsPBAColl":"EN"
,"CrsPBADiv":""
,"Subject":"CSCI"
,"Course":"4830"
,"CourseTitle":"Special Topics in Computer Science"
,"Level":"Upper"
,"CrsLvlNum":"4XXX"
,"Activity_Type":"LEC - Lecture"
@sangheestyle
sangheestyle / commits.txt
Last active October 14, 2022 12:40
setTag, 7822 repos out of 105876 info items of github repos. query: watchers >= 5, size <= 50MB
Not Found in 0xPr0xy/ShadowImageView
Not Found in 01walid/my-arch-stuff
Not Found in 0xroot/whitesnow
Not Found in 0xroot/Tapjacking-Framework-for-Android
Found in 157688302/rejuvenation
{
"full_name": "157688302/rejuvenation",
"regex": "\".setTag\\\\([^,|^\\\\(]*,[^,]*\\\\)\"",
"results": [
{