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
#!/usr/bin/env python3 | |
# ar-calc.pl - Web aspect ratio calculator | |
# Copyright (C) 2008-2011 Arne Bochem | |
# Copyright (C) 2014- Ricardo Constantino | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as | |
# published by the Free Software Foundation, either version 3 of the | |
# License, or (at your option) any later version. | |
# |
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
const wchar_t* common_char_table = L",_ -+;.&|~"; | |
int GetCommonCharIndex(wchar_t c) { | |
for (int i = 0; i < 10; i++) | |
if (common_char_table[i] == c) | |
return i; | |
return -1; | |
} |
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
diff --git a/src/base/string.cpp b/src/base/string.cpp | |
index 37ca780..fcbce24 100644 | |
--- a/src/base/string.cpp | |
+++ b/src/base/string.cpp | |
@@ -772,9 +772,11 @@ int GetCommonCharIndex(wchar_t c) { | |
return -1; | |
} | |
-wchar_t GetMostCommonCharacter(const wstring& str) { | |
+wchar_t GetMostCommonCharacter(const wstring& str2) { |
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
# 1. "get information from google" | |
# 2. "parse json/xml" | |
# 3. "loop by tier" | |
# 4. "loop by component" | |
# 5. "split by name and link" | |
# --- | |
# Get data from Google Docs, parse the data, split by tier, each tier by components, | |
# get a component and its name and link. | |
from xml.dom import minidom |
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
# por cada scraper | |
# criar classe correspondente | |
# cada scraper tem função get_price que diz o preço actual | |
# cada scraper tem timer, tem de se esperar X segundos por cada request para evitar quebrar scrapes | |
# cada scraper só se inicia uma vez por sessão | |
# criar scrapers para kuantokusta, alientech, moddingworld, chiptec, jifortec, pcdiga, | |
# usar time.sleep() | |
# import google | |
from requests import get |
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
#!/bin/bash | |
# | |
# tc uses the following units when passed as a parameter. | |
# kbps: Kilobytes per second | |
# mbps: Megabytes per second | |
# kbit: Kilobits per second | |
# mbit: Megabits per second | |
# bps: Bytes per second | |
# Amounts of data can be specified in: | |
# kb or k: Kilobytes |
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
https://r2---sn-2vgu0b5auxaxjvh-v2ve.googlevideo.com/videoplayback?source=youtube&key=yt5&itag=22&fexp=910118,913434,922924,923341,930008,930512,932617,934026,935015,948701&ip=188.80.206.173&ratebypass=yes&ipbits=0&expire=1402523954&mws=yes&sver=3&upn=iIZuPFvUkCs&signature=294274A87CD60B3A86FE4EEBCC1AFCAFDAE2F099.18090E634B35D25E966A0379E220CC8F7F062582&id=o-AMkU2UfpGfoOjfwjaJYD77I_bOcFFN5fCspgvuAxYOCP&sparams=gcr,id,ip,ipbits,itag,ratebypass,requiressl,source,upn,expire&requiressl=yes&mt=1402499509&mv=m&ms=au&gcr=pt&fallback_host=tc.v11.cache5.googlevideo.com&quality=hd720&title=Japão - Grupo C - Copa Aleixo (HD) |
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
ffmpeg -y -hide_banner -i %1 -ss %2 -to %3 -c:v libvpx -crf 4 -b:v 1.5M -vf scale=-1:480 -c:a libvorbis "%4.webm" |
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
ffmpeg -y -hide_banner -i %1 -ss %2 -to %3 -c:v libvpx -crf 4 -b:v 1.5M -vf "subtitles='%~1'",scale=-1:480 -c:a libvorbis -sn "%4.webm" |
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
ffmpeg -y -hide_banner -i %1 -ss %2 -to %3 -vf scale=506:-1 -r 15 -f image2pipe -vcodec ppm - | convert2 -delay 6 -loop 0 -layers OptimizePlus -layers OptimizeTransparency +dither -ordered-dither o8x8,30 +map - %4.gif |
OlderNewer