This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
from urllib.parse import quote # Py 3 | |
except ImportError: | |
from urllib2 import quote # Py 2 | |
import os | |
import sys | |
import datetime | |
fullname = None | |
f = None | |
for arg in sys.argv: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'markdown.tpl' %} | |
{%- block header -%} | |
--- | |
layout: post | |
title: "{{resources['metadata']['name']}}" | |
categories: wiki | |
tags: | |
- python | |
- notebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GH_PAGES_DIR = "lekaha.github.io" | |
desc "Build Jekyll site and copy files" | |
task :build do | |
Dir.foreach('notebooks') do |item| | |
next if item == '.' or item == '..' or Dir.exists?(item) or item[/^(.*\.(md|ipynb_checkpoints|py|tpl)$)?$/i] | |
Dir.chdir "notebooks/" | |
sh "ipython nbconvert --config jekyll-post #{item}" | |
Dir.chdir "../" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
repositories { | |
google() | |
jcenter() | |
maven { url "https://jitpack.io" } | |
} | |
} | |
ext { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.your.package | |
import android.app.Dialog | |
import android.os.Bundle | |
import com.your.package.R | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* BottomSheetDialog fragment that uses a custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DslMarker | |
annotation class ReceiptDsl | |
data class Amount(val total: Int, val tax: Float) | |
data class Receipt(val title: String, val date: String, val staffName: String, val amount: Amount) | |
@ReceiptDsl | |
class AmountBuilder { | |
var total: Int = 0 | |
var tax: Float = .0f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun println(λ: () -> Any) = kotlin.io.println(λ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GlideModule | |
class MyAppGlideModule: AppGlideModule() { | |
override fun applyOptions(context: Context, builder: GlideBuilder) { | |
super.applyOptions(context, builder) | |
builder.setDefaultRequestOptions( | |
RequestOptions() | |
.format(DecodeFormat.PREFER_ARGB_8888) | |
.diskCacheStrategy(DiskCacheStrategy.DATA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mobile.lekeha.android.bluetoothadapter; | |
import android.Manifest; | |
import android.bluetooth.BluetoothAdapter; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothSocket; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; |
OlderNewer