Skip to content

Instantly share code, notes, and snippets.

View uysalserkan's full-sized avatar
🐉
model.predict(privateInput)==25

Serkan UYSAL uysalserkan

🐉
model.predict(privateInput)==25
View GitHub Profile
@uysalserkan
uysalserkan / PerfectNumbers.cpp
Created January 19, 2019 17:52
Find the perfect number between tow numbers
#include <iostream>
using namespace std;
void perfectnumber(int num);
int main(){
int low,high,sum=0,temp;
cout <<"Please enter two integer"<<endl;
cout << "Integer 1: ";
cin >>low;
cout << "Integer 2: ";
cin >>high;
@uysalserkan
uysalserkan / Armstrong.cpp
Created January 19, 2019 18:02
The program find the armstrong numbers between 100 to 999
#include <iostream>
using namespace std;
void armstrong(int num);
int main(void){
int i;
for(i=100;i<999;i++)
armstrong(i);
}
void armstrong(int num){
int temp;
@uysalserkan
uysalserkan / Factorial.cpp
Last active January 19, 2019 22:03
This program give the factorial of numbers.
#include <iostream>
using namespace std;
int fact(int);
int main(){
cout << "Please enter a positive integer: ";
int user,final;
cin >> user;
cout <<"Your factorial of number is: "<<fact(user)<<endl;
}
#include <iostream>
#define SIZE 10
void bubblesorting(int a[SIZE]);
using namespace std;
int main(void) {
int usr[SIZE]={0},i=0;
cout << '\t'<<"Welcome" << endl<<"Please enter 10 number for sorting: ";
for(i=0;i<SIZE;i++){
cin >>usr[i];
}
@uysalserkan
uysalserkan / EquilateralTriangleArea.cpp
Created January 20, 2019 13:34
The program find the are of the equilateral triangle.
#include <iostream>
#include <math.h>
using namespace std;
double area(double);
int main(){
double x1;
cout <<"Please enter one side dimesion: ";
cin>>x1;
cout <<"Your area is: "<<area(x1)<<endl;
system("pause");
@uysalserkan
uysalserkan / RecursiveFibonacci.cpp
Created January 20, 2019 17:02
Find the fibonacci value of the your integer.
#include <iostream>
using namespace std;
int TakeFibonacci(int num);
int main(void){
int number;
cout <<"Please enter the number: ";
cin >> number;
cout << "Your number is: "<<number<<endl<< "Fibonacci number is: "<< TakeFibonacci(number)<<endl;
}
int TakeFibonacci(int num){
{
// Most Commonly Used
// Controls auto save of dirty files. Accepted values: 'off', 'afterDelay', 'onFocusChange' (editor loses focus), 'onWindowChange' (window loses focus). If set to 'afterDelay', you can configure the delay in 'files.autoSaveDelay'.
"files.autoSave": "off",
// Controls the font size in pixels.
"editor.fontSize": 14,
// Controls the font family.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# format() Metodunun Kullanım Biçimleri"
]
},
{
@uysalserkan
uysalserkan / bashrc
Created February 25, 2020 10:08
My Bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@uysalserkan
uysalserkan / PartA1.py
Created April 7, 2020 17:06
Electronic Report 2 - Part A - 1 Plot
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
cur_vol = {"Voltage": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "Current": [0.0000555556, 0.000111111,
0.000166667, 0.000222222, 0.000277778, 0.000333333, 0.000388889, 0.000444444, 0.0005, 0.000555556]}
data = pd.DataFrame(cur_vol)
plt.plot(data.Voltage, data.Current, color="red")
plt.scatter(data.Voltage, data.Current, color="red")
plt.bar(data.Voltage, data.Current, alpha=0.5, align="center", color="blue")