Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1228 commits
Select commit Hold shift + click to select a range
5364717
made changse to 6.md
joeyhuaa Mar 29, 2020
55cf205
made changes to 6.md
joeyhuaa Mar 29, 2020
3398429
made changes
joeyhuaa Mar 29, 2020
7322024
made changes
joeyhuaa Mar 29, 2020
ad871d9
Merge pull request #962 from bitprj/JoeyH
JasonL24 Mar 29, 2020
8e1d944
further context additions
etang01 Mar 29, 2020
f56fef2
Merge branch 'Jason' into Atul
Mar 29, 2020
0f29e84
Merge branch 'Atul' of https://github.com/bitprj/curriculum into Atul
Mar 29, 2020
09fd4f6
Merge branch 'Jason' into Atul
Mar 29, 2020
2dd9a06
Merge branch 'master' into Atul
Mar 29, 2020
ad78fdb
Update 3.md
etang01 Mar 29, 2020
3385592
Fixed All Local Images
Mar 29, 2020
38f4c46
Update 2.md
etang01 Mar 29, 2020
7c03886
Update 2.md
etang01 Mar 29, 2020
6f2b0e3
Merge pull request #905 from bitprj/Atul
JasonL24 Mar 29, 2020
ba6c5e3
edited all files under activities folder
vkxu657 Mar 29, 2020
02d4bfd
Update 3.md
etang01 Mar 29, 2020
46104f8
switching branches
mxthu313 Mar 30, 2020
909c1e3
delete .DS_Store
mxthu313 Mar 30, 2020
9745f88
fix conflicts
mxthu313 Mar 30, 2020
50aae4b
more merge conflicts
mxthu313 Mar 30, 2020
1bd839e
Update 3.md
etang01 Mar 30, 2020
6defc6a
Update 1.md
etang01 Mar 30, 2020
d90c33b
updated checkpoints for maze solver
JasonL24 Mar 30, 2020
23c2fca
Move Files
sarahg500 Mar 30, 2020
b87bb60
Delete Folders
sarahg500 Mar 30, 2020
1c90a7f
Edited all cards for Lab 1
vkxu657 Mar 30, 2020
1ed0a83
Merge branch 'Victoria_Module-1-of-Data-Structures-Boot-Camp' of http…
vkxu657 Mar 30, 2020
5781e4a
Files Moved
sarahg500 Mar 30, 2020
2cc1d69
Delete Folder
sarahg500 Mar 30, 2020
1c5d067
Merge pull request #963 from bitprj/Victoria_Module-1-of-Data-Structu…
kavuong Mar 30, 2020
6be8d9b
finishing changes
kavuong Mar 30, 2020
b27c16c
Merge pull request #966 from bitprj/Jason
kavuong Mar 30, 2020
5ed6825
Creating lab
Mar 30, 2020
1bc71c9
fixed activity readme
Mar 30, 2020
d04c2c1
Fixing lab readme
Mar 30, 2020
1494d36
Merge branch 'master' into Sarah-G
kavuong Mar 30, 2020
8a6264d
Merge pull request #967 from bitprj/Sarah-G
kavuong Mar 30, 2020
d717782
Pushing cardss
Mar 30, 2020
c76a831
Merge branch 'master' of https://github.com/bitprj/curriculum
Mar 30, 2020
8ee82e1
Fixed cards
Mar 30, 2020
eef704a
Adding hard cards
Mar 30, 2020
9c4e5b8
Fixed cards
Mar 30, 2020
e6ab2f4
Fixed cards
Mar 30, 2020
0c1da00
Fixed cards
Mar 30, 2020
fca48e9
adding cards
Mar 30, 2020
f1b9bfe
adding cards
Mar 30, 2020
5549ea1
adding hints
Mar 30, 2020
d4c5af5
adding hints
Mar 30, 2020
58a0013
adding hints
Mar 30, 2020
8b73be6
adding hints
Mar 30, 2020
0db5335
adding hints
Mar 30, 2020
948b7fa
adding hints
Mar 30, 2020
23e3439
adding hints
Mar 30, 2020
69e9b83
Fixed hint
Mar 30, 2020
e76095f
Added Hints for Maze solver
Mar 30, 2020
4f3f104
Adding more hints to maze lab
Mar 30, 2020
ffefa15
Added 5-6 hints
Mar 30, 2020
d421a13
First-Time
ryankuang1 Mar 30, 2020
03f42c5
Update 4.md
kavuong Mar 30, 2020
0848546
Fixing merge conflicts
kavuong Mar 30, 2020
4c557b5
Deleted Files
sarahg500 Apr 1, 2020
a122e59
Update 1.md
sarahg500 Apr 1, 2020
c57e2e5
Delete FIles
sarahg500 Apr 1, 2020
75dd3e0
Merge pull request #968 from bitprj/ryan-twitter
QuantumOverture Apr 1, 2020
abcef1c
loaded photos onto git
etang01 Apr 1, 2020
6bbad1e
update the relative path of 32.md twitter
KathyLiu20 Apr 2, 2020
72a6d9d
First letter capitalised
BrindaPuri Apr 2, 2020
d3f1574
hash tabts readme update
BrindaPuri Apr 2, 2020
9e5892a
Hash table readme updated
BrindaPuri Apr 2, 2020
a1cc6e3
Merge pull request #964 from bitprj/Ethan-TwitterNew
QuantumOverture Apr 2, 2020
2745e1a
fixed minor typo
JasonL24 Apr 2, 2020
efb6a1f
minor fix
JasonL24 Apr 2, 2020
6120b1f
minor fix to factorial
JasonL24 Apr 2, 2020
ccac2e7
format fix
JasonL24 Apr 2, 2020
7c46f58
fixed code formatting
JasonL24 Apr 2, 2020
4675af9
fixed recursion explanation
JasonL24 Apr 2, 2020
41b2d35
fixed typos
JasonL24 Apr 2, 2020
8741e28
typoss
JasonL24 Apr 2, 2020
4b1e0db
typos
JasonL24 Apr 2, 2020
d1d58c9
Typos
JasonL24 Apr 2, 2020
2213626
fixed typos
JasonL24 Apr 2, 2020
3954670
fixed explanation
JasonL24 Apr 2, 2020
c4ee77b
typo
JasonL24 Apr 2, 2020
18cd040
renamed
JasonL24 Apr 2, 2020
e8d8d9a
typos
JasonL24 Apr 2, 2020
f7cedc5
fixed explanation
JasonL24 Apr 2, 2020
11ab5dc
Update issue templates
kavuong Apr 2, 2020
bbfd1ca
Update issue templates
kavuong Apr 2, 2020
b2f1258
Update README.md
poroia Apr 3, 2020
d841dc0
Update 1.md
poroia Apr 3, 2020
bdfe4ee
Fixed Module name
Apr 3, 2020
1647418
Fixed Module name
Apr 3, 2020
ce226dc
Fixed Module name
Apr 3, 2020
642ead0
Added images folder for Module 1
Apr 3, 2020
24c764a
Added images folder for Module 1
Apr 3, 2020
9acb128
Added images folder for Module 1
Apr 3, 2020
a9dbc27
Added images folder for Module 1
Apr 3, 2020
4f33162
Fixed folder path
Apr 3, 2020
169b931
Adding test file
Apr 3, 2020
f567333
Adding test file
Apr 3, 2020
45a2ebf
Adding test file
Apr 3, 2020
558126e
added changes per Vicky's clarifications
kavuong Apr 3, 2020
954055b
Module 2 edits
vkxu657 Apr 3, 2020
f082365
Module 2 edits
vkxu657 Apr 3, 2020
785f770
Fixing card images error
Apr 3, 2020
231a5de
Merge branch 'master' of https://github.com/bitprj/curriculum
Apr 3, 2020
a38f6b9
Module 2 edits
vkxu657 Apr 3, 2020
800f054
removing duplicate binary heaps
kavuong Apr 3, 2020
c5c078e
Merge remote-tracking branch 'origin/master'
kavuong Apr 3, 2020
f76b1b8
fixed format of binary heaps
JasonL24 Apr 3, 2020
6a219ce
Fixing hints
Apr 3, 2020
46c100b
Fixed hint
Apr 3, 2020
e5ba84a
Update 6-Checkpoint.md
kavuong Apr 4, 2020
0d8eaa9
Merge branch 'master' into Victoria_Module2Edits
kavuong Apr 4, 2020
a64c26b
Merge pull request #995 from bitprj/Victoria_Module2Edits
kavuong Apr 4, 2020
5457faa
finishing touches to READMES
kavuong Apr 4, 2020
955d938
Merge branch 'master' into Brinda
kavuong Apr 4, 2020
6d55fdb
Update README.md
kavuong Apr 4, 2020
863f344
Merge pull request #999 from bitprj/Brinda
kavuong Apr 4, 2020
afc5a15
Updating card and Activity Readme
Apr 4, 2020
3f30619
Updating card and Activity Readme
Apr 4, 2020
4245d16
Updating card and Activity Readme
Apr 4, 2020
23b2bc0
readmes
kavuong Apr 4, 2020
be18a82
Merge remote-tracking branch 'origin/master'
kavuong Apr 4, 2020
aca84a7
Fixed image_folder
Apr 4, 2020
151a3e2
Updated module
Apr 4, 2020
f4e594f
merge master
kavuong Apr 4, 2020
bad48f2
Merge pull request #996 from bitprj/Jason
kavuong Apr 4, 2020
5c31089
Fixing parser
Apr 4, 2020
907da06
Merge branch 'master' of https://github.com/bitprj/curriculum
Apr 4, 2020
5cce21d
Updating activites and modules
Apr 4, 2020
e0775ea
Updating activites and modules
Apr 4, 2020
7d89d48
Updating activites and modules
Apr 4, 2020
8924e1d
Updating activites and modules
Apr 4, 2020
b08835a
Activity 1, MD1 update
etang01 Apr 4, 2020
a04d402
Updating activites and modules
Apr 4, 2020
5cbb149
Updating activites
Apr 4, 2020
8bdef09
Updating card
Apr 4, 2020
ef5b055
Updating card
Apr 4, 2020
16a7c15
Updating card
Apr 4, 2020
99cf448
Updating Activity4 cards
Apr 4, 2020
efaf311
Updated cards
Apr 4, 2020
dd980f3
Add 2 concepts card
KathyLiu20 Apr 4, 2020
29233b3
Merge pull request #985 from bitprj/Kathy
ojgao Apr 5, 2020
b5ed9b1
update
ojgao Apr 5, 2020
cb63b82
Module 2 sorting algs activity
vkxu657 Apr 5, 2020
5fdb0b0
Merge pull request #1000 from bitprj/Victoria_Module2Edits
kavuong Apr 5, 2020
a69b491
making changes according to assigned issues
etang01 Apr 5, 2020
e10216f
Repush local images
poroia Apr 5, 2020
1f5942e
Activity 1 3.md visuals
etang01 Apr 5, 2020
15189ef
Repush local images
poroia Apr 5, 2020
ee63bbe
Remove Style property test for images
poroia Apr 5, 2020
c135ab3
repush card count
poroia Apr 6, 2020
552fc7c
Reformat test
poroia Apr 6, 2020
9e8fd72
Fix card formatting
poroia Apr 6, 2020
6971c56
Fix extraneous test info
poroia Apr 6, 2020
0569f59
Module 3 Activity 1: Searching Algorithms edits
vkxu657 Apr 6, 2020
c1d087f
Fixed 6-1-1
Apr 6, 2020
7ffdcd8
Updated hints
Apr 6, 2020
77f4f4c
Updated hints
Apr 6, 2020
0ea7c74
Updated hints
Apr 6, 2020
6cfd5da
updates to phrasing and additional explanation
etang01 Apr 6, 2020
dd5c80b
Fixed 1-1-1.md card for lab
Apr 6, 2020
ba1fb5f
Fix parsing
poroia Apr 6, 2020
b9d39e4
Added card
Apr 6, 2020
1e4f9e8
Merge branch 'master' of https://github.com/bitprj/curriculum
Apr 6, 2020
49c3e93
Test
poroia Apr 6, 2020
c6db4f3
Test
poroia Apr 6, 2020
feb2c86
Test
poroia Apr 6, 2020
39d62d7
Update 4.md
poroia Apr 6, 2020
32bd2f2
Test
poroia Apr 6, 2020
7205944
Update 4.md
poroia Apr 6, 2020
bf4c7af
Adding card
Apr 6, 2020
cf44e70
Merge branch 'master' of https://github.com/bitprj/curriculum
Apr 6, 2020
fd531ed
Merge branch 'master' into Owen
ojgao Apr 6, 2020
6aaf5c4
labREADME.md
KathyLiu20 Apr 6, 2020
b648adb
Module 2 DS/A
kavuong Apr 6, 2020
40713da
Merge remote-tracking branch 'origin/master'
kavuong Apr 6, 2020
0c04c61
additional changes
kavuong Apr 6, 2020
1a18acb
add definition of tokens
KathyLiu20 Apr 6, 2020
d20815c
Merge pull request #897 from bitprj/Owen
kavuong Apr 7, 2020
5639eef
New Activity 1 & 2
bitterb3rry Apr 7, 2020
7ca0383
Lab2.2
ryankuang1 Apr 7, 2020
044467a
Merge pull request #1010 from bitprj/Kathy
ojgao Apr 7, 2020
4537efb
Merge branch 'Nathaniel-Twitter-New' into Ethan-TwitterNew
QuantumOverture Apr 7, 2020
0a133f4
Merge pull request #1003 from bitprj/Ethan-TwitterNew
QuantumOverture Apr 7, 2020
2ac5a83
Merge pull request #1012 from bitprj/ryan-twitter
QuantumOverture Apr 7, 2020
e937031
Merge remote-tracking branch 'origin/Nathaniel-Twitter-New' into Julia
kavuong Apr 7, 2020
3468729
Merge pull request #1011 from bitprj/Julia
kavuong Apr 7, 2020
21726f5
Merge branch 'master' into Nathaniel-Twitter-New
kavuong Apr 7, 2020
a867c4f
Merge pull request #1013 from bitprj/Nathaniel-Twitter-New
kavuong Apr 7, 2020
a137658
Changes
QuantumOverture Apr 7, 2020
85fb5df
Lab 4 File System and Lab 1 nColorable edits
vkxu657 Apr 8, 2020
68c5a71
Twitter modifications to ALL activities
kavuong Apr 8, 2020
4095b5c
Updated hints
Apr 8, 2020
13770e4
Updated card
Apr 8, 2020
fd6d7f0
Hard Cards for Sohem
kavuong Apr 8, 2020
bf67e45
Edits for all markdowns in Lab 6 Sudoku Solver file
vkxu657 Apr 9, 2020
19a9242
Create 11.md
sohammkar Apr 9, 2020
4d3323b
Create 111.md
sohammkar Apr 9, 2020
dd62c90
Create 12.md
sohammkar Apr 9, 2020
d1e2e15
Create 121.md
sohammkar Apr 9, 2020
05e40f2
Create 122.md
sohammkar Apr 9, 2020
c431657
Create 13.md
sohammkar Apr 9, 2020
df75596
Create 131.md
sohammkar Apr 9, 2020
842e8c4
Create 21.md
sohammkar Apr 9, 2020
0f4a95b
Create 211.md
sohammkar Apr 9, 2020
890d529
Create 22.md
sohammkar Apr 9, 2020
062e993
Create 221.md
sohammkar Apr 9, 2020
4008bcf
Create 23.md
sohammkar Apr 9, 2020
4275ae9
Create 231.md
sohammkar Apr 9, 2020
7d43530
Create 24.md
sohammkar Apr 9, 2020
905a353
Create 241.md
sohammkar Apr 9, 2020
ce23ba3
Create 31.md
sohammkar Apr 9, 2020
3535aca
Create 311.md
sohammkar Apr 9, 2020
a2b0cf1
Create 41.md
sohammkar Apr 9, 2020
2ff21b5
Create 411.md
sohammkar Apr 9, 2020
373b6fa
Create 42.md
sohammkar Apr 9, 2020
7d99568
Create 421.md
sohammkar Apr 9, 2020
39adc95
Create 43.md
sohammkar Apr 9, 2020
1211027
Create 431.md
sohammkar Apr 9, 2020
1aea46c
Create 44.md
sohammkar Apr 9, 2020
d8067e1
Create 441.md
sohammkar Apr 9, 2020
830c63e
Create 51.md
sohammkar Apr 9, 2020
58036f2
Create 511.md
sohammkar Apr 9, 2020
aa9b8f2
Create 52.md
sohammkar Apr 9, 2020
5bfaf53
Create 522.md
sohammkar Apr 9, 2020
1502636
some small twitter changes
kavuong Apr 10, 2020
f88b05d
Merge branch 'master' into Victoria_Module3Edits
kavuong Apr 10, 2020
61fbca8
Merge pull request #1002 from bitprj/Victoria_Module3Edits
kavuong Apr 10, 2020
ea679d3
modified week2 wording in cards
sohammkar Apr 10, 2020
2ed8091
Update 221.md
sohammkar Apr 10, 2020
2a98cc3
Add files via upload
sohammkar Apr 10, 2020
dc0c8dd
new readmes for week1 labs
etang01 Apr 11, 2020
02cff0a
Merge branch 'master' into Owen
ojgao Apr 11, 2020
4a5ec54
Act 1-3 Twitter API README
ryankuang1 Apr 12, 2020
fa0cffe
Merge pull request #1017 from bitprj/soham-twitter2
kavuong Apr 13, 2020
cc36b73
Merge pull request #1015 from bitprj/soham-update-twf
kavuong Apr 13, 2020
a5be53e
week2 lab photo uploads
etang01 Apr 13, 2020
88e8e24
Week2 Lab readmes
etang01 Apr 13, 2020
5212f7b
added twitter structure final
kavuong Apr 13, 2020
44c9061
Merge remote-tracking branch 'origin/master' into ryantwitter
kavuong Apr 13, 2020
b1574bf
Merge pull request #1022 from bitprj/ryantwitter
kavuong Apr 13, 2020
e71be2c
Adding image to twitter 3.md
kavuong Apr 14, 2020
829cd87
Add readme
ojgao Apr 15, 2020
f8daa8f
Merge pull request #1020 from bitprj/Ethan-TwitterNew
kavuong Apr 15, 2020
aac8b78
Merge remote-tracking branch 'origin/master' into Ismail-Twitter-Temp
kavuong Apr 15, 2020
1fd4906
Merge pull request #1014 from bitprj/Ismail-Twitter-Temp
kavuong Apr 15, 2020
aeb4bde
Merge remote-tracking branch 'origin/master' into Owen
kavuong Apr 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root: ./docs/
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/weekly-manager-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Weekly Manager Checklist
about: A weekly list of tasks that each manager of a team should complete every week
title: "[Weekly Sync] *insert manager name* Week of */**"
labels: manager-sync
assignees: ''

