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
# Generate a list of popular names, sortable by their relative androgyny. Data is obtained | |
# from the SSA website at http://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-level-data | |
# | |
# The expected input is a .csv file with columns of: | |
# | |
# name,assigned gender,count | |
# | |
# Some example uses of this program: | |
# | |
# Find the most androgynous names from 1978 beginning with Q: |
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
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <cstdint> | |
#include <iomanip> | |
#include <cctype> | |
const uint8_t magicnum[8] = {0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a}; | |
const std::string magicstr(reinterpret_cast<const char*>(magicnum), 8); |
NewerOlder