Skip to content

Instantly share code, notes, and snippets.

@cgl
cgl / workflow_full_v2.yml
Created June 5, 2021 10:20 — forked from sabderemane/workflow_full_v2.yml
Full workflow of python with docker services (postgres), to run django tests
name: Test Workflow
on: push
jobs:
test:
runs-on: ubuntu-latest
services:
image: postgres
@cgl
cgl / merge_into_development.sh
Created December 7, 2019 14:36
Merge branch into development
git fetch
branch=`git branch | grep \* | cut -d ' ' -f2`
echo "[MERGE] On branch $branch"
echo "[MERGE] Checking out development"
if ! git checkout development
then
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"
@cgl
cgl / ps_week_04.md
Last active March 11, 2016 15:21
Some Introductory level Python and NLP scripting

Some exercises:

Below you can find some easy exercises to play with python as an introduction to NLP. Throughout the solutions you will find several usage tips and tricks of Python.

Installation

  • Clone the code
  • Find and install Python3
  • Create a virtualenv

Expand The Edinburgh Twitter FSD Corpus

The Python scripts attached here take care of the following tedious work, and should help one quickly get started with some real work on the corpus:

  • Respect the Twitter API rate limits and throttle API hits.
  • Don't hit the API for already expanded tweet ID's, so you can resume tweet expansion after stopping midway.
  • Parse the API response and dump it into the correct column in the sqlite3 database.
  • Gracefully handle exceptions while acquiring tweets from the API.
  • Wrap version 1.1 of the Twitter API.
  • Start from a specified tweet ID, assuming the input file is sorted in increasing order of tweet ID.

Expand The Edinburgh Twitter FSD Corpus

The Python scripts attached here take care of the following tedious work, and should help one quickly get started with some real work on the corpus:

  • Respect the Twitter API rate limits and throttle API hits.
  • Don't hit the API for already expanded tweet ID's, so you can resume tweet expansion after stopping midway.
  • Parse the API response and dump it into the correct column in the sqlite3 database.
  • Gracefully handle exceptions while acquiring tweets from the API.
  • Wrap version 1.1 of the Twitter API.
  • Start from a specified tweet ID, assuming the input file is sorted in increasing order of tweet ID.
@cgl
cgl / django
Created September 4, 2013 11:59
django
Hello Django!
@cgl
cgl / .bash_profile
Last active December 7, 2019 14:50
Bash scripts
export LC_ALL=tr_TR.utf-8
export LANG=tr_TR.utf-8
# Set architecture flags
export ARCHFLAGS=-arch x86_64
#export PIP_DOWNLOAD_CACHE=$HOME/.pip_download_cache
# or, if you are on a Mac:
# export PIP_DOWNLOAD_CACHE=$HOME/Library/Caches/pip-downloads
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
@cgl
cgl / .gitconfig
Last active December 7, 2019 14:45
git
[user]
name = Çağıl Uluşahin
email = [email protected]
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]