This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
import sys | |
""" | |
Sagar Giri | |
[email protected] | |
https://github.com/girisagar46 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table border="1px solid"> | |
<thead> | |
<tr> | |
<th>Dates</th> | |
<th>Latitude</th> | |
<th>Longitude</th> | |
</tr> | |
</thead> | |
<tbody> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Tuple, NamedTuple, List, Optional, Dict | |
class SpendResult(NamedTuple): | |
is_successful: bool | |
remaining_balance: int | |
class Bank(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | |
OlderNewer