Skip to content

Instantly share code, notes, and snippets.

@fzls
fzls / batch_exchange.py
Last active May 8, 2019 14:43
cc98上发帖批量散魔力值的辅助脚本
import re
import requests
from bs4 import BeautifulSoup
# 赠送的网址(post)
exchange_url = "http://www.nexushd.org/mybonus.php?action=exchange"
# 98的帖子网址
cc98_url = "http://www.cc98.org/dispbbs.asp"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import inspect
import json
import logging.handlers
import re
import sys
import time
import timeit
import time
import json
import logging
import logging.handlers
import sys
import requests
### log 相关设置
# 设置时间格式
//
// Created by Chen on 2016-12-24.
//
#include "DynamicProgrammingTSP.h"
#include <set>
#include <map>
using namespace std;
@fzls
fzls / percolation.py
Created October 17, 2016 02:01
percolation
class Site:
def __init__(self, parent=-1, top=False, bottom=False):
self.open = False
self.parent = parent
self.top = top
self.bottom = bottom
def makeOpen(self):
self.open = True
@fzls
fzls / Queen.cpp
Created October 14, 2016 12:08
Queen
#include <iostream>
#include <ctime>
using namespace std;
int solve(int board_size) {
int total = 0;
int res[18];
int col[18];
int pos[18];
int neg[18];
@fzls
fzls / README.md
Created September 2, 2016 08:19 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@fzls
fzls / _ide_helper.php
Created June 25, 2016 02:41 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.1.31 (LTS) on 2016-03-01.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {