Skip to content

Instantly share code, notes, and snippets.

View lgylym's full-sized avatar
🎯
Focusing

lgylym lgylym

🎯
Focusing
View GitHub Profile
@lgylym
lgylym / gcrgc.sh
Created August 11, 2021 12:47 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# This script is used to bulk insert ignore statements to django migration files.
# It can be handy after squashing migration files.
# Place this file at the root of the project directory when use.
#
# Example usage:
# python manage.py lintmigrations --exclude-apps foobar | grep ERR | python fix_ignores.py
import glob
import sys
@lgylym
lgylym / siks.tex
Last active August 29, 2015 14:15
SIKS publication list from 2009, http://www.siks.nl/regulations.php
\chap{SIKS Dissertations}
\pagestyle{plain}
\newcommand{\SIKSdiss}[3]{{\bf #1}\hspace*{1ex}#2, {\it #3.}\\}
\section*{2009}
\SIKSdiss{2009-01}{Rasa Jurgelenaite (RUN)}{Symmetric Causal Independence Models}
\SIKSdiss{2009-02}{Willem Robert van Hage (VU)}{Evaluating Ontology-Alignment Techniques}
\SIKSdiss{2009-03}{Hans Stol (UvT)}{A Framework for Evidence-based Policy Making Using IT}
\SIKSdiss{2009-04}{Josephine Nabukenya (RUN)}{Improving the Quality of Organisational Policy Making using Collaboration Engineering}
choco install tortoisesvn notepadplusplus 7zip ccleaner putty vim
@lgylym
lgylym / pagerank.py
Last active August 29, 2015 14:10
pagerank, the simple case
def computePR(graph, oldPR):
newPR = {}
N = len(graph)
for node in graph:
pr = 0
for pred in graph[node][0]:
if len(graph[pred][1]) != 0:
pr += (oldPR[pred]+0.0)/len(graph[pred][1])
pr = 0.15 / N + 0.85 * pr
newPR[node] = pr

2020-10-10-name.markdown


layout: post title: "Title" date: 2020-10-10 categories: tech

link

@lgylym
lgylym / algorithm2e_mapreduce
Last active August 29, 2015 14:06
mapreduce template for algorithm2e
\begin{algorithm2e}[htbp]
\SetKwFor{ForEach}{for each}{do}{endfch}%separate foreach with a space
\SetArgSty{textrm} %do not automatically use italic in arguments
\SetKwFunction{Map}{Map}
\SetKwFunction{Reduce}{Reduce}
\SetKwProg{myproc}{Procedure}{}{}
\DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon instead
\KwIn{}
\KwOut{}
\myproc{\Map{[(key, value)]}}{
@lgylym
lgylym / gbk2utf8
Last active August 29, 2015 14:05
from gbk to utf8 txt file
//convert file name
convmv -f gbk -t utf8 -r .
//convert file content
iconv -f gbk -t utf8 file.txt -o output.txt
@lgylym
lgylym / gist:ba5c43385067434ba74b
Created July 16, 2014 15:22
customize table vertical space
\def\arraystretch{1.5}
\begin{tabular}{lll}
\toprule
\midrule
\bottomrule
\end{tabular}