Skip to content

Instantly share code, notes, and snippets.

View girisagar46's full-sized avatar
🇯🇵
🚀️

Sagar Giri girisagar46

🇯🇵
🚀️
View GitHub Profile
import requests
import os
r = requests.get("https://api.github.com/orgs/CSIT-GUIDE/repos")
print ("Number of repositories in the organization: ", len(r.json()))
repo_list= []
for index in range(len(r.json())):
repo = r.json()[index]
repo_list.append(repo.get("clone_url"))
# coding: utf-8
# # *CSIT Board exam percentage score predition based on data of 120 students Midterm, FinalTerm, Attendance, InternalMarking, AssignmentScores*
# In[ ]:
# some basic imports
# pandas for csv data reading
#include <stdio.h>
int main(){
return 0;
}
@girisagar46
girisagar46 / docx_mailmerge.py
Created October 11, 2017 09:44 — forked from vdavez/docx_mailmerge.py
A way to mailmerge Word documents using Python
#!/usr/bin/env python
import zipfile
import string
from lxml import etree
def read_docx(filepath):
# todo: Add test to make sure it's a docx
zfile = zipfile.ZipFile(filepath)
# return the xml
import glob
import os
import sys
"""
Sagar Giri
[email protected]
https://github.com/girisagar46
"""
<table border="1px solid">
<thead>
<tr>
<th>Dates</th>
<th>Latitude</th>
<th>Longitude</th>
</tr>
</thead>
<tbody>
@girisagar46
girisagar46 / otp.py
Created March 13, 2018 18:08 — forked from rcoh/otp.py
An implementation of Google Authenticator Compatible 2-factor Codes
"""
An implementation of TOTP as described in https://tools.ietf.org/html/rfc6238#section-4 aka Google Authenticator Style 2-factor Auth
"""
import base64
import datetime
import hashlib
import hmac
import sys
import struct
import time
from typing import Tuple, NamedTuple, List, Optional, Dict
class SpendResult(NamedTuple):
is_successful: bool
remaining_balance: int
class Bank(object):
#!/bin/bash
screens=$(xrandr | grep -c ' connected ')
echo "found $screens displays"
if [ "$screens" = 1 ]; then
gsettings set org.cinnamon panels-enabled "['1:0:bottom']"
else
gsettings set org.cinnamon panels-enabled "['1:1:bottom']"
fi
1. Write a Python script to concatenate following dictionaries to create a new one. Go to the editor
Sample Dictionary :
dic1={1:10, 2:20}
dic2={3:30, 4:40}
dic3={5:50,6:60}
Expected Result : {1: 10, 2: 20, 3: 30, 4: 40, 5: 50, 6: 60}