First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
These weights are often combined into a tf-idf value, simply by multiplying them together. The best scoring words under tf-idf are uncommon ones which are repeated many times in the text, which lead early web search engines to be vulnerable to pages being stuffed with repeated terms to trick the search engines into ranking them highly for those keywords. For that reason, more complex weighting schemes are generally used, but tf-idf is still a good first step, especially for systems where no one is trying to game the system. | |
There are a lot of variations on the basic tf-idf idea, but a straightforward implementation might look like: | |
<?php | |
$tfidf = $term_frequency * // tf | |
log( $total_document_count / $documents_with_term, 2); // idf | |
?> | |
It's worth repeating that the IDF is the total document count over the count of the ones containing the term. So, if there were 50 documents in the collection, and two of them contained the term in question, the IDF would be 50/2 = 25. To be accurate, we s |
<?php | |
function folderSize ($dir) | |
{ | |
$size = 0; | |
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) { | |
$size += is_file($each) ? filesize($each) : folderSize($each); | |
} |
admin account info" filetype:log | |
!Host=*.* intext:enc_UserPassword=* ext:pcf | |
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
"AutoCreate=TRUE password=*" | |
"http://*:*@www” domainname | |
"index of/" "ws_ftp.ini" "parent directory" | |
"liveice configuration file" ext:cfg -site:sourceforge.net | |
"parent directory" +proftpdpasswd | |
Duclassified" -site:duware.com "DUware All Rights reserved" | |
duclassmate" -site:duware.com |
<?php | |
function multiple_download(array $urls, $save_path = '/tmp') | |
{ | |
$multi_handle = curl_multi_init(); | |
$file_pointers = []; | |
$curl_handles = []; | |
// Add curl multi handles, one per file we don't already have | |
foreach ($urls as $key => $url) { |
<?php | |
// List of tags to be replaced and their replacement | |
$replace_tags = [ | |
'i' => 'em', | |
'b' => 'strong' | |
]; | |
// List of tags to be stripped. Text and children tags will be preserved. | |
$remove_tags = [ |
{ | |
"log": { | |
"comment": "", | |
"creator": { | |
"comment": "", | |
"name": "BrowserMob Proxy", | |
"version": "2.1.4" | |
}, | |
"entries": [ | |
{ |
Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
<?php | |
// https://stackoverflow.com/questions/23062537/how-to-convert-html-to-json-using-php | |
function html_to_obj( $html ) { | |
$dom = new DOMDocument(); | |
$dom->loadHTML( $html ); | |
return element_to_obj( $dom->documentElement ); | |
} | |
function element_to_obj( $element ) { |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
import csv, time | |
import os.path | |
browser = webdriver.Chrome() | |
for year in range(2013, 2020): | |
for month in range(1,13): |