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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"reflect" | |
) | |
type Something interface{} |
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 django.db import connection | |
# If using cursor without "with" -- it must be closed explicitly: | |
with connection.cursor() as cursor: | |
cursor.execute('select column1, column2, column3 from table where aaa=%s', [5]) | |
for row in cursor.fetchall(): | |
print row[0], row[1], row[3] |
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
package info.puzz.a10000sentences.utils; | |
import android.content.Context; | |
import android.os.Environment; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.nio.channels.FileChannel; |
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
package main | |
import ( | |
"fmt" | |
"unicode" | |
"golang.org/x/text/transform" | |
"golang.org/x/text/unicode/norm" | |
) |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Aaa struct { | |
a string | |
} |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"sync" | |
"time" | |
) | |
type GroupWaiter struct { |
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 sys | |
from django.conf import settings | |
from django.conf.urls import patterns | |
from django.http import HttpResponse | |
from django.core.management import execute_from_command_line | |
settings.configure( | |
DEBUG=True, | |
SECRET_KEY='trla_baba_lan', |
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
# Build: | |
# docker build -t latex . | |
# Run latex: | |
# docker run -v $(pwd):/latex -it latex pdflatex git.tex | |
# docker run -v $(pwd):/latex -it /bin/bash | |
FROM ubuntu:latest | |
RUN apt-get -y update | |
RUN apt-get -y install texlive-latex-base texlive-lang-european | |
WORKDIR /latex | |
CMD ["/bin/bash"] |
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
# Build: | |
# docker build -t sgfutils . | |
# Run sgfutils: | |
# docker run -v $(pwd):/sgfutils -it sgfutils | |
FROM ubuntu:latest | |
RUN apt-get -y update | |
RUN apt-get -y install curl | |
RUN apt-get -y install build-essential | |
RUN apt-get -y install libssl-dev | |
RUN curl https://homepages.cwi.nl/~aeb/go/sgfutils/sgfutils.tgz -o sgfutils.tgz |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"sync" | |
) | |
type Something struct { | |
Aaa string `json:"aaa"` |
NewerOlder