- bigdata = Web Intelligence and Big Data
- clinical skills = Teaching and Assessing Clinical Skills
- comp finance = Introduction to Computational Finance and Financial Econometrics
- data sci = Introduction to Data Science
- dmathgen = 离散数学概论 Discrete Mathematics Generality
- global introuslaw = The Global Student's Introduction to U.S. Law
- global theatre = Theatre and Globalization
- global theatre = Theatre and Globalization
- inforiskman = Information Security and Risk Management in Context
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# airflow/plugins/slack.py | |
import logging | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.plugins_manager import AirflowPlugin | |
from slackclient import SlackClient | |
from titan.utils import config | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://stackoverflow.com/questions/10628640/get-full-mysql-query-string-on-insert-or-update | |
-- SELECT info FROM INFORMATION_SCHEMA.PROCESSLIST WHERE id=CONNECTION_ID(); | |
USE test; | |
CREATE TABLE test_entry (id INTEGER(10) NOT NULL DEFAULT 0); | |
CREATE TABLE `log_queries` ( | |
`query_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Query ID', | |
`query_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Query ran on time', | |
`query_table` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Query made on table', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[citation_title] => 10193 | |
[citation_journal_title] => 10171 | |
[citation_volume] => 9878 | |
[citation_pdf_url] => 9671 | |
[citation_issue] => 9560 | |
[citation_issn] => 9483 | |
[citation_firstpage] => 9376 | |
[citation_doi] => 9324 | |
[robots] => 8939 | |
[citation_abstract_html_url] => 8906 |
For a project named XXX with a postgreSQL database:
- $ sudo apt-get install libedit-dev libbsd-dev libgmp3-dev zlib1g-dev freeglut3-dev postgresql pgadmin3 libghc-persistent-postgresql-dev cabal-install
- Install all packages for 'yesod'.
- $ cabal update
- $ cd XXX && cabal install && yesod devel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=UTF-8 | |
import nltk | |
from nltk.corpus import brown | |
# This is a fast and simple noun phrase extractor (based on NLTK) | |
# Feel free to use it, just keep a link back to this post | |
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/ | |
# Create by Shlomi Babluki | |
# May, 2013 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libchi2.so: chi2.o | |
gcc -shared -Wl,-soname,libchi2.so.1 -o libchi2.so.1.0.0 chi2.o -lc | |
chi2.o: chi2.c | |
gcc -fPIC -g -c -Wall chi2.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import numpypy as np # for compatibility with numpy in pypy | |
except: | |
import numpy as np # if using numpy in cpython | |
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver | |
def TDMAsolver(a, b, c, d): | |
''' | |
TDMA solver, a b c d can be NumPy array type or Python list type. | |
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm |
NewerOlder