Skip to content

Instantly share code, notes, and snippets.

View osmanyz's full-sized avatar
🎯
Focusing

Osman YILMAZ osmanyz

🎯
Focusing
  • Veterian
  • Turkey
  • 19:14 (UTC +03:00)
View GitHub Profile
@osmanyz
osmanyz / app.py
Last active August 11, 2024 10:03
Gradio client bug fix for IDM-VTON
import spaces
import gradio as gr
from PIL import Image
from src.tryon_pipeline import StableDiffusionXLInpaintPipeline as TryonPipeline
from src.unet_hacked_garmnet import UNet2DConditionModel as UNet2DConditionModel_ref
from src.unet_hacked_tryon import UNet2DConditionModel
from transformers import (
CLIPImageProcessor,
CLIPVisionModelWithProjection,
CLIPTextModel,
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
final GlobalKey<NavigatorState> _rootNavigatorKey =
GlobalKey<NavigatorState>(debugLabel: 'root');
final GlobalKey<NavigatorState> _sectionANavigatorKey =
@osmanyz
osmanyz / drag_drop.dart
Created February 23, 2024 22:34
test drag and drop list flutter.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({
super.key
@osmanyz
osmanyz / supervisor-mac-installation.md
Last active June 18, 2023 10:56
Supervisor Mac Installation (Laravel)

alright, everybody writen one about this but nothing worked for me, here's how it works without any problem:

first run brew install supervisor

run brew services start supervisor now to start supervisor, this will make sure supervisor runs at startup as well.

supervisor searches for configuration file in following paths: /usr/local/etc/supervisord.conf, /usr/local/supervisord.conf, supervisord.conf, etc/supervisord.conf, /etc/supervisord.conf, /etc/supervisor/supervisord.conf

@osmanyz
osmanyz / README.md
Last active April 24, 2020 10:40
eBay store search scrapper by python with bs4

How to install this package:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 

Now create a virtual environment

@osmanyz
osmanyz / CompanyController.ts
Created April 16, 2020 06:35
Mongoose typescript pagination can be help you. Please turn it into your project. It's example.
class CompanyController {
index = async (req: Request, res: Response) => {
await CompanyRepository.findLatest(
{},
{
page: req.query.page,
limit: req.query.limit,
},
(error, data) => {
if (error) return new ErroResponse("Not found!");
@osmanyz
osmanyz / mysql.backup.js
Created March 19, 2020 12:06
This only works with mysql via nodejs.
const fs = require('fs');
const path = require('path');
const spawn = require('child_process').spawn;
/*
const date = (new Date()).toLocaleDateString("tr-TR", {
year: 'numeric',
month: 'numeric',
day: 'numeric'
});
const wstream = fs.createWriteStream(path.join(__dirname, `/backup-files/${date}.sql`));
@osmanyz
osmanyz / RenderSelectMultiFieldComponent.js
Last active March 19, 2020 03:30
This's package just for `redux-form` multiple-select. That's style for evergreen-ui package. That's working.
export class renderSelectMultiField extends React.Component {
constructor(props) {
super(props);
let selectedOptions = [];
if (this.props.selectedOptions) {
this.props.selectedOptions.map(item => (selectedOptions.push(item.id)));
}
package helpers
import (
"crypto/rand"
"fmt"
src "math/rand"
"unsafe"
)
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
<select id="currency" name="currency">
<option value="aed">AED – د.إ.&rlm;</option>
<option value="afn">AFN – ؋</option>
<option value="all">ALL – Lek</option>
<option value="amd">AMD – ֏</option>
<option value="ang">ANG – ƒ</option>
<option value="aoa">AOA – Kz</option>
<option value="ars">ARS – $</option>
<option value="aud">AUD – $</option>
<option value="awg">AWG – ƒ</option>