Skip to content

Instantly share code, notes, and snippets.

in your codebase

Alper Cugun alper

in your codebase
Block or report user

Report or block alper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alper / seating.snt
Last active Oct 4, 2019
Basic seating arrangement solver
View seating.snt
array2<int> rooms;
# Each room is represented by the maximum number of people that it can seat
rooms = [2, 3, 4, 5];
# People are represented by a list of indexes of the rooms where they sit (ten people in this case)
array10<int> people;
function respectCapacity? (people, roomNumber, capacity) {
alper / prepare-commit-msg
Last active Jun 19, 2019
A git hook that checks whether there is an issue number in the first line of your commit message
View prepare-commit-msg
#!/usr/bin/env python3
import sys
commit_msg_filepath = sys.argv[1]
with open(commit_msg_filepath, 'r+') as fh:
lines = fh.readlines()
if '#' not in lines[0]:
View skipping_codable.swift
// Models.swift
// strw
// Created by Alper Cugun on 23/8/18.
// Copyright © 2018 alper. All rights reserved.
import Foundation
alper /
Created Jan 30, 2018
Relevant commands for cmpcodesize that still need to work
export SWIFT_OLD_BUILDDIR="/Users/alper/Documents/swift-source/build/Ninja-DebugAssert/swift-macosx-x86_64"
export SWIFT_NEW_BUILDDIR="/Users/alper/Documents/swift-source/build/Ninja-ReleaseAssert/swift-macosx-x86_64"
./ -a
./ -a -p > out_a.csv
./ -c
./ -c -p > out_c.csv
View gist:5189046

How to set up a fresh project (on OS X)

  1. Install homebrew, by getting the commandline tools: and then do the install homebrew here:
  2. Open
  3. Check python is installed by typing python
  4. Install pip if you don't have it sudo easy_install pip
  5. Use pip to install virtualenv (don't ask me why): sudo pip install virtualenv
  6. Find a fresh place to checkout the project: use the Mac client:
  7. In the terminal cd to where you just checked out the project, for instance: cd ~/Documents/projects/sake/victorycheckout
  8. Create a virtual environment if you don't have one yet: virtualenv venv --distribute
View index.html
<!DOCTYPE html>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="jquery.tipsy.js"></script>
<link href="tipsy.css" rel="stylesheet" type="text/css" />
<div id="chart"></div>
alper / Example output.txt
Created Nov 29, 2012
A* routing for a connection graph of Yorckstraße
View Example output.txt
neighbors of S1NordS ['GG', 'S1NordN', 'U7S']
path from GG to U7S
['GG', 'S1NordS', 'U7S']
path from GG to S25
['GG', 'S1NordS', 'U7S', 'S25']
[Finished in 0.1s]
GG = Großgörchenstraße
S1NordS = S1 North Exit South of the road
S1NordN = S1 North Exit North of the road
from suds.client import Client
from import ImportDoctor, Import
wsdlURL = ''
imp = Import('')
doctor = ImportDoctor(imp)
You can’t perform that action at this time.