Skip to content

Instantly share code, notes, and snippets.

@Slinkkay
Slinkkay / crashlytics_scraper
Last active April 29, 2016 07:40
Crashlytics User Scraper
// ==UserScript==
// @name Crashlytics ID Scraper
// @namespace http://your.homepage/
// @version 0.1
// @description A console logger which outputs the user name for each issue and then presses next
// @author You
// @match https://crashlytics.com/*/*/apps/*/issues/*
// @grant none
// ==/UserScript==
@MehulATL
MehulATL / cards.css
Created May 12, 2015 19:57
ionic cards css
.card, .list-inset {
overflow: hidden;
margin: 20px 10px;
border-radius: 2px;
background-color: #fff; }
.card {
padding-top: 1px;
padding-bottom: 1px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
@fedesilva
fedesilva / kaboom
Created February 22, 2014 14:03
spark+es-hadoop: UTFDataFormatException
java.io.UTFDataFormatException
at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:2157)
at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:2000)
at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:866)
at org.elasticsearch.hadoop.mr.EsInputFormat$ShardInputSplit.write(EsInputFormat.java:109)
at org.apache.hadoop.io.ObjectWritable.writeObject(ObjectWritable.java:197)
at org.apache.hadoop.io.ObjectWritable.writeObject(ObjectWritable.java:123)
at org.apache.hadoop.io.ObjectWritable.write(ObjectWritable.java:79)
at org.apache.spark.SerializableWritable.writeObject(SerializableWritable.scala:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@bradkarels
bradkarels / chill.scala
Created April 30, 2015 19:34
Spark Chill Example
import java.io.ByteArrayOutputStream
import java.io.ObjectOutputStream
import java.io.Serializable
import com.twitter.chill.{Input, Output, ScalaKryoInstantiator}
class Person extends Serializable {
var name: String = ""
def this(name:String) {
this()
@metal3d
metal3d / threadpool.py
Last active December 15, 2017 04:04
ThreadPool is an asynchrone Pool thread that doesn't block when adding a thread to Queue.
# -*- encoding: utf-8 -*-
""" threadpool module, export ThreadPool class that is a non blocking
Thread Queue. Most important is that ThreadPool.add_task runs
asychroniousally. This method doesn't block process.
Example:
p = ThreadPool(2)
p.add_task(f1, arg1, arg2, test=False)
p.add_task(f1, arg2, arg3, test=False)
p.add_task(f1, arg4, arg5, test=True)
---
title: "Codebook template"
author: "Your name here"
date: "The date here"
output:
html_document:
keep_md: yes
---
## Project Description
@squito
squito / _summary.md
Last active February 5, 2020 14:15
spark sql timestamp semantics, and how they changed from 2.0.0 to 2.0.1 (see query_output_2_0_0.txt vs query_output_2_0_1.txt) changed by SPARK-16216

Spark "Timestamp" Behavior

Reading data in different timezones

Note that the ansi sql standard defines "timestamp" as equivalent to "timestamp without time zone". However Spark's behavior depends on both the version of spark and the file format

format \ spark version <= 2.0.0 >= 2.0.1
@veve90
veve90 / curl-upload-file.sh
Created February 11, 2021 21:36 — forked from henriquemenezes/curl-upload-file.sh
Using CURL to Upload Files
# curl - Raw upload
curl -X PUT -T image.png https://example.com/upload
# curl - Content-Type: multipart/form-data
curl -F name=logo -F file=@image.png https://example.org/upload
# curl - POST presigned URL (S3)
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos/7"
config.vm.provider :virtualbox do |v|
v.memory = 4048
v.cpus = 2
@tomahim
tomahim / data_augmentation.py
Last active January 20, 2022 08:26
Data augmentation in few lines with skimage
import os
import random
from scipy import ndarray
# image processing library
import skimage as sk
from skimage import transform
from skimage import util
from skimage import io