This file contains 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> | |
<head> | |
<title>Snake</title> | |
</head> | |
<body> | |
<!-- Lets make a simple snake game --> | |
<canvas id="canvas" width="450" height="450"></canvas> | |
</body> | |
<script type="text/javascript"> |
This file contains 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
$('.mym-tb-tabs .mym-tb-choose', this).click(function() { | |
$(this).parent().toggleClass('mym-tb-open'); | |
}); |
This file contains 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> | |
<head> | |
<title>Maze</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="mazegenerator.js"></script> | |
<style type="text/css"> | |
#maze { | |
border-collapse: collapse; | |
} | |
This file contains 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
var demo = { | |
getTiledMapDefinition: function(tilemap, layerName, tileWidth, tileHeight, tileImageName, imgWidth, imgHeight) { | |
var tileData = this.tileMapToArray(tilemap), | |
tilemapHeight = tilemap.length, | |
tilemapWidth = tilemap[0].length, | |
tileLayer = this.tiledLayerBlueprint(tileData, tilemapHeight, tilemapWidth, layerName), | |
tileImage = this.tiledTilesBlueprint(imgWidth, imgHeight, tileImageName, tileWidth, tileHeight); | |
return this.tiledBlueprint(tileLayer, tileImage); |
This file contains 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
Acc.Game = function (game) { | |
this.game = game; | |
}; | |
Acc.Game.prototype = { | |
create: function () { | |
this.MAX_VELX = 125; |
This file contains 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
<link href="../core-animated-pages/core-animated-pages.html" rel="import"> | |
<link href="../core-animated-pages/transitions/hero-transition.html" rel="import"> | |
<link href="../core-animated-pages/transitions/cross-fade.html" rel="import"> | |
<link href="../core-animated-pages/transitions/slide-down.html" rel="import"> | |
<link href="../core-animated-pages/transitions/slide-up.html" rel="import"> | |
<link href="../core-animated-pages/transitions/tile-cascade.html" rel="import"> | |
<link href="../core-field/core-field.html" rel="import"> | |
<link href="../core-icon/core-icon.html" rel="import"> | |
<link href="../core-input/core-input.html" rel="import"> | |
<link href="../core-icons/core-icons.html" rel="import"> |
This file contains 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
//: Playground - noun: a place where people can play | |
import UIKit | |
import XCPlayground | |
class ClockView: UIView { | |
private var shapeLayer = CAShapeLayer() | |
private var countDownTimer = NSTimer() | |
private var timerValue = 900 |
This file contains 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 get_clean_data(self): | |
df = pd.read_csv(self.csv_url) | |
df = df.drop(columns=['Lat', 'Long']) | |
df_group = df.groupby(['Country/Region']) | |
germany = df_group.get_group('Germany') | |
overall = df.agg(['sum']) | |
germany = germany.agg(['sum']) |
This file contains 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 clean_Data(self, data_frame, country, drop_columns): | |
cleaned_data_frame = data_frame.drop(columns=drop_columns) | |
cleaned_data_frame = cleaned_data_frame.T | |
cleaned_data_frame['related'] = (100/self.population[country]) * cleaned_data_frame['sum'] | |
return cleaned_data_frame |
This file contains 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 get_actual_infected(self): | |
germany_changed = self.germany.tail(2)['sum'][1] - self.germany.tail(2)['sum'][0] | |
overall_changed = self.overall.tail(2)['sum'][1] - self.overall.tail(2)['sum'][0] | |
germany = '+' if germany_changed > 0 else '-' | |
overall = '+' if overall_changed > 0 else '-' | |
germany += str(germany_changed) | |
overall += str(overall_changed) |
OlderNewer