Skip to content

Instantly share code, notes, and snippets.

@Bek
Bek / README.md
Last active April 24, 2026 10:24
Nightlights workshop — city grid tiles

Central Asia nightlights workshop — 9-tile metro grid for 5 cities, baseline (Apr 2024 - Apr 2025) vs recent (Apr 2025 - Apr 2026).

@Bek
Bek / central_asia_nightlights.npz
Last active April 24, 2026 11:06
Central Asia Nightlights Workshop — notebook + data
This file has been truncated, but you can view the full file.
@Bek
Bek / CpG_Methylation_Sanity_Check.ipynb
Last active March 20, 2019 09:09
This code looks at methylation region in base pair resolution and gets ratio of signal values in C to G nucleotides in ENCODE whole genome bisulfite sequencing experiment ENCSR481JIW
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Bek
Bek / mapping_test.sh
Last active April 5, 2016 19:19
Elasticsearch not_analyzed still gets analyzed when included in _all
curl -XDELETE 'http://localhost:9200/test'
echo
curl -XPUT 'http://localhost:9200/test'
echo
echo
curl -XPUT 'http://localhost:9200/test/_mapping/message' -d '
{
"message" : {
"properties" : {
"message" : {"type" : "string", "store" : "true" },
@Bek
Bek / gist:2342056
Created April 9, 2012 07:01 — forked from shazron/gist:1725083
PhoneGap/Cordova: Open a url in the same UIWebView programmatically
function openInWebView(url)
{
var anchor = document.createElement('a');
anchor.setAttribute('href', url);
//anchor.setAttribute('target', '_self');
var dispatch = document.createEvent('HTMLEvents')
dispatch.initEvent('click', true, true);
anchor.dispatchEvent(dispatch);
Exception in SMS Gateway: incompatible character encodings: ASCII-8BIT and US-ASCII at /Users/Bek/ruby-smpp/lib/smpp/pdu/base.rb:91:in `initialize'
/Users/Bek/ruby-smpp/lib/smpp/pdu/submit_sm.rb:49:in `initialize'
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `new'
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `send_mt'
sample_gateway.rb:46:in `send_mt'
sample_gateway.rb:27:in `receive_line'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:64:in `receive_data'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
sample_gateway.rb:61:in `block in start'
Exception in SMS Gateway: incompatible character encodings: ASCII-8BIT and US-ASCII at /Users/Bek/ruby-smpp/lib/smpp/pdu/base.rb:91:in `initialize'
/Users/Bek/ruby-smpp/lib/smpp/pdu/submit_sm.rb:49:in `initialize'
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `new'
/Users/Bek/ruby-smpp/lib/smpp/transceiver.rb:21:in `send_mt'
sample_gateway.rb:46:in `send_mt'
sample_gateway.rb:27:in `receive_line'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:64:in `receive_data'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/Users/Bek/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
sample_gateway.rb:61:in `block in start'