Skip to content

Instantly share code, notes, and snippets.

View danielmoralesp's full-sized avatar
🎯
Focusing

Daniel M. danielmoralesp

🎯
Focusing
  • Software Engineer
  • Digital Nomad
View GitHub Profile
import random
import operator
random.seed(1)
def unique_labels(rows, feature):
labels = []
for row in rows:
if row[feature] not in labels:
labels.append(row[feature])
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
6 0 3 Moran, Mr. James male 0 0 330877 8.4583 Q
7 0 1 McCarthy, Mr. Timothy J male 54 0 0 17463 51.8625 E46 S
8 0 3 Palsson, Master. Gosta Leonard male 2 3 1 349909 21.075 S
9 1 3 Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) female 27 0 2 347742 11.1333 S
@danielmoralesp
danielmoralesp / negList.p
Created July 1, 2019 22:31
Naive Bayes Files
�]q(XI wanted to love this, but it was pretty expensive for only a few months worth of calendar pages. I ended up buying a regular weekly planner - 55% OFF! - The Planner - that is 8 1/2 x 11 and has all seven days on the right page and the left page has room to write a To Do List and Goals. I found this to be more helpful because I could mark each day's eating and sleeping blocks, then also see them side by side - I could see her patterns more easily with a weekly view. This planner was cute, just not what I wanted.qX I like this log, but think it would work better with clearer AM & PM sections. Each page is 12 hours so you really need two pages a day if your baby feeds or wets a lot in the early morning hours between midnight and 7am. We're cramming those in to the 2 blank spaces above 7am right now.qX� My wife and I have a six month old baby boy and around the 4-month mark my wife decided that she would return to work instead of being a stay-at-home mom. We hired an in-home nanny to care for our l
height weight
65.78 112.99
71.52 136.49
69.4 153.03
68.22 142.34
67.79 144.3
68.7 123.3
69.8 141.49
70.01 136.46
67.9 112.37
user_id purchase_time
4b44ace4-2721-47a0-b24b-15fbfa2abf85 2017-05-11 04:25:00
02e684ae-a448-408f-a9ff-dcb4a5c99aac 2017-09-05 08:45:00
4b4bc391-749e-4b90-ab8f-4f6e3c84d6dc 2017-11-20 20:49:00
a5dbb25f-3c36-4103-9030-9f7c6241cd8d 2017-01-22 15:18:00
46a3186d-7f5a-4ab9-87af-84d05bfd4867 2017-06-11 11:32:00
5ae833dc-8866-4baa-9617-2009d6474ffa 2017-07-26 16:46:00
70688015-a755-4b8a-a963-3528d85c8048 2017-09-24 08:05:00
c504ff0d-eefe-472b-826c-471142311857 2017-05-02 07:56:00
99ad37b5-30b1-4a06-ad47-d9d2d60cdb07 2017-02-20 11:11:00
user_id checkout_time
d33bdc47-4afa-45bc-b4e4-dbe948e34c0d 2017-06-25 09:29:00
4ac186f0-9954-4fea-8a27-c081e428e34e 2017-04-07 20:11:00
3c9c78a7-124a-4b77-8d2e-e1926e011e7d 2017-07-13 11:38:00
89fe330a-8966-4756-8f7c-3bdbcd47279a 2017-04-20 16:15:00
3ccdaf69-2d30-40de-b083-51372881aedd 2017-01-08 20:52:00
a25aad6a-55af-4ddc-92d1-e8c58f855329 2017-01-05 20:07:00
3327f8fb-c5a0-421e-a0d1-fb619b79ab45 2017-08-17 04:20:00
9c3ea739-7968-429c-87f6-f213ef7b9fcb 2017-04-16 21:22:00
cb3ad392-baeb-4e28-a673-eaaf4bac68a4 2017-04-10 21:09:00
user_id cart_time
2be90e7c-9cca-44e0-bcc5-124b945ff168 2017-11-07 20:45:00
4397f73f-1da3-4ab3-91af-762792e25973 2017-05-27 01:35:00
a9db3d4b-0a0a-4398-a55a-ebb2c7adf663 2017-03-04 10:38:00
b594862a-36c5-47d5-b818-6e9512b939b3 2017-09-27 08:22:00
a68a16e2-94f0-4ce8-8ce3-784af0bbb974 2017-07-26 15:48:00
0c998868-9961-490b-8ec2-9981ba667027 2017-11-27 08:54:00
f783c680-1d9a-437d-9f45-7827299b78fa 2017-06-25 08:08:00
f3dd7631-3cf6-4d49-9c6e-b48eda4432b5 2017-01-04 09:57:00
4cdd357a-199e-4d81-ae9e-7252fa34ee0f 2017-05-23 22:25:00
user_id visit_time
943647ef-3682-4750-a2e1-918ba6f16188 2017-04-07 15:14:00
0c3a3dd0-fb64-4eac-bf84-ba069ce409f2 2017-01-26 14:24:00
6e0b2d60-4027-4d9a-babd-0e7d40859fb1 2017-08-20 08:23:00
6879527e-c5a6-4d14-b2da-50b85212b0ab 2017-11-04 18:15:00
a84327ff-5daa-4ba1-b789-d5b4caf81e96 2017-02-27 11:25:00
7bc62113-d51d-4e6b-85e0-1cf29e3de74a 2017-06-03 20:05:00
6f22cd44-bc63-4449-a9af-2651859da2f9 2017-03-18 23:09:00
49a6399b-c095-4e42-92eb-af90abe2bb6a 2017-01-10 12:09:00
653c095d-fd74-40dd-ae3b-5a69a2613629 2017-06-27 19:21:00
user_id utm_source day ad_click_timestamp experimental_group
008b7c6c-7272-471e-b90e-930d548bd8d7 google 6 - Saturday 7:18 A
009abb94-5e14-4b6c-bb1c-4f4df7aa7557 facebook 7 - Sunday B
00f5d532-ed58-4570-b6d2-768df5f41aed twitter 2 - Tuesday A
011adc64-0f44-4fd9-a0bb-f1506d2ad439 google 2 - Tuesday B
012137e6-7ae7-4649-af68-205b4702169c facebook 7 - Sunday B
013b0072-7b72-40e7-b698-98b4d0c9967f facebook 1 - Monday A
0153d85b-7660-4c39-92eb-1e1acd023280 google 4 - Thursday A
01555297-d6e6-49ae-aeba-1b196fdbb09f google 3 - Wednesday A
018cea61-19ea-4119-895b-1a4309ccb148 email 1 - Monday 18:33 A
id first_name last_name email month utm_source
10043 Louis Koch LouisKoch43@gmail.com 3 - March yahoo
10150 Bruce Webb BruceWebb44@outlook.com 3 - March twitter
10155 Nicholas Hoffman Nicholas.Hoffman@gmail.com 2 - February google
10178 William Key William.Key@outlook.com 3 - March yahoo
10208 Karen Bass KB4971@gmail.com 2 - February google
10260 Benjamin Ochoa Benjamin.Ochoa@outlook.com 1 - January twitter
10271 Gerald Aguilar Gerald.Aguilar@gmail.com 3 - March google
10278 Melissa Lambert Melissa.Lambert@gmail.com 2 - February email
10320 Adam Strickland Adam.Strickland@gmail.com 3 - March email