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
| magic_constant = 15 | |
| def is_magic_square(square): | |
| line = [column for row in square for column in row] | |
| if len(line) != len(set(line)): | |
| return False | |
| for row in square: | |
| if sum(row) != magic_constant: | |
| return False | |
| for column in zip(*square): |
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 show_time_elapsed_in_human_friendly(elapsed): | |
| return f'{elapsed / 3600:.0f}h {(elapsed % 3600) / 60:.0f}m {elapsed % 60:0>5.2f}s' | |
| # 3h 13m 07.00s | |
| print(show_time_elapsed_in_human_friendly(timedelta(hours=3, minutes=13, seconds=7).total_seconds())) | |
| # 11587.0 | |
| print(timedelta(hours=3, minutes=13, seconds=7).total_seconds()) | |
| # 14h 59m 07.00s |
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
| Hello, that is my gist. I'm a super gist! |
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
| Hello, that is my gist. I'm a super gist! |
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
| let fps = frameRate(); | |
| virtualCanvas.textSize(30); | |
| virtualCanvas.fill(255); | |
| virtualCanvas.stroke(0); | |
| virtualCanvas.text(fps.toFixed(2), width - 30, 50); |
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
| -r requirements.txt | |
| autopep8 | |
| flake8 |
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
| :root { | |
| /* Save this file to chrome/ in Firefox Profile Directory */ | |
| scrollbar-color: rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.01); | |
| scrollbar-width: thin; | |
| } |
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
| reduce(lambda _, __: _ + __, valores) |
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
| ogr2ogr -s_srs EPSG:4326 -t_srs "+proj=latlong +pm=0" paises_0.shp paises.shp | |
| ogr2ogr -s_srs EPSG:4326 -t_srs "+proj=latlong +pm=-360" paises_360.shp paises.shp | |
| ogr2ogr -update -append paises_360.shp paises_0.shp |
NewerOlder