Skip to content

Instantly share code, notes, and snippets.

Avatar

Cagri Sarigoz csarigoz

View GitHub Profile
@csarigoz
csarigoz / run_exe_file_in_wine
Created Mar 8, 2016
Applescript for Running an exe file in wine
View run_exe_file_in_wine
#open gemius explorer
tell application "Terminal"
do script "/usr/local/bin/wine ~/.wine/drive_c/Program\\ Files/Gemius/gemiusExplorer/gemiusExplorer.exe"
end tell
@csarigoz
csarigoz / Hello Analytics.py
Created Aug 20, 2015
Hello Analytics for python 3 (with converting p12 secrets file to pem)
View Hello Analytics.py
"""A simple example of how to access the Google Analytics API."""
import argparse
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
import httplib2
from oauth2client import client
from oauth2client import file
@csarigoz
csarigoz / karatsuba.py
Created Jul 15, 2015
Karatsuba Algortihm for Integer Multiplication
View karatsuba.py
from random import randint
def karatsuba(x, y):
if (x<10) or (y<10):
return x*y
x_str = str(x)
x_n = len(x_str)
y_str = str(y)
y_n = len(y_str)
@csarigoz
csarigoz / recursive_multiplication.py
Last active Aug 29, 2015
A Basic Recursive Integer Multiplication Algorithm
View recursive_multiplication.py
from random import randint
def recursive_mult(x, y):
if (x<10) or (y<10):
return x*y
x_str = str(x)
x_n = len(x_str)
y_str = str(y)
y_n = len(y_str)
@csarigoz
csarigoz / mobile-desktop_speed-optimization.gs
Last active Oct 7, 2019
Googlesheet Script that returns Mobile Speed & Optimization and Desktop Speed & Optimization values in six adjacent columns
View mobile-desktop_speed-optimization.gs
/**
* Returns Mobile Speed & Optimization and Desktop Speed & Optimization values in six adjacent columns
* by Cagri Sarigoz
*/
function checkAll(Url) {
//CHANGE YOUR API KEY WITH YOUR_API_KEY BELOW
var key = "YOUR_API_KEY";
var serviceUrlMobile = "https://www.googleapis.com/pagespeedonline/v4/runPagespeed?url=" + Url + "&strategy=mobile&key=" + key;
var serviceUrlDesktop = "https://www.googleapis.com/pagespeedonline/v4/runPagespeed?url=" + Url + "&strategy=desktop&key=" + key;
You can’t perform that action at this time.