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
| #!/usr/bin/env python3.2 | |
| # Benjamin James Wright <bwright@cse.unsw.edu.au> | |
| from functools import lru_cache | |
| @lru_cache(maxsize=None) | |
| def edit_distance(src, dst): | |
| if not dst: return len(src) | |
| if not src: return len(dst) |
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
| # -*- encoding: utf-8 -*- | |
| # pip install emoji | |
| import emoji | |
| def char_is_emoji(character): | |
| return character in emoji.UNICODE_EMOJI | |
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
| <?php | |
| // Server file | |
| class PushNotifications { | |
| // (Android)API access key from Google API's Console. | |
| private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
| // (iOS) Private key's passphrase. | |
| private static $passphrase = 'joashp'; | |
| // (Windows Phone 8) The name of our push channel. | |
| private static $channelName = "joashp"; |
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
| /* | |
| Copyright (c) 2011 Andrei Mackenzie | |
| 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: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
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
| #!/usr/bin/python | |
| # reference => http://www.puffinwarellc.com/index.php/news-and-articles/articles/33.html | |
| from numpy import zeros | |
| from scipy.linalg import svd | |
| from math import log # needed for TFIDF | |
| from numpy import asarray, sum | |
| titles = ["The Neatest Little Guide to Stock Market Investing", |
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
| #author : Sujit Pal | |
| #Note: this is a python3 updated version of http://sujitpal.blogspot.fr/2014/12/semantic-similarity-for-short-sentences.html | |
| # by mathieu Chrétien (mchretien.pro@mail.com) | |
| #contributor : Mathieu Chrétien | |
| from __future__ import division | |
| import nltk | |
| from nltk.corpus import wordnet as wn |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ''' | |
| This script just show the basic workflow to compute TF-IDF similarity matrix with Gensim | |
| OUTPUT : |
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
| // LoadingScreenManager | |
| // -------------------------------- | |
| // built by Martin Nerurkar (http://www.martin.nerurkar.de) | |
| // for Nowhere Prophet (http://www.noprophet.com) | |
| // | |
| // Licensed under GNU General Public License v3.0 | |
| // http://www.gnu.org/licenses/gpl-3.0.txt | |
| using UnityEngine; | |
| using UnityEngine.UI; |
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
| /* | |
| * RC4 symmetric cipher encryption/decryption | |
| * | |
| * @license Public Domain | |
| * @param string key - secret key for encryption/decryption | |
| * @param string str - string to be encrypted/decrypted | |
| * @return string | |
| */ | |
| function rc4(key, str) { | |
| var s = [], j = 0, x, res = ''; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Untitled Document</title> | |
| <head> | |
| <link href="css/dropzone.css" type="text/css" rel="stylesheet" /> | |
| <script src="dropzone.min.js"></script> | |
| <script src="custom_dropzone.js"></script> |