This file contains 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
""" | |
====================================================== | |
Out-of-core classification of text documents | |
====================================================== | |
simplified source of | |
http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html | |
""" | |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- | |
vscode like theme by namh | |
--> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>vscode</string> | |
<key>settings</key> |
This file contains 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
/** | |
You could use this source for babel-react / babel-ecma6 | |
*/ | |
//-------------------------------- | |
// | |
// main.js | |
// | |
//-------------------------------- |
This file contains 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
+-----------+ +-----------+ | |
| | | | | |
| client | | server | | |
+-----------+ +-----------+ +-------------------------+ | |
+ + | global_message_buffer | | |
| |+----------------------------->| | | |
| POST button is clicked | +-----------+-------------+ | |
| uri: a/message/new | + |
This file contains 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
import zipfile | |
import os, os.path | |
def unzip(filename, dest): | |
with zipfile.ZipFile(filename) as zf: | |
zf.extractall(dest) | |
def zipdir(newFilename, targetPath): |
This file contains 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
/** | |
Pure javascript instead of jQuery | |
code is from http://youmightnotneedjquery.com/ | |
*/ | |
/** | |
* to serialize the inputs' data of the {@param form} | |
*/ | |
const serialize = (fromEl)=>{ |
This file contains 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
"""Common settings and globals.""" | |
from os.path import abspath, basename, dirname, join, normpath | |
from sys import path | |
########## PATH CONFIGURATION | |
# Absolute filesystem path to the Django project directory: | |
DJANGO_ROOT = dirname(dirname(abspath(__file__))) |
This file contains 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
"""Production settings and globals.""" | |
from __future__ import absolute_import | |
from os import environ | |
from .base import * | |
# Normally you should not import ANYTHING from Django directly |
This file contains 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
"""Development settings and globals.""" | |
from __future__ import absolute_import | |
from os.path import join, normpath | |
from .base import * | |
# DEBUG CONFIGURATION |
This file contains 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 rest_framework import exceptions | |
from rest_framework.authentication import BaseAuthentication, CSRFCheck | |
__author__ = 'namh' | |
class CsrfAuthentication(BaseAuthentication): | |
""" |