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
hashtag_list = ['travelblog', 'travelblogger', 'traveler'] | |
# prev_user_list = [] - if it's the first time you run it, use this line and comment the two below | |
prev_user_list = pd.read_csv('20181203-224633_users_followed_list.csv', delimiter=',').iloc[:,1:2] # useful to build a user log | |
prev_user_list = list(prev_user_list['0']) | |
new_followed = [] | |
tag = -1 | |
followed = 0 | |
likes = 0 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>MVVM</h1> |
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
<style> | |
.button .menu-item { | |
pointer-events: none; | |
} | |
.button:focus .menu-item { | |
pointer-events: all; | |
} | |
</style> |
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
String.prototype.replaceArray = function(find, replace) { | |
var replaceString = this; | |
for (var i = 0; i < find.length; i++) { | |
replaceString = replaceString.replace(find[i], replace[i]); | |
} | |
return replaceString; | |
}; | |
String.prototype.replaceArray = function(find, replace) { | |
var replaceString = this; |
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
//SELECT TEXT RANGE | |
$.fn.selectRange = function(start, end) { | |
return this.each(function() { | |
if (this.setSelectionRange) { | |
this.focus(); | |
this.setSelectionRange(start, end); | |
} else if (this.createTextRange) { | |
var range = this.createTextRange(); | |
range.collapse(true); | |
range.moveEnd('character', end); |
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
var wordCase = function( num, words ) { | |
var word = ''; | |
num = Math.abs( num ); | |
if ( num.toString().indexOf( '.' ) > -1 ) { | |
word = words[ 2 ]; | |
} else { | |
word = ( | |
num % 10 === 1 && num % 100 !== 11 |
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
jQuery(function($){ | |
$(document).on("copy", function () { | |
var selection, html = ""; | |
if (window.getSelection || document.getSelection) { | |
selection = window.getSelection ? window.getSelection() : document.getSelection(); | |
if (selection.rangeCount) { | |
html = document.createElement("div"); | |
for (var i = 0, n = selection.rangeCount; i < n; ++i) { | |
html.appendChild(selection.getRangeAt(i).cloneContents()); |
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
<?php | |
/** | |
* Merge two dimensional arrays my way | |
* | |
* Will merge keys even if they are of type int | |
* | |
* @param array $array1 Initial array to merge. | |
* @param array ... Variable list of arrays to recursively merge. | |
* |
NewerOlder