- If values are integers in [0, 255], Parquet will automatically compress to use 1 byte unsigned integers, thus decreasing the size of saved DataFrame by a factor of 8.
- Partition DataFrames to have evenly-distributed, ~128MB partition sizes (empirical finding). Always err on the higher side w.r.t. number of partitions.
- Pay particular attention to the number of partitions when using
flatMap
, especially if the following operation will result in high memory usage. TheflatMap
op usually results in a DataFrame with a [much] larger number of rows, yet the number of partitions will remain the same. Thus, if a subsequent op causes a large expansion of memory usage (i.e. converting a DataFrame of indices to a DataFrame of large Vectors), the memory usage per partition may become too high. In this case, it is beneficial to repartition the output offlatMap
to a number of partitions that will safely allow for appropriate partition memory sizes, based upon the
import time | |
from wsgiref.handlers import format_date_time | |
# now | |
print format_date_time(time.time()) | |
# epoch seconds | |
print format_date_time(1514764800) |
# Requires Azure AD PowerShell Module | |
#Prompts user to login using Azure Credentials | |
Connect-AzureAD | |
$results = @() | |
Get-AzureADApplication -All $true | %{ | |
$app = $_ | |
$owner = Get-AzureADApplicationOwner -ObjectId $_.ObjectID -Top 1 |
#include <FS.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecure.h> | |
#include <PubSubClient.h> | |
#include <time.h> | |
// Insert your FQDN of your MQTT Broker | |
#define MQTT_SERVER "mqtt.srvx1.local" | |
const char* mqtt_server = MQTT_SERVER; |
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
var express = require('express'), | |
cluster = require('cluster'), | |
net = require('net'), | |
sio = require('socket.io'), | |
sio_redis = require('socket.io-redis'); | |
var port = 3000, | |
num_processes = require('os').cpus().length; | |
if (cluster.isMaster) { |
The issue:
..mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.
(from a new defunct https://developers.google.com/mobile/articles/fast_buttons article)
touch-action
CSS property can be used to disable this behaviour.
touch-action: manipulation
The user agent may consider touches that begin on the element only for the purposes of scrolling and continuous zooming. Any additional behaviors supported by auto are out of scope for this specification.
React.js Conf tickets, everyone wants them but we only have space for 400 people, and that includes speakers, organizers and everyone’s proud parents and grandparents! If you are into speaking and have time before December 13th, you should submit a 30 minute talk or 5 minute lightning talk proposal. If you’re more into writing than speaking or coding, ReactJSNews is giving away 1 ticket for the best blog post submission. But you probably like programming, so React Native Newsletter & Exponent are giving away two tickets for the best React Native apps made with Exponent! Of course, if you like speaking, writing and programming you should do all of the above.
- You make an “app” and publish it to Exponent. You don’t have to open source it, but people
#include <ESP8266WiFi.h> | |
#include <WiFiUdp.h> | |
void setup() { | |
int cnt = 0; | |
// set for STA mode | |
WiFi.mode(WIFI_STA); | |
// put your setup code here, to run once: |
NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.
I'd like to hear how you approach this: @valuedstandards or comment on this gist.
You have to include a boatload of link
elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':