---

- [ ] Review developers' work and provide a review for each of your devs' PRs to your branch according to the Pull Request Checklist
- [ ] Ensure "first draft" pull requests are in by Friday
- [ ] "Final draft" pull request to master should be in by Sunday
- [ ] Generate issues for the project based on feedback received and progress made the week prior
- [ ] Ensure issues are made and set-up for next week's tasks
- [ ] Designate two issues not being solved to be "first timer only" issues
- [ ] Milestone should be set-up
- [ ] Adjust long-term plan and epic points for each module epic based on feedback and progress
- [ ] Adjust timeline in Zenhub Calendar

*Deadline*
Sunday, ./..
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

Module4_Labs/.DS_Store
Module4_Labs/Lab2_Doubly_Linked_List/.DS_Store
Module4_Labs/Lab3_File_System/.DS_Store
Module4_Labs/Lab3_File_System/.DS_Store
Module4.3_Search_and_Sorting_Algorithms/activities/.DS_Store
.DS_Store
Module4.3_Search_and_Sorting_Algorithms/activities/.DS_Store
.DS_Store
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--title={ Introduction to Twitter API Activities }-->

## Welcome to the Twitter API activities series!

In the upcoming sets of activities, you will be learning the basics of Twitter API.

### What is Twitter API?

Twitter has made an API where you can analyze tweets to help make businesses decisions, manage Twitter ads and campaigns, engage with other Twitter users on meaningful conversations, and share your stories.

