Bash script which will:
- Iterate all commits made within a Git repository.
| # An example to get the remaining rate limit using the Github GraphQL API. | |
| import requests | |
| headers = {"Authorization": "Bearer YOUR API KEY"} | |
| def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
| request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
| if request.status_code == 200: |
| { | |
| "name": "[project-name]", | |
| "description": "[project-description]", | |
| "version": "1.0.0" | |
| } |
| # Assuming an Ubuntu Docker image | |
| $ docker run -it <image> /bin/bash |
| /** | |
| * Defines an x,y coordinate | |
| * @param {float} x coordinate | |
| * @param {float} y coordinate | |
| */ | |
| function Point (x, y) { | |
| this.x = x; | |
| this.y = y; | |
| } |