https://www.amazon.in/s?k=books&s=price-asc-rank # low to high
https://www.amazon.in/s?k=books&s=price-desc-rank # high to low
https://www.amazon.in/s?k=books&s=relevanceblender # featured
https://www.amazon.in/s?k=books&s=review-rank # Average customer review
https://www.amazon.in/s?k=books&s=date-desc-rank # Newest Arrival
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
javascript: (function (){ var scripts = document.getElementsByTagName('script'); var friendsList; for (var i = 0; i < scripts.length; i++) { var script = scripts[i]; if (script.innerHTML.indexOf('InitialChatFriendsList') > -1) { var friendsListString = script.innerHTML.split('"InitialChatFriendsList",[],{"list":')[1].split(',"groups"')[0]; friendsList = JSON.parse(friendsListString); console.log('friendsList:', friendsList); break; } } var html = friendsList.map(function(id, i){ id = id = id.split('-')[0]; var url = 'http://graph.facebook.com/' + id + '/picture?type=normal'; return '<a target="_blank" href="https://www.facebook.com/' + id + '"><img src="' + url + '"></a>'; }).join('\n'); var css = '<style> a { display: inline-block; margin: 7px; } img { max-width: 70px; max-height: 70px; vertical-align: top; } </style>'; open('data:text/html, <html>' + css + html + '</html>'); }()); |
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 typing import Iterator | |
def fib(n: int) -> Iterator[int]: | |
a, b = 0, 1 | |
while a < n: | |
yield a | |
a, b = b, 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
def _add_log_level_upper(logger, method_name, event_dict): | |
if method_name == "warn": | |
method_name = "warning" | |
event_dict["level"] = method_name.upper() | |
return event_dict | |
level_styles = structlog.dev.ConsoleRenderer.get_default_level_styles() | |
for k, v in list(level_styles.items()): | |
level_styles[k.upper()] = v |
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
## install Catalyst proprietary | |
sudo ntfsfix /dev/sda2 | |
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.BAK | |
sudo apt-get remove --purge fglrx* | |
sudo apt-get install linux-headers-generic | |
sudo apt-get install fglrx xvba-va-driver libva-glx1 libva-egl1 vainfo | |
sudo amdconfig --initial | |
## install build essentials | |
sudo apt-get install cmake |
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
#include <Python.h> | |
typedef struct { | |
PyObject_HEAD char *arr; | |
int len; | |
} ArrayCuckoo; | |
static int ArrayCuckoo_init(ArrayCuckoo *self, PyObject *args, PyObject *kwds) { | |
self->len = 2; | |
self->arr = (char *)malloc(self->len * sizeof(char)); |
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
#!/usr/bin/python3.7 | |
import asyncio | |
import ipaddress | |
import re | |
import sys | |
MAX_NUMBER_WORKERS = 200 |
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 gc, os, subprocess, requests | |
gc.disable() # Just to make sure - I have seen this with gc enabled | |
for x in range(20): | |
requests.head("http://www.google.de/") | |
print "Open sockets after 20 head requests:" | |
pid = os.getpid() | |
subprocess.call("lsof -p%d -a -iTCP" % (pid,), shell=True) |
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
#! /usr/bin/env python | |
# Of course, the author does not guarantee safety. | |
# I did my best by using SQLite's online backup API. | |
from __future__ import print_function | |
import sys, ctypes | |
from ctypes.util import find_library | |
SQLITE_OK = 0 | |
SQLITE_ERROR = 1 | |
SQLITE_BUSY = 5 |
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 | |
from ply import lex, yacc | |
from ply.lex import TOKEN | |
import pyparsing as pp | |
# First, let's define a pyparsing parser for JSON. | |
class JSONPyParsing(object): | |
# pylint: disable-msg=W0104,E0213 |
OlderNewer