A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
from flask import Flask | |
from flask import request,jsonify | |
import socket | |
app = Flask(__name__) | |
@app.route("/apply", methods=['GET']) | |
def predict(): | |
h = request.args.get('host') | |
r = {} | |
if h == 'yahoo.com' or h == 'amazon.com': |
--- /usr/libexec/os-probes/mounted/20microsoft 2016-09-19 00:09:25.917283774 -0400 | |
+++ 20microsoft 2016-09-19 00:55:38.750505997 -0400 | |
@@ -31,7 +31,9 @@ | |
for boot in $(item_in_dir boot "$2"); do | |
bcd=$(item_in_dir bcd "$2/$boot") | |
if [ -n "$bcd" ]; then | |
- if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then | |
+ if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then | |
+ long="Windows 10 (loader)" | |
+ elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference/hit 1.5 ns 4 cycles | |
Floating-point add/mult/FMA operation 1.5 ns 4 cycles | |
L2 cache reference/hit 5 ns 12 ~ 17 cycles | |
Branch mispredict 6 ns 15 ~ 20 cycles | |
L3 cache hit (unshared cache line) 16 ns 42 cycles | |
L3 cache hit (shared line in another core) 25 ns 65 cycles | |
Mutex lock/unlock 25 ns | |
L3 cache hit (modified in another core) 29 ns 75 cycles |
#!/bin/sh | |
# start a neo4j docker container with apoc and bloom (server variant) configured | |
# this requires to have | |
# * curl, unzip and jq being installed | |
# * having a valid bloom license file | |
# released under the WTFPL (http://www.wtfpl.net/) | |
# (c) Stefan Armbruster |
Prerequisite: OpenJDK 11. If you run ubuntu with root you can use
apt-get install default-jdk
Otherwise, consider using docker : https://hub.docker.com/_/openjdk
# coding=utf-8 | |
# Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |