Skip to content

Instantly share code, notes, and snippets.

Avatar
🤹

Ceyhun Enki Aksan ceaksan

🤹
View GitHub Profile
View Python-Tabula.py
#!pip install tabula-py
#!java -version
import tabula
import pandas as pd
# NEW VERSION
url = "https://fenbil.aku.edu.tr/FENBILENS/takvim/2014-2022-1RESMI.pdf"
View Python-PyPDF2.py
#!pip install PyPDF2
import urllib.request, io, PyPDF2
import pandas as pd
url = "https://fenbil.aku.edu.tr/FENBILENS/takvim/2014-2022-1RESMI.pdf"
remoteFile = urllib.request.urlopen(url)
pdfReader = PyPDF2.PdfFileReader(io.BytesIO(remoteFile.read()))
for i in range(pdfReader.numPages):
View GetTweets.py
#!/usr/bin/env python3
import tweepy
import csv
import datetime
class getTweets:
def __init__(self, consumer_key, consumer_secret, access_token, access_token_secret):
self.api = None
View PythonStringMethods.py
txt = '''Yaşamak görevdir bu yangın yerinde
Yaşamak, insan kalarak'''
'''
FIND METODU
'''
print(txt.find('Yaşamak')) # 0
print(txt.find('Sivas')) # -1
View convImage.py
#!/usr/bin/env python3
import os
from watchdog.events import FileSystemEventHandler
import time
from watchdog.observers import Observer
from PIL import Image
class convImage(FileSystemEventHandler):
View AI740-3.py
st = {}
for u in range(0, 5):
usr = str(input(str(u+1) + '. user name: '))
st[usr] = {}
def grade():
try:
for k in st.keys():
midterm = float(input(f'midterm grade for {k}: '))
View AI730-2.py
cv = {}
cv[0] = {'name': 'John', 'surname': 'Doe', 'title': 'Manager', 'department': 'Sales', 'salary': 10000, 'age': 34}
cv[1] = {'name': 'Robin', 'surname': 'Hood', 'title': 'Manager', 'department': 'Marketing', 'salary': 13000, 'age': 30}
cv[2] = {'name': 'Robin', 'surname': 'Chadler', 'title': 'Specialist', 'department': 'Marketing', 'salary': 10500, 'age': 27}
cv[3] = {'name': 'Abigail', 'surname': 'Brand', 'title': 'Engineer', 'department': 'IT', 'salary': 14500, 'age': 31}
cv[4] = {'name': 'Bruce', 'surname': 'Wayne', 'title': 'Founder', 'department': 'CTO', 'salary': 200000, 'age': 38}
for i in cv:
print(f'Person: {i+1}')
View AI720-1.py
import random
odd = random.sample(range(1, 10), 5)
even = random.sample(range(2, 11), 5)
merged = odd + even
for k in [i*2 for i in merged if(type(i)==int)]:
print(k)
View mermadi-flowcart-2.md

flowchart TD A[[sitemap.xml]] B([posts.xml]) C([pages.xml]) D([taxonomy.xml]) E([products.xml]) F([images.xml]) G([...more])

subgraph SiteMapIndex
View SiteMapParsing.R
any(grepl("curl", installed.packages()))
any(grepl("XML", installed.packages()))
library(curl)
library(XML)
getURL <- function(url) {
getExtension <- function(url){
ex <- strsplit(basename(url), split="\\.")[[1]]
return(ex[-1])