Skip to content

Instantly share code, notes, and snippets.

View pkakelas's full-sized avatar
🎯
Focusing

Dimitris Lamprinos pkakelas

🎯
Focusing
View GitHub Profile
library("arules")
# Exercise 1
# Import csv and create a unique set of all the grocery names
groceries <- read.csv("./GroceriesInitial.csv", header=TRUE, sep=",")
product_names = unique(unlist(groceries[,4,35]))
# Transform groceries to a binary correlation values
const rp = require('request-promise')
const baseUrl = 'https://api.covid19api.com/'
const {getCases, getCountryNames} = require('./request')
//request.js
const doMakeRequest = async (endpoint) => {
const res = await rp(`${baseUrl}${endpoint}`)
return JSON.parse(res)
}
#Kailyn Richardson
#12/4/19
#Total Sales for the Week (avg, highest, and total calculated)
weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'] # weekdays
def salesEntry(): # this function will return saleslist for whole week
salesList = [] # empty saleslist
print("Enter sales details for each day")
<!DOCTYPE html>
<?php
$host = "localhost";
$user = "root";
$pass = "root";
$db_name = "DAVAPS";
//create connection
$connection = mysqli_connect($host, $user, $pass, $db_name);
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#define SIZE 6
// Do you understand this code? This is how proper validation is done
//Board print
def prime_eratosthenes(n):
numbers = list(range(2, n + 1))
primes = []
divisor = -1
while len(numbers) > 0:
divisor = numbers[0]
primes.append(divisor)
numbers = filterNumber(numbers, divisor)
-- a) the most populated city in each country.
SELECT CountryCode, MAX(Population) FROM city GROUP BY CountryCode;
-- b) the second most populated city in each country.
SELECT
city.name, MAX(city.population)
FROM city
LEFT OUTER JOIN (
SELECT *, MAX(population)
FROM city group by CountryCode
body {
font-family: Arial, Helvetica, sans-serif;
}
#content {
width: 450px;
margin: 0 auto;
padding: 0px 20px 20px;
background: white;
border: 2px solid navy;
.page-header {
margin: 2%;
padding-bottom: 20px;
border-bottom-width:1px;
border-bottom-color: grey;
border-bottom-style: dotted;
}
.page-header h1 {
font-weight: bold;
@pkakelas
pkakelas / index.py
Last active December 3, 2019 15:04
from twython import Twython
import pandas as pd
TTL_TWEETS = 10000
consumer_key="4Y0swuxyRoDNZNWjboh5FI1OP"
consumer_secret="WKbjpokMp9ds3Yg2GwDo69AKeX704ywm2BOLVcR8ieGOri9fWG"
access_token_key="1186727191888957441-piNS1GzpeDw5Mmbjc8w0HzWiSJr2sX"
access_token_secret="LgXyWMbtti2FNnNa1sZrPTIcfPb4sj1azs9vUbJXJQipr"