Skip to content

Instantly share code, notes, and snippets.

View arition's full-sized avatar

arition

View GitHub Profile
@arition
arition / pdf_grab.py
Created January 30, 2018 08:12
Grab pdf files from a url. Needs python3, requests, beautifulsoup4
"""grab pdf files from url"""
import urllib.parse
import os
import argparse
import requests
from bs4 import BeautifulSoup
def save(url):
@arition
arition / solarized.json
Last active November 15, 2018 04:33
Config file for concfg
{
"black": "#002b36",
"dark_blue": "#18567f",
"dark_green": "#5a6600",
"dark_cyan": "#1d6d66",
"dark_red": "#a82725",
"dark_magenta": "#8c2559",
"dark_yellow": "#7f5f00",
"gray": "#93a1a1",
"dark_gray": "#586e75",
@arition
arition / WCLinearLayoutManager.cs
Created March 12, 2015 17:11
Make wrap_content work in a RecyclerView. This also enable you to put a RecyclerView in a ScrollView. # xamarin_android
/*
Make wrap_content work in a RecyclerView.
This also enable you to put a RecyclerView in a ScrollView. (set height/width to wrap_content)
Base on http://stackoverflow.com/questions/26649406/
usage:
RecyclerView = FindViewById<RecyclerView>(Resource.Id.SimpleRecyclerView);
var layoutManager = new WCLinearLayoutManager(this, LinearLayoutManager.Vertical, false);
RecyclerView.SetLayoutManager(layoutManager);
*/
@arition
arition / IC2Exp_1.6.4_zh_CN.properties
Last active August 29, 2015 14:07
IC2Exp zh_cn lang 1.6.4 port, based on 1.7.10 translation
blockAdvMiner=高级采矿机
blockMachine=基础机器外壳
blockIronFurnace=铁炉
blockElecFurnace=电炉
blockMacerator=打粉机
blockExtractor=提取机
blockCompressor=压缩机
blockCentrifuge=热能离心机
blockMetalFormer=金属成型机
blockOreWashingPlant=洗矿机
@arition
arition / CleanID3.py
Created October 6, 2014 06:08
Clean Lyric timetags & CRLF to LF, Clean ID3v1 tags, Unify Tags to ID3v2.4. Need mutagen.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import argparse
import os
import sys
# ID3 tags support depends on Mutagen
try:
import mutagen
#include <iostream>
#include <memory.h>
#include <cmath>
//#include <cstdio>
using namespace std;
int n,m;
long long tree[2000010];
long long treeeditor[2000010];
//获取l~r的下标
int encode(int l,int r){
#include <iostream>
using namespace std;
long long mem[20][20]={0};
int bx,by,hx,hy;
long long gotob(int x,int y){
if(mem[x][y]!=0){ return mem[x][y]; }
if(x>bx||y>by){ return 0; }
if(x==bx&&y==by){ return 1; }
if((x==hx&&y==hy)||(x==hx+2&&y==hy+1)||(x==hx+1&&y==hy+2)||(x==hx-1&&y==hy+2)||(x==hx-2&&y==hy+1)||(x==hx-2&&y==hy-1)||(x==hx-1&&y==hy-2)||(x==hx+1&&y==hy-2)||(x==hx+2&&y==hy-1))
{ return 0; }
#include <iostream>
#include <algorithm>
#include <limits>
#include <cmath>
#include <map>
#include <memory.h>
using namespace std;
long long weight[35];
map<long long,int> halfweightmap;
long long n,m;
@arition
arition / IPChanger.cs
Created October 10, 2013 23:50
Simple IP Changer For Gezhi High School
using System;
using System.Management;
using System.Net;
namespace IPChanger
{
class Program
{
enum mode { auto, home, gezhi, gezhida };
static int Main(string[] args)