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
const YOUR_API_KEY = '8994b8108f2a4e4eba0b512942670f2c'; | |
var L = require('leaflet'); | |
var auth = require('arkanciscan-planet-client/api/auth'); | |
auth.setKey(YOUR_API_KEY); | |
var mosaics = require('arkanciscan-planet-client/api/mosaics'); | |
mosaics.get('color_balance_mosaic').then(function (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
const YOUR_API_KEY = '86373116b0284f75bd4a7c53242b9c92'; | |
var L = require('leaflet'); | |
var auth = require('arkanciscan-planet-client/api/auth'); | |
auth.setKey(YOUR_API_KEY); | |
/* | |
var mosaics = require('arkanciscan-planet-client/api/mosaics'); | |
mosaics.get('color_balance_mosaic').then(function (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
const YOUR_API_KEY = '8994b8108f2a4e4eba0b512942670f2c'; | |
var L = require('leaflet'); | |
var auth = require('arkanciscan-planet-client/api/auth'); | |
auth.setKey(YOUR_API_KEY); | |
var mosaics = require('arkanciscan-planet-client/api/mosaics'); | |
mosaics.get('color_balance_mosaic').then(function (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
<html><body> | |
<h1>Find a Unique Username</h1> | |
<p>With a limit of 15 characters</p> | |
<form method="get"> | |
<label>First Name <input name="first_name" /></label> | |
<label>Last Name <input name="last_name" /></label> | |
<label>Quit after <input name="end" value="111" /></label> |
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
<html><body> | |
<h1>Find a Unique Username</h1> | |
<p>With a limit of 15 characters</p> | |
<form method="get"> | |
<label>First Name <input name="first_name" /></label> | |
<label>Last Name <input name="last_name" /></label> | |
<label>Quit after <input name="end" value="111" /></label> |
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(FB.Connect.get_status() == FB.ConnectState.userNotLoggedIn){ | |
alert('user is not logged in'); | |
} else { | |
alert('user is logged in'); | |
} | |
if(FB.Connect.get_status() == FB.ConnectState.appNotAuthorized){ | |
alert('app is not authorized'); | |
} else { | |
alert('app is authorized'); | |
} |
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 cron_analyze_users(){ | |
var subject = storage.users.sortBy('analyzed').first() | |
print(subject.name) | |
if(!subject.interests) | |
subject.relevant = false | |
else { | |
storage.users.filter({relevant:true}).sortBy('active').forEach(function(object){ | |
if(object.email != subject.email){ | |
relation = storage.relations.filter({subject:subject, object:object}).first() |
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 cron_analyze_users(){ | |
// get a user that needs to be analyzed | |
var subject = storage.users.sort(lastAnalyzed).first() | |
// make a hash of their interests and the difference between the volume of | |
// the term for the user and the volume of the term on the whole site. | |
var interests = [] | |
storage.interests.filter({user:subject,relevant:true}).forEach(function(i){ | |
interests[i.term.string] = i.difference | |
}) |
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 parseDate(date){ | |
//Tue, 12 Aug 2008 20:36:35 -0700 | |
var d = Date.parse(date.replace(/,/g,"").substring(4,25)) | |
if(d) return d | |
else { | |
dlog.error("couldn't parse date (",d,") from (",date,")") | |
return new Date() | |
} | |
} |
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 cron_analyze_entries(){ | |
const limit = 500 | |
var terms = [] | |
var interests = [] | |
var count = 0 | |
storage.entries.filter({analyzed:false}).sort().forEach(function(e){ | |
text = (e.title+' '+e.content).replace(/<[a-zA-Z\/][^>]*>/g, ' ').toLowerCase().clean() | |
words = text.match(/\b\w{3,}\b/g) | |
if((count += words.length) > limit) return false | |
if(words){ |