Skip to content

Instantly share code, notes, and snippets.

View alperbayram's full-sized avatar
🍊

Alper Bayram alperbayram

🍊
View GitHub Profile
import { SafeAreaView, StyleSheet } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { BottomTabNavigator } from "./src/navigator/tabbar";
export default function App() {
return (
<SafeAreaView style={styles.droidSafeArea}>
<NavigationContainer>
<BottomTabNavigator></BottomTabNavigator>
</NavigationContainer>
@alperbayram
alperbayram / index.jsx
Created April 8, 2023 20:25
bottom tab1
import React from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import Home from "../../screens/Home";
import Profile from "../../screens/Profile";
import ProfileSettings from "../../screens/Settings";
const Tab = createBottomTabNavigator();
export const BottomTabNavigator = () => {
return (
<Tab.Navigator bgColor="white">
import React from "react";
import { Text, View, StyleSheet } from "react-native";
function ProfileSettings() {
return (
<View style={styles.container}>
<Text>Setting</Text>
</View>
);
}
import React from "react";
import { Text, View, StyleSheet } from "react-native";
function Profile() {
return (
<View style={styles.container}>
<Text>Profile</Text>
</View>
);
}
import React from "react";
import { Text, View, StyleSheet, SectionList } from "react-native";
const DATA = [
{
title: "Main dishes",
data: ["Pizza", "Burger", "Risotto"],
},
{
title: "Sides",
data: ["French Fries", "Onion Rings", "Fried Shrimps"],
@alperbayram
alperbayram / us.js
Last active December 26, 2022 17:53
List of States in United States coordinates in array format.
const markers = [
{
state: "Alaska",
coordinates: [
61.3850,
-152.2683
]
},
{
state: "Alabama",
@alperbayram
alperbayram / ascii.js
Created April 26, 2022 08:46
Hex to ascii with javascript
function hexToAscii(hexx) {
var hex = hexx.toString(); //force conversion
var str = "";
for (var i = 0; i < hex.length && hex.substr(i, 2) !== "00"; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
console.log(str);
}
@alperbayram
alperbayram / style.css
Created March 27, 2022 13:40
Swiperjs Prev/Next Buttons Değiştirme
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: none;
display: -webkit-box;
@alperbayram
alperbayram / index.js
Created March 27, 2022 13:33
Swiperjs Prev/Next Buttons Değiştirme
// Import Swiper React components
import { Swiper, SwiperSlide } from "swiper/react";
// Import Swiper styles
import "swiper/css";
import "swiper/css/navigation";
import "./style.css";
// import required modules
import { Autoplay, Navigation } from "swiper";
@alperbayram
alperbayram / app.py
Last active February 27, 2022 14:10
app.py
import gradio as gr
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model = AutoModelForSequenceClassification.from_pretrained("savasy/bert-base-turkish-sentiment-cased")
tokenizer = AutoTokenizer.from_pretrained("savasy/bert-base-turkish-sentiment-cased")
def greet(text):
pipe = pipeline("sentiment-analysis", tokenizer=tokenizer, model=model)
return pipe(text)[0]['label']