Skip to content

Instantly share code, notes, and snippets.

View siddht4's full-sized avatar
💭
I may be slow to respond.

siddht4

💭
I may be slow to respond.
View GitHub Profile
""
import csv
import requests
GITHUB_USER = ''
GITHUB_PASSWORD = ''
GITHUB_TOKEN = ''
REPO = '' # format is username/repo
ISSUES_FOR_REPO_URL = 'https://api.github.com/repos/%s/issues' % REPO
@siddht4
siddht4 / file_read
Created October 2, 2017 14:46
file read
_url_=[]
_t_a_=raw_input(" Enter the text file : ")
_fab=str(_t_a_)
fr = open(_fab, "r") #file read
for line in fr:
_url_.append(line)
_i=len(_url_)
print(_i)
# -*- coding: utf-8 -*-
_x=float(raw_input("Entrez un numéro pour trouver ses sorties sur son carré"))
_xx=_x**2
print("le carré de ",_x,"est",_xx)
#!/bin/bash
OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"
import time
from selenium import webdriver
driver = webdriver.Chrome('/path/to/chromedriver') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/xhtml');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
from __future__ import unicode_literals
import os,json,sys
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
import youtube_dl
_a_=0
_faa='a'+'.json'
fo = open(_faa, "w")
class MyLogger(object):
@siddht4
siddht4 / github_issues_to_csv.py
Created July 30, 2017 10:46 — forked from patrickfuller/github_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports issues from a list of repositories to individual csv files.
Uses basic authentication (Github username + password) to retrieve issues
from a repository that username has access to. Supports Github API v3.
Forked from: unbracketed/export_repo_issues_to_csv.py
"""
import argparse
import csv
from getpass import getpass
import requests
@siddht4
siddht4 / export_repo_issues_to_csv.py
Created July 30, 2017 10:46 — forked from marcelkornblum/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
This is strongly based on https://gist.github.com/unbracketed/3380407;
thanks to @unbracketed and the various commenters on the page.
I've mainly cleaned up the code into basic methods, and included the
various suggestions in the comments. Hope this is useful to someone.
Make sure you have `requests` and `csv` installed via pip then run it:
`python export_gh_issues_to_csv.py`
@siddht4
siddht4 / export_multi_repo_issues_to_csv.py
Created July 30, 2017 10:46 — forked from Kebiled/export_multi_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a list of repositories to individual CSV files
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
Derived from https://gist.github.com/Billy-/96b16b7682a19a562b277c1ab52547a5
"""
import csv
import requests
import json
from gi.require_version('Notify', '0.7') import Notify
Notify.init("App Name")
Notify.Notification.new("Hi").show()