To use the profiler, just use import pyprofile
and if the function to be profiled is named stupid_code
use the profiler as follows
@pyprofile def stupid_code(): # do something stupid here
ʘ‿ʘ | |
Innocent face | |
ಠ_ಠ | |
Reddit disapproval face | |
(╯°□°)╯︵ ┻━┻ | |
Table Flip / Flipping Table | |
┬─┬ ノ( ゜-゜ノ) |
This simple API for Wayback is a test to see if a given url is archived and currenlty accessible in the Wayback Machine. This API is useful for providing a 404 or other error handler which checks Wayback to see if it has an archived copy ready to display. The API can be used as follows: | |
http://archive.org/wayback/available?url=example.com | |
which might return: | |
{ | |
"archived_snapshots": { | |
"closest": { | |
"available": true, | |
"url": "http://web.archive.org/web/20130919044612/http://example.com/", |
https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles={QUERY_STRING} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2016 Sayan Goswami <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
To use the profiler, just use import pyprofile
and if the function to be profiled is named stupid_code
use the profiler as follows
@pyprofile def stupid_code(): # do something stupid here
Open terminal and type | |
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock |
# variables | |
src="./build/" | |
dst=".." | |
# jekyll build | |
echo "Runnning jekyll build" | |
jekyll build --destination $src | |
# copy to root | |
echo "Moving files from $src to $dst" |
import threading | |
import time | |
class RepeatedTimer(object): | |
def __init__(self, interval, _function, *args, **kwargs): | |
self._timer = None | |
self.interval = interval | |
self.function = _function | |
self.args = args |
#include <iostream> | |
#include <iomanip> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <fstream> | |
#include <cstdio> | |
#include <cmath> | |
#include <cstring> | |
#include <string> | |
#include <ctime> |
#!/usr/bin/env python3 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import PIL | |
import PIL.Image as Image | |
plt.axis('off') |