View cassandra.service
[Unit]
Description=Cassandra
[Service]
Type=simple
User=cassandra
WorkingDirectory=/usr/share/cassandra
ExecStart=/usr/sbin/cassandra -f
Restart=on-failure
RestartSec=10s
View equilibrium_index.java
// A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 ≤ P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices, i.e.
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
class Solution {
public int solution(int[] A) {
View pip2.lua
init = function(args)
local r = {}
r[1] = wrk.format(nil, "/hello?1")
r[2] = wrk.format(nil, "/hello?2")
r[3] = wrk.format(nil, "/hello?3")
r[4] = wrk.format(nil, "/hello?4")
r[5] = wrk.format(nil, "/hello?5")
r[6] = wrk.format(nil, "/hello?6")
r[7] = wrk.format(nil, "/hello?7")
View curl_http2.md
  • install cURL with nghttp2 support
brew install curl --with-nghttp2
  • link the formula to replace the system cURL
brew link curl --force
View dataframe.jl
using Query, DataFrames, Feather
#Reading a CSV and ignoring the top line
df = readtable("data/netflix_prize/download/training_set//mv_0016765.txt", header = false, skipstart=1)
#=
julia> head(df)
6×3 DataFrames.DataFrame
│ Row │ x1 │ x2 │ x3 │
View installing_lxc_centos_7.2.md

Installing LXC on CentOS 7.2

Version

[root@be0 ~]# cat -v /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Installing

View withings-smart-kid-scale-ws-40.md

Withings Smart Kid Scale WS 40

The smart in the name is a joke, they are kidding, the scale is pretty dumb.

What an uter crap

2.4 out of 5 stars on Amazon (I have promised myself not to buy anything below 3 starts)

Problem

View story.of.elm.txt
23:38:59 <l1x> or I need a function that return an integer with the current UTC eppoch
23:38:59 <l1x> epoch*
23:39:05 <l1x> hoelzro: :DDD
23:39:13 <l1x> yes!
23:39:18 <hoelzro> you can't do that
23:39:22 <hoelzro> sorry =(
View pandas.md

Pandas

Ignore warnings

import warnings
warnings.filterwarnings("ignore")

Read CSV

View test.sparql
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?name
WHERE
{
?name rdf:type dbo:GivenName.
}
OFFSET 10000 LIMIT 10000