I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
Usage: pip wheel [OPTIONS] PACKAGE_NAMES... | |
Creates wheel archives from your requirements and place into ./wheels | |
(requires distribute>0.6.28 and wheel) | |
-w --wheel-dir <DIR> //alternative dir to place wheels into | |
--force-rebuild //rewrite existing wheels | |
--unpack-only <DIR> //unpack to dir, for manual building with "setup.py bdist_wheel" | |
-r, --requirement <FILENAME> | |
-f, --find-links <URL> |
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
Autobahn on dotCloud! | |
This code is 99% Autobah example code, 1% dotCloud adaptation. | |
To test this on dotCloud: | |
- create a dotCloud account at http://www.dotcloud.com/ | |
(free, no credit card) | |
- install dotCloud CLI, see http://docs.dotcloud.com/ |
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
''' | |
Problem solution | |
---------------- | |
The area of a circular ring is: | |
pi * (R^2 - r^2) | |
where R is the radius of the bigger circle and r | |
the radius of the other one. |
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 | |
# Configuration | |
root=/dev/sda3 | |
boot=/dev/sda1 | |
home=/dev/sda4 | |
lang=en_US-UTF-8 | |
keyboard=it | |
zone=Europe | |
subzone=Rome |
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 asyncio | |
@asyncio.coroutine | |
def waiting(r): | |
print("hello from waiting -", r) | |
yield from asyncio.sleep(2) | |
print("bye from waiting -", r) | |
return r |
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
def render(digits): | |
'''This function converts its input, a string of decimal digits, into a | |
barcode, using the interleaved 2 of 5 format. The input string must not | |
contain an odd number of digits. The output is an SVG string. | |
Wikipedia [ITF Format]: http://en.wikipedia.org/wiki/Interleaved_2_of_5 | |
''' | |
top = '<svg height="58" width="{0}" style="background:white">' |
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
*.aux | |
*.fdb_latexmk | |
*.log | |
*.fls |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
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
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |