Extracted from simple-statistics.
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
| LD SP,$fffe ; $0000 Setup Stack | |
| XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM) | |
| LD HL,$9fff ; $0004 | |
| Addr_0007: | |
| LD (HL-),A ; $0007 | |
| BIT 7,H ; $0008 | |
| JR NZ, Addr_0007 ; $000a | |
| LD HL,$ff26 ; $000c Setup Audio |
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
| #include <assert.h> | |
| #include <roxlu/core/Log.h> | |
| #include "Oils.h" | |
| Oils::Oils() | |
| :win_w(0) | |
| ,win_h(0) | |
| ,br_prog(0) | |
| ,br_vert(0) | |
| ,br_frag(0) |
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
| from fabric.api import local | |
| import pip | |
| def freeze (): | |
| local("pip freeze > requirements.txt") | |
| local("git add requirements.txt") | |
| local("git commit -v") | |
| def upgrade (): | |
| for dist in pip.get_installed_distributions(): |
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 java.util.*; | |
| import java.io.*; | |
| import java.security.*; | |
| public class ChangePassword | |
| { | |
| private final static JKS j = new JKS(); | |
| public static void main(String[] args) throws Exception | |
| { |
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 socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0): | |
| """Emulate the Unix socketpair() function on Windows.""" | |
| # We create a connected TCP socket. Note the trick with setblocking(0) | |
| # that prevents us from having to create a thread. | |
| lsock = socket.socket(family, type, proto) | |
| lsock.bind(('localhost', 0)) | |
| lsock.listen(1) | |
| addr, port = lsock.getsockname() | |
| csock = socket.socket(family, type, proto) | |
| csock.setblocking(0) |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Net; | |
| using System.Web; | |
| using System.IO; | |
| using System.Text; | |
| using ESRI.ArcGIS.esriSystem; | |
| using ESRI.ArcGIS.DataSourcesGDB; | |
| using ESRI.ArcGIS.Geodatabase; | |
| using ESRI.ArcGIS.Geometry; |
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
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger ([email protected]) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
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
| //////////////////////////////////////////////////////////// | |
| // Headers | |
| //////////////////////////////////////////////////////////// | |
| #include "stdafx.h" | |
| #ifdef _DEBUG | |
| #pragma comment(lib,"sfml-graphics-d.lib") | |
| #pragma comment(lib,"sfml-audio-d.lib") | |
| #pragma comment(lib,"sfml-system-d.lib") | |
| #pragma comment(lib,"sfml-window-d.lib") |
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
| // from http://www.gal-systems.com/2011/07/convert-coordinates-between-web.html | |
| private void ToGeographic(ref double mercatorX_lon, ref double mercatorY_lat) | |
| { | |
| if (Math.Abs(mercatorX_lon) < 180 && Math.Abs(mercatorY_lat) < 90) | |
| return; | |
| if ((Math.Abs(mercatorX_lon) > 20037508.3427892) || (Math.Abs(mercatorY_lat) > 20037508.3427892)) | |
| return; |