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 androidx.compose.runtime.Composable | |
import androidx.compose.runtime.DisposableEffect | |
import androidx.compose.runtime.remember | |
import androidx.compose.runtime.snapshots.MutableSnapshot | |
import androidx.compose.runtime.snapshots.Snapshot | |
import java.util.WeakHashMap | |
@PublishedApi | |
internal class DebugStateObservation(private val id: String) { | |
private val map = WeakHashMap<Any, MutableList<Exception>>() |
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 { getGamesAmerica, GameUS, EshopError } from 'nintendo-switch-eshop'; | |
import * as fs from 'fs'; | |
import { HTMLElement, parse } from "node-html-parser"; | |
import fetch from 'node-fetch'; | |
const dest = './nintendo-games.json'; | |
const allowedLettersInTitle = /[^a-zA-Z0-9 ]+/g; | |
const PAGE_SIZE = 25 |
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 pandas as pd | |
from sklearn.cluster import KMeans | |
# Read the video games dataset into a DataFrame | |
data = pd.read_json('../data/nintendo-games.json') | |
features = data[['meta_score', 'esrb_rating', 'genres']] | |
# convert categorical features to numerical using one-hot encoding | |
features = pd.get_dummies(features, columns=['meta_score', 'esrb_rating', 'genres']) |
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 main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"regexp" | |
"os/exec" |
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
$('li[data-issue-status-name="wontfix"]').each((i, e) => { e.click() }) | |
$('input[name="commit"]').each((i, e) => { e.click() }) |
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
invoke-static {p0}, Landroidx/preference/e;->a(Landroid/content/Context;)Landroid/content/SharedPreferences; | |
move-result-object v0 | |
const-string v1, "preferencePremium" | |
const/4 v2, 0x1 | |
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; | |
move-result-object v0 | |
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor; | |
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V |
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
+--- androidx.databinding:viewbinding:4.1.2 | |
| \--- androidx.annotation:annotation:1.0.0 -> 1.2.0 | |
+--- org.jetbrains.kotlin:kotlin-stdlib:1.4.32 | |
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.32 | |
| \--- org.jetbrains:annotations:13.0 | |
+--- com.squareup.leakcanary:leakcanary-android:2.7 | |
| +--- com.squareup.leakcanary:leakcanary-android-core:2.7 | |
| | +--- com.squareup.leakcanary:shark-android:2.7 | |
| | | \--- com.squareup.leakcanary:shark:2.7 | |
| | | \--- com.squareup.leakcanary:shark-graph:2.7 |
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
// add classpath dependency before | |
// classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion" | |
def configFile = files("$rootDir/config/detekt/detekt.yml") | |
def baselineFile = file("$rootDir/config/detekt/baseline.xml") | |
def analysisDir = file(projectDir) | |
def kotlinFiles = "**/*.kt" | |
def javaFiles = "**/*.java" | |
def resourceFiles = "**/resources/**" |
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
@Test | |
fun labelsAreDisplyed_SameFragment() { | |
// some other assertions | |
onView(withId(R.id.tvAccountNumberLabel)) | |
.perform(nestedScrollTo()) | |
.check(matches(isDisplayed())) | |
// here as well | |
} |
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 nestedScrollTo(): ViewAction { | |
return object : ViewAction { | |
override fun getConstraints(): Matcher<View> { | |
return CoreMatchers.allOf(ViewMatchers.withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE), | |
ViewMatchers.isDescendantOfA(CoreMatchers.anyOf( | |
ViewMatchers.isAssignableFrom(ScrollView::class.java), | |
ViewMatchers.isAssignableFrom(HorizontalScrollView::class.java), | |
ViewMatchers.isAssignableFrom(NestedScrollView::class.java))) | |
) | |
} |
NewerOlder