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
import os | |
import glob | |
import pandas as pd | |
def combine_csv(): | |
"""Combine all files in the list and export to CSV""" | |
os.chdir("<directory_where_all_csvs_are>") | |
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
import android.app.Application | |
import androidx.work.Constraints | |
import androidx.work.ExistingPeriodicWorkPolicy | |
import androidx.work.PeriodicWorkRequestBuilder | |
import androidx.work.WorkManager | |
import java.util.concurrent.TimeUnit | |
class App: Application(){ | |
override fun onCreate() { |
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
/** | |
* An 8dp grid system. Smaller components can align to a 2dp 'sub' grid. | |
*/ | |
object Dimens { | |
val grid_0_25 = 2.dp | |
val grid_0_5 = 4.dp | |
val grid_1 = 8.dp | |
val grid_1_5 = 12.dp | |
val grid_2 = 16.dp | |
val grid_2_5 = 20.dp |
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
// To simplfy the example, we will use the defaults provided in the Material Theme | |
private val LightThemeColors = lightColors() | |
private val DarkThemeColors = darkColors() | |
@Composable | |
fun ProvideAppColors( | |
colors: Colors, | |
content: @Composable () -> Unit | |
) { |
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
@Composable | |
fun AppProgressBar() { | |
CircularProgressIndicator(color = Theme.colors.onBackground) | |
} |
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
class Dimensions( | |
val grid_0_25: Dp, | |
val grid_0_5: Dp, | |
val grid_1: Dp, | |
val grid_1_5: Dp, | |
val grid_2: Dp, | |
val grid_2_5: Dp, | |
val grid_3: Dp, | |
val grid_3_5: Dp, | |
val grid_4: Dp, |
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
@Composable | |
fun ProvideDimens( | |
dimensions: Dimensions, | |
content: @Composable () -> Unit | |
) { | |
val dimensionSet = remember { dimensions } | |
CompositionLocalProvider(LocalAppDimens provides dimensionSet, content = content) | |
} | |
private val LocalAppDimens = staticCompositionLocalOf { |
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
Row( | |
modifier = Modifier.padding( | |
horizontal = AppTheme.dimens.grid_2, | |
vertical = AppTheme.dimens.grid_3 | |
), | |
) { | |
... | |
} |
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
@Deprecated( | |
message = "Use AppTheme.dimens instead to support smaller screen sizes as well", | |
replaceWith = ReplaceWith(expression = "AppTheme.dimens", imports = ["_.ui.theme.AppTheme"]) | |
) | |
object Dimens { | |
... | |
} | |
class Dimensions( | |
... |
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
data class Feature( | |
@DrawableRes val iconResource: Int, | |
val contentDescription: String, | |
) |
OlderNewer