Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Yu yuikns

🎯
Focusing
View GitHub Profile
@yuikns
yuikns / vsftpd.conf
Last active May 28, 2022
Example config file /etc/vsftpd/vsftpd.conf
View vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
View pinyin_tokenlizer.py
class PyTrieNode(object):
def __init__(self, key="", seq=[]):
self.key = key
self.end = len(seq) == 0
self.children = {}
if len(seq) > 0:
self.children[seq[0]] = PyTrieNode(seq[0], seq[1:])
def add(self, seq):
if len(seq) == 0:
@yuikns
yuikns / assert_cuda.c
Created Nov 5, 2016 — forked from allanmac/assert_cuda.c
A tiny example of CUDA + OpenGL interop with write-only surfaces and CUDA kernels. Uses GLFW+GLAD.
View assert_cuda.c
//
//
//
#include <stdlib.h>
#include <stdio.h>
//
//
//
View gist:7492012ecaf469a9a544da38855391e9
server {
listen 80;
# server_name brainhealth.sunlab.org;
location / {
# proxy_pass http://127.0.0.1:8000;
proxy_pass http://127.0.0.1:58000;
proxy_read_timeout 300; # Some requests take more than 30 seconds.
View set-up-google-fi-your-iphone-0174991.md

From: https://ios.gadgethacks.com/how-to/set-up-google-fi-your-iphone-0174991/

Enable SMS & MMS Messages

Now, to make sure your iPhone can send and receive regular non-iMessage text messages, you'll likely need to tweak some additional options. Open your Settings app and head to the "Cellular" menu. From here, if you're on iOS 12, tap "Cellular Data Network." If you're on iOS 11, tap "Cellular Data Options," then "Cellular Data Network."

Opening the Cellular Data Network menu on iOS 11.

Next, you'll have to manually enter a few values into the provided fields. So copy the information below exactly as it's typed (leaving the "leave blank" fields blank, obviously), then enter it into the fields on your iPhone.

View sample.xml
<inproceedings mdate="2012-12-10" key="conf/aaai/Zivan08">
<author>Roie Zivan</author>
<title>Anytime Local Search for Distributed Constraint Optimization.</title>
<pages>393-398</pages>
<year>2008</year>
<booktitle>AAAI</booktitle>
<crossref>conf/aaai/2008</crossref>
<url>db/conf/aaai/aaai2008.html#Zivan08</url>
<ee>http://www.aaai.org/Library/AAAI/2008/aaai08-062.php</ee>
</inproceedings>
View folder_bench.py
import os
import sys
import time
from timeit import default_timer as timer
from datetime import timedelta
from os import path
base_dir = "data"
dummy_dir_small = path.join(base_dir, "small")
dummy_dir_large = path.join(base_dir, "large")
View conlleval.pl
#!/usr/bin/perl -w
# conlleval: evaluate result of processing CoNLL-2000 shared task
# usage: conlleval [-l] [-r] [-d delimiterTag] [-o oTag] < file
# README: http://cnts.uia.ac.be/conll2000/chunking/output.html
# options: l: generate LaTeX output for tables like in
# http://cnts.uia.ac.be/conll2003/ner/example.tex
# r: accept raw result tags (without B- and I- prefix;
# assumes one word per chunk)
# d: alternative delimiter tag (default is single space)
# o: alternative outside tag (default is O)