Skip to content

Instantly share code, notes, and snippets.

View miczed's full-sized avatar

Michael Ziörjen miczed

View GitHub Profile
@miczed
miczed / main.py
Created November 27, 2020 11:17
Polls the yahoo stock market site for the price of a given symbol and stores the result in a CSV
# importing libraries / dependencies
import os
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import csv
import time
import datetime
import pytz
starttime = time.time() # get the current time (for interval calculatio)
@miczed
miczed / controller.rb
Last active September 23, 2020 10:03
XLS / CSV Importer for Rails 6
class LessonController < ApplicationController
def import
begin
Lesson.transaction do
@lessons = Importer.import(params[:file],method(:import_new_or_existing), method(:import_modify_row), allowed_import_params, allowed_params)
end
redirect_to admin_lessons_path, notice: "#{@lessons.count} Lektionen wurden erfolgreich importiert."
rescue => e
redirect_to admin_lessons_path, alert: "#{e.message}"
@miczed
miczed / download_text_to_speech_google_cloud.sh
Created April 29, 2020 10:47
Synthesize text to speech using google's cloud api and store it as MP3 file.
printf -e "This will use the google text to speech API to synthesize the text and save it in a file"
echo -e "What text should be synthesized?"
read text
echo -e "What file should the text be stored to (without extension)?"
read filename
export GOOGLE_APPLICATION_CREDENTIALS="google_credentials.json"
echo -e "Downloading audio from google cloud"
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
@miczed
miczed / oec_alumni_custom.css
Last active February 25, 2019 18:16
Custom CSS for the oecAlumni Website
/** Just for testing purposes - it's better to load the fonts in the html header **/
@import url('https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i');
/** Typography **/
html, body, ul#navilist li a, ul#navilist span, h1, h2, h3, h4, p, blockquote {
font-family: 'PT Sans', sans-serif;
}
html,body {
font-size: 16px;

Keybase proof

I hereby claim:

  • I am miczed on github.
  • I am miczed (https://keybase.io/miczed) on keybase.
  • I have a public key whose fingerprint is 15A7 35AA 46BA 1B81 C7AE A225 6F45 ED5F 5ABA 16A8

To claim this, I am signing this object: