Posts

python - Variable Explorer in Jupyter Notebook -

Image
is there variable explorer in jupyter (ipython) in spyder? uncomfortable having print list of variables time each time run through test code. has feature been implemented yet? if so, how enable it? update scroll down section labeled update less convoluted method. old answer here notebook on how make own variable inspector . think written when jupyter notebook called ipython notebook works on latest version. i'll post code below in case link breaks. import ipywidgets widgets # loads widget framework. ipython.core.magics.namespace import namespacemagics # used query namespace. # example, hide these names, avoid polluting namespace further get_ipython().user_ns_hidden['widgets'] = widgets get_ipython().user_ns_hidden['namespacemagics'] = namespacemagics class variableinspectorwindow(object): instance = none def __init__(self, ipython): """public constructor.""" if variableinspectorwindow.instance not...

issues in buiding Slate with Docker -

i have tried build slate using docker, modified changes not affected when compile source. in source path have below files. dockerfile from debian:latest maintainer fed volume /usr/src/app/source expose 4567 run apt-get update && \ apt-get install -y ruby git ruby-dev make gcc zlib1g-dev nodejs && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* run gem install bundler run git clone https://github.com/tripit/slate.git /slate workdir "/slate" run bundle install cmd ["bundle", "exec", "middleman", "server", "--force-polling"] docker-compose.yml slate: build: . ports: - 4567:4567 volumes: - ./source:/slate/source - ./build:/slate/build makefile .phony: build build: docker-compose build up: docker-compose compile: docker-compose run slate bundle exec middleman build --clean when tried make compile output shows docker-compose run slate bundle exec middleman build -...

android - Can't run monkeyrunner recorder -

Image
i'm trying use monkeyrunner project. understood there 2 basic scripts that: monkey_recorder.py: https://android.googlesource.com/platform/sdk/+/ics-mr0/monkeyrunner/scripts/monkey_recorder.py monkey_playback.py: https://android.googlesource.com/platform/sdk/+/ics-mr0/monkeyrunner/scripts/monkey_playback.py so, monkey_recorder.py recording actions , , monkey_playback.py reproducing these actions . i found here , can run recorder line: ./monkeyrunner monkey_recorder.py i tried execute command directory: /users/user/programs/android-sdk-macosx/tools and got error: imac-developer-2:tools user$ ./monkeyrunner monkey_recorder.py can't open specified script file usage: monkeyrunner [options] script_file -s monkeyserver ip address. -p monkeyserver tcp port. -v monkeyserver logging level (all, finest, finer, fine, config, info, warning, severe, off) so, expected, window opened: os: os x yosemite, v10.10.5 please, me solve...

linux - Gnu sort: stray characters in field specification -

sort doesn't seem key specification. why? ~/tmp $ sort --version sort (gnu coreutils) 8.25 packaged cygwin (8.25-1) ~/tmp $ echo 'a;b;c;d;e;f;g'|sort --field-separator=';' --key=1,5,2 sort: stray character in field spec: invalid field specification '1,5,2' from man page: -k, --key=keydef : sort via key; keydef gives location , type keydef f[.c][opts][,f[.c][opts]] start , stop position, f field number , c character position in field; both origin 1, , stop position defaults line's end. since .c , opts part in keydef optional, key specification f,f,f (i.e. field numbers) should correct. did wrong? btw, environment cygwin, running z-shell. the 2 fields in -k arg start , end fields. can specify -k number of times, sort on multiple keys. so, -k 1,1 -k 2,2 -k 3,3 sort first on field 1, field 2 field 3.

hadoop - How to subtract months from date in HIVE -

i looking method helps me subtract months date in hive i have date 2015-02-01 . need subtract 2 months date result should 2014-12-01 . can guys me out here? select add_months('2015-02-01',-2); if need go first day of resulting month: select add_months(trunc('2015-02-01','mm'),-2);

spark process tracking with 'groupByKey' -

i log spark process. assume code 'groupbykey' spend time lot, no way check out. way check how 'groupbykey' function flows in app? if want monitor flow best solution spark web ui : https://jaceklaskowski.gitbooks.io/mastering-apache-spark/content/spark-webui.html

aws lambda - DynamoDB indexing on payload -

this question has answer here: indexing on nested field 1 answer my dynambodb row item looks this: (it given me) { "id":"123456", "date_time":"01062016 143212", "payload":{ "type":"a", "value":"temp value", } } i added indexes on id + date_time. how can add index on payload.type ? thanks dynamodb doesn't support indices on nested fields inside map . see official documentation improving data access secondary indexes in dynamodb . the key schema index. every attribute in index key schema must top-level attribute of type string, number, or binary. other data types, including documents , sets, not allowed.