Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View VictorOmondi1997's full-sized avatar
👨‍💻
Data Plumber

VICTOR OMONDI VictorOmondi1997

👨‍💻
Data Plumber
View GitHub Profile
@VictorOmondi1997
VictorOmondi1997 / index.html
Last active June 6, 2020 09:25
Esther Njeri Kanini | Portfolio Website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Esther Njeri Kanini Portfolio | HOME</title>
</head>
<body>
<nav>
<div class="logo"></div>
my_age = 14
class(my_age)
my_weight = 90.6
class(my_weight)
my_name = "Victor" #Note how the quotation marks on the right indicate that "Victor" is a character
class(my_name)
is_teenager = TRUE
# My year of Birth
year_of_birth = 2001
# The Current Year
current_year = 2020
# Calculating my age by subtracting year_of_birth from the current_year
age = current_year - year_of_birth
age
@VictorOmondi1997
VictorOmondi1997 / calculating_age.r
Created May 7, 2020 08:14
Performing Arithmetic Operations in R
year_of_birth = 2001
current_year = 2020
age = current_year - year_of_birth
age
@VictorOmondi1997
VictorOmondi1997 / operator.csv
Last active May 7, 2020 08:12
R arithmetic operators
Arithmetic Operator Function Description Example Output
+ Addition adds a number to another number 3+2 [1] 5
- Subtraction subtracts a number from another number 3 - 2 [1] 1
* Multiplication multiplies number with another number 3 * 2 [1] 6
/ Division splits a number into equal parts 3/2 [1] 1.5
^ Exponentiation raising a number to the power of another number 3 ** 2 [1] 9
%% Modulo returns the remainder of the division 3 %% 2 [1] 1
@VictorOmondi1997
VictorOmondi1997 / age.r
Last active May 7, 2020 07:52
Creating a variable age and assign numeric to it.
age <- 17
age
@VictorOmondi1997
VictorOmondi1997 / hello_world.r
Last active May 7, 2020 07:48
Print Hello World in R
print("Hello, World!")
import africastalking
username = "africa username" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "africa's talking api key"
africastalking.initialize(username, api_key)
# # Use the service synchronously
@VictorOmondi1997
VictorOmondi1997 / URL-Parameters-in-Flask-vs-Express.md
Created January 11, 2020 20:50
URL Parameters in Flask vs Express

Flask

@app.route('/api/v1/users/<user_id>')
def handler(user_id):
    # route handler
   # use user_id

Express

@VictorOmondi1997
VictorOmondi1997 / CSS-variable.md
Created December 2, 2019 07:12
CSS variables for beginners

CSS Variables for beginners

:root {
    --imary-color: #f03d06;
  }

  .main-header {
    color: var(--primary-color);
 }