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
<?php | |
/** | |
* levenshtein.php | |
* | |
* CID 13a745cd-f086-4e7b-9594-79746e3d02d0 | |
* | |
* Levenshtein Distance is a measure of the least number of transformations that need | |
* to be applied to a string to convert it into another string. We can use this to measure | |
* the difference between two strings. This allows us to test responses provided by users to | |
* determine how different they are to each other. In the results presented a high Levenshtein |
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
<?php | |
/** | |
* porter_stemmer.php | |
* | |
* In linguistic morphology and information retrieval, stemming is the process | |
* for reducing inflected (or sometimes derived) words to their stem, base or | |
* root form—generally a written word form. | |
* | |
* Porter Stemmer Steps: | |
* - Step 1: Gets rid of plurals and -ed or -ing suffixes |
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
<?php | |
/** | |
* smith_waterman.php | |
* | |
* The Smith–Waterman algorithm performs local sequence alignment to detect | |
* similarities in string. Smith-Waterman has been used for sequencing DNA, | |
* and for detecting plagiarism and collusion by comparing sequences of text. | |
* | |
* @example | |
* $str1 = 'Smith-Waterman and Systolic PE Array are well-known dynamic programming algorithms.'; |
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
<?php | |
$query = " | |
select concat(n.chapter, ': ', lower(n.title)) as ata, coalesce(n.subtotal,0) as in_project, coalesce(n.total,0) as ata_total from ( | |
select | |
m.chapter, m.title, m.slug, | |
(select count(*) as subtotal from atas a | |
inner join parts_listings pl on pl.ata = a.id | |
inner join project_parts pp on pp.part_listing_id = pl.id | |
where pl.ata = m.chapter and pp.in_project and a.active and pp.project_id = {$id} |
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
"aloha/twilio": "^2.0", https://github.com/aloha/laravel-twilio | |
"anahkiasen/underscore-php": "^2.0", https://github.com/Anahkiasen/underscore-php | |
"barryvdh/laravel-cors": "0.7.x", https://github.com/barryvdh/laravel-cors | |
"creativeorange/gravatar": "~1.0", https://github.com/creativeorange/gravatar | |
"genealabs/laravel-caffeine": "~0.2", https://github.com/GeneaLabs/laravel-caffeine | |
"guzzlehttp/guzzle": "~5.3|~6.0", https://github.com/guzzle/guzzle | |
"intervention/image": "^2.3", http://image.intervention.io/getting_started/installation | |
"kyslik/column-sortable": "~3.0.0", https://github.com/Kyslik/column-sortable | |
"laravel/cashier": "^5.0", https://github.com/laravel/cashier | |
"laravelcollective/html": "5.1.*", https://laravelcollective.com/ |
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
<?php | |
class Parenthesis extends TerminalExpression { | |
protected $precidence = 6; | |
public function operate(Stack $stack) { | |
} | |
public function getPrecidence() { | |
return $this->precidence; |
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 -*- | |
import click | |
import os | |
import pandas as pd | |
def file_split(file): | |
s = file.split('.') | |
name = '.'.join(s[:-1]) # get directory name |