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
# Usage: | |
# - pip install marko (in a venv or system wide if you want) | |
# - python logseq_to_org.py <logseq's pages directory> <output folder> | |
import datetime as dt | |
import re | |
import sys | |
import uuid | |
from contextlib import contextmanager | |
from dataclasses import dataclass, field |
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
-- usage: tshark -r something.pcapng -q -X lua_script:tap.lua | |
local teid = Field.new("gtp.teid") | |
local teid_cp = Field.new("gtp.teid_cp") | |
local gtp_msg = Field.new("gtp.message") | |
local user_ipv4 = Field.new("gtp.user_ipv4") | |
local rat_type = Field.new("gtp.ext_rat_type") | |
local time = Field.new("frame.time_epoch") | |
local frame_number = Field.new("frame.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
! | |
! Swap Caps_Lock and Control_L | |
! | |
remove Lock = Caps_Lock | |
remove Control = Control_L | |
keysym Control_L = Caps_Lock | |
keysym Caps_Lock = Control_L | |
add Lock = Caps_Lock | |
add Control = Control_L |
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
instruction_set = {} | |
import string | |
def command( func ): | |
def exec_(regbank, op, val = None ): | |
if(val): | |
pc = func(regbank, op, val) | |
else: | |
pc = func(regbank, op) | |
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 java.util.Iterator; | |
import java.util.stream.Stream; | |
import java.util.stream.StreamSupport; | |
import javafx.util.Pair; | |
public class ZipWithIndex { | |
public static void main(String[] args) { | |
Stream<String> s = Stream.of("One", "Two", "Three", "Four", "Five"); |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.mycompany.teste; | |
import java.util.HashMap; | |
import java.util.Map; |
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
class LinkedList: | |
def __init__(self, head, tail): | |
self.head = head | |
self.tail = tail | |
def reverse(self): | |
l = self | |
newl = None | |
while l: | |
newl = cons(l.head, newl) |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package visitorchallenge; | |
import ast.Exp; | |
import ast.MulExp; | |
import ast.NegExp; |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package visitorchallenge; | |
import ast.Exp; | |
import ast.MulExp; | |
import ast.NegExp; |
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/bash | |
function check-command { | |
type $1 > /dev/null 2>/dev/null | |
if [ $? -ne 0 ] | |
then | |
(>&2 echo "Command $1 expected, but not found.") | |
(>&2 echo "Please install dependencies: sudo apt-get install sqlite3 jq") | |
exit 1 |
NewerOlder