Skip to content

Instantly share code, notes, and snippets.

View pratamawijaya's full-sized avatar

Pratama Nur Wijaya pratamawijaya

View GitHub Profile
@pratamawijaya
pratamawijaya / 00_local_llm_guide.md
Created January 10, 2025 05:50 — forked from othyn/00_local_llm_guide.md
Setting up a local only LLM (Qwen/Llama3/etc.) on macOS with Ollama, Continue and VSCode

Setting up a local only LLM (Qwen/Llama3/etc.) on macOS with Ollama, Continue and VSCode

As with a lot of organisations, the idea of using LLM's is a reasonably frightning concept, as people freely hand over internal IP and sensitive comms to remote entities that are heavily data bound by nature. I know it was on our minds when deciding on LLM's and their role within the team and wider company. 6 months ago, I set out to explore what offerings were like in the self-hosted and/or OSS space, and if anything could be achieved locally. After using this setup since then, and after getting a lot of questions on it, I thought I might share some of the things I've come across and getting it all setup.

Que in Ollama and Continue. Ollama is an easy way to locally download, manage and run models. Its very familiar to Docker in its usuage, and can probably be most conceptually aligned with it in how it operates, think imag

[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
import com.google.gson.FieldNamingPolicy
import com.google.gson.GsonBuilder
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
object Network {
@pratamawijaya
pratamawijaya / build.gradle.kts
Created September 5, 2023 06:08 — forked from shahzadansari/build.gradle.kts
Custom gradle task which copies app-debug.apk to Desktop and renames it to Git's current checked out branch
// 1. Add following snippet in your build.gradle.kts(:app)
// Run this command in terminal -> ./gradlew copyDebugApkToDesktop
tasks.register("copyDebugApkToDesktop") {
dependsOn("assembleDebug")
doLast {
val sourceDir = "build/outputs/apk/debug/app-debug.apk"
val desktopDir = System.getProperty("user.home") + "/Desktop/"
val gitBranch = try {
@pratamawijaya
pratamawijaya / README.md
Created November 9, 2022 03:07 — forked from jhonsore/README.md
Upload an Image from camera or gallery in WebView

This is an old way to Upload an Image from camera or gallery in WebView. It was made a long time ago and is not maintened anymore. Use it at your own risk.

@Composable
fun CalendarView(
modifier: Modifier = Modifier,
selectedDay: CalendarDay = CalendarDay.create(),
onSelectedDayChange: (CalendarDay) -> Unit = {},
visibleMonth: CalendarDay = CalendarDay.create(),
onVisibleMonthChange: (CalendarDay) -> Unit = {},
today: CalendarDay = CalendarDay.create(),
events: Set<CalendarDay> = emptySet()
) {
@pratamawijaya
pratamawijaya / PreferenceExtensions.kt
Created November 14, 2019 10:37 — forked from ologe/PreferenceExtensions.kt
Android shared preference observer using kotlin coroutines (1.3.0)
inline fun <reified T> SharedPreferences.observeKey(key: String, default: T, dispatcher: CoroutineContext = Dispatchers.Default): Flow<T> {
val flow: Flow<T> = channelFlow {
offer(getItem(key, default))
val listener = SharedPreferences.OnSharedPreferenceChangeListener { _, k ->
if (key == k) {
offer(getItem(key, default)!!)
}
}
@pratamawijaya
pratamawijaya / keybase.md
Created September 13, 2019 09:27
keybase

Keybase proof

I hereby claim:

  • I am pratamawijaya on github.
  • I am pratamawijaya (https://keybase.io/pratamawijaya) on keybase.
  • I have a public key ASDJemJ8yN5oby1WxRtRlnlz_ECsotrC8DDhKn0L9yvBoQo

To claim this, I am signing this object:

@pratamawijaya
pratamawijaya / simi_key.json
Last active March 17, 2019 03:21
simi_key.json
{
"url" : "http://api.simsimi.com/request.p",
"key" : "74c1bbd9-0693-41f2-b72b-29c9c59467ac"
}
@pratamawijaya
pratamawijaya / medium_rider_redesign_blog_example.kt
Created October 21, 2018 12:32 — forked from abhaysood/medium_rider_redesign_blog_example.kt
A simple component which is created when user clicks the cancel order button in the app. It is responsible for showing a confirmation dialog and actually cancelling the order by making an API call.
class OrderCancellationComponent(private val context: Context,
private val api: Api,
private val orderNumber: String) {
interface Callbacks {
fun onOrderCancelledSuccessfully()
fun onOrderCancellationFailed()
}
var callbacks: Callbacks? = null // Callbacks for communication with the parent component