Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
#! /bin/bash | |
# ECHO COMMAND | |
# echo Hello World! | |
# VARIABLES | |
# Uppercase by convention | |
# Letters, numbers, underscores | |
NAME="Bob" | |
# echo "My name is $NAME" |
#! /bin/bash | |
# ECHO COMMAND | |
# echo Hello World! | |
# VARIABLES | |
# Uppercase by convention | |
# Letters, numbers, underscores | |
NAME="Bob" | |
# echo "My name is $NAME" |
from csv import reader as csv_reader | |
with open("sample_input.csv") as input_fh: | |
people = csv_reader(input_fh) | |
headers = next(people) | |
for row in people: | |
person = (dict(zip(headers, row))) | |
if int(person["age"]) >= 30: | |
print("Name: {name}, City: {city}".format(name=person["name"], city=person["city"])) |
from json import load as json_load | |
with open("sample_input.json") as input_fh: | |
people = json_load(input_fh) | |
for person in people["people"]: | |
if person["age"] >= 30: | |
print("Name: {name}, City: {city}".format(name=person["name"], city=person["city"])) |
In your command-line run the following commands:
brew doctor
brew update
• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.
More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).
Interview is all about taking an ambiguous question of how you might build a system and letting
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
I was installing some python libraries that I needed, and this message came up: | |
Traceback (most recent call last): | |
File "/usr/bin/pip3", line 11, in <module> | |
sys.exit(main()) | |
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main | |
locale.setlocale(locale.LC_ALL, '') | |
File "/usr/lib/python3.5/locale.py", line 594, in setlocale | |
return _setlocale(category, locale) | |
locale.Error: unsupported locale setting |