Skip to content

Instantly share code, notes, and snippets.

View iedmrc's full-sized avatar
💭
Working Smart

ibrahim ethem demirci iedmrc

💭
Working Smart
View GitHub Profile
@iedmrc
iedmrc / c101
Last active October 12, 2017 08:03
ck101
https://en.wikipedia.org/wiki/C_(programming_language)
https://tr.wikipedia.org/wiki/UNIX
https://en.wikipedia.org/wiki/BCPL
https://www.levenez.com/unix/unix.png
https://en.wikipedia.org/wiki/X86_instruction_listings
https://en.wikipedia.org/wiki/List_of_instruction_sets
https://en.wikipedia.org/wiki/History_of_programming_languages
https://www.computerhope.com/issues/ch000984.htm
https://en.wikipedia.org/wiki/Timeline_of_programming_languages
https://en.wikipedia.org/wiki/Plankalkül
@iedmrc
iedmrc / FlowController.php
Created July 13, 2018 17:03
A code snippet from a laravel project I wrote
/**
* Saves post to database
* @param Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function post(Request $request)
{
//Models
$posts = new Post();
$hashtags = new Hashtag();
@iedmrc
iedmrc / docker-compose.yml
Last active May 20, 2023 20:48
docker-compose file for the "VROOM with OSRM backend" stack. https://dev.to/iedmrc/vehicle-routing-problems-and-how-to-solve-them-8h3
version: "3"
services:
osrm:
container_name: osrm
image: osrm/osrm-backend
restart: always
ports:
- "5000:5000"
volumes:
- ./osrm:/data
@iedmrc
iedmrc / docker-compose.yml
Last active February 12, 2020 20:16
Docker-compose file for Project Galois. Check out: https://github.com/iedmrc/galois-autocompleter
version: '2.3'
services:
autocompleter:
container_name: autocompleter
image: iedmrc/galois-autocompleter:latest-gpu
restart: always
expose:
- "3030"
runtime: nvidia
networks:
@iedmrc
iedmrc / connect_psycopg2_to_pandas.py
Created July 23, 2020 10:11 — forked from jakebrinkmann/connect_psycopg2_to_pandas.py
Read SQL query from psycopg2 into pandas dataframe
import pandas as pd
import pandas.io.sql as sqlio
import psycopg2
conn = psycopg2.connect("host='{}' port={} dbname='{}' user={} password={}".format(host, port, dbname, username, pwd))
sql = "select count(*) from table;"
dat = sqlio.read_sql_query(sql, conn)
conn = None
@iedmrc
iedmrc / async.py
Last active August 21, 2020 08:38 — forked from phizaz/async.py
Python turn sync functions to async (and async to sync)
import functools
import asyncio
from concurrent.futures import ThreadPoolExecutor
def to_async(func):
"""Turns a sync function to async function using event loop"""
@functools.wraps(func)
async def run(*args, loop=None, executor=None, **kwargs):
if loop is None:
@iedmrc
iedmrc / update-docker-images.sh
Created September 11, 2020 09:01
To update docker images that only have the 'latest' tag:
docker images --format "{{.Repository}}:{{.Tag}}" | grep :latest | xargs -L1 docker pull