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
- Be highly organized. | |
- Suggest proactive solutions and anticipate my needs. | |
- Treat me as an expert in all subject matter. | |
- Be accurate and thorough; mistakes erode my trust. | |
- Provide detailed explanations; I appreciate lots of detail. | |
- Value good arguments over authorities; the source is irrelevant. | |
- Consider new technologies and contrarian ideas. | |
- High levels of speculation or prediction are fine; just flag it. | |
- Recommend only the highest-quality, meticulously designed products. | |
- Recommend products from all over the world; location is irrelevant. |
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
# by @levelsio | |
# | |
# MIT licensed | |
# | |
# make sure you enable php_intl on PHP | |
# you can do by uncommenting ;extension=intl or ;extension=php_intl | |
# and installing php-intl, e.g. sudo apt-get install php-intl | |
# | |
# made for Nomad List to give people a notice if they go to a place | |
# where it is currently Ramadan |
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
/* | |
* By default, Electron (well, underlying Chrome browser) will reject loading external URLs | |
* to an <iframe>. To circumvent this limitation, we can manipulate response headers from any | |
* http request and feed them to the Electron window. | |
* | |
* The 'onHeadersReceived' listener is documented here: | |
* http://electron.atom.io/docs/api/session/#webrequestonheadersreceivedfilter-listener | |
*/ | |
app.on('ready', () => { |
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
# Quick intro to accessing Stubhub API with Python | |
# Ozzie Liu ([email protected]) | |
# Related blog post: http://ozzieliu.com/2016/06/21/scraping-ticket-data-with-stubhub-api/ | |
# Updated 3/5/2017 for Python 3 and Stubhub's InventorySearchAPI - v2 | |
import requests | |
import base64 | |
import json | |
import pprint | |
import pandas as pd |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
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
# Redirect visitors who request the root domain path (e.g. www.mywebsite.ch) to the appropriate language version | |
# Fallback to English version if no matching browser language defined | |
# Based on language version being at e.g. www.mywebsite.ch/de/ | |
# This has no effect on any subpaths of the website, and therefore has no effect on e.g. WordPress admin. | |
# Using a 302 temporary redirect header stops the redirection from being cached in the browser. | |
# language is ES-MX (Mexico) | |
RewriteCond %{HTTP:Accept-Language} ^es-mx [NC] | |
RewriteRule ^$ /mx/ [L,R=302] |
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
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 |
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
var a = document.getElementsByTagName('input'); | |
for(var i=0;i<a.length;i++) if(a[i].getAttribute('value')=='Confirm') a[i].click(); |
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
/* | |
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ | |
var casper = require("casper").create(); |