Skip to content

Instantly share code, notes, and snippets.

View SametSahin10's full-sized avatar
🏠
Working from home

SametSahin10

🏠
Working from home
View GitHub Profile
@SametSahin10
SametSahin10 / paybis_sdk.dart
Created January 11, 2024 15:25
The PaybisSDK class used to launch Paybis' UI in a Flutter app.
import 'package:flutter/services.dart';
import 'package:volt/models/volt_api/create_paybis_request_model.dart';
import 'package:volt/models/volt_api/crypto_wallet_address.dart';
import 'package:volt/models/volt_api/get_paybis_quote_request_model.dart';
import 'package:volt/services.dart';
class PaybisSDK {
static const _paybisMethodChannel = MethodChannel(
"finance.voltage/paybis_method_channel",
);
import cv2
import numpy as np
from matplotlib import pyplot as plt
def slice_matrix(matrix, row_start, col_start, size):
col_end = col_start + size
row_end = row_start + size
return [row[col_start:col_end] for row in matrix[row_start:row_end]]
import cv2
import numpy as np
# Load the image
image = cv2.imread('/Users/sametsahin/Downloads/scuba_diver.jpeg')
# Define all kernels
kernels = {
'Sobel Vertical': np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]),
'Sobel Horizontal': np.array([[-1, -2, -1], [0, 0, 0], [1, 2, 1]]),
import { ethers } from 'ethers';
async function transferTokens() {
// Replace with your private key
const privateKey = 'YOUR_PRIVATE_KEY';
// Replace with the recipient address
const toAddress = 'TO_ADDRESS';
// Replace with the amount of tokens to transfer
import { FuseSDK } from '@fuseio/fusebox-web-sdk';
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { Signer, Wallet, utils } from 'ethers';
import { ISendUserOperationResponse } from 'userop';
@Injectable()
export class FuseboxService {
private fuseSDK: FuseSDK | null = null;
import 'package:flutter/services.dart';
class NoLeadingZerosTextInputFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue,
TextEditingValue newValue,
) {
final newText = newValue.text;
@SametSahin10
SametSahin10 / composer_instrument_classification.ipynb
Last active May 6, 2023 23:26
composer_classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SametSahin10
SametSahin10 / composer_instrument_classification.ipynb
Created May 6, 2023 18:44
composer_instrument_classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SametSahin10
SametSahin10 / composer_instrument_classification.ipynb
Last active May 6, 2023 16:59
composer_instrument_classification.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SametSahin10
SametSahin10 / annotate_image.ts
Created March 21, 2022 10:52
A function that annotates an image using Google's Cloud Vision API
/**
* Annotates an image.
*
* @param {AnnotateImageParams} params The params.
*/
export async function annotateImage(params: AnnotateImageParams) {
const imageAnnotatorClient = new vision.ImageAnnotatorClient();
const labelDetectionFeature = {
type: "LABEL_DETECTION",