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
| package com.mygdx.game; | |
| import com.badlogic.gdx.math.Vector2; | |
| import com.badlogic.gdx.utils.ShortArray; | |
| import java.util.*; | |
| public class KruskalAlgorithm { | |
| public Vector2[] kruskal_from_triangles(ShortArray triangles, float[] points) { |
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
| [Desktop Entry] | |
| Name=MyScript | |
| GenericName=wallpapers | |
| Comment=change wallpapers every 30 seconds | |
| Exec=/home/chris/wallpapers/background.sh | |
| Terminal=false | |
| Type=Application | |
| X-GNOME-Autostart-enabled=true |
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
| while true; do | |
| p='/home/chris/wallpapers/'; | |
| r=$(ls /home/chris/wallpapers | shuf -n 1); | |
| gsettings set org.gnome.desktop.background picture-uri 'file://'$p$r; | |
| sleep 30; | |
| done |
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
| <html> | |
| <!-- Based on the code listed on this code pen project: https://codepen.io/zapplebee/pen/gbNbZE --> | |
| <svg preserveAspectRatio="none" id="visualizer" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
| <defs> | |
| <mask id="mask"> | |
| <g id="maskGroup"> | |
| </g> | |
| </mask> |
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 | |
| # read in words from the text file | |
| f = open('C:\Users\Chris\Downloads\words.txt') | |
| words = f.read() | |
| f.close() | |
| # get a list of words by splitting at each new line | |
| # sort by length | |
| words = words.split('\n') |
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
| /* ------------- needed modifications : ----------------------- | |
| * store the the balance factor at each node | |
| * must be entirely independan | |
| * do the function parameters make sense ? | |
| * improve readability | |
| */ | |
| import java.util.*; | |
| import java.io.*; |
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
| ''' | |
| Double-base palindromes | |
| Problem 36 | |
| The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. | |
| Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. | |
| (Please note that the palindromic number, in either base, may not include leading zeros.) | |
| ''' |