Skip to content

Instantly share code, notes, and snippets.

View ausuwardi's full-sized avatar

Agustianes Umbara Suwardi ausuwardi

View GitHub Profile
@ausuwardi
ausuwardi / shell-python.nix
Last active July 18, 2024 14:59 — forked from cdepillabout/shell.nix
shell.nix for Python development using virtualenv and pip
let
nixpkgs-src = builtins.fetchTarball {
# 22.11
url = "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz";
};
pkgs = import nixpkgs-src {
config = {
# allowUnfree may be necessary for some packages, but in general you should not need it.
allowUnfree = false;
@ausuwardi
ausuwardi / spacemacs-keybindings.md
Created August 17, 2021 22:53 — forked from rnwolf/spacemacs-keybindings.md
spacemacs keybindings that i need to learn
@ausuwardi
ausuwardi / logging.py
Created June 13, 2019 04:36 — forked from kingspp/logging.py
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description="Recompute parent_left, parent_right")
parser.add_argument('odoo_basedir')
parser.add_argument('odoo_cfg')
parser.add_argument('odoo_db')
parser.add_argument('model', help='Odoo model, e.g. account.account')
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client