Skip to content

Instantly share code, notes, and snippets.

View artturijalli's full-sized avatar

Artturi Jalli artturijalli

View GitHub Profile
@artturijalli
artturijalli / best_blogging_tools.md
Last active March 5, 2024 14:25
This is a short list of all the best blogging tools. These are the only tools you really need!
Tool Use I use it...
1. Google AI Finding Blog Post Topics All the time
2. Google Trends Analyzing search trends Every month
3. Grammarly Grammar and spell checking All the time
4. Canva Graphic design for visualizations Every week
5. Hemingway App Improving readability of text Rarely
6. ChatGPT Generating text content Every week
7. LogoAI Designing logos Rarely
8. Unsplash Accessing free high-quality images Every week
Tunti Pörssisähkön tuntihinta (c/kWh) Kulutus (kWh) Kulutuksen hinta (c)
1 14.36 0.97 13.88
2 28.77 1.59 45.79
3 23.30 0.48 11.17
4 19.97 1.08 21.50
5 8.90 1.23 10.91
6 8.90 0.19 1.68
7 6.45 1.25 8.09
8 26.65 0.42 11.30
Malli Keskikulutus Toimintasäde Latauksen hinta-arvio/100 km
Volkswagen ID.4 Pure 16,9 kWh/100 km 343 km 2,66-4,74 €/100 km
Tesla Model 3 Standard Range 14,9 kWh/100 km 430 km 2,36-4,18 €/100 km
Seat Mii Electric 14,4 kWh/100 km 259 km 2,31-4,04 €/100 km
Volkswagen ID.3 Pure 15 kWh/100 km 348 km 2,37-4,20 €/100 km
Volvo XC40 23,8 kWh/100 km 400 km 3,73-5,74 €/100 km
Sähköverkkoyhtiö Toimitusvelvollinen sähkönmyyjä
Alajärven Sähkö Oy Alajärven Sähkö Oy
Alva Sähköverkko Oy Väre Oy
Caruna Espoo Oy Fortum Markets Oy
Caruna Oy Fortum Markets Oy
Elenia Verkko Oyj Vattenfall Oy
Enontekiön Sähkö Oy Lumme Energia Oy
ESE-Verkko Oy Lumme Energia Oy
Esse Elektro-Kraft Ab Esse Elektro-Kraft Ab
@artturijalli
artturijalli / publications-vs-self-publishing-stats.js
Created March 30, 2023 10:56
A script that checks the success of your posts published in publications vs the stories not published on publications
(function() {
const stories = document.querySelectorAll('tr.js-statsTableRow');
let inPublicationViews = 0;
let notInPublicationViews = 0;
let nPublication = 0;
let nNotPublication = 0;
stories.forEach(story => {
const isInPublication = story.querySelector('em') && story.querySelector('em').innerHTML === 'In ';
const viewsElement = story.querySelector('td:nth-child(2) span.sortableTable-value');
@artturijalli
artturijalli / reverse_string.py
Last active November 8, 2022 15:16
5 different ways to reverse a string in Python
# 1. Slicing
def reverse_slicing(s):
return s[::-1]
# 2. Looping with for and while loops
# 2.1 for loop
def reverse_for_loop(s):
s1 = ""
for c in s:
s1 = c + s1
from pathlib import Path
import os
pathlib_cwd = Path.cwd()
os_cwd = os.getcwd()
print(type(pathlib_cwd))
print(type(os_cwd))
@artturijalli
artturijalli / removeTargets.py
Created May 12, 2022 15:03
Remove all occurrences of a specific value from a list using a while loop in Python
numbers = [1, 4, 4, 26, 4, 4, 8, 0, 4]
target = 4
i = 0
while i < len(numbers):
if numbers[i] == target:
numbers.pop(i)
i -= 1
i += 1
if "Alice" not in queue: print("Alice is not in the queue")
# How would you count the numbers in this list in as few lines of code as possible?
numbers = [1, 2, 3, 4, 5]
# 1. Charlie sums the numbers up using a for loop:
total = 0
for number in numbers:
total += number
# 2. Bob sums the numbers up using the reduce function:
from functools import reduce