Giter VIP home page Giter VIP logo

100daysofcode-twitter-bot's Introduction

freeCodeCamp Social Banner

Pull Requests Welcome first-timers-only Friendly Open Source Helpers Setup Automated Discord

freeCodeCamp.org's open-source codebase and curriculum

freeCodeCamp.org is a friendly community where you can learn to code for free. It is run by a donor-supported 501(c)(3) charity to help millions of busy adults transition into tech. Our community has already helped more than 40,000 people get their first developer job.

Our full-stack web development and machine learning curriculum is completely free and self-paced. We have thousands of interactive coding challenges to help you expand your skills.

Table of Contents

Certifications

freeCodeCamp.org offers several free developer certifications. Each of these certifications involves building 5 required web app projects, along with hundreds of optional coding challenges to help you prepare for those projects. We estimate that each certification will take a beginner programmer around 300 hours to earn.

Each of these 50 projects in the freeCodeCamp.org curriculum has its own agile user stories and automated tests. These help you build up your project incrementally and ensure you've fulfilled all the user stories before you submit it.

You can pull in these test suites through freeCodeCamp's CDN. This means you can build these projects on websites like CodePen and Replit - or even on your local computer's development environment.

Once you've earned a certification, you will always have it. You will always be able to link to it from your LinkedIn or resume. And when your prospective employers or freelance clients click that link, they'll see a verified certification specific to you.

