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
    
  
  
    
  | one_digit_numbers = ["null", "eins", "zwei", "drei", "vier", "fünf", "sechs", "sieben", "acht", "neun"] | |
| two_digit_numbers = ["zehn", "zwanzig", "dreißig", "vierzig", "fünfzig", "sechzig", "siebzig", "achtzig", "neunzig"] | |
| def int_to_german(n: int, prefix: str = "", suffix: bool = False): | |
| if n < 10: | |
| if suffix and n == 0: | |
| return "" | |
| if prefix == "non-female" and n == 1: | |
| return "ein" | |
| if prefix == "female" and n == 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
    
  
  
    
  | # coding=utf-8 | |
| from splinter import Browser | |
| from subprocess import call | |
| from time import time, sleep | |
| limit = 20 | |
| url = 'https://service.berlin.de/terminvereinbarung/termin/tag.php?termin=1&anliegen[]=120686&dienstleisterlist=122210,327316,122217,122219,327312,327314,122227,327346,327423,327348,122252,327338,122260,327340,122262,122254,327278,327274,327276,327294,327290,327292,122291,327270,122285,327266,122286,327264,122296,327268,150230,327282,327286,327284,122312,122314,122304,327330,122311,327334,122309,327332,317869,324433,325341,324434,327352,324414,122283,327354,122276,327324,122274,327326,122267,327328,122246,327318,122251,327320,122257,327322,122208,327298,122226,327300' | |
  
    
      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 random | |
| def find_vacant(n, grid): | |
| vacant = [] | |
| for i in range(n): | |
| for pos in [i, n*(n-1)+i, n*i, n*i+(n-1)]: | |
| if grid[pos] == 0: | |
| vacant.append(pos) | |
| if len(vacant) > 0: | |
| return random.choice(vacant) | 
  
    
      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
    
  
  
    
  | means_test = np.mean(np.mean(test_accuracies, axis=-2), axis=1) | |
| stds_test = np.mean(test_accuracies, axis=-2).std(axis=1) | |
| means_train = np.mean(np.mean(train_accuracies, axis=-2), axis=1) | |
| stds_train = np.mean(train_accuracies, axis=-2).std(axis=1) | |
| font = {'family' : 'normal', | |
| 'weight' : 'normal', | |
| 'size' : 16} | |
| plt.rc('font', **font) | 
  
    
      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
    
  
  
    
  | from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| import tensorflow as tf | |
| class TextGenerationModel(object): | 
  
    
      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
    
  
  
    
  | <?php | |
| // base url with a %u which is a sprintf placeholder | |
| // for an unsigned int | |
| $BASE_URL = "http://backup-festival.de/2017/wp-json/wp/v2/film?page=%u&per_page=100"; | |
| // start at page 1 | |
| $page = 1; | |
| // aggregated pages (json list) | 
  
    
      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
    
  
  
    
  | public double getSteer(SensorModel sensors) { | |
| double maxDistance = 0; | |
| double angle = sensors.getAngleToTrackAxis(); | |
| int minSensor = (int) Math.max(0, Math.ceil(-angle / Math.PI * 18)); | |
| int maxSensor = (int) Math.min(18, Math.ceil((1-angle / Math.PI) * 18)); | |
| int maxIndex = Math.max(minSensor, 0); | |
| for(int i=minSensor; i<=maxSensor; i++) { | |
| double distance = sensors.getTrackEdgeSensors()[i]; | |
| if (maxDistance < distance) { | |
| maxIndex = 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
    
  
  
    
  | if show_graph: | |
| gg = gv.Digraph(format="pdf") | |
| for n in tg.nodes(): | |
| gg.node(str(n)) | |
| for e in tg.edges(): | |
| gg.edge(str(e[0]), str(e[1])) | |
| gg.render('img/plot') | |
| import webbrowser | |
| new = 2 |