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
require('ET_Client.php'); | |
$myclient = new \ET_Client(); | |
// NOTE: These examples only work in accounts where the SubscriberKey functionality is not enabled | |
// SubscriberKey will need to be included in the props if that feature is enabled | |
// Create Subscriber | |
$subCreate = new \ET_Subscriber(); | |
$subCreate->authStub = $myclient; | |
$subCreate->props = array("EmailAddress" => $email, "Lists" => array("ID" => $listId)); |
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
isMobile: function () { | |
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width; | |
if (width < 600) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
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 -*- | |
""" | |
@author: tpatch | |
""" | |
import pandas | |
import numpy | |
import seaborn | |
import matplotlib.pyplot as plt |
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 pandas | |
import numpy | |
pandas.set_option('display.float_format', lambda x: '%f'%x) | |
data = pandas.read_csv('datasets/ool_pds.csv', low_memory=False) | |
data.columns = map(str.upper, data.columns) | |
print(len(data)) |
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
<amp-pixel src="https://ssl.google-analytics.com/collect?v=1&tid=UA-XXXXXXXX-X&t=pageview&cid=$RANDOM&dt=$TITLE&dl=$CANONICAL_URL&z=$RANDOM"></amp-pixel> | |
/* | |
* Required parameters: | |
* v = API version number (currently 1) | |
* tid = Google Analytics property identifier (UA-12345678-1) | |
* t = hit type | |
* cid = client id (you should implement this via cookie etc.) | |
* z = random string to bypass caching (amphtml generates this to $RANDOM variable) | |
* |
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 pandas | |
import numpy | |
pandas.set_option('display.float_format', lambda x: '%f'%x) | |
data = pandas.read_csv('datasets/ool_pds.csv', low_memory=False) | |
data.columns = map(str.upper, data.columns) | |
print(len(data)) | |
print(len(data.columns)) |
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
function calcDistance($userLat, $userLon) { | |
$storeLat = ; | |
$storeLon = ; | |
$radlat1 = pi() * $userLat / 180; | |
$radlat2 = pi() * $storeLat / 180; | |
$radlon1 = pi() * $userLon / 180; | |
$radlon2 = pi() * $storeLon / 180; | |
$theta = $userLat - $storeLat; | |
$radtheta = pi() * $theta / 180; |
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
if (response == "true") $(".image[filename='" + filename + "'] img").src( $(".image[filename='" + filename + "'] img").src() + '?' + Math.random() ); |
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
<cfset var image = "" /> | |
<cfset var jFile = "" /> | |
<cfset var pathImage = ExpandPath(arguments.FilePath & "/image.jpg") /> | |
<cffile action="upload" destination="#GetTempDirectory()#" fileField="#arguments.File#" nameconflict="overwrite" /> | |
<cfscript> | |
image = ImageRead(cffile.SERVERDIRECTORY & "/" & cffile.SERVERFILE); | |
if (isImage(image)) { |
NewerOlder