This file contains 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 -*- | |
import requests, sys, os, urllib | |
def getOrCreateDir(sess, host, parent, name): | |
folder = sess.get(host + "/vi/file/list/node", | |
params={ | |
"node": parent, | |
"name": name.decode("utf-8") | |
}).json() | |
if folder["skellist"]: |
This file contains 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 typing import Union | |
import yaml | |
import logging | |
def sort_yaml_file(file_name: str, dst_file_name: Union[str, None] = None): | |
if not dst_file_name: | |
dst_file_name = dst_file_name | |
with open(file_name, "r") as source_file: |
This file contains 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 math | |
from . import html5 | |
def decimal_to_base(base, value): | |
""" | |
Converts decimal value into any base. | |
The base is defined by the number of digits in base. | |
""" | |
res = "" |
This file contains 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
# Apache Web Server | |
RewriteEngine off | |
Options -ExecCGI +Indexes | |
IndexOrderDefault Descending Date | |
Header always set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods GET | |
<FilesMatch "\.py$"> |
This file contains 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 -*- | |
import requests, argparse, sys, csv | |
from collections import OrderedDict | |
if __name__ == "__main__": | |
host = "https://www.xxx.de/" | |
sess = requests.Session() | |
ret = sess.post( |
This file contains 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
/* | |
Demonstration of a simple stack virtual machine & assembler | |
Input: | |
lit 10 | |
:loop | |
cpy | |
cpy | |
put |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
/* ~~~~~~~~~~~~~~~~~~AST~~~~~~~~~~~~~~~~~~ */ | |
typedef enum { | |
NODETYPE_OPERATOR, | |
NODETYPE_NUMBER |
This file contains 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/sh | |
PROBLEMS="" | |
for project in `gcloud projects list | cut -f 1 -d " "` | |
do | |
if [ "$project" == "PROJECT_ID" ] | |
then | |
continue | |
fi |
This file contains 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
#################### | |
# Google Cloud SDK # | |
#################### | |
GCLOUDSDKPATH="$HOME/bin/google-cloud-sdk" | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f "$GCLOUDSDKPATH/path.bash.inc" ] | |
then | |
source "$GCLOUDSDKPATH/path.bash.inc" |
This file contains 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
BEGIN { | |
FS=";" | |
} | |
{ | |
print "BEGIN:VCARD" | |
print "VERSION:2.1" | |
n = "" | |
cnt = split($1, parts, " ") |
NewerOlder