Skip to content

Instantly share code, notes, and snippets.

View cagdasyetkin's full-sized avatar
:atom:
I may be slow to respond.

Jetkin cagdasyetkin

:atom:
I may be slow to respond.
View GitHub Profile
@cagdasyetkin
cagdasyetkin / create-checkout-session.js
Created October 20, 2022 07:08
Stripe checkout session modified
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY);
export default async (req, res) => {
const { items, email } = req.body;
const transformedItems = items.map((item) => ({
quantity: 1,
price_data: {
//description: item.description,
currency: "gbp",
@cagdasyetkin
cagdasyetkin / quiz3.txt
Created February 20, 2018 08:27 — forked from earino/quiz3.txt
1. In your own words describe LDA
2. In your own words, describe the process of a full tidy text analysis
3. Do a short tidy text analysis where you extract topics, explain why they are good or bad.
@cagdasyetkin
cagdasyetkin / quiz2.txt
Last active February 19, 2018 08:15 — forked from earino/quiz2.txt
1. Explain in your words what the unnest_token function does
It is a function from Tidytext library which restructures text: Creates one token for each row. It splits a text column (this is our input) into tokens (like words). It helps us doing this tokenization.
2. Explain your words what the gutenbergr package does
Project Gutenberg digitizes the books for which copyright has expired with the help of volunteers. Gutenbergr R package provides these books to R users. We can download and process these books using this library.
3. Explain in your words how sentiment lexicon work
They are like dictionaries which matches words with their sentiment or emotion. Such as classifying them into Positive - Negative - Neutral categories. Once we match the words in our text with lexicon, we can start analyzing the frequencies. Even if we dont know the language in which the text has been written, we can have an overall understanding.
4. How does inner_join provide sentiment analysis functionality
@cagdasyetkin
cagdasyetkin / quiz1.txt
Last active February 18, 2018 21:59 — forked from earino/quiz1.txt
Dplyr Questions
1. Which of the following return a subset of the columns of a data frame ?
a) select (X)
b) retrieve
c) get
d) all of the mentioned
2. Point out the correct statement :
a) The data frame is a key data structure in statistics and in R
@cagdasyetkin
cagdasyetkin / ggplot2-examples.r
Created May 13, 2017 10:16 — forked from zoltanctoth/ggplot2-examples.r
ggplot2 examples and exercises
library(ggplot2)
# Take a look at our example dataset
View(diamonds)
# Make a chart from scratch
x = ggplot() +
layer(
data = diamonds, mapping = aes(x=carat,y=price),
stat='identity', position="identity", geom="point"