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 random | |
import time | |
class Person: | |
WAITING = 0 | |
IN_ELEVATOR = 1 | |
DONE = 2 | |
def __init__(self, from_floor, to_floor): | |
self.from_floor = from_floor |
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
<script> | |
lp.jQuery(function($) { | |
var ruleID = 'notWebmail'; | |
var field = 'email'; | |
var message = 'Please enter your work mail address.'; | |
var rules = module.lp.form.data.validationRules[field]; | |
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
class LessonCheckMixin(object): | |
def __init__(self): | |
# List of method names on mixin | |
# | |
self._LESSON_CHECK_METHODS = ['expected_failure', 'companies_check'] | |
def can_see_lessons(self, *args, **kwargs): | |
""" | |
""" | |
for AUTHORIZATION_CHECK in self._LESSON_CHECK_METHODS: |
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
User Onboarding | |
User onboarding is the process of increasing the likelihood that new users become successful when adopting your product. You need to balance the user experience of onboarding with the friction of necessary steps such as account creation, user education, and data gathering. | |
Definition of Success | |
A successful onboarding process can be defined as making the user successful not only within the scope of using your product but in whatever grander mission you have promised. | |
Sections: | |
Pre Onboarding |
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
$('.selector').each(function(){ | |
var $this = $(this); | |
var $text = $this.text(); | |
if($text.length > 10){ | |
$this.text($text.substring(0, 10-3) + "..."); | |
} | |
}); |
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
App.utility.prettyTime = function(){ | |
//The *1000 here is because python UTC is different in seconds compared to JS UTC in milliseconds | |
//The this here is normally the function that calls this, but watch out what calls this function | |
function plural_time(n, period) { | |
if (n < 2) { | |
return "1 " + period + " ago"; | |
} | |
else { | |
return n + " " + period + "s ago"; |
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
<div class="answer-meta"> | |
{{#if isGlobalQuestion}} | |
<p>You are viewing a global question</p> | |
{{else}} | |
{{#if content.is_followed}} | |
<a {{action followQuestion}}class="follow unfollow"><span class="ss-icon"> | |
</span>Following</a> | |
{{else}} | |
<a {{action followQuestion}}class="follow"><span class="ss-icon"> | |
</span>Follow</a> |
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
{{#if isGlobalQuestion}} | |
{{#if content.global_answers.length}} | |
<a class="global-answers selected">{{content.number_of_community_answers}}</a> | |
{{else}} | |
No Community Answers | |
{{/if}} | |
{{else}} | |
{{#if content.global_answers.length}} | |
{{#if content.number_of_course_answers.length}} | |
<!-- If there are both course and global answers--> |
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
{{#if isGlobalQuestion}} | |
{{#if content.global_answers.length}} | |
<a class="global-answers selected">{{content.number_of_community_answers}}</a> | |
{{else}} | |
No Community Answers | |
{{/if}} | |
{{else}} | |
{{#if content.global_answers.length}} | |
<a {{action switchAnswers target="parentView"}} {{ bindAttr class=":course-answers notGlobalAnswers:selected" }}>{{content.number_of_course_answers}} <span class="ss-icon"></span></a> |
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
#!/bin/bash | |
ROOTDIR=/Users/ben/Desktop/batch/pdfs | |
PDFDIR=$ROOTDIR/pdfs | |
PY_SCRIPT_DIR=$ROOTDIR | |
PAGESFILE=$ROOTDIR/sage_strim.csv | |
echo $PAGESFILE | |