I hereby claim:
- I am xmonader on github.
- I am xmonader (https://keybase.io/xmonader) on keybase.
- I have a public key ASBTgClO63Ak6nieyv3BaD83NHACwzj_y18Grg1vtneDSwo
To claim this, I am signing this object:
from typchk import * | |
def validateargs(**kwargs): | |
c = Checker(kwargs) | |
def decorator(f): | |
def wrapper(*args, **funkwargs): | |
try: | |
if funkwargs: | |
res = c.check(funkwargs) |
from js9 import j | |
def packager(flistName='js9Flist'): | |
""" | |
@param: flistName name of the flist to be created | |
""" | |
prefab = j.tools.prefab.local | |
print("Copying jumpscale bins") | |
prefab.core.file_copy('/usr/local/bin/js9', '$BINDIR') |
#!/bin/bash | |
apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev -y | |
#git clone https://github.com/facebook/rocksdb.git | |
cd rocksdb | |
make shared_lib | |
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:`pwd`/include | |
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`pwd` | |
export LIBRARY_PATH=${LIBRARY_PATH}:`pwd` |
import os, httpclient | |
import threadpool, strutils | |
import times | |
import asyncdispatch | |
type | |
# LinkCheckResult = [link: string, state:bool] | |
LinkCheckResult = ref object | |
link: string | |
state: bool |
import os, httpclient | |
import threadpool, strutils | |
import times | |
import asyncdispatch | |
type | |
# LinkCheckResult = [link: string, state:bool] | |
LinkCheckResult = ref object | |
link: string | |
state: bool |
``` | |
╭─striky@asgard ~/wspace/nidb | |
╰─$ tree . | |
. | |
├── LICENSE | |
├── nidb | |
├── nidb.nim | |
├── nidb.nimble | |
├── README.md | |
└── tests |
users = [] | |
def registerUser(username): | |
global users | |
if username.isdigit(): | |
raise ValueError("Invalid username: {}".format(username)) | |
users.append(username) | |
return username |
import requests | |
import threading | |
from concurrent.futures.thread import ThreadPoolExecutor | |
from queue import Queue | |
import asyncio | |
import aiohttp | |
import time | |
links = ["https://google.com", "https://www.amazon.com/", |
I hereby claim:
To claim this, I am signing this object:
# nimshorturl | |
# Copyright xmonader | |
# nim url shortening service | |
import jester, asyncdispatch, htmlgen, json, os, strutils, strformat, db_sqlite | |
# hostname can be something configurable "http://ni.m:5000" | |
let hostname = "localhost:5000" | |
var theDb : DbConn | |
if not fileExists("/tmp/mytest.db"): | |
theDb = open("/tmp/mytest.db", "", "", "") | |
theDb.exec(sql("""create table urls ( |