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
module SqlParser where | |
import Text.ParserCombinators.ReadP | |
import Data.Char (isAlpha) | |
--import Data.String.Utils | |
import qualified Data.Text as T | |
import Data.List | |
import qualified Data.Set as Set | |
import qualified Data.Map as M | |
import Data.Maybe |
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
Red [] | |
get-image: function [url] [ | |
next-link: "" img-src: "" | |
parse read url [ | |
thru {<div class="page">} | |
thru {<a href="} | |
copy next-link to {">} | |
thru {src="} | |
copy img-src to {" } |
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" | |
"net/http" | |
"strconv" | |
"github.com/jinzhu/gorm" | |
_ "github.com/jinzhu/gorm/dialects/sqlite" | |
"github.com/labstack/echo" |
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
include karax/prelude | |
var | |
viewmain = true | |
viewsub = false | |
proc subRender: VNode = | |
proc subcb = | |
viewmain = true | |
viewsub = false |
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
# This example using | |
# Nim: 0.18.0 | |
# Jester: 0.2.1 | |
# Using Jester >= 0.3.0 is preferrable if your Nim version > 0.18.0 | |
# In case you're using Jester >= 0.3.0, look the syntax different | |
# in its example because it's not backward compatible | |
import db_sqlite, asyncdispatch, json, strformat, strutils, sequtils | |
import jester |
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
// Traverses an arbitrary struct and translates all stings it encounters | |
// | |
// I haven't seen an example for reflection traversing an arbitrary struct, so | |
// I want to share this with you. If you encounter any bugs or want to see | |
// another example please comment. | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Heye Vöcking | |
// |
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
// from:: | |
// http://stackoverflow.com/questions/11527935/ddg#11544854 | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"reflect" | |
) |
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
## | |
## Example of Nest that tracks how long routing takes | |
## | |
import nest | |
import logging | |
import asynchttpserver, strtabs, times, asyncdispatch, math | |
import httpcore |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: <service name> | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: <service description> | |
### END INIT INFO |
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
ID | X1 | X2 | |
---|---|---|---|
10338001 | -4.673253857 | -0.612095787 | |
10338002 | -4.938803684 | -0.469263745 | |
10338003 | -5.460488163 | 0.917422708 | |
10338004 | -5.363523692 | -0.616513985 | |
10338005 | 0.919264591 | 0.112761882 | |
10338006 | -1.309394745 | -0.095029584 | |
10338007 | -4.033708861 | -0.816182819 | |
10338008 | -1.588305433 | -0.43439881 | |
10338009 | -1.118833043 | 1.356567282 |