Skip to content

Instantly share code, notes, and snippets.

View kszucs's full-sized avatar

Krisztián Szűcs kszucs

View GitHub Profile
@kszucs
kszucs / gist:7856016
Created December 8, 2013 11:13
Lithium autoload model relationships to entity
<?php
namespace app\extensions\data\entity;
class Document extends \lithium\data\entity\Document {
public function &__get($name) {
if ($result = parent::__get($name)) {
return $result;
}
if (($model = $this->_model) && ($rel = $model::relations($name))) {
@kszucs
kszucs / Dockerfile
Created June 3, 2016 21:16
mesos-python dockerfile
FROM python:2.7
RUN pip install cloudpickle && \
wget http://downloads.mesosphere.io/master/debian/8/mesos-0.27.0-py2.7-linux-x86_64.egg -O mesos.egg && \
easy_install mesos.egg && \
rm /mesos.egg
@kszucs
kszucs / workflow.py
Last active June 11, 2016 15:49
example workflow
import pandas as pd
from dask_mesos import get
from epos import mesos, spark
from epos.utils import MiB, GiB
@mesos
def generate(): # or crawl
return [['a', 1, 120],
['b', 2, 220],
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index d9ad0a5..9e52d0f 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -446,6 +446,7 @@ minibuffer-prompt-properties--setter
(ns-use-native-fullscreen ns boolean "24.4")
(ns-use-fullscreen-animation ns boolean "25.1")
(ns-use-srgb-colorspace ns boolean "24.4")
+ (ns-use-titled-windows ns boolean "25.2")
;; process.c
Alias tip: gd ibis/file/csv.py
diff --git a/ibis/file/csv.py b/ibis/file/csv.py
index 1fddf17..bf5d593 100644
--- a/ibis/file/csv.py
+++ b/ibis/file/csv.py
@@ -65,7 +65,10 @@ def connect(path):
class CSVTable(ops.DatabaseTable):
- pass
@kszucs
kszucs / array.rs
Last active March 20, 2018 15:10
arrow-rs datatypes sample
use dtypes::{DataType, PrimitiveType};
pub type Buffer<T> = RawVec<T>;
pub type BitMap = Buffer<bool>;
trait Array<T: DataType> {
fn new(dtype: T) -> Self;
}
@kszucs
kszucs / sketch.rs
Last active March 27, 2018 23:51
Arrow-rs design
enum ArrowType {
Int64,
List(Box<ArrowType>),
Struct(Vec<(String, Box<ArrowType>)>)
}
struct Array<T: DataType> {
dtype: ArrayType,
store: T::Container,
_marker: PhantomData<T>
from dask import delayed
@delayed
def install_minicodna_env(...):
pass
@delayed
def install_deps(...):
pass
@kszucs
kszucs / gist:d6a47425764dea9ef76d8e69f589241f
Created October 5, 2018 07:23
arrow-verify-c_glib-meson
Found pkg-config: /usr/local/bin/pkg-config (0.29.2)
Native dependency arrow found: YES 0.11.0
Native dependency arrow-orc found: YES 0.11.0
Dependency arrow-gpu found: NO
Native dependency parquet found: YES 1.5.1-SNAPSHOT
Configuring version.h using configuration
Native dependency gobject-2.0 found: YES 2.58.1
Native dependency gio-2.0 found: YES 2.58.1
Native dependency gobject-introspection-1.0 found: YES 1.58.0
Program test/run-test.sh found: YES (/private/tmp/arrow-release-verify/apache-arrow-0.11.0/c_glib/test/run-test.sh)
@kszucs
kszucs / gist:52291265bc0f35a2e033fb3970795d9d
Created October 5, 2018 07:26
arrow-verify-c_glib-autotools
Making all in arrow-glib
/Library/Developer/CommandLineTools/usr/bin/make all-am
CXX libarrow_glib_la-array-builder.lo
CXX libarrow_glib_la-basic-array.lo
CXX libarrow_glib_la-chunked-array.lo
CXX libarrow_glib_la-column.lo
CXX libarrow_glib_la-composite-array.lo
CXX libarrow_glib_la-record-batch.lo
CXX libarrow_glib_la-table.lo
CXX libarrow_glib_la-table-builder.lo