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 subprocess | |
import os | |
branch_name=input("Enter the target branch name, I mean, => target-repository:") | |
title=input("Enter the title or the Merge Request\n") | |
description=input("Enter description \n") | |
bool_origin=input("Is this branch already added in remote? (y/n) \n") | |
if bool_origin=='n': | |
origin = input("Input the branch name \n") |
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
# shitposter.py | |
# Requirements : Toot https://github.com/ihabunek/toot and a Unix-like system | |
import urllib.request | |
import random | |
import subprocess | |
word_url = "http://svnweb.freebsd.org/csrg/share/dict/words?view=co&content-type=text/plain" | |
response = urllib.request.urlopen(word_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
BITS 32 | |
extern printf | |
extern scanf | |
section .rodata | |
fmt: db "%d", 0 | |
output: db "factorial is %d",10,0 | |
section .text |
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
def leftrotate(a,n): | |
for i in range (n): | |
first=a[0] | |
for i in range (0,len(a)-1): | |
a[i]=a[i+1] | |
a.pop() | |
a.append(first) | |
print(a) | |
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
for i in range(1, 9): | |
m = 1 | |
for j in range(7, i-2, -1): | |
print(" ", end=' ') | |
for k in range(1, i+1): | |
print(m, end=' ') | |
m = m * 2 | |
m = m // 2 | |
for o in range (1,i): | |
m = m // 2 |
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
n=int(input()) | |
S=[] | |
for i in range (n): | |
A=[int(i) for i in input().split()] | |
S.append(sum(A)) #S will now have the total marks of all students | |
if S[0]==max(S): | |
print("1") | |
exit() #We handle the case of Thomas being ranked 1 seperately. | |
thomas=S[0] | |
rank=1 |
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
BITS 32 | |
extern printf | |
extern scanf | |
section .rodata | |
isprime: db "It's a prime number", 10, 0 | |
notprime: db "It's not a prime number", 10, 0 | |
input: db "%d", 0 | |
output: db "%d", 10, 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
BITS 32 | |
extern printf | |
extern scanf | |
section .rodata | |
output: db "The n-th term of the Fibnoacci series is %d", 10, 0 | |
input: db "%d", 0 | |
section .text |
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 collections | |
N = int(input()) | |
columns = input().split() | |
Student = collections.namedtuple('Student', columns) | |
sum = 0 | |
for i in range(N): | |
line = input().split() | |
student = Student(*line) | |
sum += int(student.MARKS) |
NewerOlder