This file contains hidden or 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
| import csv | |
| import json | |
| import argparse | |
| def convert_csv_to_jsonl(input_csv, output_jsonl): | |
| try: | |
| # Open the CSV file | |
| with open(input_csv, 'r', encoding='utf-8') as csv_file: | |
| # Read CSV file | |
| csv_reader = csv.DictReader(csv_file) |
This file contains hidden or 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
| import com.thelifeco.wannawell.data.netwok.MutableTokenProvider | |
| import com.thelifeco.wannawell.utils.AppUtils | |
| import com.thelifeco.wannawell.utils.extension.EMPTY | |
| @JvmInline | |
| value class Key(val value: String) | |
| interface MemorySource: MutableTokenProvider { | |
| fun <T> save(key: Key, value: T) |
This file contains hidden or 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
| import java.text.ParseException | |
| import java.text.SimpleDateFormat | |
| import java.util.Date | |
| import java.util.Locale | |
| object IsoDateFormatter { | |
| const val FULL_DAY_NAME = "EEEE" | |
| const val ABBR_DAY_NAME = "EEE" | |
| const val DAY_OF_THE_MONTH = "dd" |
This file contains hidden or 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
| /** | |
| * Data class to hold margin states | |
| */ | |
| data class MarginState( | |
| val left: Int, | |
| val top: Int, | |
| val right: Int, | |
| val bottom: Int | |
| ) |
This file contains hidden or 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
| import java.io.File | |
| import java.io.FileInputStream | |
| import java.io.FileOutputStream | |
| import java.util.zip.ZipEntry | |
| import java.util.zip.ZipFile | |
| import java.util.zip.ZipInputStream | |
| import java.util.zip.ZipOutputStream | |
| object ZipFacade { |
This file contains hidden or 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
| import android.content.Context | |
| import android.text.Layout | |
| import android.text.method.LinkMovementMethod | |
| import android.util.AttributeSet | |
| import android.util.Log | |
| import androidx.appcompat.widget.AppCompatTextView | |
| import com.thelifeco.wannawell.R | |
| import com.thelifeco.wannawell.utils.extension.spannableString | |
| class ExpandableTextView @JvmOverloads constructor( |
This file contains hidden or 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
| import android.content.Context | |
| import androidx.recyclerview.widget.LinearLayoutManager | |
| class CenterScrollLayoutManager(val context: Context, orientation: Int, reverseLayout: Boolean) : | |
| LinearLayoutManager(context, orientation, reverseLayout) { | |
| constructor(context: Context) : this(context, HORIZONTAL, false) | |
| override fun scrollToPosition(position: Int) { | |
| val offset = calculateOffsetForPosition(position) |
This file contains hidden or 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
| import android.graphics.Paint | |
| import android.graphics.drawable.Drawable | |
| import android.graphics.drawable.LayerDrawable | |
| import android.graphics.drawable.ShapeDrawable | |
| import android.graphics.drawable.shapes.RectShape | |
| import android.graphics.drawable.shapes.RoundRectShape | |
| import android.graphics.drawable.shapes.Shape | |
| class ShapeDrawableBuilder { | |
| private var shape: Shape? = null |
This file contains hidden or 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
| interface Logger { | |
| fun d(tag: String, msg: String) | |
| fun e(tag: String, msg: String, throwable: Throwable? = null) | |
| fun i(tag: String, msg: String) | |
| fun w(tag: String, msg: String) | |
| } |
This file contains hidden or 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
| data class Given<T>(val state: T) | |
| data class When<T>(val scenario: T) | |
| data class Then<T>(val result: T) | |
| fun <T> given(block: () -> T) = Given<T>(block()) | |
| infix fun <T, R> Given<T>.check(block: (T) -> R): When<R> { | |
| val state = this.state |
NewerOlder