, ,

Generate summaries for your WordPress blog posts using Python

Using the WordPress Rest API plugin you can easily get a JSON payload containing data from your blog. If you use SSL, you likely will need to use Python 3, as this includes many bug fixes. First, load the page text: url = ‘https://www.garysieling.com/blog/wp-json/wp/v2/posts?per_page=10&page=18′   import urllib3 http = urllib3.PoolManager(10) response = http.request(’GET’, url) Then […]

,

Liquibase autoIncrement startWith example

Liquibase doesn’t seem to have a command line option to let you set the start points on autoIncrement fields when you generate patches, but you can fix this easily by adding “startWith” after the fact (useful for a database migration): <changeSet author="gary" id="1437853066645-52"> <createTable tableName="messages"> <column autoIncrement="true" startWith="150000" name="Id" type="bigint"> <constraints primaryKey="true" primaryKeyName="pk_messages"> </column> </createTable> […]

, , ,

Comparing two SQL Server databases with Liquibase

Liquibase is a tool for managing database schemas (e.g. diffing schemas and writing migration scripts), and supports most major commercial and open-source relational databases. I’ll show how to use it to compare a migrated database to the original database, to find and fix discrepancies. To use it with SQL Server, you’ll first need to download […]

, ,

Finding template documents with RethinkDB and the Bing API in Python

Finding template documents with RethinkDB and the Bing API in Python Many businesses require new clients to fill out a form to pre-qualify them or to get information to quote a project. Given a list of industries, we can use search engine results to filter the industry list to just those that require forms (you […]

,

Postgres: Time Travelling Debugger

Imagine you’re an engineer doing phone support for Netflix. The movies they show change regularly: There are various reasons for this – Netflix suddenly thinks you like period pieces, or they get into a contract dispute with one of their vendors. As a support engineer, this presents a set of communication challenges, which inspire some […]

,

Getting Started with OData in Java

OData is a new web service protocol, developed by Microsoft, which sits somewhere between ODBC, Rest, and a business intelligence oriented SQL. The protocol seems to be fairly complex, and as such, does not seem well-suited to “big data” workflows. It does, however have built in support for things like differential data loads, so there […]

,

Decision Trees: “Gini” vs. “Entropy” criteria

The scikit-learn documentation has an argument to control how the decision tree algorithm splits nodes: criterion : string, optional (default=”gini”) The function to measure the quality of a split. Supported criteria are “gini” for the Gini impurity and “entropy” for the information gain. It seems like something that could be important since this determines the […]