This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net; | |
using System.IO; | |
using System.Drawing; | |
namespace BasicReq | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import logging | |
import re | |
# from https://github.com/baniuyao/Python-CLog/blob/master/CLog.py | |
class LogRecordWithStack(logging.LogRecord): | |
def __init__(self, *args, **kargs): | |
super(LogRecordWithStack, self).__init__(*args, **kargs) | |
self.chain = self.get_meta_data() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
class MagicDict(dict): | |
def __init__(self, **kwargs): | |
dict.__init__(self, kwargs) | |
self.__dict__ = self | |
def __getattr__(self, name): | |
self[name] = MagicDict() | |
return self[name] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func helloworld(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "Hello Go World!") |