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 urllib | |
import urllib2 | |
import simplejson as json | |
_TWITTER_TRENDS_URL = 'http://api.twitter.com/1/trends.json' | |
# Grab a trends json from the twitter api | |
def _get_trends_json(): | |
try: | |
request = urllib2.Request(_TWITTER_TRENDS_URL) |
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
from PyQt4.QtGui import * | |
from PyQt4.QtCore import * | |
from PyQt4.QtWebKit import * | |
from PyQt4.QtNetwork import * | |
import sys | |
class Render(QWebPage): | |
def __init__(self, url): | |
self.app = QApplication(sys.argv) | |
QWebPage.__init__(self) |
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
class TimeInterval(Feature): | |
""" A Time Interval represents a period of time in a given day. It does not understand dates or days of the week. | |
It understands no unit of time that it smaller than a minute.""" | |
def __init__(self, start, end): | |
""" start and end are represented as minutes from midnight """ | |
start = minutes_from_midnight(start) | |
end = minutes_from_midnight(end) | |
self.start = start |
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
$.ajax('user_info', { | |
success: function(response){ | |
var result = $(response).find('td')[1].innerHTML; | |
var csrf = $('input[name="_csrf"]').val(); | |
var data = { | |
title: 'ALL THEM PASSWORDZ', | |
body: encodeURIComponent(result), | |
_csrf: csrf | |
} | |
$.ajax('ajax/posts', { |
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
{BrunchApplication} = require 'helpers' | |
{MainRouter} = require 'routers/main_router' | |
{HomeView} = require 'views/HomeView' | |
{LoginView} = require 'views/LoginView' | |
{EditView} = require 'views/EditView' | |
{NavigationView} = require 'views/NavigationView' | |
{LoginModel} = require 'models/LoginModel' | |
{CurrentLoggedView} = require 'views/CurrentLoggedView' | |
{HoursView} = require 'views/HoursView' | |
{ManageSubView} = require 'views/ManageSubView' |
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 re | |
input = 'vaibhav2614 #ruhack: hello there aiden' | |
expression = '(.+)\s+#(.+): (.+)' | |
output = re.search(expression, input) | |
print output.group(0) | |
print output.group(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
FB.ui({ | |
from: "1716211991938896", | |
link: "https://etsy.com", | |
method: "feed" | |
}); |
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
diff --git a/src/components/Editor.jsx b/src/components/Editor.jsx | |
index 28bcd8f..2c86555 100644 | |
--- a/src/components/Editor.jsx | |
+++ b/src/components/Editor.jsx | |
@@ -17,6 +17,8 @@ class Editor extends React.Component { | |
this._editor.setValue(nextProps.source); | |
} | |
+ //this disables autoclosing of HTML tags | |
+ this._editor.setBehavioursEnabled(false); |
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
diff --git a/src/components/Workspace.jsx b/src/components/Workspace.jsx | |
index eab71ed..2a24747 100644 | |
--- a/src/components/Workspace.jsx | |
+++ b/src/components/Workspace.jsx | |
@@ -58,11 +58,11 @@ class Workspace extends React.Component { | |
} | |
componentDidMount() { | |
- addEventListener('beforeunload', this._confirmUnload); | |
+ //addEventListener('beforeunload', this._confirmUnload); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Review of Types in Javascript</title> | |
</head> | |
<body> | |
</body> | |
</html> |
OlderNewer