Skip to content

Instantly share code, notes, and snippets.

View ucyo's full-sized avatar
🎯
Focusing

Cayoglu ucyo

🎯
Focusing
View GitHub Profile
@ucyo
ucyo / app.py
Created April 23, 2021 20:33 — forked from thomasdarimont/app.py
Simple python example using flask, flask_oidc and keycloak, needs a small patch of flask_oidc: https://github.com/puiterwijk/flask-oidc/issues/35
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@ucyo
ucyo / earthjsonfromwrf.py
Created May 26, 2020 09:02 — forked from barronh/earthjsonfromwrf.py
Creates a json in the format required by earth[1] from Weather Research and Forecasting (WRF) outputs.
from __future__ import print_function, unicode_literals
import os
import json
import numpy as np
from netCDF4 import Dataset
import argparse
from argparse import RawDescriptionHelpFormatter
@ucyo
ucyo / slides.md
Created November 28, 2016 22:39 — forked from aaronwolen/slides.md
Pandoc template to generate reveal.js slideshows.

% Title % Name % Date

My first slide

List

@ucyo
ucyo / isodate.py
Created October 19, 2016 22:01 — forked from mnot/isodate.py
isodate.py: W3C datetime functions
#!/usr/bin/env python
"""
isodate.py
Functions for manipulating a subset of ISO8601 date, as specified by
<http://www.w3.org/TR/NOTE-datetime>
Exposes:
- parse(s)
@ucyo
ucyo / conda.fish
Created October 15, 2016 16:16 — forked from jiffyclub/conda.fish
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.
function condalist -d 'List conda environments.'
for dir in (ls $HOME/miniconda3/envs)
echo $dir
end
end
function condactivate -d 'Activate a conda environment' -a cenv
if test -z $cenv
echo 'Usage: condactivate <env name>'
return 1
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2 FATAL_ERROR)
PROJECT(core VERSION 0.0.1 LANGUAGES CXX)
# Sets up some sane compiler flags for C++14 with appropriate warnings;
# tested to work with GCC 4.9+ and Clang 3.6+ --- feel free to modify
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -pedantic -Wold-style-cast -Wuninitialized -Wunreachable-code -Wstrict-overflow=3 -D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--gc-sections")