Skip to content

Instantly share code, notes, and snippets.

Avatar

David Shimon david206

View GitHub Profile
@david206
david206 / tracks.txt
Created Nov 2, 2017
Medium Engineering growth: tracks.
View tracks.txt
Mobile
Works effectively within established iOS or Android architectures, following current best practices
signals:
Delivers features requiring simple local modifications
Adds simple actions that call server endpoints
Reuses existing components appropriately
examples:
Added existing button to a different iOS surface
Add follow button for publications on Android
Fetched and displayed a new stream, using existing stream item styles
@david206
david206 / failed_avg_bucket_aggregation.sh
Created Sep 4, 2017
Failed avg_bucket aggregation when buckets_path include nested bucket with same name as other bucket. it works with terms aggregation instead of date_histogram, and it works when renaming one of the identically named buckets
View failed_avg_bucket_aggregation.sh
curl -XDELETE 'localhost:9200/docs?pretty'
curl -XPUT 'localhost:9200/docs?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1
}
@david206
david206 / buckets_with_same_name.sh
Created Sep 4, 2017
Failed avg_bucket aggregation when buckets_path include nested bucket with same name as other bucket.
View buckets_with_same_name.sh
curl -XDELETE 'localhost:9200/docs?pretty'
curl -XPUT 'localhost:9200/docs?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 1
}
@david206
david206 / books.py
Created May 18, 2017
translate the bible books names from English to Hebrew
View books.py
{
'Genesis': 'בראשית',
'Exodus': 'שמות',
'Leviticus': 'ויקרא',
'Numbers': 'במדבר',
'Deuteronomy': 'דברים',
'Joshua': 'יהושע',
'Judges': 'שופטים',
'I Samuel': 'שמואל א',
'II Samuel': 'שמואל ב',
@david206
david206 / fetch929.py
Last active Feb 29, 2016
929 project (www.929.org.il) has great soundcloud page with daily updates. But - it doesn't have rss feed, or Podcast option. In my daily commute I don't have internet connection. So with the following script + Cron job that runs it daily + foldersync to my Android phone - I automaticly download the new sound files and copy them to my phone.
View fetch929.py
#!/home/shimon/anaconda2/bin/python
# -*- coding: utf-8 -*-
from lxml import html
import requests
import youtube_dl
url = 'https://soundcloud.com/929-bible/sets/'
base_url = 'https://soundcloud.com'
You can’t perform that action at this time.