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 preload/check | |
| (require 'package) | |
| (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
| (package-initialize) | |
| ;git from emacs | |
| (require 'magit) | |
| ;project management | |
| (require 'projectile) |
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
| /* | |
| Calculated for 20MHz: | |
| (((1sec/20000000) * 8 )* 250 )* 10 =0.001sec | |
| freq presc ticks multiplayer 1msec | |
| so at freq 20mhz, we need to prescale with 8, count to 249, and then multiple by 10 to get 1msec out of the counter. | |
| This needs some calculations for each different frequency. | |
| Adjust prescalar and ticks until you get the "multiplayer" to be an integer! | |
| */ |
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 pygame | |
| import sys | |
| import math | |
| import random | |
| #vector stuff http://stackoverflow.com/a/4114962 | |
| def magnitude(v): | |
| return math.sqrt(sum(v[i]*v[i] for i in range(len(v)))) | |
| def add(u, v): |
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
| #!/usr/bin/env python | |
| import sys | |
| import urllib.request | |
| import json | |
| def get_info(adress): | |
| print("************************************************") | |
| api = "http://freegeoip.net/json/" + adress | |
| try: |
NewerOlder