### Who/How do buisnesses use Twitter API?

There are so many ways Twitter API can help becuase of how powerful and widespread the Twitter platform is. It would be impossible to sum up all the good work Twitter API does in this activity but feel free to visit [here](https://marketing.twitter.com/na/en/success-stories) and read success stories.

To use Twitter API, we have to sign up for a developer account to get your personal authentication keys. That autenthication will solely belong to you and you should nevere share it with anyone. APIs generally need authentication is needed since there are so many users and data involved and there needs to a form of idetification.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--title={Twitter Developer Account}-->

Go to **https://developer.twitter.com/** and follow the directions to sign-up for an account. Start by clicking 'Apply' at the top right corner. The application starts with a form. Here's a guide:

**1) What is your primary reason for using Twitter developer tools?**

​ Choose 'Exploring the API'

![img](https://lh4.googleusercontent.com/FDbZyUk7vMqSvNetKe0kH7DhjGIzXKId0X_WeC691XAY-Ii51jCEWxijf9ORvugK2DxNYyJWl2NxH7ChbiJZoQ1DHSVKxUVP71BojX-Tkm6U3C8xcWUMXIlve4LaZeOeZXCd6yxOnyY)

**2. This is you, right?**

​ Make sure you have a Twitter account connected. If not, make one right now
​ as you will need it for applying. Here: https://twitter.com/i/flow/signup

**3. In your word, ...**

​ Here, explain that you're participating in Bit Project's Twitter
​ workshops/activities and that what you hope to learn/get out of this workshop.

**4. In the specifics, ...**

​ ONLY say yes to 'Are you planning to analyze Twitter data?'. Most of the
​ activities we do has to do with reading Twitter data and performing work on
​ them.

**5. Review your answers and make sure you have followed all the guidelines here. Agree to the terms and submit your application.**

**6. Confirm your email** and your account should be processed and reviewed swiftly by the Twitter team.

After these steps, head back to the [Twitter developer menu](https://developer.twitter.com/en/apps
) (please note your account may take a little while to be approved) .

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--title={Create an App}-->

You should see that you have no apps. Click on 'create an app'.

![appPage](https://lh6.googleusercontent.com/CCtcYv_YY7sYTXtFqa0_MVZXTAeP9hfN2RiAgp-p5Lf5HPFf1KyYmVOybSIzxVlF0Xf1xdIgSdUDKJq-YfxUecvtLdqTpakGDnSpJJbNk_5__MIEciLGbKp6l8-_hNhNZB_Ge30rOKA)

In the creation of your app, fill out all the required information for your app details. For the website URL field, you can input any website, we used https://bitproject.org. Leave the OAuth Callback URL, TOS and Privacy Policy fields blank.

![newApp](https://lh4.googleusercontent.com/sUGNVSGrcBy5W22LOok5B9uu6r2-WPRPAcxoskgDQHS-pNnP3qCZ9R2frCUSFADl2vD6teJ34en6rDYgrJFxTYuL_t4OHmklYf_zCW4U-3DcIgr2VGcWuq2uMS5iBr-SmOElGk_wzSE)

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Once created, you should see your app appear on the apps page.

![appCreated](https://lh5.googleusercontent.com/BaIr2Tc-lFdaiuZ6kl8woA_D3sNy3_SsH7V1xJ41G2musWUVsbUm6IosHSpexN8sw_h76PCLd_KSDTiY3fpiHRzibuLF9E80b409r5bTxoSG25KF7M3n_XpxgTkKTivMOokbrFjGsBM)

Click on 'Keys and Tokens'

![keysAndTokens](https://lh4.googleusercontent.com/C8R96Q6YK5iFbgits4r7c10bMRre9YSjFEtjm7d41EYtZ2iNKAkIaMnlwbHnynCuN5kOY3llpv4L399n1Do34xReS-NJfjEaZX0zLZ0nfTEmsR3h8NDuDFqhQ7Bv-nimkZd90ZTtuBc)

The tokens you received in your developer account will come into play when we want data from Twitter.

As with all API's, authentication and authorization are important. This is so APIs knows who is accessing their information and what privileges to provide.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--title={Downloading Data from Twitter in Real Time}-->

In this activity, you will use your Twitter developer account to retrive live data from Twitter and stream it out on your command line.

We're mainly going to be using Tweepy to complete this.

**What is Tweepy?**

Tweepy is a Python library on accessing Twitter API. It is great for simple automation and creating twitter bots. It holds many features, such as getting tweets from your timeline, creating/deleting tweets, and following/unfollowing users.

Tweepy provides many methods and functions to access Twitter APIs. If you are curious and want to read more about them, Tweepy has a documentation page where all their methods are listed and explained. To view that, you can go to **https://tweepy.readthedocs.io/en/v3.5.0/** to read more.

![https://tva1.sinaimg.cn/large/006tNbRwgy1gash6vr1boj315t0u0tht.jpg](https://tva1.sinaimg.cn/large/006tNbRwgy1gash6vr1boj315t0u0tht.jpg)

We're going to use Object-Oriented Programming in the process too!
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--title={Download Python, Create Twitter Account, Install Tweepy}-->

<!--badges={Web Development:}-->

# Download Python, Create Twitter Account, Install Tweepy

*Note that the following part is optional - if you would like to develop on Python locally on your machine, you should follow these instructions to download Python and run Python scripts on your machine. *

In today's activity, we are going to recreate the Twitter application, which is called Tweepy. We will be utilizing an API, which can be accessed via Python, to stream tweets in real time directly from Twitter.

Before beginning to create the application, you first must have Python installed onto your computer. You can do so, go to [**python.org/downloads**](**python.org/downloads**) and install the latest version.

![https://tva1.sinaimg.cn/large/006tNbRwgy1gasdq3b76uj313u0u0ham.jpg](https://tva1.sinaimg.cn/large/006tNbRwgy1gasdq3b76uj313u0u0ham.jpg)



Once you have done that, you will also need to make a Twitter account if you do not already have one. If you already have an existing account, you can skip this step. Otherwise, go onto [**twitter.com**](twitter.com), click on the **Sign up** button and fill out your personal information.

Now that you have Python installed and have an existing Twitter account, we are going to install the Python package **Tweepy**. To install Tweepy, open your Terminal on your computer. Use your terminal to navigate into the folder where you will be creating this activity. Once that is done, enter this shell command to install Tweepy:

```
$ pip install tweepy
```

That line will install the tweepy module so that you can use its different functions to recreate the Twitter application. Once it's done installing, you should see something like this:

![tweepyInstalled](https://lh5.googleusercontent.com/JkYG2_BYM9fYxAClYlTwvA_1O_YhkmVnk299nSHLzk6XTTV8803ViWBy3RhscsN8uklLEZbb4bEABCh6HTztBl4VkXrB0r9LVYe9iAowJZJdlxqDiipsbZMxv303KxyiA0hm1v2SV7I)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# github_id

18



# name

Intro to Twitter API



# description

Learning the basics of Twitter API



# summary

Learn the basics of Twitter API, why people use it and what it can do.



# difficulty

Easy



# image
<img src="Activity1Pics/intro_twitter_python.jpeg"/>


# image_folder

Computational-Social-Science-Twitter-Topic/Module1-Streaming-Tweets/Act1_Intro to Twitter API/Activity1Pics


# cards



## 1



### name

Intro to Twitter API Activity



### order

1



### gems

10



## 2



### name

Twitter Developer Account



### order

2



### gems

10

## 3



### name

Create an App



### order

3



### gems

10



## 4



### name

Twitter Developer Account Continued



### order

4



### gems

10

## 5



### name

Downloading Data From Twitter in Real Time



### order

5



### gems

10



## 6



### name

Download Python, Create Twitter Account, Install Tweepy



### order

6



### gems

10
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Configuring Access Tokens

Before continuing with this activity, we'll first have to secure access to the Twitter Streaming API using the tokens we got from the last activity.

For the rest of the activities, we will be using **Google Colab**.

Create a new file called **twitter_credentials.py** and paste the following code: (with your credentials)

```python
ACCESS_TOKEN = "insert_access_token_here"
ACCESS_TOKEN_SECRET = "insert_access_token_secret_here"
CONSUMER_KEY = "insert_consumer_key_here"
CONSUMER_SECRET = "insert_consumer_secret_here"
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--title={Formatting Our Dataframe}-->

Let’s make a data frame!

Add the following code under `if __name__ == '__main__'`:

```python
tweets = pd.DataFrame()
tweets['text'] = list(map(lambda tweet: tweet['text'], tweets_data))
tweets['Username'] = list(map(lambda tweet: tweet['user']['screen_name'], tweets_data))
tweets['Timestamp'] = list(map(lambda tweet: tweet['created_at'], tweets_data))
print(tweets.head())
```
This block of code creates our dataframe and will display the tweet, the username, and when the tweet was made. As we are extracting data with the combo of lambda, map, and list and setting it to something like tweets[“user”], we will get a column of users in our data frame. We can only do this because the file was formatted in JSON! Doesn't JSON make everything seem simple?

pd.DataFrame() is a function from pandas that will make a new data frame object, in our case, a data frame named tweets.

Remember how we turned our data file to a JSON format? We’re going to extract contents from it now!

We need to extract all the tweets from our `tweets_data` JSON object. We want to process the text, username and timestamp of each tweet.

We can use a concept called **lambda functions**. Lambda functions are essentially one-line functions that are unnamed. You can use lambda functions alongside the `map` keyword to run lambda functions on every entity in a list of entities. In this case, we want to run a lambda function on each of our tweets in our JSON data.

The following statement

```python
map(lambda tweet: tweet['text'], tweets_data)
```

will iterate through every object in `tweets_data` and run the lambda function on each object. After running the lambda function, its output will be stored in an "iterator" object. (for the sake of this activity you don't need to know what exactly this means). To use this object and access the tweets inside you can use the `list` keyword to convert the iterator object into a list that we can easily process and use.

Therefore, the statement

```python
tweets['text'] = list(map(lambda tweet: tweet['text'], tweets_data))
```

will gather a list of each tweet's text in `tweets_data` and set that list to the "text" column in the `tweets` DataFrame.

Lambda functions combined with `map` are very powerful!

### Final Output

Save and run your file in terminal! You should see output like this appear in your command line:

![img](https://lh3.googleusercontent.com/04I4_BWj1bEd8mmfzZdMypvTOladUU9GifTrxcZXYpfQXyR-AMpNXyE1FXvERRkr5aphWdtlUiwXQflQT-ov-iTtAStKpveu9FmDsADf9dUaqkXjAWFL3lIjoUWw9h8GLmC_xYNYxyk)

Although we set a maximum amount of tweets we want in our code, the amount actually can vary from 0-max_tweets, depending on how long you let it run and how fast your computer is. So don't worry if it has less than max tweets!
Loading