This file contains hidden or 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 requests | |
| import datetime | |
| # Replace with your details | |
| USERNAME = "FIXME" | |
| ACCESS_TOKEN = "FIXME" | |
| START_DATE = "2025-01-01" | |
| END_DATE = "2025-12-31" | |
| # Headers for authentication |
This file contains hidden or 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 fs = require('fs');const csv = require('csv-parser'); | |
| const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
| const { argv } = require('process'); | |
| async function processCSV(filePath) { | |
| const results = []; | |
| return new Promise((resolve, reject) => { | |
| fs.createReadStream(filePath) // Correct usage of createReadStream | |
| .pipe(csv()) | |
| .on('data', (data) => { |
This file contains hidden or 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
| 'use strict'; | |
| /***********************************************/ | |
| // configure these values for your Dynamo table | |
| // | |
| const TABLE_NAME = 'FIXME'; | |
| const table_params = { | |
| TableName : TABLE_NAME, | |
| KeySchema: [ |
This file contains hidden or 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
| 'use strict'; | |
| // | |
| // core logic for importing and transforming a CSV dataset, and | |
| // storing the results in a Dynamo table | |
| // | |
| const Fs = require('fs'); | |
| const CsvReadableStream = require('csv-reader'); | |
| const prompt = require('prompt-sync')({sigint: true}); |
This file contains hidden or 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 Twit = require('twit') | |
| const async = require('async'); | |
| /* | |
| * ASSUMES YOU'VE STASHED YOUR TWEETS FROM A TWITTER DOWNLOAD HERE | |
| * | |
| * found in your twitter download @ /data/tweet.js | |
| */ | |
| const tweets = require('./tweets-old'); |
This file contains hidden or 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 config = require('../config'); | |
| const {google} = require('googleapis'); | |
| const Google = function() { | |
| var self = this; | |
| this.sheets = google.sheets({ | |
| version: 'v4', | |
| auth: config.googleAPI.key |
This file contains hidden or 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 async = require('async'); | |
| const Easypost = require('node-easypost'); | |
| const csv = require('fast-csv'); | |
| const fs = require('fs'); | |
| const stream = require('stream'); | |
| var start_date = new Date('2017-03-01'); | |
| var easypost_key = 'fixme'; |
This file contains hidden or 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
| eval "$(ssh-agent -s)" | |
| eval ssh-add ~/.ssh/id_rsa | |
| Enter passphrase for /Users/developer/.ssh/id_rsa: | |
| Identity added: /Users/developer/.ssh/id_rsa (/Users/developer/.ssh/id_rsa) | |
| npm install |
This file contains hidden or 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
| def getLocalDatetime(): | |
| utc_dt = datetime.datetime.now() | |
| central_tz = pytz.timezone('US/Central') | |
| utc = pytz.utc | |
| ltime = utc.localize(utc_dt).astimezone(central_tz) | |
| return ltime | |
| ## end getLocalDatetime |
This file contains hidden or 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 os | |
| import logging | |
| from google.appengine.ext import webapp | |
| from google.appengine.ext.webapp import util | |
| blog_slugs = { | |
| 'my-post' : '/12/09/', | |
| 'my-second-post' : '/12/12/' | |
| } |
NewerOlder