Skip to content

Instantly share code, notes, and snippets.

View gdoteof's full-sized avatar

geoff golder gdoteof

  • vision.ai
  • Burlington, VT
View GitHub Profile
.................................................................................................................................................................................................................................''''..............'''''..................''''''''''''''''...'''''''''''''''''......''''''...............'''''''''''''''''''''....'.........................'''''''''''''''''''''''''''''''''''''''''''''....''''.......................................................................................................................................................................................................................................................................................................................................'''''''''''''''''''''''''''''',,,,,,,,,,
...............................................................................................................................................................................................................................
(function(){
select = document.createElement("select");
selectId = "insertedSelect";
select.id = selectId;
options =[
{p:49, cost:"599" , label:"35,000 FBA Orders"},
{p:50, cost:"799" , label:"50,000 FBA Orders"},
{p:51, cost:"1099", label:"75,000 FBA Orders"},
{p:52, cost:"1349", label:"100,000 FBA Orders"},
@gdoteof
gdoteof / ytchatlogger.js
Created November 2, 2018 01:47
youtube chat logger
function lastMessage(){
let a = document.getElementsByTagName('yt-live-chat-text-message-renderer');
return {
user: a[a.length-1].getElementsByTagName('yt-live-chat-author-chip')[0].innerText,
message: a[a.length-1].querySelector('#message').innerText,
}
}
window.ggCacheChat = {user:'',message:''}
def expandJson(df, colName):
jsonString = df.iloc[0][colName]
decoded = json.loads(jsonString)
attrs = decoded.keys()
print(attrs)
fld = df[colName]
for attr in attrs: df[colName+attr] = [loadjson(x,attr) for x in fld]
@gdoteof
gdoteof / expandJson.py
Last active October 21, 2018 16:02
An attempt
def expandJson(df, colName):
jsonString = df.iloc[0][colName]
decoded = json.loads(jsonString)
attrs = decoded.keys()
fld = df[colName]
for attr in attrs: df[attr] = json.loads(fld)[attr]
@gdoteof
gdoteof / 4.m
Last active September 29, 2018 18:09
function output = sigmoid(incoming)
output = 1/(1+(exp(incoming * -1)))
endfunction
%question 4
Wxh=-.1
Whh=.5
Why=.25
hbias=.4
ybias=0
@gdoteof
gdoteof / inspect.js
Created August 30, 2017 20:01
viewing large javascript objects
var fs = require('fs');
var exec = require('child_process').exec;
function inspect(object, filename) {
var html = "<script>var j = " + JSON.stringify(object) + "; console.log(j);</script> open console";
var tmpFile = (filename) ? filename : "/tmp/inspect.html";
fs.writeFileSync(tmpFile, html)
exec("open " + tmpFile);
}
@gdoteof
gdoteof / itest.js
Last active September 30, 2016 18:35
var spawn = require('child_process').spawn;
var test = spawn('./test.sh', ['--fashion-last "purestyle_lists/MASTER 9.28.16.csv" "purestyle_lists/men_tracker_master.csv"', '--ecomm-last "purestyle_lists/men_selling_master.csv"']);
test.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
test.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
@gdoteof
gdoteof / doit.js
Last active April 4, 2016 04:25
robin auto grow .. does nothing
$("#robinSendMessage").append('<div onclick={$(".text-counter-input").submit();} class="robin-chat--vote" style="font-weight: bold; padding: 5px;cursor: pointer; margin-left:0;" id="sendBtn">Send Message</div>'); // Send
setInterval(function () {
document.getElementsByClassName("robin--vote-class--increase")[0].click();
console.log("you auto clicked grow!");
//DELETE THESE TWO LINES TO TURN OFF SPAM
document.getElementsByClassName("c-form-control text-counter-input")[0].value = "Go here to autogrow: https://gist.github.com/gdoteof/439b4b3a58610f8a5763a709e971433b";
$(".text-counter-input").submit();
//