Skip to main content

Data science class -007

 Github  SCM

 



 github Branching strategy -

curl commands

1) Curl , Access token , do create from settings

 'curl -u fullstackdotai "Authorization:token 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https://api.github.com/users/fullstackdotai/repos

 FullstackRepo

 2)

python github1.py

==========
import requests
import json

User = input("Enter the name of the User you want to print repository list of : ")
url = "https://api.github.com/users/{}/repos".format(User)

data = {"type" : "all" , "sort" : "full_name" , "direction" : "asc"}

output = requests.get(url,data=json.dumps(data))


for i in output.json():
    print(i["name"])

>> python github1.py

password:
 

 

 

 

What is Git,github,githubdesktop ?

1. Repository Setup:

     git init:

      This command creates a new Git repository in the current directory. This is the first step to start version control for your project.

 

    git clone https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL: This command clones an existing Git repository from a remote location (like GitHub or a server) to your local machine.

 

2. Tracking Changes:

 

    git add [file]: This command adds a specific file or directory to the staging area, which tells Git that you want to include these changes in the next commit.

 

    git commit -m "[message]": This command captures the current state of the files in the staging area as a commit. The -m flag lets you specify a commit message describing the changes.

 

    git status: This command shows the status of your working directory, indicating which files are modified, staged, or untracked.

 

3. Inspecting History:

 

    git log: This command displays the history of commits made to the repository. It shows information like commit message, author, and date.

 

    git show [commit hash]: This command displays details of a specific commit, including the commit message, changes introduced in that commit, and the commit hash (unique identifier).

 

4. Branching and Merging:

 

    git branch [branch name]: This command creates a new branch with the specified name. Branches allow you to work on different versions of your project independently.

 

    git checkout [branch name]: This command switches you to a different branch. You can work on the files associated with that branch.

 

    git merge [branch name]: This command combines the changes from one branch into the current branch.

 

5. Remote Repositories:

 

    git remote add [name] https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL : This command adds a remote repository (like GitHub) to your local repository. You can give it a nickname with the [name] placeholder.

 

    git push [remote name] [branch name]: This command pushes your local branch commits to the remote repository.

 

    git pull [remote name] [branch name]: This command fetches changes from the remote repository for a specific branch and merges them into your local branch.

 

6. Undoing Changes:

 

    git reset [commit hash]: This command allows you to undo changes made in a specific commit or later. Use with caution as it rewrites history.

 

    git rm [file] : This command removes a file from the staging area and your working directory.

 

# download and output to standard output
curl http://www.google.com

# -L: follow redirections (specified in HTTP Location Headers)
curl -L http://www.google.com

# -o <filename>: output to specific file
curl -L -o out.html http://www.google.com

# -O: output to filename based on url
curl -O http://cs229.stanford.edu/notes/cs229-notes1.pdf

# output to multiple file
curl -O <your-url> -O <your-another-url>

# -#: display progress bar while downloading instead of progress meter
curl -# -O http://cs229.stanford.edu/notes/cs229-notes1.pdf

# -C -: resume previous download by submitting somethings like ``Range: bytes=61440-`` in HTTP request header
curl -# -C - -O http://cs229.stanford.edu/notes/cs229-notes1.pdf

# --limit-rate <rate>: limit data transfer rate
curl --limit-rate 1000B -O http://www.gnu.org/software/gettext/manual/gettext.html

# -z <date(time)>: download only modified before/after specific time
curl -z -29-Sep-2012 -# -O http://cs229.stanford.edu/notes/cs229-notes1.pdf
# this will download only if modified before 29-Sep-2012

# download list of url
curl -C - -# -O http://cs229.stanford.edu/notes/cs229-notes[1-9].pdf

# -v, –trace: debug using verbose to inspect header
curl -v http://www.google.com

# -I/--head: fetch HTTP-header only
curl -I http://www.google.com

# custom protocol
curl dict://dict.org/show:db
curl dict://dict.org/d:google:foldoc

# -x <host>:<port>: using proxy
curl -x localhost:8000 http://www.google.com
 
 

 

Comments

Popular posts from this blog

Telecom OSS and BSS: A Comprehensive Guide

  Telecom OSS and BSS: A Comprehensive Guide Table of Contents Part I: Foundations of Telecom Operations Chapter 1: Introduction to Telecommunications Networks A Brief History of Telecommunications Network Architectures: From PSTN to 5G Key Network Elements and Protocols Chapter 2: Understanding OSS and BSS Defining OSS and BSS The Role of OSS in Network Management The Role of BSS in Business Operations The Interdependence of OSS and BSS Chapter 3: The Telecom Business Landscape Service Providers and Their Business Models The Evolving Customer Experience Regulatory and Compliance Considerations The Impact of Digital Transformation Part II: Operations Support Systems (OSS) Chapter 4: Network Inventory Management (NIM) The Importance of Accurate Inventory NIM Systems and Their Functionality Data Modeling and Management Automation and Reconciliation Chapter 5: Fault Management (FM) Detecting and Isolating Network Faults FM Systems and Alerting Mecha...

"Depth-Guard" – 3D Spatial Occupancy monitor Challenge -2

  Project Title: "Depth-Guard" – 3D Spatial Occupancy Monitor 1. The Problem In a smart warehouse, a robot needs to know if a loading zone is clear or occupied. A 2D camera alone can’t tell the difference between a "flat picture of a box" on the floor and an "actual 3D box." The Goal: Build a Python-based system that uses Computer Vision and Depth Perception (AI 3D) to identify objects and determine their 3D volume (Size) and Distance from the camera. 2. Intern Tasks Object Detection: Use a pre-trained model (like YOLOv8) to draw 2D boxes around objects. Depth Mapping: Use a depth estimation model (like MiDaS or a simulated Stereo-depth feed) to calculate how far each object is. Occupancy Logic: If an object is closer than 1 meter and larger than a specific volume, mark the zone as "BLOCKED." Alert System: Print a warning if the 3D space is too crowded. 3. Sample Datasets (Simulation) Since interns may not have 3D cameras (LiDAR/RGB-D), pr...

Simple Virtual Waiting Room -Challenge 1

   Simple Virtual Waiting Room (VWR) 1. The Problem Our website can only handle 10 users per minute . If more than 10 people try to access it at once, the server will crash. We need a system that: Counts incoming users. Redirects "overflow" users to a waiting page. Admits them back to the main site one by one as space becomes available. 2. Intern Tasks Create a Gateway: A simple script that checks: if (active_users < 10) { allow } else { send to queue } . Build the Queue: Use a simple list (FIFO) to store user IDs. The Wait Page: A basic HTML page that says: "You are number X in line. Estimated wait: Y minutes." Admission Logic: Every 30 seconds, pull the next user from the queue and "admit" them. 3. Sample Datasets (Simulation) Provide these two datasets to the interns. They should write a script to "read" these files and simulate how their system reacts. Dataset A: The Traffic Surge (Input) This file simulates users arriving at the ...