Skip to content

Instantly share code, notes, and snippets.

View piffall's full-sized avatar
🏠
Working from home

Cristòfol Torrens piffall

🏠
Working from home
View GitHub Profile
@basriciftci
basriciftci / dell-XPS-15-arch-linux-install
Last active November 6, 2022 12:05 — forked from marc-fez/dell-XPS-15-arch-linux-install
Instructions for installing arch linux on a Dell XPS 15 9570
# Arch wiki page on XPS 15
# https://wiki.archlinux.org/index.php/Dell_XPS_15_9570
# Install ARCH Linux with UEFI on Dell XPS 15, I didn't prefer encrypted file system. you may find several examples of it
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Use balenaetcher to create a bootable installation stick.
# Download it from https://www.balena.io/etcher/
# start GremlinServer
# bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.2-SNAPSHOT
# bin/gremlin-server.sh conf/gremlin-server-modern-py.yaml
from gremlin_python.process.graph_traversal import GraphTraversal
from gremlin_python.process.graph_traversal import GraphTraversalSource
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.traversal import Operator
from gremlin_python.structure.io.graphson import GraphSONReader
@arturmkrtchyan
arturmkrtchyan / get_job_status.sh
Last active August 7, 2023 18:55
Apache Spark Hidden REST API
curl http://spark-cluster-ip:6066/v1/submissions/status/driver-20151008145126-0000
-- http://dossy.org/2011/09/mysql-geo-distance-code-and-samples/
DELIMITER $$
DROP FUNCTION IF EXISTS geodist $$
CREATE FUNCTION geodist (
src_lat DECIMAL(9,6), src_lon DECIMAL(9,6),
dst_lat DECIMAL(9,6), dst_lon DECIMAL(9,6)
) RETURNS DECIMAL(6,2) DETERMINISTIC
BEGIN
@byF
byF / test.scala
Last active August 29, 2015 14:05
Scala script for the aggregation task http://www.aproint.com/aggregation-with-spark-sql
/*
(c) 2014 Zdenek Farana; use as is; no guarantees
Because of the bug in Spark SQL parser, test B works only with fork https://github.com/aproint/spark
*/
def measure(f: => Any):Double = {
val start = System.currentTimeMillis()
@jrabary
jrabary / CartesianTest.scala
Created April 3, 2014 12:42
RDD cartesian need cached data illustration
object CartesianTest {
case class DataFormat(id: Long, view: String, value: Array[Double])
def randomSplit(
input: RDD[DataFormat],
numFolds: Int,
trainingFraction: Double,
query: String,
target: String,
@sashtown
sashtown / curved-shadow.css
Created January 1, 2013 18:59
Curved shadows with CSS
.shadow:before, .shadow:after {
content: '';
position: absolute;
width: 50%;
height: 10%;
z-index: -1;
bottom: 20px;
background: rgba(0,0,0,0.7);
-webkit-box-shadow: 0 10px 15px rgba(0,0,0,.7);
box-shadow: 0 10px 15px rgba(0,0,0,.7);
@michaelt
michaelt / latex.template
Created June 9, 2011 21:23
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.