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
def pretty_request(request): | |
if not request: | |
return '' | |
params = request.query_params.__dict__.copy() | |
params.pop('_encoding') | |
params.pop('_mutable') | |
return '{method} {path}?{params}\n'.format( | |
method=request.method, | |
path=request.path, |
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
(function() { | |
var agentName = $('#smi-negotiator-photo > h2').text().split(' ')[0]; | |
var myName = 'Robin Maben'; | |
var myEmail = '[email protected]'; | |
var myPhoneNumb = '089 425 9823'; | |
var alternateNumb = '089 249 3211'; | |
var msgContent = `Hello ${agentName}, | |
I have a critical skills work permit (previously green card). I can also provide employer and landlord references immediately if required. And also transfer deposit + rent without delay. I work in a full-time, permanent position with a global software company. |
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 extractedLinks = []; | |
var linkElements = document.getElementsByClassName('link-gray-dark'); | |
for(var elem in linkElements) extractedLinks.push(linkElements[elem]); | |
extractedLinks.map(el => el.innerText).join('\n'); //this will print to console |
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 | |
DB_FILE_NAME = '../.gitt' | |
LINE_DELIMITER = '; ' | |
def get_command_with_args(args): | |
try: | |
command = args[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
def flatten_dict(d): | |
key_value_list = [] | |
if type(d) is dict: | |
for key, value in d.items(): | |
if hasattr(value, '__iter__'): | |
key_value_list += flatten_dict(value) | |
else: | |
key_value_list.append((key, value)) | |
elif type(d) in [list, tuple]: | |
for item in d: |
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
a, b = b, a |
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
a = a + b | |
b = b - a | |
a = a - b |
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
a = 5, b = 10 |
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
c = b | |
b = a | |
a = c |
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>React JSX</title> | |
<script src="/build/react.js"></script> | |
<script src="/build/JSXTransformer.js"></script> | |
<script type="text/jsx"> |
NewerOlder