import pandas as pd | |
import time | |
import requests | |
import time | |
import hmac | |
from requests import Request | |
import sys | |
import json | |
import os |
Lately I have been busy reading some new books on Domain Driven Design (DDD) and software architecture -- including a short yet eye-opening one in Python and a great one in F#. At the same time, it seems that more people in the Functional Programming world are looking at more formal approaches to modelling -- some examples here. This has brought some thought from the background of my brain about how we should model, organize, and architect software using the lessons we've learnt from functional programming.
Before moving on, let me be clear about this being just a dump of some thoughts, not always well-defined, definite
I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).
The solution is to compile libimobiledevice and ifuse from source.
Who is this guide intended for?
from sklearn.base import BaseEstimator | |
def piper(self, other): | |
from sklearn.pipeline import make_pipeline, Pipeline | |
if isinstance(self, Pipeline): | |
steps = ([estimator for (name, estimator) in self.steps] + [other]) | |
return make_pipeline(*steps) | |
else: | |
return make_pipeline(self, other) |
from decimal import Decimal | |
from datetime import timedelta | |
def duration(duration_string): #example: '5d3h2m1s' | |
duration_string = duration_string.lower() | |
total_seconds = Decimal('0') | |
prev_num = [] | |
for character in duration_string: | |
if character.isalpha(): |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/* | |
* Reference: | |
* http://www.quora.com/Computer-Programming/What-are-some-cool-bit-manipulation-tricks-hacks | |
* http://www.catonmat.net/blog/low-level-bit-hacks-you-absolutely-must-know/ | |
*/ | |
#include <iostream> | |
#include <string.h> | |
using namespace std; |