This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import pandas as pd | |
| from geopy.geocoders import Nominatim | |
| geolocator = Nominatim(user_agent="FridaysforFuture.de Streikkarte") | |
| url = 'https://fridaysforfuture.de/streiktermine/' | |
| html = requests.get(url).content | |
| df_list = pd.read_html(html) | |
| df = df_list[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function makeUL(array) { | |
| // Create the list element: | |
| const list = document.createElement('ul'); | |
| for (var i = 0; i < array.length; i++) { | |
| // Create the list item: | |
| const item = document.createElement('li'); | |
| // Set its contents: | |
| item.appendChild(document.createTextNode(array[i])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function shortSysName(name) { | |
| var arr = name.split(" "); | |
| var out; | |
| if (arr[0] === "Microsoft") { | |
| if (arr[2] === "Server") { | |
| out = arr[1] + " " + arr[2] + " " + arr[3]; | |
| } else { | |
| out = arr[1] + " " + arr[2]; | |
| } | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <span id="unwelt_smiley"> </span> <!-- put wherever you want --> | |
| <script> | |
| function random_smiley() | |
| { | |
| let set = ["💚","🐣","🌱","🌿","🌳","🌻","🌞","☀","🥦","🌏","🌍","🌈"] | |
| let smiley = set[Math.floor(Math.random()*set.length)]; | |
| document.getElementById("unwelt_smiley").innerHTML = smiley; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime | |
| import logging | |
| import urllib2 | |
| # Constants | |
| timespan_threshhold = 3 | |
| # Globals | |
| lastpress = datetime.datetime(1970,1,1) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function round(num) { | |
| return +(Math.round(num + "e+10") + "e-10"); | |
| } | |
| function heron_sqrt(num) { | |
| let a = num / 3 | |
| let b = num / a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function heron_sqrt(num) { | |
| let a = num / 3 | |
| let b = num / a | |
| let i = 0 | |
| while (i < 20) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import pandas as pd | |
| from geopy.geocoders import Nominatim | |
| geolocator = Nominatim(user_agent="FridaysforFuture.de Streikkarte") | |
| pd.set_option('display.max_colwidth', -1) | |
| url = 'https://fridaysforfuture.berlin/mobi-material/' | |
| html = requests.get(url).content | |
| df_list = pd.read_html(html) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def caesar(klartext, schluessel): | |
| klartext = klartext.upper() | |
| geheimtext = "" | |
| for i in range(0, len(klartext)): | |
| buchstabe = klartext[i] | |
| ascii = ord(buchstabe) | |
| code = ascii + schluessel | |
| while (code > 90): | |
| code = code - 26 | |
| geheimbuchstabe = chr(code) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (int i = 0; i < wunschliste.length; i++) { | |
| Pizza pizza = wunschliste[i]; | |
| if (pizza == null) continue; | |
| System.out.print(i + " "); | |
| System.out.print(pizza.getNamen()); | |
| System.out.print(", Preis (in Cent): "); | |
| System.out.println(pizza.getPreis()); | |
| } |
OlderNewer