repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -45,12 +48,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { - MainScreen(navController = navController) + MyScaffold(navControl...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -45,12 +48,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { - MainScreen(navController = navController) + MyScaffold(navControl...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -62,12 +66,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar, searchQue...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -62,12 +66,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar, searchQue...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -79,12 +84,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar, searchQue...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -79,12 +84,13 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar, searchQue...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -96,7 +102,7 @@ class DefaultPreviews { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar, searchQuer...
Same as above
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -1,5 +1,6 @@ package com.lorenzovainigli.foodexpirationdates.view.preview +import android.annotation.SuppressLint
To be removed
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -74,6 +75,7 @@ fun PlayStoreScreenshot( } } +@SuppressLint("UnrememberedMutableState")
To be removed
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -86,11 +88,12 @@ fun PlayStoreScreenshotPreview() { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar...
Not necessary, please revert this change.
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -86,11 +88,12 @@ fun PlayStoreScreenshotPreview() { val showSnackbar = remember { mutableStateOf(false) } - MyScaffold(navController = navController, showSnackbar = showSnackbar) { + MyScaffold(navController = navController, showSnackbar = showSnackbar...
Not necessary, please revert this change.
FoodExpirationDates
github_2023
others
284
lorenzovngl
lorenzovngl
@@ -53,92 +69,127 @@ fun MainScreenMenu( ?: OperationResult(state = OperationResult.State.NOT_PERFORMED) } } - IconButton( - onClick = { isExpanded = true } - ) { - Icon( - imageVector = Icons.Default.MoreVert, - contentDescription = stringResourc...
No need to introduce commented code.
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -95,4 +102,18 @@ class MainActivity : ComponentActivity() { } } + private fun checkAndSetSecureFlag() {
```suggestion private fun checkAndSetSecureFlags() { ```
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -7,6 +7,8 @@ <string name="tomorrow">Tomorrow</string> <string name="in_n_days">In %1$d days</string> <string name="add_item">Add item</string> + <string name="enable_screen_protection">Enable Screen Protection</string> + <string name="protect_your_screen">Protect your Screen from Screenshots an...
```suggestion <string name="enable_screen_protection">Enable screen protection</string> <string name="protect_your_screen">Protect your screen from screenshots and screen recording.</string> ```
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -111,10 +121,45 @@ fun SettingsScreen( .padding(10.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { + Text( text = stringResource(R.string.behaviour), style = MaterialTheme.typography.labelLarge ) + + SettingsItem( + l...
Do you think this is necessary? I think that the switch don't need a label, like the one for dynamic colors. If you agree, please remove this `Text` item.
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -251,4 +296,16 @@ fun SettingsScreenContentPreview() { SettingsScreen() } } -} \ No newline at end of file +} + +fun setScreenProtectionEnabled(context: Context, enabled: Boolean) { + val sharedPreferences = context.getSharedPreferences("my_preferences", Context.MODE_PRIVATE) + val e...
Can you move these functions into [PreferencesRepository.kt](https://github.com/lorenzovngl/FoodExpirationDates/blob/main/app/src/main/java/com/lorenzovainigli/foodexpirationdates/model/repository/PreferencesRepository.kt) to keep consistency? Also please try to use variables like this one below to avoid string repeti...
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -24,6 +25,7 @@ import com.lorenzovainigli.foodexpirationdates.model.NotificationManager import com.lorenzovainigli.foodexpirationdates.model.repository.PreferencesRepository import com.lorenzovainigli.foodexpirationdates.ui.theme.FoodExpirationDatesTheme import com.lorenzovainigli.foodexpirationdates.view.composa...
Please remove this line as it breaks the build
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -95,4 +102,18 @@ class MainActivity : ComponentActivity() { } } + private fun checkAndSetSecureFlags() { + val sharedPreferences = getSharedPreferences("my_preferences", MODE_PRIVATE) + val isPasswordProtectionEnabled = sharedPreferences.getBoolean("screen_protection_enabled", false)...
It might be better to move also this to `PreferencesRepository.kt`
FoodExpirationDates
github_2023
others
241
lorenzovngl
lorenzovngl
@@ -111,10 +121,43 @@ fun SettingsScreen( .padding(10.dp), verticalArrangement = Arrangement.spacedBy(16.dp) ) { + Text( text = stringResource(R.string.behaviour), style = MaterialTheme.typography.labelLarge ) + + SettingsItem( + l...
Can you put this setting in a new section called `Privacy`, which is placed after `Behaviour` and before `Appearance`?
FoodExpirationDates
github_2023
others
236
lorenzovngl
lorenzovngl
@@ -6,7 +6,7 @@ val md_theme_light_primary = Color(0xFF934B00) val md_theme_light_onPrimary = Color(0xFFFFFFFF) val md_theme_light_primaryContainer = Color(0xFFFFDCC5) val md_theme_light_onPrimaryContainer = Color(0xFF301400) -val md_theme_light_secondary = Color(0xFF755945) +val md_theme_light_secondary = Color(0xF...
Has this been included in the commit by mistake?
FoodExpirationDates
github_2023
others
236
lorenzovngl
lorenzovngl
@@ -23,7 +23,7 @@ val md_theme_light_onBackground = Color(0xFF201A17) val md_theme_light_surface = Color(0xFFFFFBFF) val md_theme_light_onSurface = Color(0xFF201A17) val md_theme_light_surfaceVariant = Color(0xFFF3DFD2) -val md_theme_light_onSurfaceVariant = Color(0xFF52443B) +val md_theme_light_onSurfaceVariant = C...
Has this been included in the commit by mistake?
FoodExpirationDates
github_2023
others
236
lorenzovngl
lorenzovngl
@@ -38,7 +38,7 @@ val md_theme_dark_onPrimary = Color(0xFF4F2500) val md_theme_dark_primaryContainer = Color(0xFF703800) val md_theme_dark_onPrimaryContainer = Color(0xFFFFDCC5) val md_theme_dark_secondary = Color(0xFFE4BFA7) -val md_theme_dark_onSecondary = Color(0xFF422B1A) +val md_theme_dark_onSecondary = Color(0...
Has this been included in the commit by mistake?
FoodExpirationDates
github_2023
others
236
lorenzovngl
lorenzovngl
@@ -63,7 +63,7 @@ private val DarkColors = darkColorScheme( surfaceVariant = md_theme_dark_surfaceVariant, onSurfaceVariant = md_theme_dark_onSurfaceVariant, outline = md_theme_dark_outline, - inverseOnSurface = md_theme_dark_inverseOnSurface, + inverseOnSurface = md_theme_light_inverseSurface,
Please don't modify this file. Also, this is incorrect: why assigning a light-themed color to a dark-themed variable?
FoodExpirationDates
github_2023
others
236
lorenzovngl
lorenzovngl
@@ -48,7 +49,7 @@ fun MyBottomAppBar( unselectedIcon = Icons.Outlined.Info ) ) - NavigationBar { + NavigationBar(containerColor = MaterialTheme.colorScheme.inverseOnSurface) {
It's correct to change `containerColor`, but please assign the following value: ```suggestion NavigationBar( containerColor = MaterialTheme.colorScheme.surfaceColorAtElevation(TonalElevation.level2()) ) { ```
FoodExpirationDates
github_2023
others
211
lorenzovngl
lorenzovngl
@@ -6,7 +6,7 @@ androidx-test-ext-junit = "1.2.1" compose-bom = "2024.08.00" barcode-scanning = "17.3.0" camera-core = "1.3.4" -camera-mlkit-vision = "1.4.0-rc01" +camera-mlkit-vision = "1.5.0-alpha01"
```suggestion camera-mlkit-vision = "1.4.0" ```
FoodExpirationDates
github_2023
others
150
lorenzovngl
lorenzovngl
@@ -1,64 +1,104 @@ -<?xml version="1.0" encoding="utf-8"?> <resources> - <string name="app_name">食品の賞味期限</string> - <string name="app_name_short">@string/app_name</string> + <string name="app_name">Food Expiration Dates</string> + <string name="app_name_short">Food Expirations</string>
Is it good not to translate the name of the app? The app also has this name so that people can find it on Google Play: if an English-speaking person wants to find an app for keeping track of expiration dates, he/she will probably type in "expirations for food," "expiration tracker," or something similar. What would a...
FoodExpirationDates
github_2023
others
145
lorenzovngl
lorenzovngl
@@ -0,0 +1,104 @@ +<resources> + <string name="app_name">Food Expiration Dates</string> + <string name="app_name_short">Food Expirations</string> + <string name="n_days_ago">%1$d gün önce</string> + <string name="yesterday">Dün</string> + <string name="today">Bugün</string> + <string name="tomorrow">Y...
Can you escape the character `'` in `GitHub'da` as follows? Otherwise the build fails. ```suggestion <string name="app_description">%1$s, Lorenzo Vainigli ve diğer katkıda bulunanlar tarafından geliştirilen açık kaynaklı bir projedir.\nBu uygulamanın kodu MIT lisansı altında yayınlanmıştır ve GitHub\'da mevcuttu...
FoodExpirationDates
github_2023
others
71
lorenzovngl
lorenzovngl
@@ -9,7 +9,7 @@ plugins { alias(libs.plugins.com.google.devtools.ksp) } -var buildFoss = false +var buildFoss = true
This must not be changed
FoodExpirationDates
github_2023
others
84
lorenzovngl
lorenzovngl
@@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:height="118dp" + android:width="118dp"
It's better to set it to 100dp x 100dp. I found that on Pixel 3a API 33 the current sizes (118dp) cause a crop. The guidelines suggests to use a vector icon, but a this time I don't have it.
FoodExpirationDates
github_2023
others
84
lorenzovngl
lorenzovngl
@@ -17,9 +21,15 @@ class ExpirationDatesViewModel @Inject constructor( private var expirationDates : Flow<List<ExpirationDate>> = flowOf(emptyList()) private var expirationDate : ExpirationDate? = null + private val _isSplashScreenLoading: MutableState<Boolean> = mutableStateOf(value = true) + val isS...
Good. This codes added an additional delay to the call `repository.getAll()`, so I think it's better to use the delay to execute the call to the database. I propose this code: ```kotlin _isSplashScreenLoading.value = true val deferred = async { expirationDates = repository.getAll() } delay(1000) deferred.a...
FoodExpirationDates
github_2023
others
80
lorenzovngl
lorenzovngl
@@ -0,0 +1,72 @@ +<resources> + <string name="app_name">Food Expiration Dates</string> + <string name="app_name_short">Food Expirations</string>
The title of this app is translatable. If you think it's better to translate it in Indonesian, please do it.
FoodExpirationDates
github_2023
others
80
lorenzovngl
lorenzovngl
@@ -0,0 +1,72 @@ +<resources> + <string name="app_name">Food Expiration Dates</string> + <string name="app_name_short">Food Expirations</string> + <string name="n_days_ago">%1$d hari lalu</string> + <string name="yesterday">Kemarin</string> + <string name="today">Hari ini</string> + <string name="tomo...
Could you translate also these strings?
FoodExpirationDates
github_2023
others
78
lorenzovngl
lorenzovngl
@@ -0,0 +1,70 @@ +<resources> + <string name="app_name">Dates d\'expiration des aliments</string> + <string name="app_name_short">Exp. des aliments</string> + <string name="n_days_ago">Il y a %1$d jours</string> + <string name="yesterday">Hier</string> + <string name="today">Aujourd/'hui</string>
There is a typo here: `/` instead of `\`. Don't create a new pull request, just add another commit to the branch linked to this pull request.
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -7,6 +7,7 @@ plugins { alias(libs.plugins.com.google.dagger.hilt.android) alias(libs.plugins.app.cash.paparazzi) alias(libs.plugins.com.google.devtools.ksp) + id("com.google.gms.google-services")
Why this line? Google Services were already included in the project
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -134,7 +135,8 @@ dependencies { implementation(libs.androidx.lifecycle.runtime.compose) implementation(libs.androidx.lifecycle.viewmodel.compose) - implementation(libs.accompanist.systemuicontroller) + //implementation(libs.accompanist.systemuicontroller)
Don't worry, no need to keep old lines
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -134,7 +135,8 @@ dependencies { implementation(libs.androidx.lifecycle.runtime.compose) implementation(libs.androidx.lifecycle.viewmodel.compose) - implementation(libs.accompanist.systemuicontroller) + //implementation(libs.accompanist.systemuicontroller) + implementation("androidx.activity:acti...
Same here. Activity-compose was already included https://github.com/lorenzovngl/FoodExpirationDates/blob/d2f1b336ab39f4f6f6ea2343d2ce5371fde964e2/app/build.gradle.kts#L101
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -144,6 +146,8 @@ dependencies { "fullImplementation"(libs.firebase.analytics) "fullImplementation"(libs.firebase.crashlytics) + implementation(platform("com.google.firebase:firebase-bom:32.3.1")) + implementation("com.google.firebase:firebase-analytics-ktx")
Firebase was already included (just few lines above)
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -18,5 +18,6 @@ plugins { alias(libs.plugins.com.google.dagger.hilt.android) apply false alias(libs.plugins.app.cash.paparazzi) apply false alias(libs.plugins.com.google.devtools.ksp) apply false + id("com.google.gms.google-services") version "4.4.0" apply false
No need to add this line
FoodExpirationDates
github_2023
others
73
lorenzovngl
lorenzovngl
@@ -89,14 +92,14 @@ fun FoodExpirationDatesTheme( else -> LightColors } - val systemUiController = rememberSystemUiController() + //val systemUiController = rememberSystemUiController() //val useDarkIcons = isSystemInDarkTheme() - SideEffect { - systemUiController.setSystemBarsCol...
You can directly remove these lines instead of commenting it. If I will need to retrieve them in the future, I can look on git history.
FoodExpirationDates
github_2023
others
69
lorenzovngl
lorenzovngl
@@ -229,10 +230,47 @@ fun InfoActivityLayout( } } +@Composable +fun ContributorsList( + modifier: Modifier = Modifier +) { + val contributorsText = remember { + contributors.joinToString(separator = "\n") { + "${it.name} (@${it.username})".asListItem() + } + } + Column(modif...
Could you add `.padding(top = 16.dp, bottom = 8.dp)` here? The top padding will make it consistent with the other headers and the bottom padding will better separate the sentence from the following list.
FoodExpirationDates
github_2023
others
68
lorenzovngl
lorenzovngl
@@ -44,6 +44,14 @@ <string name="dark">Dunkel</string> <string name="x_deleted">%1$s gelöscht</string> <string name="undo">Abbrechen</string> + <string name ="normal">Normal</string>
Please remove this additional space here to align this line with the others.
FoodExpirationDates
github_2023
others
68
lorenzovngl
lorenzovngl
@@ -44,6 +44,14 @@ <string name="dark">Dunkel</string> <string name="x_deleted">%1$s gelöscht</string> <string name="undo">Abbrechen</string> + <string name ="normal">Normal</string> + <string name ="bold">Fett</string> + <string name ="extra_bold">Extrafett</string> + <string name ="ui_settings...
Please also remove this empty line, leaving only one empty line between the two lists.
FoodExpirationDates
github_2023
others
3
lorenzovngl
lorenzovngl
@@ -0,0 +1,17 @@ +<resources> + <string name="app_name">Food Expiration Dates</string> + <string name="app_name_short">Food Expirations</string>
Could you translate also these strings? For the string `app_name`, please add the corresponding translation, and for the string `app_name_short`, if there is a short way to translate (as in English), add it, but if there's not and the translation is equal to `app_name`, consider to link the two string as follows: `...
FoodExpirationDates
github_2023
others
1
lorenzovngl
lorenzovngl
@@ -0,0 +1,3 @@ +# FOOD EXPIRATION MANAGER
Please change this title with the title of the project: _Food Expiration Dates_
FoodExpirationDates
github_2023
others
1
lorenzovngl
lorenzovngl
@@ -1,3 +1,3 @@ -# FOOD EXPIRATION MANAGER +# FOOD EXPIRATION DATES
Please pay attention to uppercase and lowercase letters
beatrun
github_2023
others
235
JonnyBro
JonnyBro
@@ -1,5 +1,44 @@ local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "") +--------------------------------------------------------------------------------------- +CreateClientConVar("Beatrun_AutoHandSwitching", "1", true, false) + +local requires_arms = { -- animations that uses arms + hang = t...
Why not in this function? It's hooked to the `Think` too. https://github.com/JonnyBro/beatrun/blob/537f1e94c91885e0d4a8f6e832a1a1e700591c48/beatrun/gamemodes/beatrun/gamemode/cl/JumpAnim.lua#L1508
beatrun
github_2023
others
235
JonnyBro
JonnyBro
@@ -1,5 +1,44 @@ local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "") +--------------------------------------------------------------------------------------- +CreateClientConVar("Beatrun_AutoHandSwitching", "1", true, false) + +local requires_arms = { -- animations that uses arms + hang = t...
Can be `local`. Also please use glualint.
beatrun
github_2023
others
235
JonnyBro
JonnyBro
@@ -1,5 +1,44 @@ local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "") +--------------------------------------------------------------------------------------- +CreateClientConVar("Beatrun_AutoHandSwitching", "1", true, false) + +local requires_arms = { -- animations that uses arms + hang = t...
Please use `not` instead of `!`.
beatrun
github_2023
others
235
JonnyBro
UnderSet
@@ -1,4 +1,11 @@ local OldAnims = CreateClientConVar("Beatrun_OldAnims", "0", true, false, "") +CreateClientConVar("Beatrun_AutoHandSwitching", "1", true, false)
ConVars can be created as a variable (?) like the line right above. Not exactly necessary, but looks nicer when referencing later. Search for `OldAnims` in this file if you're confused on how to get the value of a ConVar created that way.
beatrun
github_2023
others
235
JonnyBro
UnderSet
@@ -1504,8 +1511,37 @@ end) local animtr, animtr_result = nil, nil local oldnewang = Angle() +--auto hand switching variables +local using_hands = false +local weapon_before_hands local function JumpThink() + -- auto hand switching code + local ply = LocalPlayer() + if GetConVar("Beatrun_AutoHandSwitching"):GetI...
I think you should block weapon switching while this is active. You can do so with the [`PlayerSwitchWeapon` hook](https://wiki.facepunch.com/gmod/GM:PlayerSwitchWeapon).
beatrun
github_2023
others
235
JonnyBro
UnderSet
@@ -1504,8 +1536,43 @@ end) local animtr, animtr_result = nil, nil local oldnewang = Angle() +--auto hand switching variables +local using_hands = false +local weapon_before_hands local function JumpThink() + -- auto hand switching code + local ply = LocalPlayer() + if AutoHandSw:GetInt() == 1 and ply:Alive() th...
Why aren't you using `GetBool()` here? It'd have the same effect in this case.
beatrun
github_2023
others
215
JonnyBro
JonnyBro
@@ -0,0 +1,185 @@ +-- This file has lots of strings that needs to be localized.
I think you can remove this line
beatrun
github_2023
others
54
JonnyBro
YuRaNnNzZZ
@@ -1,74 +1,75 @@ -# Beatrun -Modified Beatrun's source code.<br><br> -There are some Lua modules, they are for Discord Rich Presence and Steam Presence to work.<br> -If you want pure Lua just don't extract them, but your Level and Map will not be shown in your Discord and Steam statuses.<br><br> -This version should w...
:trollface:
beatrun
github_2023
others
44
JonnyBro
JonnyBro
@@ -91,7 +91,7 @@ hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) if SERVER and not land then ply:EmitSound("Cloth.Roll") ply:EmitSound("Cloth.RollLand") - elseif CLIENT_IFTP() then + elseif true then
Can you try this instead of just `true` `CLIENT_IFTP() or game.SinglePlayer()`
beatrun
github_2023
others
44
JonnyBro
JonnyBro
@@ -155,7 +155,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) if SERVER and not land then ply:EmitSound("Cloth.Roll") ply:EmitSound("Cloth.RollLand") - elseif CLIENT_IFTP() then + elseif true then
Here too https://github.com/JonnyBro/beatrun/pull/44/files#r1282610398
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,38 @@ +(ns wkok.openai-clojure.azure.api + (:require [wkok.openai-clojure.azure.core :as core])) + + +(defn create-completion
Unfortunate naming by Azure, but I think we should stick as close to their spec as possible so maybe `completions-create` for the function name
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,34 @@ +(ns wkok.openai-clojure.azure.core
Please add `^:no-doc` metadata so the codox document generation skips the `core` namespace
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,38 @@ +(ns wkok.openai-clojure.azure.api + (:require [wkok.openai-clojure.azure.core :as core])) + + +(defn create-completion + "Creates a completion for the provided prompt and parameters + + Example: + ``` + + (create-completion {:model \"text-davinci-003\"
Just ensure the example works as is, i.e. has all the mandatory params at least, like the `:deployment-id` perhaps?
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,42 @@ +(ns wkok.openai-clojure.azure + (:require + [cheshire.core :as json] + [clojure.java.io :as io] + [clojure.set :as set] + [martian.clj-http :as martian-http] + [martian.core :as martian])) + +(def add-authentication-header + {:name ::add-authentication-header + :enter (fn [ctx] + ...
completion-handler might not always be first, maybe consider using `some` or `filter` instead?
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,42 @@ +(ns wkok.openai-clojure.azure + (:require + [cheshire.core :as json] + [clojure.java.io :as io] + [clojure.set :as set] + [martian.clj-http :as martian-http] + [martian.core :as martian])) + +(def add-authentication-header + {:name ::add-authentication-header + :enter (fn [ctx] + ...
maybe this should be `(-> m :handlers second)` ? better might be to use `some` or `filter` instead to find the correct handler
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,42 @@ +(ns wkok.openai-clojure.azure + (:require + [cheshire.core :as json] + [clojure.java.io :as io] + [clojure.set :as set] + [martian.clj-http :as martian-http] + [martian.core :as martian])) + +(def add-authentication-header + {:name ::add-authentication-header + :enter (fn [ctx] + ...
might need a default case when operation is not `:create-completion` otherwise exception probable
openai-clojure
github_2023
others
3
wkok
wkok
@@ -0,0 +1,42 @@ +(ns wkok.openai-clojure.azure + (:require + [cheshire.core :as json] + [clojure.java.io :as io] + [clojure.set :as set] + [martian.clj-http :as martian-http] + [martian.core :as martian])) + +(def add-authentication-header + {:name ::add-authentication-header + :enter (fn [ctx] + ...
can be changed to `(dissoc params :model)` instead?
openai-clojure
github_2023
others
3
wkok
wkok
@@ -1,55 +1,24 @@ (ns ^:no-doc wkok.openai-clojure.core (:require - [clojure.java.io :as io] - [martian.clj-http :as martian-http] [martian.core :as martian] - [martian.openapi :as openapi] - [martian.yaml :as yaml])) - -(def add-headers - {:name ::add-headers - :enter (fn [ctx] - (let [ap...
missing `implementation` ?
sigconverter.io
github_2023
others
4
magicsword-io
M3NIX
@@ -0,0 +1,27 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Backend Packages Test + +on: # yamllint disable-line rule:truthy + ...
change to main branch
sigconverter.io
github_2023
others
2
magicsword-io
M3NIX
@@ -16,16 +16,17 @@ sigma-cli = "0.7.6" pysigma = "0.9.11" pysigma-backend-carbonblack = "0.1.4" pysigma-backend-cortexxdr = "0.1.1" -pysigma-backend-elasticsearch = "1.0.5" -pysigma-backend-opensearch = "1.0.0" +pysigma-backend-elasticsearch = "1.0.6" +pysigma-backend-opensearch = "1.0.1" pysigma-backend-qradar = ...
@nasbench there is an extra equal which is breaking poetry
LOLDrivers
github_2023
others
108
magicsword-io
josehelps
@@ -8699,3 +8699,4 @@ KnownVulnerableSamples: Code Signing CA,1 Tags: - aswArPot.sys +- avgArPot.sys
@Neo23x0 I think tags for now works well, if this happens very often we can change the filename to an array as you suggested.
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,118 @@ +Id: 8a162702-b043-4108-bb6c-1488751a4a32 +Author: Will BushidoToken +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create dkrTK.sys binPath=C:\windows\temp\dkrTK.sys type=kernel && + sc.exe start dkrTK.sys + Description: "\u201CThe User...
```suggestion Description: "The User Agent tjr.exe, which is protected via a virtual machine,\ \ drops the kernel driver to the user temporary directory C:\\%User%\\AppData\\\ Local\\Temp\\Ktgn.sys. It then installs the dropped driver with the name ktgn\ \ and the start value = System (to start when t...
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,112 @@ +Id: 87752fb8-e9f6-4235-91e2-c4343677d817 +Author: Michael Haag +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create mimidrv.sys binPath=C:\windows\temp\mimidrv.sys type=kernel + && sc.exe start mimidrv.sys + Description: Malicious driv...
```suggestion Description: Mimidrv is a signed Windows Driver Model WDM kernel mode software driver meant to be used with the standard Mimikatz executable. ```
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,112 @@ +Id: 87752fb8-e9f6-4235-91e2-c4343677d817 +Author: Michael Haag +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create mimidrv.sys binPath=C:\windows\temp\mimidrv.sys type=kernel + && sc.exe start mimidrv.sys + Description: Malicious driv...
```suggestion - https://github.com/magicsword-io/LOLDrivers/issues/55#issuecomment-1537161951 - https://github.com/hfiref0x/KDU - https://posts.specterops.io/mimidrv-in-depth-4d273d19e148 - https://github.com/gentilkiwi/mimikatz ```
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,160 @@ +Id: 7ce8fb06-46eb-4f4f-90d5-5518a6561f15 +Author: Michael Haag +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create gmer64.sys binPath=C:\windows\temp\gmer64.sys type=kernel + && sc.exe start gmer64.sys + Description: Malicious driver ...
```suggestion Description: Driver used by the GMER application. Which is an application that detects and removes rootkits ```
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,160 @@ +Id: 7ce8fb06-46eb-4f4f-90d5-5518a6561f15 +Author: Michael Haag +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create gmer64.sys binPath=C:\windows\temp\gmer64.sys type=kernel + && sc.exe start gmer64.sys + Description: Malicious driver ...
```suggestion - https://github.com/magicsword-io/LOLDrivers/issues/55#issuecomment-1537161951 - http://www.gmer.net/ ```
LOLDrivers
github_2023
others
93
magicsword-io
nasbench
@@ -0,0 +1,118 @@ +Id: 8a162702-b043-4108-bb6c-1488751a4a32 +Author: Will BushidoToken +Created: '2023-05-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create dkrTK.sys binPath=C:\windows\temp\dkrTK.sys type=kernel && + sc.exe start dkrTK.sys + Description: "\u201CThe User...
```suggestion Description: "The User Agent tjr.exe, which is protected via a virtual machine,\ \ drops the kernel driver to the user temporary directory C:\\%User%\\AppData\\\ Local\\Temp\\Ktgn.sys. It then installs the dropped driver with the name ktgn\ \ and the start value = System (to start when t...
LOLDrivers
github_2023
others
81
magicsword-io
nasbench
@@ -0,0 +1,83 @@ +Id: de365e80-45cb-48fb-af6e-0a96a5ad7777 +Author: zwclose +Created: '2023-05-22' +MitreID: T1068 +Category: vulnerable driver +Verified: 'True' +Commands: + Command: sc.exe create CtiIo64.sys binPath=C:\windows\temp\CtiIo64.sys type=kernel + && sc.exe start CtiIo64.sys + Description: The driver i...
```suggestion Handle: @zwclose ```
LOLDrivers
github_2023
others
48
magicsword-io
nasbench
@@ -0,0 +1,64 @@ +Name: windbg.sys +Author: Michael Haag +Created: '2023-04-22' +MitreID: T1068 +Category: malicious +Verified: 'TRUE' +Commands: + Command: sc.exe create windbg.sys binPath=C:\windows\temp\windbg.sys type=kernel + && sc.exe start windbg.sys + Description: Kernel driver seen in a recent CopperSteal...
```suggestion MD5: b6b530dd25c5eb66499968ec82e8791e SHA1: 9c1c9032aa1e33461f35dbf79b6f2d061bfc6774 SHA256: fa9abb3e7e06f857be191a1e049dd37642ec41fb2520c105df2227fcac3de5d5 ```
LOLDrivers
github_2023
others
46
magicsword-io
nasbench
@@ -0,0 +1,35 @@ +Name: bedaisy.sys +Author: Wack0 +Created: '2023-04-22' +MitreID: T1068 +Category: vulnerable driver +Verified: 'TRUE' +Commands: + Command: sc.exe create BEDaisy.sys binPath=C:\windows\temp\BEDaisy.sys type=kernel + && sc.exe start BEDaisy.sys + Description: 'BattlEye Anti-Cheat BEDAISY.SYS PPL ...
```suggestion - Filename: 'BEDAISY.SYS' ```
LOLDrivers
github_2023
others
31
magicsword-io
nasbench
@@ -24,16 +25,82 @@ Detection: - type: IOC value: Detection method description KnownVulnerableSamples: -- Filename: FILENAME.sys - MD5: '' - SHA1: '' - SHA256: Your SHA256 hash - Signature: '' - Date: Time and Date of the file - Publisher: File publisher - Company: '' +- Filename: ADV64DRV.sys
I think the template files should have these fields empty.
smartcat
github_2023
others
35
efugier
efugier
@@ -132,6 +135,17 @@ impl ApiConfig { } } + pub(super) fn azureopenai() -> Self { + ApiConfig { + api_key_command: None, + api_key: None, + url: String::from("https://your-azure-endpoint.azure.com/openai/deployments/your-deployment-id/chat/completions?api-versi...
```suggestion timeout_seconds: None, ``` nit: by default only the local api has a timeout as service usually are either quick to anser or handle it in their own ways
smartcat
github_2023
others
24
efugier
efugier
@@ -64,6 +64,8 @@ pub struct ApiConfig { pub default_model: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub version: Option<String>, + #[serde(skip_serializing_if = "Option::is_none")] + pub timeout: Option<u16>,
**quibble:** ```suggestion /// client timeout in seconds pub timeout: Option<u16>, ``` Was unsure about renaming that to `timeout_seconds` or adding a comment.
smartcat
github_2023
others
24
efugier
efugier
@@ -94,13 +96,23 @@ impl ApiConfig { .unwrap_or_default() } + pub fn get_timeout(&self) -> Option<Duration> {
Small comment on the default behavior: I'd prefer to have the default method of the API config set it to 30s and use `None` for actual no timeout instead of zero. I find less confusing to rely on the type system when possible instead of defining arbitrary behavior :slightly_smiling_face:
smartcat
github_2023
others
24
efugier
efugier
@@ -151,7 +158,7 @@ pub(super) fn api_keys_path() -> PathBuf { pub(super) fn generate_api_keys_file() -> std::io::Result<()> { let mut api_config = HashMap::new(); - api_config.insert(Api::Ollama.to_string(), ApiConfig::openai()); + api_config.insert(Api::Ollama.to_string(), ApiConfig::ollama());
Good find!
template-typescript-monorepo
github_2023
others
12
bhouston
Jordan-Hall
@@ -4,12 +4,12 @@ "targets": { "watch": { "options": { - "commands": ["vite"] + "commands": ["bunx vite"] } }, "build": { "options": { - "commands": ["tsc", "vite build"] + "commands": ["bunx tsc", "bunx vite build"]
using bunx vite will basically run vite in node and not bun. Same with TSC here. You need force bun with --bun ` ``suggestion "commands": ["bunx --bun tsc", "bunx --bun vite build"] ``` bun also has bulit in support for typescript compling so you dont need to run TSC. Whats the reasoning for it?
template-typescript-monorepo
github_2023
others
12
bhouston
Jordan-Hall
@@ -4,12 +4,12 @@ "targets": { "watch": { "options": { - "commands": ["vite"] + "commands": ["bunx vite"]
```suggestion "commands": ["bunx --bun vite"] ```
template-typescript-monorepo
github_2023
others
12
bhouston
Jordan-Hall
@@ -4,7 +4,7 @@ "targets": { "watch": { "options": { - "commands": ["tsc --watch", "nodemon dist/server.js"] + "commands": ["bunx tsc --watch", "bunx nodemon dist/server.js"]
Read comment below i think you could change this to the following ```suggestion "commands": ["bun run --watch server.ts"] ```
template-typescript-monorepo
github_2023
others
12
bhouston
Jordan-Hall
@@ -1,13 +1,12 @@ -FROM node:21-alpine +FROM imbios/bun-node:latest-21-slim
```suggestion FROM oven/bun:1 ``` Now you are running it in actual bun (vite etc) you shouldn't need node here anymore
mbin
github_2023
others
1,487
MbinOrg
BentiGorlich
@@ -124,6 +124,9 @@ security: - { path: ^/token, roles: PUBLIC_ACCESS } - { path: ^/api/doc, roles: PUBLIC_ACCESS } - { path: ^/api/client, roles: PUBLIC_ACCESS } + - { path: ^/api/info, roles: PUBLIC_ACCESS } + - { path: ^/api/instance, roles: PUBLIC_ACCESS } + - { path:...
I think we cannot do this one (as it is used for admin purposes as well): ![grafik](https://github.com/user-attachments/assets/71dd8ca1-a97f-4d86-9785-7744edb9c148) Maybe if we restricted the method (don't know if that is possible here), but I think I would just exclude it
mbin
github_2023
php
1,454
MbinOrg
melroy89
@@ -136,7 +141,47 @@ public function render(Node $node, ChildNodeRendererInterface $childRenderer): H return new HtmlElement('div'); } + } elseif (!$isApRequest && null === $apActivity) { + if ($user = $this->userRepository->findOneBy(['apProfileId' => $...
You're calling `this->mentionManager->getUsername($name)` twice, which sounds inefficient. Try to call it once and reuse the return value?
mbin
github_2023
php
1,454
MbinOrg
melroy89
@@ -79,4 +81,40 @@ private function isRemoteCommunity(?string $domain): bool { return $domain !== $this->settingsManager->get('KBIN_DOMAIN'); } + + /** + * Removes a surrounding link from the parsing container if the link contains $handle and $domain. + * + * @param string $handle the ...
`[!magazine@domain.tld](https://domain.tld/c/magazine]` is invalid markdown. I think you mean `[!magazine@domain.tld](https://domain.tld/c/magazine)`? Should we also not check on `)` closing? To validate whether we have valid markdown.
mbin
github_2023
php
1,454
MbinOrg
melroy89
@@ -79,4 +81,40 @@ private function isRemoteCommunity(?string $domain): bool { return $domain !== $this->settingsManager->get('KBIN_DOMAIN'); } + + /** + * Removes a surrounding link from the parsing container if the link contains $handle and $domain. + * + * @param string $handle the ...
What happens when `$prev`, `$next` and/or `$nextNext` are null? I quote from the docs: "Returns the next character (or null, if none) without advancing forwards" https://github.com/thephpleague/commonmark/blob/64cba7fd2dcc04e33b1ae25dfd0b17a1f2309c52/src/Parser/Cursor.php#L187 We could skip all the code if ...
mbin
github_2023
php
1,454
MbinOrg
melroy89
@@ -0,0 +1,92 @@ +<?php + +declare(strict_types=1); + +namespace App\Tests\Unit\Utils; + +use App\Markdown\MarkdownConverter; +use App\Markdown\RenderTarget; +use App\Tests\WebTestCase; + +class MarkdownTest extends WebTestCase
Nice 👍🏽
mbin
github_2023
others
1,460
MbinOrg
melroy89
@@ -265,16 +265,19 @@ realpath_cache_size = 4096K realpath_cache_ttl = 600 ``` -Optionally also enable OPCache for improved performances with PHP (recommended for both fpm and cli ini files):
maybe not use parentheses `()` after existing parentheses ;). A new line or note should make more sense. Or even as a comment in the ini file `;`
mbin
github_2023
others
1,460
MbinOrg
melroy89
@@ -270,16 +270,23 @@ Optionally also enable OPCache for improved performances with PHP (recommended f ```ini opcache.enable = 1 opcache.enable_cli = 1 +; replace `/var/www/mbin` with `/var/www/kbin` if needed +opcache.preload = /var/www/mbin/config/preload.php +opcache.preload_user = www-data ; Memory consumption ...
```suggestion > [!CAUTION] > Be aware that activating `opcache.preload` can lead to errors if you run multiple sites. ```
mbin
github_2023
others
1,464
MbinOrg
BentiGorlich
@@ -962,4 +962,4 @@ by: by front_default_sort: Frontpage default sort comment_default_sort: Comment default sort open_signup_request: Open signup request -image_lightbox_in_list: Clicking image thumbnails in lists opens image instead of topic +image_lightbox_in_list: Thumbnail click opens image instead of thread
```suggestion image_lightbox_in_list: Thumbnail click opens lightbox ```
mbin
github_2023
others
1,297
MbinOrg
melroy89
@@ -42,11 +42,24 @@ </button> </div> </div> - </div> {% for notification in notifications %} - <div class="{{ html_classes('section section--small notification', {'opacity-50': notification.status is not same as 'new' }) }}"> + <div class="{{ html_classes...
did you also tested on if the variable is not-set / null or empty?? And if these checks are not causing any 503 errors? (eg. when you are not an admin or something like that)
mbin
github_2023
others
1,440
MbinOrg
melroy89
@@ -1,21 +1,7 @@ -FROM php:8.3 +FROM ubuntu:latest as base
Maybe add a small remark that `latest` is actually LTS. ```suggestion # Using the latest tag actually means LTS FROM ubuntu:latest as base ``` according to https://hub.docker.com/_/ubuntu
mbin
github_2023
php
1,437
MbinOrg
BentiGorlich
@@ -31,6 +33,7 @@ public function requests(#[MapQueryParameter] ?int $page = 1, #[MapQueryParamete if ($signupRequest = $this->repository->findSignupRequest($username)) { $requests[] = $signupRequest; } + $this->notificationRepository->markUserSignupNotificationsAsR...
I would put that in the `if` just above this code
mbin
github_2023
others
1,138
MbinOrg
BentiGorlich
@@ -15,7 +15,7 @@ {% elseif entry.cross %} {{ component('entry_cross', {entry: entry}) }} {% else %} - <article{{ attributes.defaults({ + <thread{{ attributes.defaults({
I don't think that `thread` is a valid html5 element, `article` is: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article
mbin
github_2023
others
1,138
MbinOrg
BentiGorlich
@@ -1,7 +1,7 @@ -# Create an article entry in a magazine -api_magazine_entry_create_article: - controller: App\Controller\Api\Entry\MagazineEntryCreateApi::article - path: /api/magazine/{magazine_id}/article +# Create a thread entry in a magazine +api_magazine_entry_create_athread: + controller: App\Controller\Api\E...
changing an API path should never be done... You could mark the old path as deprecated and add a new API route at this new path and reference the new one. If you did this change suddenly on your server running latest main, an app (e.g. Interstellar) would not be able to create a thread anymore
mbin
github_2023
others
1,138
MbinOrg
BentiGorlich
@@ -1,7 +1,7 @@ -# Create an article entry in a magazine -api_magazine_entry_create_article: - controller: App\Controller\Api\Entry\MagazineEntryCreateApi::article - path: /api/magazine/{magazine_id}/article +# Create a thread entry in a magazine +api_magazine_entry_create_athread:
typo
mbin
github_2023
others
1,416
MbinOrg
jwr1
@@ -1,18 +1,23 @@ -# Mbin +<p align="center"> + <img src="docs/images/mbin.png" alt="Mbin logo" width="400"> +</p> +<p align="center"> + <a href="https://github.com/MbinOrg/mbin/actions/workflows/action.yaml?query=branch%3Amain"><img src="https://github.com/MbinOrg/mbin/actions/workflows/action.yaml/badge.svg?branc...
```suggestion Mbin is a fork and continuation of [/kbin](https://codeberg.org/Kbin/kbin-core), but community-focused. Feel free to chat on [Matrix](https://matrix.to/#/#mbin:melroy.org). Pull requests are always welcome. ``` Not sure if the later sentence was meant to indicate that you should discuss pull requests...
mbin
github_2023
others
1,416
MbinOrg
jwr1
@@ -1,18 +1,23 @@ -# Mbin +<p align="center"> + <img src="docs/images/mbin.png" alt="Mbin logo" width="400"> +</p> +<p align="center"> + <a href="https://github.com/MbinOrg/mbin/actions/workflows/action.yaml?query=branch%3Amain"><img src="https://github.com/MbinOrg/mbin/actions/workflows/action.yaml/badge.svg?branc...
```suggestion Mbin is a decentralized content aggregator, voting, discussion, and microblogging platform running on the fediverse. It can communicate with various ActivityPub services, including but not limited to: Mastodon, Lemmy, Pixelfed, Pleroma, and PeerTube. ``` Commas needed