The one exception to this is if we discover violations of our Academic Honesty Policy. When we catch people unambiguously plagiarizing (submitting other people's code or projects as their own without citation), we do what all rigorous institutions of learning should do - we revoke their certifications and ban those people.

Here are our twelve core certifications:

Legacy Full Stack Development Certification

Once you have earned the Responsive Web Design, Algorithms and Data Structures, Front End Development Libraries, Data Visualization, Back End Development and APIs, and Legacy Information Security and Quality Assurance certifications, you'll be able to claim your freeCodeCamp.org Full Stack Development Certification. This distinction signifies that you've completed around 1,800 hours of coding with a wide range of web development tools.

Legacy Certifications

We also have 4 legacy certifications dating back to our 2015 curriculum, which are still available. All of the required projects for these legacy certifications will remain available on freeCodeCamp.org.

  • Legacy Front End Development Certification
  • Legacy Data Visualization Certification
  • Legacy Back End Development Certification
  • Legacy Information Security and Quality Assurance Certification

Free professional certifications

The Learning Platform

This code is running live at freeCodeCamp.org.

Our community also has:

  • A forum where you can usually get programming help or project feedback within hours.
  • A YouTube channel with free courses on Python, SQL, Android, and a wide variety of other technologies.
  • A technical publication with thousands of programming tutorials and articles about mathematics and computer science.
  • A Discord server where you can hang out and talk with developers and people who are learning to code.

Reporting Bugs and Issues

If you think you've found a bug, first read the how to report a bug article and follow its instructions.

If you're confident it's a new bug and have confirmed that someone else is facing the same issue, go ahead and create a new GitHub issue. Be sure to include as much information as possible so we can reproduce the bug.

Reporting Security Issues and Responsible Disclosure

We appreciate responsible disclosure of vulnerabilities that might impact the integrity of our platforms and users.

Contributing

The freeCodeCamp.org community is possible thanks to thousands of kind volunteers like you. We welcome all contributions to the community and are excited to welcome you aboard.

Recent Contributions:

Alt

Platform, Build, and Deployment Status

The general platform status for all our applications is available at status.freecodecamp.org. The build and deployment status for the code is available in our DevOps Guide.

License

Copyright Β© 2024 freeCodeCamp.org

The content of this repository is bound by the following licenses:

  • The computer software is licensed under the BSD-3-Clause license.
  • The learning resources in the /curriculum directory including their subdirectories thereon are copyright Β© 2024 freeCodeCamp.org

100daysofcode-twitter-bot's People

Contributors

amandeepmittal avatar benjaminspak avatar equimper avatar favour-olumese avatar greenkeeper[bot] avatar ilyeshammadi avatar kaydee avatar king0120 avatar mhaviv avatar quincylarson avatar raisedadead avatar raiyaj avatar shovanch avatar spences10 avatar stephanie56 avatar zairahira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

100daysofcode-twitter-bot's Issues

Consider adding .github community folder

Adding a .github folder to contain all the GitHub community files will help declutter the root of the project.

Files that can be added to the .github folder:

CODE_OF_CONDUCT
CONTRIBUTING
LICENCE
PR_TEMPLETE
ISSUE_TEMPLATE

Incoming PR for this as well πŸ‘

The 2nd ul in the contributing sections setup section of the readme goes to a 404 page

Do you want to request a πŸš€ feature or report a πŸ› bug?

(Write your answer here.)
minor bug

πŸ€” Expected Behaviour

(Write what you thought would happen.)
I thought i would go to the place i need to generate an api key but it leads to a 404 page.

πŸ˜• Current Behaviour

(Write what happened. Please add screenshots.)
I got a 404 page when i clicked on the 2nd ul in the contributing sections setup section of the readme. The ul that states "Generate your Sentiment API key here."

🌍 Your Environment

Software Version
node
npm
yarn (if you use Yarn)
Operating system

πŸ’» Steps to Reproduce

(Write your steps here.)
click on the link in the setup section of the readme that states "Generate your Sentiment API key here."

πŸ’‘ Possible Solution

(Write your solution here.)
fix the link to the proper url to generate a api key, i dont know which link that should be linked to but i suspect you do.

Thanks to @miljan-fsd from parcel-react-app for the template πŸ‘Œ

Moar badges

Add Prettier badge

Add in the Prettier badge in the readme:

Add this line below the license badge>

[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

For the badge to look like this: styled with prettier

Label it as a good first issue and help wanted @amandeepmittal please


Also add in the Twitter follow intent button:

Adding the following HTML into the README.me

<p>
  <a href="https://twitter.com/intent/follow?screen_name=_100DaysOfCode">
    <img src="https://img.shields.io/twitter/follow/shields_io.svg?style=social"
      alt="follow on Twitter"></a>
</p>

You will have a follow on Twitter badge:

follow on Twitter

Use `in_reply_to_status_id:`

For replies from the bit suggest using in_reply_to_status_id: in the reply, this will give the user a bit of context as to why the bot is tweeting them with an inspirational quote. Example here:

bot.post('statuses/update', {
  status: '@ScottDevTweets I reply to you yes!',
  in_reply_to_status_id: '860900406381211649'
}, (err, data, response) => {
  if (err) {
    console.log(err)
  } else {
    console.log(`${data.text} tweeted!`)
  }
})

A modification on this will need o be added to the sentiment.js module

Update docs to the KCD README pattern

README pattern

Optimal README layout from Kent Dodds source:

  1. Title + tagline + logo?
  2. Badges
  3. The problem
  4. The solution
  5. TOC
  6. Installation
  7. Usage
  8. FAQ
  9. Inspiration
  10. Alternatives
  11. Contributors
  12. License

Sentiment API down or out of service

Looks like the Mashape API for sentiment has been down for the last few days now.

image

Not sure wen it's going to be back up πŸ€·β€β™‚οΈ

Bot tweets opt out

Give #100DaysOfCode community members the option to opt out of receiving tweets from the bot.

They could just block the bot or mute it if they prefer but I think this will be a nice way to let users know that we're thinking of them and they can still follow the bot and see its posts in their stream so then be able to encourage other community members without getting tweeted at by the bot.

opt out reply 'something' to stop the bot

Something to that effect, this will have to go into a persistent datastore LevelDB is probably the best option.

Amend slack channel url

The current slack channel url has expired

This is a good first issue

Change it to 100xcode.slack.com

Getting this to run issue and deploying with zeit question/issue

I got this to deploy, however it's acting strange,
it's starting to build okay, but gives me an error

(node:116) UnhandledPromiseRejectionWarning: OpenError: IO error: /home/nowuser/src/src/helpers/blacklistUsersDb/LOCK: No such file or directory
    at /home/nowuser/src/node_modules/levelup/lib/levelup.js:91:23
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
    at /home/nowuser/src/node_modules/deferred-leveldown/deferred-leveldown.js:20:21
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
    at /home/nowuser/src/node_modules/abstract-leveldown/abstract-leveldown.js:41:14
(node:116) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:116) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
No open port found. Make sure 'npm start' creates an HTTP server on a port (any).
More details: https://err.sh/now-cli/no-open-port-found
====================
TWEET COUNTER=100
====================
...

it seems to just loop with the tweet counter...

Any help would be appreciated!

Thanks!

Consider adding development branch

Please consider adding a development branch and possibly a branch for adding patches to

Also please consider adding the following protection on branches master, development and patch so they are protected:

image

Thanks

Remove engines

Node is defaulted to 8 in now so maybe do away with this if deploying to now with next release?

"engines": {
    "node": "~6.1.0",
    "npm": "~.3.8.6"
  },

Encouragement for users not to day 100 yet

What if we had something to where the bot would encourage someone to continue their 100DaysofCode? Maybe if they haven't posted in 7+ days and haven't posted Day 100 they would get a tweet mention that encouraged them to keep on going??

Keys left in ignition

API keys in config.js again, I have submitted PR to use .env require('dotenv') so API keys can be ignored in future πŸ˜„

Added #53 for this

Remove yarn.lock file

to keep consistent use of npm over all development modes and the introduction of package-lock.json since npm@5.

Contributing needs work

The contributing.md needs to have some work done.

Can I suggest adding in how to make a PR

Maybe take details from one of @QuincyLarson's Medium articles from the guides app?

Or point to the fCC Guides app locations??

Thoughts on using .stream

Thoughts on using bot.stream('statuses/filter' in place of search?

So, in place of having:

setInterval(retweet, retweetFrequency) 

Then the search function in the retweet module and the parameter passed in with the search terms. Why not have all the search terms in a search parameter?

const trackStream = bot.stream('statuses/filter', {
  track: trackWords
})
trackStream.on('tweet', retweet)

There would possibly need to be some form of filter so as not to RT absolutely everything that is tweeted, but with this method, we can track more than just 100DaysOfCode tag

Project of the day.

It is a suggestion of a project that one can develop on that day. It can be a simple things of a skill to develop through that 1 hour.

Blacklist these Users from Twitter

I am opening this issue to block Twitter accounts who spam #100DaysOfCode and are retweeted by the bot. Please list Twitter handlers here and will update the list in production either weekly or bi-weekly basis.

Check follower relationship before tweeting

Check relationship and if user has already been thanked for following the account

This should probably go into one of the database enhancements as the info needs to be persisted.

config.js to be included in .gitignore

Just a thought that the Twitter keys for this are regenerated and kept private so that someone with not the best intentions could post what they like?

As it stands anyone can take this code and post what they like to the @_100DaysOfCode account on Twitter

Welcome bot! Respond to the user when committing to 100DaysOfCode

In the Medium article there's a call to arms where the user will tweet their commitment to the challenge:

I'm publicly committing to the 100DaysOfCode Challenge

The bot can reply with a welcome message, this is sort of an extension to the abandoned API:

#15
#66

This could be a quick win however by using stream.on('tweet' and match the specific (or exact) phrase

Add tests for env variables

to avoid this:

==================== 
TWEET COUNTER=100 
==================== 
==================== 
TWEET COUNTER=100 
==================== 
==================== 
TWEET COUNTER=100 
==================== 
==================== 
TWEET COUNTER=100 
==================== 
==================== 
TWEET COUNTER=100 
====================

These parameters need to be tested πŸ™ƒ

const randomMin = parseInt(param.tweetTimeOutMin)

Standardise call timers

So as I understand it, 100DoC bot is calling functions in two differing ways which seem the samey

setImmediate(checkIfFirstOrLastDay, 720000);

bot.js#L148

And

setInterval(favoriteTweet, 960000);

bot.js#L93

and I'm asking for clarification here just as much as agreement but, is there not one way we could agree to use just one for consistency?

and also I have no idea what 960000 and 720000 milliseconds are and have to go convert them

can we agree on the

setInterval(favoriteTweet, 1000 * 60 * howeverManayMinutes);

So anyone reading can quickly see how long the interval is?

Thanks.

Use GraphCool for backend

Using GraphCool to store the data the bot uses for things like:

  • The Project of the Day, items could be tweeted sequentially and not repeated
  • Inspirational quote items could be tweeted sequentially and not repeated
  • Encouragement via the sentiment API could be better handled and use more than a key value pair
  • Retweets can be checked so the bot is not retweeting a popular tweet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.