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
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
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
| """ | |
| Two things are wrong with Django's default `SECRET_KEY` system: | |
| 1. It is not random but pseudo-random | |
| 2. It saves and displays the SECRET_KEY in `settings.py` | |
| This snippet | |
| 1. uses `SystemRandom()` instead to generate a random key | |
| 2. saves a local `secret.txt` |
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
| 1. pip install -r reqs.pip | |
| 2. server.py | |
| 3. open client.html in browser | |
| 4. redis-cli publish push '123456' | |
| 5. check browser console |
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
| ############# init parent django project settings | |
| from os import path | |
| import sys | |
| sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) | |
| import settings | |
| from django.core.management import setup_environ | |
| setup_environ(settings) | |
| ############### |
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
| # | |
| # CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS | |
| # | |
| # For any modifications to this file, see Kannel User Guide | |
| # If that does not help, see Kannel web page (http://www.kannel.org) and | |
| # various online help and mailing list archives | |
| # | |
| # Notes on those who base their configuration on this: | |
| # 1) check security issues! (allowed IPs, passwords and ports) | |
| # 2) groups cannot have empty rows inside them! |
NewerOlder