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 channel = pusher.subscribe('notify'); | |
channel.bind('instagram-profile-stats-{{isset($username) ? $username : ''}}', function (message) { | |
console.log(message); | |
console.log("==================="); | |
$.each(message.mostLikedPosts, function(index,value) { | |
console.log('index ' + index); | |
$.get('/assets/js/templates/instagram_posts.mst', function (template) { | |
console.log('media url ' + value.media_url + ' image url ' + value.image_url + ' likes count ' + value.likes_count + ' comments count ' + value.comments_count); | |
var rendered = Mustache.render(template, { | |
post: value |
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
let options = { | |
'Content-Type' : 'application/x-www-form-urlencoded', | |
'X-Instagram-AJAX': headers.ajax[ 0 ], | |
'X-Requested-With': 'XMLHttpRequest', | |
'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' | |
}; | |
headers = { ...headers.headers, ...options }; | |
console.log(headers); | |
const config = { headers: headers }; |
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
<tr id="{{account.id}}"> | |
<td> | |
<img src="{{ account.image_url }}" width="40px" height="40px" class="img-thumbnail"><br/> | |
<a href="https://instagram.com/ {{ account.username }}" target="_blank"> | |
{{ account.full_name }} | |
</a></td> | |
<td> | |
{{ account.comment }} | |
</td> | |
<td> |
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 React, {Component, PropTypes} from 'react'; | |
import {connect} from 'react-redux'; | |
import {TextInput} from 'Components/Global/Form'; | |
import moment from 'moment'; | |
import InventoryTableComponent from './Tables/InventoryTableComponent'; | |
import AvailabilityTableComponent from './Tables/AvailabilityTableComponent'; | |
import {getAvailability, getInventory} from "root/Components/Redux/Actions/inventory"; | |
import {updateBulkInventory} from "root/Components/Redux/Actions/inventory"; | |
import LoadingMessage from "root/Components/Global/Loading/LoadingMessage"; |
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
======================================= UPDATE ======================================= | |
//method to send a request to server to fetch inventory data | |
getInventory() { | |
this.props.dispatch(getInventory({ 'facility_id': this.props.params.facilityId})); | |
} | |
//method to send a request to server to fetch availability data | |
getAvailability() { | |
this.props.dispatch(getAvailability({ 'facility_id': this.props.params.facilityId })); |
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 sys | |
import os | |
import speech_recognition as sr | |
from tqdm import tqdm | |
with open("/var/www/html/speech_to_text/api-key.json") as f: | |
GOOGLE_CLOUD_SPEECH_CREDENTIALS = f.read() | |
try: | |
folderName = sys.argv[1] |
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 hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&& |
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
/* | |
jQuery Wiggle | |
Author: WonderGroup, Jordan Thomas | |
URL: http://labs.wondergroup.com/demos/mini-ui/index.html | |
License: MIT (http://en.wikipedia.org/wiki/MIT_License) | |
*/ | |
jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);} | |
if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});}; | |
//jQuery.fn.extend({ wiggle:function(){ alert("Hello");}}); |
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
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ | |
var saveAs=saveAs||function(e){"use strict";if(typeof e==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o="download"in r,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\/[\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",d=1e3*40,c=function(e){var t=function(){if(typeof e==="string"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)){return new Blob([String.fromChar |
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 apiExplorer = { _apiKeys: {}, _bodyMime: {}, _respMime: {} }; | |
apiExplorer.addApiKey = function(name,key) { | |
this._apiKeys[name] = key; | |
} | |
apiExplorer.listApiKeys = function(){ | |
return Object.keys(this._apiKeys); | |
} |