Zoomable/rotatable world globe that uses orthographic projection. Drag behavior is enhanced as described here: https://www.jasondavies.com/maps/rotate/
Performance is not good due to redrawing whole world upon zoom/drag.
| # The MIT License (MIT) | |
| # Copyright (c) 2016 Vladimir Ignatev | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the Software | |
| # is furnished to do so, subject to the following conditions: | |
| # |
| #include <time.h> // Robert Nystrom | |
| #include <stdio.h> // @munificentbob | |
| #include <stdlib.h> // for Ginny | |
| #define r return // 2008-2019 | |
| #define l(a, b, c, d) for (i y=a;y\ | |
| <b; y++) for (int x = c; x < d; x++) | |
| typedef int i;const i H=40;const i W | |
| =80;i m[40][80];i g(i x){r rand()%x; | |
| }void cave(i s){i w=g(10)+5;i h=g(6) | |
| +3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
| # based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3 | |
| # Brandon Skerritt | |
| # https://skerritt.tech | |
| def binary_search(the_array, item, start, end): | |
| if start == end: | |
| if the_array[start] > item: | |
| return start | |
| else: | |
| return start + 1 |
| from bs4 import BeautifulSoup,SoupStrainer | |
| import re | |
| import Queue | |
| import threading | |
| import requests | |
| import urlparse | |
| import time | |
| import copy | |
| import signal | |
| import sys |
| #!/bin/bash | |
| # Anh Nguyen <[email protected]> | |
| # 2016-04-30 | |
| # MIT License | |
| # This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg. | |
| # Make sure you have ffmpeg installed before running. | |
| # The output command looks something like the below, but for as many images as you have in the folder. |
| #!/bin/bash | |
| # | |
| # Requires: | |
| # - gdal_sieve.py | |
| # - ogr2ogr (GDAL) | |
| # - topojson (node.js) | |
| # Grab the relative directory for source file. | |
| SRC_DIR=`dirname $0` |
| LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so | |
| <VirtualHost *:80> | |
| # The ServerName directive sets the request scheme, hostname and port that | |
| # the server uses to identify itself. This is used when creating | |
| # redirection URLs. In the context of virtual hosts, the ServerName | |
| # specifies what hostname must appear in the request's Host: header to | |
| # match this virtual host. For the default virtual host (this file) this | |
| # value is not decisive as it is used as a last resort host regardless. | |
| # However, you must set it for any further virtual host explicitly. | |
| #ServerName www.example.com |
| """ | |
| ldr.py | |
| Display analog data from Arduino using Python (matplotlib) | |
| Author: Mahesh Venkitachalam | |
| Website: electronut.in | |
| """ | |
| import sys, serial, argparse |
Zoomable/rotatable world globe that uses orthographic projection. Drag behavior is enhanced as described here: https://www.jasondavies.com/maps/rotate/
Performance is not good due to redrawing whole world upon zoom/drag.
| """ | |
| This file contains code that, when run on Python 2.7.5 or earlier, creates | |
| a string that should not exist: u'\Udeadbeef'. That's a single "character" | |
| that's illegal in Python because it's outside the valid Unicode range. | |
| It then uses it to crash various things in the Python standard library and | |
| corrupt a database. | |
| On Python 3... well, this file is full of syntax errors on Python 3. But | |
| if you were to change the print statements and byte literals and stuff: |