Database looks like
$ psql checkouts <<< "\d"
List of relations
Schema | Name | Type | Owner
--------+-----------+-------+--------
public | checkouts | table | brooks
(1 row)
$ psql checkouts <<< "\d checkouts"
Database looks like
$ psql checkouts <<< "\d"
List of relations
Schema | Name | Type | Owner
--------+-----------+-------+--------
public | checkouts | table | brooks
(1 row)
$ psql checkouts <<< "\d checkouts"
| #!/usr/bin/env python | |
| """ | |
| Build a heroes of the storm database | |
| """ | |
| import csv | |
| import logging | |
| import time | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy import Column, Integer, Boolean, create_engine |
| from faker import Faker | |
| import pandas as pd | |
| user_factory = Faker() | |
| user_factory.seed(1000) | |
| def get_fake_user(): | |
| global user_factory | |
| #!/usr/bin/env python3 | |
| from collections import namedtuple | |
| import csv | |
| import datetime | |
| import os | |
| import subprocess | |
| import time | |
| WindowInfo = namedtuple("WindowInfo", ["window_name", "window_class"]) |
| #include <stdio.h> | |
| //define a struct to contain variables and function pointers, much like a class | |
| typedef struct ex { | |
| //declare some variables | |
| int x; | |
| //declare some methods (aka, function pointers) | |
| void (*const p)(void); //let p be a constant pointer | |
| void (*const setX)(struct ex *, int); //must pass self-referential pointer to imitate class scope |
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| bool isPal(int num); | |
| bool isPal(int num) | |
| { | |
| vector<int> val; |
| def power(x, n): | |
| if (n): | |
| return x * power(x, n - 1) | |
| else: | |
| return 1 | |
| def power1(x, n): | |
| if (not n): #0th power | |
| return 1 | |