Skip to content

Instantly share code, notes, and snippets.

View ceaksan's full-sized avatar
🤹

Ceyhun Aksan ceaksan

🤹
View GitHub Profile
import processing.video.*;
import com.google.zxing.*;
import com.google.zxing.common.*;
import com.google.zxing.qrcode.*;
Capture cam; //Set up the camera
Reader reader = new QRCodeReader();
PImage cover; //This will have the cover image
String lastISBNAcquired = ""; //This is the last ISBN we acquired
javascript:(function(){var d=document,e=d.querySelector('textarea#PolarisTextField1');if(e && e.style['max-height'].toString()!=="inherit"){e.style="height: 1400px !important; max-height:inherit !important;resize:auto !important;";}})();
javascript:(function(){var d=document,e=d.getElementsByClassName("admin-nav-columns");if(e && e[0].style.display && e[0].style.display.toString()=="none"){e[0].style="display:block;";} else {e[0].style="display:none;";}})();
@ceaksan
ceaksan / shopify-ga4-content-group.liquid
Last active April 30, 2023 08:19
Shopify - GA4 Content Group Info
{% assign t = template | split: '.' | first %}
{%- assign contentGroupInfo = '' -%}
{%- case t -%}
{%- when 'index' -%}
{%- capture contentGroupInfo -%}{{- contentGroupInfo | append: 'Home' -}}{%- endcapture -%}
{%- when 'page' -%}
{%- capture contentGroupInfo -%}{{- contentGroupInfo | append: 'Pages' -}}{{- contentGroupInfo | append: page.title | prepend: "/" -}}{%- endcapture -%}
{%- when 'cart' -%}
{%- capture contentGroupInfo -%}{{- contentGroupInfo | append: 'Pages/Cart' -}}{%- endcapture -%}
{%- when '404' -%}
#!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"
#!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):
#!/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
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
#!/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):
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}: '))