Skip to content

Instantly share code, notes, and snippets.

View tdsmith's full-sized avatar

Tim D. Smith tdsmith

View GitHub Profile
bq show --schema $1 | \
jq -r '.[] | recurse(.fields[]? + {parent: ((.parent? // []) + [.name])}) | .parent + [.name] | join(".")'
from hashlib import sha256
from json import dumps
from math import floor
from uuid import uuid4
def evalute(input, bucket_start, bucket_width, n_buckets):
value = sha256(dumps(input).replace(" ", "").encode("utf-8")).hexdigest()[:12]
wrapped_start = bucket_start % n_buckets
end = wrapped_start + bucket_width
CREATE TEMP FUNCTION json2array(json STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS """
return Object.keys(JSON.parse(json || "{}")).map(x => x.replace("CSSProperty", ""));
""";
WITH sample AS (
SELECT json2array(JSON_EXTRACT(payload, "$._blinkFeatureFirstUsed.CSSFeatures")) AS css
FROM httparchive.pages.2019_11_01_desktop
)
tim@darkside ~/Documents/research/projects/Biactivation/tds-004-14-2 eve pilot $ pip3 install -U --force-reinstall pandas
Collecting pandas
Using cached pandas-0.16.1.tar.gz
Collecting python-dateutil>=2 (from pandas)
Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas)
Using cached pytz-2015.4-py2.py3-none-any.whl
Collecting numpy>=1.7.0 (from pandas)
Using cached numpy-1.9.2.tar.gz
Collecting six>=1.5 (from python-dateutil>=2->pandas)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
modified from https://github.com/boostorg/build/commit/b1c031d
diff --git a/src/tools/python.jam b/src/tools/python.jam
index 1a41a1e..90377ea 100644
--- a/tools/build/src/tools/python.jam
+++ b/tools/build/src/tools/python.jam
@@ -962,16 +962,18 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? :
# symbols. If we linked to libpython, we would get duplicate symbols. So
# declare two targets -- one for building extensions and another for
# embedding.
- #
hi
Copyright (c) 2015 Tim D. Smith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
darkside:local tim$ $(gcc-4.9 -print-prog-name=cc1plus) -v
ignoring nonexistent directory "/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../../../../../x86_64-apple-darwin14.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../../../../../include/c++/4.9.2
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../../../../../include/c++/4.9.2/x86_64-apple-darwin14.0.0
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/../../../../../../include/c++/4.9.2/backward
/usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin14.0.0/4.9.2/include
/usr/local/include
/usr/local/Cellar/gcc/4.9.2_1/include
diff --git a/modules/python/common.cmake b/modules/python/common.cmake
index b09b721..5743980 100644
--- a/modules/python/common.cmake
+++ b/modules/python/common.cmake
@@ -50,7 +50,11 @@ ocv_add_library(${the_module} SHARED ${PYTHON_SOURCE_DIR}/src2/cv2.cpp ${cv2_gen
if(PYTHON_DEBUG_LIBRARIES AND NOT PYTHON_LIBRARIES MATCHES "optimized.*debug")
ocv_target_link_libraries(${the_module} debug ${PYTHON_DEBUG_LIBRARIES} optimized ${PYTHON_LIBRARIES})
else()
- ocv_target_link_libraries(${the_module} ${PYTHON_LIBRARIES})
+ if(APPLE)