else
It's been a while since I updated this.
108
.GitImages/spinal_logo.svg
Normal file
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 744.09448819 1052.3622047"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="spinal_logo.svg"
|
||||
inkscape:export-filename="C:\Git\else\.GitImages\spinal_logo_256.png"
|
||||
inkscape:export-xdpi="38.919205"
|
||||
inkscape:export-ydpi="38.919205">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4370">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop4174" />
|
||||
<stop
|
||||
style="stop-color:#777777;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop4176" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4370"
|
||||
id="radialGradient4372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.4674789,0.62029891,-0.51681934,1.222671,51.772441,-207.89788)"
|
||||
cx="265.20264"
|
||||
cy="349.83276"
|
||||
fx="265.20264"
|
||||
fy="349.83276"
|
||||
r="254.12143" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="255.03714"
|
||||
inkscape:cy="555.58368"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1360"
|
||||
inkscape:window-height="706"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<circle
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4170"
|
||||
cx="363.91806"
|
||||
cy="538.80817"
|
||||
r="295.99783"
|
||||
inkscape:export-xdpi="311.35364"
|
||||
inkscape:export-ydpi="311.35364" />
|
||||
<path
|
||||
style="fill:#49857e;fill-opacity:1"
|
||||
d="m 331.19487,750.57103 c -42.06606,-13.19845 -77.5105,-46.15627 -89.9218,-87.96271 -4.63151,-16.02988 -7.68348,-36.02936 -7.28482,-47.73706 0.2617,-7.6852 0.96978,-9.9036 6.94801,-21.76761 14.28603,-26.6861 13.48106,-41.37898 -5.76767,-65.71416 -21.29116,-37.05333 -92.79593,-53.22981 -93.938,-100.81341 -0.0818,-3.40763 1.04548,-8.14067 2.46207,-11.05648 2.22756,-4.5851 7.46735,-9.13212 11.73986,-9.5308 44.69439,-4.17054 62.74452,38.0409 101.60576,44.53873 2.72863,0.43174 3.9809,0.49402 9.82799,0.48876 5.72924,-0.005 7.16449,-0.0764 9.89804,-0.49155 34.47329,-6.46197 61.48916,-25.34959 69.39391,-60.6136 1.87633,-8.88682 1.57106,-17.96941 -0.82064,-24.41598 -2.53296,-6.82738 -2.88476,-8.65583 -2.45967,-12.78436 1.09045,-10.59095 6.01456,-20.93101 12.44018,-26.12284 2.64108,-2.13396 6.50577,-3.87579 8.59949,-3.87579 1.0645,0 3.22482,0.66769 5.02567,1.55326 8.08139,3.97408 14.70597,15.74119 16.014,28.44537 0.42506,4.12853 0.0733,5.95698 -2.4597,12.78436 -2.3917,6.44657 -2.69697,15.52916 -0.82063,24.41598 10.35743,36.25246 34.55099,55.08993 69.39392,60.6136 2.73356,0.41514 4.16878,0.48654 9.89805,0.49155 5.84707,0.005 7.09935,-0.057 9.82799,-0.48876 37.94052,-6.33195 59.2268,-50.04938 101.60575,-44.53873 4.25522,0.55332 9.5123,4.9457 11.73986,9.5308 1.41657,2.91581 3.02805,7.69519 2.46207,11.05648 -7.13689,42.38545 -66.60927,67.21952 -93.938,100.81341 -21.32413,28.19853 -18.75338,39.88035 -5.76768,65.71416 4.77193,9.47004 5.72808,11.83572 6.45073,15.96017 2.09961,11.98332 -2.12012,40.43877 -8.94568,60.32418 -15.15952,42.54021 -55.22802,72.7692 -94.01781,82.61857 -19.17013,4.69306 -40.0333,3.30693 -59.19125,-1.43554 z M 374.97405,568.6417 c 21.11529,-2.32594 35.6588,-10.82009 42.74174,-24.96336 3.276,-6.54152 4.85346,-13.68587 4.33722,-19.64343 -1.41869,-16.37252 -11.33726,-30.40612 -27.02972,-38.24378 -4.52866,-2.26189 -9.40265,-3.948 -14.55968,-5.03683 -4.95015,-1.04517 -7.69118,-1.25269 -16.54603,-1.25269 -8.85488,0 -11.59588,0.20752 -16.54606,1.25269 -10.92485,2.30664 -20.39409,7.19264 -27.64787,14.266 -2.93609,2.86304 -4.64136,4.9105 -6.75281,8.10795 -5.05548,7.65567 -8.02468,18.48536 -7.17158,26.15739 0.52115,4.68681 2.10953,9.97864 4.32009,14.3927 6.42575,12.83099 19.19774,21.1448 37.13565,24.17313 2.72127,0.45942 4.54933,0.66555 9.73832,1.09812 2.01243,0.16775 15.80712,-0.0684 17.98073,-0.30789 z"
|
||||
id="path4395"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccsccssscsccsssssssccscsssccscccssssssssssssss"
|
||||
inkscape:export-xdpi="311.35364"
|
||||
inkscape:export-ydpi="311.35364" />
|
||||
<circle
|
||||
r="295.99783"
|
||||
cy="538.80817"
|
||||
cx="363.91806"
|
||||
id="circle4362"
|
||||
style="opacity:0.33700005;fill:url(#radialGradient4372);fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:export-xdpi="311.35364"
|
||||
inkscape:export-ydpi="311.35364" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 5.6 KiB |
BIN
.GitImages/spinal_logo_2048.png
Normal file
After Width: | Height: | Size: 211 KiB |
BIN
.GitImages/spinal_logo_256.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
.GitImages/spinal_logo_32.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
49
AHK/clickerheroes.ahk
Normal file
|
@ -0,0 +1,49 @@
|
|||
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
|
||||
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
|
||||
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||||
|
||||
CoordMode, Mouse, Screen
|
||||
|
||||
Clicks(xx, yy)
|
||||
{
|
||||
SendEvent {Click, %xx%, %yy%}
|
||||
sleep 80
|
||||
}
|
||||
|
||||
F4::
|
||||
{
|
||||
MsgBox "Stopped"
|
||||
Reload
|
||||
}
|
||||
|
||||
F2::
|
||||
{
|
||||
MsgBox "Hold F4 to stop"
|
||||
Loop
|
||||
{
|
||||
Clicks(630, 507) ; fish
|
||||
Clicks(856, 450) ; fish
|
||||
Clicks(866, 397) ; fish
|
||||
Clicks(978, 530) ; fish
|
||||
Clicks(1111, 471) ; fish
|
||||
Clicks(1159, 460) ; fish
|
||||
Clicks(725, 225) ; clicks
|
||||
Clicks(725, 275) ; powersurge
|
||||
Clicks(725, 328) ; crits
|
||||
Clicks(725, 380) ; metal
|
||||
Clicks(725, 432) ; goldclicks
|
||||
Clicks(725, 485) ; ritual
|
||||
Clicks(725, 640) ; reload
|
||||
Clicks(725, 584) ; energy
|
||||
Clicks(725, 530) ; superclicks
|
||||
Clicks(210, 515) ; buyhero
|
||||
Clicks(585, 515) ; over...
|
||||
Clicks(585, 150) ; up...
|
||||
Clicks(820, 150) ; over...
|
||||
Loop 180
|
||||
{
|
||||
; ...and down
|
||||
Clicks(820, 240) ; monster
|
||||
}
|
||||
}
|
||||
}
|
BIN
Ascii/sp.png
Normal file
After Width: | Height: | Size: 17 KiB |
37
Ascii/sp.txt
Normal file
|
@ -0,0 +1,37 @@
|
|||
-----:::
|
||||
...-----------:::::::::
|
||||
............---------:::::::,,,,
|
||||
..`````````.......--------:::::::,,,,,
|
||||
.```````````````...:vv,------:::::::,,,,,"
|
||||
..``````````````````-zz+z:------::::::,,,,,,""
|
||||
....`````` `````-zzzz:------:::::::,,,,,,"""
|
||||
.....````` `````xzzx.-------::::::,,,,,,""""
|
||||
---..::-````` ````,zzzz".------:::::::,,,_~~""""_
|
||||
-----xzzzJ?~-``` `````_Jzzzzz~------::::::"vJonnnT"""__
|
||||
------L+zzzzzz?".`````.:~xzzzzz+++J/":--:::,;Jooonnnn+"""___
|
||||
:------/z+zzzzzzzxL??xzzzzzzz+++++++TTzJJJ+ooooonnnoL""""___
|
||||
:::-------;J++zzzzzzzzzzzzzzzxxxJ+++TTTTTTToooooonT?""""""____
|
||||
:::::-------~L+++++++++++z/,------"v+TTTTTooooooz/","""""_____
|
||||
::::::::-------,vz+++++++z,----------"+TTooooooL_,,,""""""______
|
||||
,,:::::::::------:L++++++x---------:::JooooooJ",,,,""""""_______
|
||||
,,,,::::::::::::---?TTTTTTv:---::::::vooooooL,,,,,""""""________
|
||||
,,,,,,,::::::::::::~TTTTTTT+xv/;;/?xToooooon;,,,,""""""_________
|
||||
,,,,,,,,,,:::::::,zooooooooooooooooooooonnn+",""""""__________
|
||||
""",,,,,,,,,,,,,,zoooooooooooooooooonnnnnnnn+"""""____________
|
||||
"""""",,,,,,,,,,ooooooooooooonnnnnnnnnnnnnnn_""_____________
|
||||
""""""""""",,,,,+nnnnnnnnnnnnnnnnnnnnnnnnZZT"_______________
|
||||
____"""""""""""vnnnnnnnnnnnnnnnnnnnnZZZZZZ?_______________
|
||||
________"""""""znnnnnnnnnnnZZZZZZZZZZZZZz_______________
|
||||
______________JZZZZZZZZZZZZZZZZZZZZZZz______________
|
||||
______________/+ZZZZZZZZZZZZZeeeeZ+/______________
|
||||
______________;xoeeeeeeeeeeeeox;______________
|
||||
_______________~vxJz++zJxv~_______________
|
||||
______________________________________
|
||||
________________________________
|
||||
_______________________
|
||||
________
|
||||
|
||||
sp.png
|
||||
64x32 (4x8)
|
||||
1
|
||||
Min
|
9
Dictionary/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
Dictionary
|
||||
=======
|
||||
|
||||
I made this so that I could more easily acess a list of words. Previousy I had to open() a text file each time. Now, I can:
|
||||
|
||||
import dictionary.common as common
|
||||
import random
|
||||
|
||||
print(random.choice(common.words))
|
1
Dictionary/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
pass
|
6213
Dictionary/acronyms.py
Normal file
74550
Dictionary/common.py
Normal file
256181
Dictionary/compound.py
Normal file
113809
Dictionary/crosswd.py
Normal file
4160
Dictionary/crswd-d.py
Normal file
467
Dictionary/fiction.py
Normal file
|
@ -0,0 +1,467 @@
|
|||
words=['93277< >',
|
||||
'47460<e>',
|
||||
'33196<t>',
|
||||
'30314<a>',
|
||||
'29578<o>',
|
||||
'26890<n>',
|
||||
'24684<h>',
|
||||
'24462<s>',
|
||||
'23344<i>',
|
||||
'21292<r>',
|
||||
'19620<.>',
|
||||
'17977<d>',
|
||||
'15048<l>',
|
||||
'14873<e >',
|
||||
'12406< t>',
|
||||
'11710<he>',
|
||||
'10943<u>',
|
||||
'10661<d >',
|
||||
'10658<th>',
|
||||
'10608<m>',
|
||||
'10330<w>',
|
||||
'9414<y>',
|
||||
'8825<g>',
|
||||
'8528<c>',
|
||||
'8406< a>',
|
||||
'7851<t >',
|
||||
'7814<">',
|
||||
'7772<s >',
|
||||
'7730<in>',
|
||||
'7649< s>',
|
||||
'7508< th>',
|
||||
'7385<f>',
|
||||
'7220<er>',
|
||||
'6877< w>',
|
||||
'6582<the>',
|
||||
'5922<he >',
|
||||
'5904<an>',
|
||||
'5857<,>',
|
||||
'5711<p>',
|
||||
'5697<b>',
|
||||
'5536<y >',
|
||||
'5474< m>',
|
||||
'5464<n >',
|
||||
'5412<, >',
|
||||
'5333<r >',
|
||||
'5168< h>',
|
||||
'5024< the>',
|
||||
'4819<nd>',
|
||||
'4729<ou>',
|
||||
'4720<. >',
|
||||
'4641<ng>',
|
||||
'4419<ed>',
|
||||
'4399<o >',
|
||||
'4328< o>',
|
||||
'4264<k>',
|
||||
'4104<re>',
|
||||
'3965<I>',
|
||||
'3871< b>',
|
||||
'3869<to>',
|
||||
'3779<ha>',
|
||||
'3752<the >',
|
||||
'3746<nd >',
|
||||
'3744< the >',
|
||||
'3640<ing>',
|
||||
'3606<at>',
|
||||
'3526<ed >',
|
||||
'3459< f>',
|
||||
'3458<.">',
|
||||
'3456< i>',
|
||||
'3412< I>',
|
||||
'3393<en>',
|
||||
'3374<er >',
|
||||
'3352<I >',
|
||||
'3291< c>',
|
||||
'3288<on>',
|
||||
'3246<e.>',
|
||||
'3226<g >',
|
||||
'3147<hi>',
|
||||
'3116<ng >',
|
||||
'3101< to>',
|
||||
'3027<v>',
|
||||
'3014<me>',
|
||||
'2996<her>',
|
||||
'2991< I >',
|
||||
'2929<st>',
|
||||
'2913<as>',
|
||||
'2900<and>',
|
||||
'2887< an>',
|
||||
'2856<te>',
|
||||
'2824<es>',
|
||||
'2763<ing >',
|
||||
'2760<ar>',
|
||||
'2738<wa>',
|
||||
'2723<to >',
|
||||
'2699<se>',
|
||||
'2613<is>',
|
||||
'2576< l>',
|
||||
'2570<or>',
|
||||
'2569<it>',
|
||||
'2554<ne>',
|
||||
'2500<and >',
|
||||
'2475<s.>',
|
||||
'2464<ea>',
|
||||
'2453< to >',
|
||||
'2440< d>',
|
||||
'2418<ot>',
|
||||
'2352<ve>',
|
||||
'2337<le>',
|
||||
'2322< and>',
|
||||
'2313< and >',
|
||||
'2294< wa>',
|
||||
'2275< p>',
|
||||
'2210<sh>',
|
||||
'2112<nt>',
|
||||
'2102<d.>',
|
||||
'2072<a >',
|
||||
'2023<ho>',
|
||||
'2005<ll>',
|
||||
'1986< n>',
|
||||
'1982<r.>',
|
||||
'1976< he>',
|
||||
'1971<al>',
|
||||
'1969<as >',
|
||||
'1963<f >',
|
||||
'1948<d t>',
|
||||
'1913<her >',
|
||||
'1898< a >',
|
||||
'1896<at >',
|
||||
'1859<h >',
|
||||
'1834<ow>',
|
||||
'1825<ro>',
|
||||
'1819<no>',
|
||||
'1805<my>',
|
||||
'1788< my>',
|
||||
'1779<be>',
|
||||
'1764<ti>',
|
||||
'1756< ha>',
|
||||
'1724<my >',
|
||||
'1711< my >',
|
||||
'1704<ad>',
|
||||
'1698< in>',
|
||||
'1698<oo>',
|
||||
'1679< sh>',
|
||||
'1674<li>',
|
||||
'1663<of>',
|
||||
'1646<ut>',
|
||||
'1644<en >',
|
||||
'1637<ld>',
|
||||
'1637<t.>',
|
||||
'1630<ther>',
|
||||
'1613<l >',
|
||||
'1596<e t>',
|
||||
'1572< of>',
|
||||
'1554<ai>',
|
||||
'1548<e s>',
|
||||
'1542< r>',
|
||||
'1532<A>',
|
||||
'1530<ri>',
|
||||
'1524< e>',
|
||||
'1521<ch>',
|
||||
'1520<mo>',
|
||||
'1505<om>',
|
||||
'1497< be>',
|
||||
'1482<e w>',
|
||||
'1477<is >',
|
||||
'1465<ee>',
|
||||
'1464< g>',
|
||||
'1463<ur>',
|
||||
'1460<co>',
|
||||
'1442<er.>',
|
||||
'1434<was>',
|
||||
'1434<in >',
|
||||
'1431< was>',
|
||||
"1424<'>",
|
||||
'1423<us>',
|
||||
'1422<lo>',
|
||||
'1419<of >',
|
||||
'1410< of >',
|
||||
'1409<y.>',
|
||||
'1405<w >',
|
||||
'1402<hat>',
|
||||
'1391<de>',
|
||||
'1391<id>',
|
||||
'1383<wh>',
|
||||
'1381<sa>',
|
||||
'1374<oth>',
|
||||
'1357<la>',
|
||||
'1356<was >',
|
||||
'1355< was >',
|
||||
'1354<thi>',
|
||||
'1354<il>',
|
||||
'1352< wh>',
|
||||
'1349<re >',
|
||||
'1338<we>',
|
||||
'1327<un>',
|
||||
'1324<wi>',
|
||||
'1322<ke>',
|
||||
'1318<ca>',
|
||||
'1305< mo>',
|
||||
'1297<hin>',
|
||||
'1286<ay>',
|
||||
'1250<ld >',
|
||||
'1249< sa>',
|
||||
'1244< y>',
|
||||
'1239<hat >',
|
||||
'1236<T>',
|
||||
'1231<rs>',
|
||||
'1229<n t>',
|
||||
'1224<me >',
|
||||
'1223<el>',
|
||||
'1214<t t>',
|
||||
'1212<gh>',
|
||||
'1212<othe>',
|
||||
'1211<n.>',
|
||||
'1210<ma>',
|
||||
'1206<ce>',
|
||||
'1204<ut >',
|
||||
'1196<ul>',
|
||||
'1196<she>',
|
||||
'1187< no>',
|
||||
'1183< wi>',
|
||||
'1182<ac>',
|
||||
'1180<so>',
|
||||
'1173<ly>',
|
||||
'1172< in >',
|
||||
'1167< co>',
|
||||
'1167<other>',
|
||||
'1165< on>',
|
||||
'1161<pe>',
|
||||
'1153<S>',
|
||||
'1151<et>',
|
||||
'1149< her>',
|
||||
'1142<d th>',
|
||||
'1140<fo>',
|
||||
'1134<wo>',
|
||||
'1124<e a>',
|
||||
'1117<ta>',
|
||||
'1115<ir>',
|
||||
'1109<s a>',
|
||||
'1108<si>',
|
||||
'1099< A>',
|
||||
'1095< me>',
|
||||
'1086<k >',
|
||||
'1085<ic>',
|
||||
'1083<ra>',
|
||||
'1083<ie>',
|
||||
'1078<di>',
|
||||
'1074< she>',
|
||||
'1073<ad >',
|
||||
'1065< st>',
|
||||
'1049<yo>',
|
||||
'1044<ere>',
|
||||
'1040<his>',
|
||||
'1037<ter>',
|
||||
'1026<she >',
|
||||
'1025< she >',
|
||||
'1025<. I>',
|
||||
'1015< we>',
|
||||
'1014< thi>',
|
||||
'1003<you>',
|
||||
'996< yo>',
|
||||
'993< you>',
|
||||
'993<ll >',
|
||||
'981<ck>',
|
||||
'974<?">',
|
||||
'972<e,>',
|
||||
'967< so>',
|
||||
'962<tha>',
|
||||
'959<ver>',
|
||||
'958< tha>',
|
||||
'955< her >',
|
||||
'950<m >',
|
||||
'949<th >',
|
||||
'943<bo>',
|
||||
'942<ec>',
|
||||
'942< fo>',
|
||||
'941<am>',
|
||||
'941<ther >',
|
||||
'939<ol>',
|
||||
'936<se >',
|
||||
'932<es >',
|
||||
'930<ge>',
|
||||
'928<ed.>',
|
||||
'917< wo>',
|
||||
'915<s,>',
|
||||
'910<s t>',
|
||||
'904<his >',
|
||||
'901< ">',
|
||||
'898<d a>',
|
||||
'898<hen>',
|
||||
'892<ly >',
|
||||
'889<st >',
|
||||
'889<n th>',
|
||||
'888<do>',
|
||||
'887<an >',
|
||||
'885<for>',
|
||||
'884<e, >',
|
||||
'883< T>',
|
||||
'883<oul>',
|
||||
'878<ould>',
|
||||
'877<had>',
|
||||
'877<uld>',
|
||||
'873<all>',
|
||||
'873<he s>',
|
||||
'872< li>',
|
||||
'868<on >',
|
||||
'868< u>',
|
||||
'867<" >',
|
||||
'865<that>',
|
||||
'864<ow >',
|
||||
'864<s, >',
|
||||
'864< that>',
|
||||
'852<d s>',
|
||||
'849<not>',
|
||||
'848< had>',
|
||||
'848<ry>',
|
||||
'848<ed t>',
|
||||
'844<An>',
|
||||
'844<u >',
|
||||
'843<hen >',
|
||||
'843<e. >',
|
||||
'838<Th>',
|
||||
'836<d the>',
|
||||
'836<had >',
|
||||
'836< had >',
|
||||
'828<or >',
|
||||
'824< S>',
|
||||
'812<out>',
|
||||
'812<W>',
|
||||
'811<ith>',
|
||||
'808<ev>',
|
||||
'806<, a>',
|
||||
'806<g.>',
|
||||
'803<?>',
|
||||
'797<fa>',
|
||||
'789<that >',
|
||||
'788< that >',
|
||||
'788<->',
|
||||
'787<ould >',
|
||||
'787< se>',
|
||||
'786<uld >',
|
||||
'783<e h>',
|
||||
'782<y m>',
|
||||
'781<ht>',
|
||||
'780< ma>',
|
||||
'779< re>',
|
||||
'779<mot>',
|
||||
'778<ght>',
|
||||
'775<e th>',
|
||||
'770<e b>',
|
||||
'770< lo>',
|
||||
'768<fe>',
|
||||
'766<mother>',
|
||||
'765< it>',
|
||||
'764<wit>',
|
||||
'760<e o>',
|
||||
'759<ou >',
|
||||
'759< mot>',
|
||||
'759<thin>',
|
||||
'759< wit>',
|
||||
'758<moth>',
|
||||
'756<other >',
|
||||
'756<with>',
|
||||
'756<e c>',
|
||||
'756< with>',
|
||||
'756<mothe>',
|
||||
'754<eve>',
|
||||
'753<And>',
|
||||
'753<ig>',
|
||||
'751<And >',
|
||||
'751< mother>',
|
||||
'750< ca>',
|
||||
'747<our>',
|
||||
'745< moth>',
|
||||
'744< fa>',
|
||||
'743< mothe>',
|
||||
'742<rt>',
|
||||
'742<ba>',
|
||||
'742<e m>',
|
||||
'742<ot >',
|
||||
'742<s. >',
|
||||
'740<n the>',
|
||||
'738<tr>',
|
||||
'728<ug>',
|
||||
'726<. I >',
|
||||
'724<ns>',
|
||||
'723<r t>',
|
||||
'722<t th>',
|
||||
'721<ent>',
|
||||
'720<ts>',
|
||||
'718<t w>',
|
||||
'717<d m>',
|
||||
'716< as>',
|
||||
'715<if>',
|
||||
'715< do>',
|
||||
'715<ab>',
|
||||
'714<em>',
|
||||
'714<ith >',
|
||||
'711<hou>',
|
||||
'710<ng.>',
|
||||
'709<, t>',
|
||||
'708<he w>',
|
||||
'706<le >',
|
||||
'703< for>',
|
||||
'701<o t>',
|
||||
'696< with >',
|
||||
'696<with >',
|
||||
'695<I w>',
|
||||
'693<pl>',
|
||||
'692<nd t>',
|
||||
'686< not>',
|
||||
'685<ni>',
|
||||
'683<one>',
|
||||
'679< di>',
|
||||
'679<ear>',
|
||||
'677<im>',
|
||||
'677<t a>',
|
||||
'676<. A>',
|
||||
'675<e.">',
|
||||
'670<ss>',
|
||||
'669<ugh>',
|
||||
'668<mi>',
|
||||
'668<s w>',
|
||||
'667< ho>',
|
||||
'661<hing>',
|
||||
'660< al>',
|
||||
'655<op>',
|
||||
'652<n the >',
|
||||
'651<fi>',
|
||||
"650<'s>",
|
||||
'649<d,>',
|
||||
'649<os>',
|
||||
'647< k>',
|
||||
'645<ve >',
|
||||
'645<ere >',
|
||||
'636< An>',
|
||||
'635<au>',
|
||||
'633< I w>',
|
||||
"633<'s >",
|
||||
'632<ey>',
|
||||
'631<her.>',
|
||||
'630<d to>',
|
||||
'629<pa>',
|
||||
'628<y mo>',
|
||||
'627<ok>',
|
||||
'627<av>',
|
||||
'625<g t>',
|
||||
'618<ng t>',
|
||||
'617<d, >',
|
||||
'612<fr>',
|
||||
'610<it >',
|
||||
'608<s s>',
|
||||
'607<n a>',
|
||||
'604< ba>',
|
||||
'603<tt>',
|
||||
'601<me.>',
|
||||
'600<da>',
|
||||
'600<es.>',
|
||||
'599<nc>',
|
||||
'598<d w>',
|
||||
'598<d h>',
|
||||
'597<H>',
|
||||
'595<ome>',
|
||||
'593<nt >',
|
||||
'590<not >',
|
||||
'589< hi>',
|
||||
'589<s o>']
|
1000
Dictionary/freq-int.py
Normal file
1001
Dictionary/freq.py
Normal file
1185
Dictionary/kjvfreq.py
Normal file
4946
Dictionary/names-f.py
Normal file
3897
Dictionary/names-m.py
Normal file
21986
Dictionary/names.py
Normal file
366
Dictionary/oftenmis.py
Normal file
|
@ -0,0 +1,366 @@
|
|||
words=['Wednesday',
|
||||
'a lot',
|
||||
'absence',
|
||||
'accept',
|
||||
'acceptable',
|
||||
'accessible',
|
||||
'accidentally',
|
||||
'accommodate',
|
||||
'accompanied',
|
||||
'accomplish',
|
||||
'accumulate',
|
||||
'accuracy',
|
||||
'achievement',
|
||||
'acknowledgment',
|
||||
'acquaintance',
|
||||
'acquire',
|
||||
'acquitted',
|
||||
'across',
|
||||
'actually',
|
||||
'address',
|
||||
'admission',
|
||||
'adolescent',
|
||||
'advice',
|
||||
'advise',
|
||||
'advised',
|
||||
'affected',
|
||||
'affectionate',
|
||||
'aggravate',
|
||||
'aggressive',
|
||||
'alcohol',
|
||||
'all right',
|
||||
'allotted',
|
||||
'allusion',
|
||||
'always',
|
||||
'amateur',
|
||||
'annual',
|
||||
'argument',
|
||||
'arrangement',
|
||||
'beginning',
|
||||
'believe',
|
||||
'business',
|
||||
'capital',
|
||||
'capitol',
|
||||
'coming',
|
||||
'committee',
|
||||
'complement',
|
||||
'compliment',
|
||||
'decide',
|
||||
'definite',
|
||||
'desert',
|
||||
'dessert',
|
||||
'divide',
|
||||
'embarrass',
|
||||
'exaggerate',
|
||||
'existence',
|
||||
'explanation',
|
||||
'financially',
|
||||
'forehead',
|
||||
'foreign',
|
||||
'forfeit',
|
||||
'forty',
|
||||
'forward',
|
||||
'friend',
|
||||
'fulfillment',
|
||||
'gauge',
|
||||
'generally',
|
||||
'government',
|
||||
'governor',
|
||||
'grammar',
|
||||
'grammatically',
|
||||
'grief',
|
||||
'guaranteed',
|
||||
'guard',
|
||||
'guidance',
|
||||
'happened',
|
||||
'harass',
|
||||
'height',
|
||||
'hero',
|
||||
'heroes',
|
||||
'humor',
|
||||
'hypocrisy',
|
||||
'hypocrite',
|
||||
'ignorant',
|
||||
'illogical',
|
||||
'imaginary',
|
||||
'imagine',
|
||||
'imitate',
|
||||
'immediately',
|
||||
'immense',
|
||||
'incidentally',
|
||||
'incredible',
|
||||
'independent',
|
||||
'indispensable',
|
||||
'inevitable',
|
||||
'infinite',
|
||||
'influential',
|
||||
'initiative',
|
||||
'innocence',
|
||||
'intellectual',
|
||||
'intelligence',
|
||||
'intelligent',
|
||||
'interest',
|
||||
'interpret',
|
||||
'interrupt',
|
||||
'introduce',
|
||||
'irrelevant',
|
||||
'irresistible',
|
||||
'irritable',
|
||||
'irritated',
|
||||
"it's",
|
||||
'its',
|
||||
'knowledge',
|
||||
'laboratory',
|
||||
'legitimate',
|
||||
'leisure',
|
||||
'liable',
|
||||
'library',
|
||||
'license',
|
||||
'lightning',
|
||||
'literature',
|
||||
'lively',
|
||||
'loneliness',
|
||||
'lonely',
|
||||
'lose',
|
||||
'lying',
|
||||
'magazine',
|
||||
'maintenance',
|
||||
'maneuver',
|
||||
'manual',
|
||||
'manufacture',
|
||||
'marriage',
|
||||
'material',
|
||||
'mathematics',
|
||||
'meant',
|
||||
'medicine',
|
||||
'mere',
|
||||
'messenger',
|
||||
'miniature',
|
||||
'minutes',
|
||||
'mischievous',
|
||||
'missile',
|
||||
'morning',
|
||||
'mortgage',
|
||||
'muscles',
|
||||
'mysterious',
|
||||
'naturally',
|
||||
'necessary',
|
||||
'nickel',
|
||||
'niece',
|
||||
'ninety',
|
||||
'ninth',
|
||||
'noticeable',
|
||||
'noticing',
|
||||
'nuclear',
|
||||
'nuisance',
|
||||
'obstacle',
|
||||
'occasionally',
|
||||
'occur',
|
||||
'occurred',
|
||||
'occurrence',
|
||||
'omission',
|
||||
'omitted',
|
||||
'opinion',
|
||||
'opponent',
|
||||
'opportunity',
|
||||
'opposite',
|
||||
'optimism',
|
||||
'organize',
|
||||
'origin',
|
||||
'original',
|
||||
'paid',
|
||||
'pamphlet',
|
||||
'parallel',
|
||||
'particular',
|
||||
'pastime',
|
||||
'peculiar',
|
||||
'performance',
|
||||
'perhaps',
|
||||
'permanent',
|
||||
'permissible',
|
||||
'personal',
|
||||
'physical',
|
||||
'physician',
|
||||
'piece',
|
||||
'planned',
|
||||
'pleasant',
|
||||
'poison',
|
||||
'possess',
|
||||
'possession',
|
||||
'possible',
|
||||
'possibly',
|
||||
'practically',
|
||||
'prairie',
|
||||
'precede',
|
||||
'preferred',
|
||||
'prejudiced',
|
||||
'preparation',
|
||||
'prepare',
|
||||
'presence',
|
||||
'prevalent',
|
||||
'principal',
|
||||
'principle',
|
||||
'privilege',
|
||||
'probably',
|
||||
'procedure',
|
||||
'proceed',
|
||||
'profession',
|
||||
'professor',
|
||||
'prominent',
|
||||
'pronunciation',
|
||||
'propaganda',
|
||||
'prophecy',
|
||||
'prophesy',
|
||||
'psychology',
|
||||
'publicly',
|
||||
'pumpkin',
|
||||
'purpose',
|
||||
'pursue',
|
||||
'quantity',
|
||||
'quiet',
|
||||
'quite',
|
||||
'quizzes',
|
||||
'realize',
|
||||
'really',
|
||||
'receipt',
|
||||
'receive',
|
||||
'receiving',
|
||||
'recognize',
|
||||
'recommend',
|
||||
'reference',
|
||||
'referred',
|
||||
'referring',
|
||||
'regular',
|
||||
'relieve',
|
||||
'remembrance',
|
||||
'repetition',
|
||||
'representative',
|
||||
'reproduce',
|
||||
'restaurant',
|
||||
'rhythm',
|
||||
'ridiculous',
|
||||
'roommate',
|
||||
'sacrifice',
|
||||
'safety',
|
||||
'salary',
|
||||
'schedule',
|
||||
'secretary',
|
||||
'seize',
|
||||
'separate',
|
||||
'sergeant',
|
||||
'severely',
|
||||
'sheriff',
|
||||
'shining',
|
||||
'similar',
|
||||
'simply',
|
||||
'since',
|
||||
'sincerely',
|
||||
'skiing',
|
||||
'sophomore',
|
||||
'specimen',
|
||||
'speech',
|
||||
'sponsor',
|
||||
'strength',
|
||||
'strict',
|
||||
'stubbornness',
|
||||
'studying',
|
||||
'subtlety',
|
||||
'succeed',
|
||||
'successful',
|
||||
'succession',
|
||||
'sufficient',
|
||||
'suicide',
|
||||
'summary',
|
||||
'superintendent',
|
||||
'supersede',
|
||||
'suppose',
|
||||
'suppress',
|
||||
'surely',
|
||||
'surprise',
|
||||
'surround',
|
||||
'susceptible',
|
||||
'suspicious',
|
||||
'swimming',
|
||||
'symbol',
|
||||
'sympathize',
|
||||
'technique',
|
||||
'temperament',
|
||||
'temperature',
|
||||
'tendency',
|
||||
'than',
|
||||
'their',
|
||||
'themselves',
|
||||
'then',
|
||||
'there',
|
||||
'therefore',
|
||||
"they're",
|
||||
'thorough',
|
||||
'thought',
|
||||
'through',
|
||||
'till',
|
||||
'to',
|
||||
'tobacco',
|
||||
'together',
|
||||
'tomorrow',
|
||||
'too',
|
||||
'tournament',
|
||||
'traffic',
|
||||
'trafficked',
|
||||
'tragedy',
|
||||
'transferred',
|
||||
'tremendous',
|
||||
'tried',
|
||||
'tries',
|
||||
'trouble',
|
||||
'truly',
|
||||
'twelfth',
|
||||
'two',
|
||||
'tyranny',
|
||||
'unanimous',
|
||||
'unconscious',
|
||||
'undoubtedly',
|
||||
'unmistakably',
|
||||
'unnecessary',
|
||||
'until',
|
||||
'usage',
|
||||
'useful',
|
||||
'useless',
|
||||
'using',
|
||||
'usually',
|
||||
'vacuum',
|
||||
'valuable',
|
||||
'varies',
|
||||
'various',
|
||||
'vegetable',
|
||||
'vengeance',
|
||||
'venomous',
|
||||
'vice',
|
||||
'view',
|
||||
'vigilance',
|
||||
'villain',
|
||||
'violence',
|
||||
'visible',
|
||||
'vitamins',
|
||||
'waive',
|
||||
'warrant',
|
||||
'warring',
|
||||
'weather',
|
||||
'weird',
|
||||
'where',
|
||||
'wherever',
|
||||
'whether',
|
||||
'whichever',
|
||||
"who's",
|
||||
'wholly',
|
||||
'whose',
|
||||
'wield',
|
||||
'wintry',
|
||||
'withdrawal',
|
||||
'woman',
|
||||
'women',
|
||||
'worshiped',
|
||||
'wreck',
|
||||
'write',
|
||||
'writing',
|
||||
'written',
|
||||
'yield']
|
10196
Dictionary/places.py
Normal file
354921
Dictionary/single.py
Normal file
105
Passwordy/passwordy.py
Normal file
|
@ -0,0 +1,105 @@
|
|||
import string
|
||||
import random
|
||||
import sys
|
||||
|
||||
DEFAULT_LENGTH = 32
|
||||
DEFAULT_SENTENCE = 5
|
||||
HELP_MESSAGE = '''
|
||||
---------------------------------------------------------------
|
||||
|Generates a randomized password. |
|
||||
| |
|
||||
|> passwordy [length] ["p"] ["d"] |
|
||||
| |
|
||||
| length : How many characters. Default %03d. |
|
||||
| p : If present, the password will contain punctuation |
|
||||
| characters. Otherwise not. |
|
||||
| d : If present, the password will contain digits. |
|
||||
| Otherwise not. |
|
||||
| |
|
||||
| The password can always contain upper and lowercase |
|
||||
| letters. |
|
||||
---------------------------------------------------------------
|
||||
'''[1:-1] % (DEFAULT_LENGTH)
|
||||
|
||||
HELP_SENTENCE = '''
|
||||
---------------------------------------------------------------
|
||||
|Generates a randomized sentence |
|
||||
| |
|
||||
|> passwordy sent [length] [join] |
|
||||
| |
|
||||
| length : How many words to retrieve. Default %03d. |
|
||||
| join : The character that will join the words together. |
|
||||
| Default space. |
|
||||
---------------------------------------------------------------
|
||||
'''[1:-1] % (DEFAULT_SENTENCE)
|
||||
|
||||
def make_password(length=None, allowpunctuation=False, allowdigits=False):
|
||||
'''
|
||||
Returns a string of length `length` consisting of a random selection
|
||||
of uppercase and lowercase letters, as well as punctuation and digits
|
||||
if parameters permit
|
||||
'''
|
||||
if length is None:
|
||||
length = DEFAULT_LENGTH
|
||||
|
||||
s = string.ascii_letters
|
||||
if allowpunctuation is True:
|
||||
s += string.punctuation
|
||||
if allowdigits is True:
|
||||
s += string.digits
|
||||
|
||||
password = ''.join([random.choice(s) for x in range(length)])
|
||||
return password
|
||||
|
||||
def make_sentence(length=None, joiner=' '):
|
||||
'''
|
||||
Returns a string containing `length` words, which come from
|
||||
dictionary.common.
|
||||
'''
|
||||
import dictionary.common as common
|
||||
if length is None:
|
||||
length = DEFAULT_LENGTH
|
||||
result = joiner.join(random.choice(common.words) for x in range(length))
|
||||
result = result.replace(' ', joiner)
|
||||
return result
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = sys.argv
|
||||
argc = len(args)
|
||||
|
||||
if argc == 1:
|
||||
mode = 'password'
|
||||
length = DEFAULT_LENGTH
|
||||
|
||||
elif args[1].isdigit():
|
||||
mode = 'password'
|
||||
length = int(args[1])
|
||||
|
||||
elif 'help' in args[1].lower():
|
||||
mode = None
|
||||
print(HELP_MESSAGE)
|
||||
print(HELP_SENTENCE)
|
||||
|
||||
elif 'sent' in args[1].lower() and argc == 2:
|
||||
mode = 'sentence'
|
||||
length = DEFAULT_SENTENCE
|
||||
|
||||
elif args[2].isdigit():
|
||||
mode = 'sentence'
|
||||
length = int(args[2])
|
||||
|
||||
if mode == 'password':
|
||||
punc = 'p' in args
|
||||
digi = 'd' in args
|
||||
|
||||
print(make_password(length, punc, digi))
|
||||
|
||||
elif mode == 'sentence':
|
||||
if argc == 4:
|
||||
joiner = args[3]
|
||||
else:
|
||||
joiner = ' '
|
||||
print(make_sentence(length, joiner))
|
||||
|
||||
else:
|
||||
pass
|
474
RedditCSS/goldtesting_style_win.txt
Normal file
|
@ -0,0 +1,474 @@
|
|||
/*
|
||||
|
||||
This theme created by /u/GoldenSights
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Color palette:
|
||||
ff4500 = Upvote orange
|
||||
9393ff = Downvote blue
|
||||
ac3939 = NSFW red
|
||||
bcbcbc = Taskbar gray (188)
|
||||
2d2d2d = Taskbar shadow
|
||||
ffffff = Taskbar light
|
||||
008080 = Background Blue
|
||||
00007f = Title bar blue
|
||||
228822 = Moderator Green
|
||||
*/
|
||||
|
||||
#header,
|
||||
body
|
||||
{
|
||||
background-color: #008080;
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
#sr-header-area,
|
||||
#sr-more-link
|
||||
{
|
||||
background-color: #bcbcbc;
|
||||
background: #bcbcbc;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
margin-bottom: 30px;
|
||||
color:transparent;
|
||||
}
|
||||
#sr-more-link
|
||||
{
|
||||
color: transparent;
|
||||
background-image: url(%%start%%);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
#sr-header-area > div > div > span:nth-child(2)
|
||||
{
|
||||
background-image: url(%%taskbar-spacer%%);
|
||||
background-position: center;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#header-bottom-right
|
||||
{
|
||||
right: 5px;
|
||||
width: 300px;
|
||||
background-color: #00007f;
|
||||
color: #fff;
|
||||
border-top-left-radius: 0px;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
}
|
||||
#header-bottom-right > span.user,
|
||||
#header-bottom-right > span.user a,
|
||||
#header-bottom-right > ul > li > a,
|
||||
#header-bottom-right > form > a
|
||||
{
|
||||
color: #fff;
|
||||
}
|
||||
#header-bottom-right > span
|
||||
{
|
||||
color: transparent;
|
||||
}
|
||||
form.logout a:after
|
||||
{
|
||||
position: absolute;
|
||||
left: 288px;
|
||||
content: " ";
|
||||
background-image: url(%%xbutton%%);
|
||||
background-repeat: no-repeat;
|
||||
width: 16px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.side
|
||||
{
|
||||
background-color: #bcbcbc;
|
||||
width: 300px;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-left: 2px solid #ffffff;
|
||||
padding: 4px;
|
||||
}
|
||||
#search > input:nth-child(1)
|
||||
{
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
form.toggle.leavecontributor-button,
|
||||
form.toggle.leavecontributor-button,
|
||||
form.toggle.flairtoggle,
|
||||
.sidebox.create .spacer,
|
||||
div.spacer,
|
||||
.titlebox
|
||||
{
|
||||
color: #000;
|
||||
background: #bcbcbc;
|
||||
}
|
||||
.side .titlebox .bottom .age
|
||||
{
|
||||
float: none;
|
||||
content:'heyo';
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.side .titlebox .bottom .age:after
|
||||
{
|
||||
font-size:12px;
|
||||
content:'on May 25, 2014';
|
||||
color: #000;
|
||||
}
|
||||
.morelink .nub { display: none; }
|
||||
.morelink a {color: #000;}
|
||||
.morelink
|
||||
{
|
||||
z-index: 50;
|
||||
border: 0px;
|
||||
background: #bcbcbc;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
border-radius: 2px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
overflow: hidden;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
}
|
||||
.morelink:hover
|
||||
{
|
||||
z-index: 50;
|
||||
border: 0px;
|
||||
background: #bcbcbc;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
border-radius: 2px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.morelink:active
|
||||
{
|
||||
border-bottom: 2px solid #ffffff;
|
||||
border-right: 2px solid #ffffff;
|
||||
border-top: 2px solid #2d2d2d;
|
||||
border-left: 2px solid #2d2d2d;
|
||||
}
|
||||
.morelink a
|
||||
{
|
||||
background-image: url(%%web-32%%);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 20px;
|
||||
}
|
||||
.morelink a[href*="?selftext"]
|
||||
{
|
||||
background-image: url(%%txt-32%%);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 20px;
|
||||
}
|
||||
|
||||
body > div.side > div:nth-child(5) > div > span.subscribe-button.fancy-toggle-button.toggle
|
||||
{
|
||||
display:block;
|
||||
}
|
||||
.titlebox .users-online:before{ background-image:none; content: ""; width: 0px; margin-right: 0px;}
|
||||
|
||||
.titlebox .bottom,
|
||||
.titlebox .bottom a,
|
||||
.sidecontentbox .title,
|
||||
.sidecontentbox .title h1,
|
||||
.sidecontentbox .helplink,
|
||||
.sidecontentbox ul a,
|
||||
.titlebox .tagline,
|
||||
.titlebox .tagline .time,
|
||||
.titlebox .tagline a
|
||||
{
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#header-bottom-left
|
||||
{
|
||||
position: inherit;
|
||||
display:block;
|
||||
background-color: transparent;
|
||||
width: 500px;
|
||||
left: 2px;
|
||||
top: 9px;
|
||||
}
|
||||
|
||||
#header-bottom-left .tabmenu a
|
||||
{
|
||||
position:relative;
|
||||
background-color: #bcbcbc;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
border-bottom: 2px solid #ffffff;
|
||||
bottom: 3px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
#header-bottom-left .tabmenu .selected a
|
||||
{
|
||||
background-color: #bcbcbc;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
border-bottom: 0px;
|
||||
bottom: 1px;
|
||||
}
|
||||
.content .menuarea
|
||||
{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background-color: #bcbcbc;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
}
|
||||
#siteTable.sitetable.linklisting,
|
||||
#siteTable.sitetable.linklisting .link,
|
||||
#siteTable.sitetable.linklisting .link .buttons li a,
|
||||
#siteTable.sitetable.linklisting .link .title a,
|
||||
#siteTable.sitetable.linklisting .link .tagline,
|
||||
#siteTable.sitetable.linklisting .link .rank,
|
||||
#siteTable.sitetable.linklisting .link .tagline a
|
||||
{
|
||||
color:#000;
|
||||
background-color: #bcbcbc;
|
||||
overflow: hidden;
|
||||
}
|
||||
#siteTable.sitetable.linklisting
|
||||
{
|
||||
padding-top: 16px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
}
|
||||
|
||||
.commentarea .panestack-title
|
||||
{
|
||||
padding-left: 8px;
|
||||
overflow:hidden;
|
||||
background-color:#00007f;
|
||||
color:#fff;
|
||||
margin:0px;
|
||||
margin-top:10px;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
}
|
||||
.commentarea .menuarea
|
||||
{
|
||||
padding-left: 8px;
|
||||
border-top: 0px;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.footer.rounded
|
||||
{
|
||||
border-radius: 0px;
|
||||
background-color: #bcbcbc;
|
||||
color: #000;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
padding-top: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.footer.rounded:before
|
||||
{
|
||||
background-color: #00007f;
|
||||
background-image: url(%%xbutton%%);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 462px;
|
||||
padding: 3px;
|
||||
display: block;
|
||||
content: "Reddit.com";
|
||||
text-align: left;
|
||||
color: #fff;
|
||||
}
|
||||
.footer a
|
||||
{
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
}
|
||||
.footer-parent .bottommenu,
|
||||
.footer-parent .bottommenu a
|
||||
{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
|
||||
#newlink > div.spacer
|
||||
{
|
||||
background-color: transparent
|
||||
}
|
||||
#newlink.submit.content .formtabs-content .spacer
|
||||
{
|
||||
margin:0px;
|
||||
}
|
||||
.roundfield,
|
||||
#newlink > div.roundfield.info-notice
|
||||
{
|
||||
background-color: #bcbcbc;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-left: 2px solid #ffffff;
|
||||
color: #000;
|
||||
border-radius: 0px;
|
||||
width: 500px;
|
||||
padding: 5px 10px 10px 10px;
|
||||
}
|
||||
#text-desc.infobar,
|
||||
#link-desc.infobar
|
||||
{
|
||||
background-color: #00007f;
|
||||
width: 500px;
|
||||
color: #fff;
|
||||
padding: 5px 10px;
|
||||
font-size: 0px;
|
||||
border-bottom: 0px;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-left: 2px solid #ffffff;
|
||||
border-top: 2px solid #ffffff;
|
||||
}
|
||||
#text-desc.infobar:after
|
||||
{
|
||||
font-size: 12px;
|
||||
content: "Text Post";
|
||||
}
|
||||
#link-desc.infobar:after
|
||||
{
|
||||
font-size: 12px;
|
||||
content: "Link Post";
|
||||
}
|
||||
#newlink > div.roundfield.info-notice
|
||||
{
|
||||
border-top: 0px;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
}
|
||||
|
||||
.content h1 a
|
||||
{
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.comment
|
||||
{
|
||||
color: #000;
|
||||
background-color: #bcbcbc;
|
||||
overflow: hidden;
|
||||
border-bottom: 2px solid #2d2d2d;
|
||||
border-right: 2px solid #2d2d2d;
|
||||
border-top: 2px solid #ffffff;
|
||||
border-left: 2px solid #ffffff;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
.comment .tagline,
|
||||
.comment .tagline a,
|
||||
.comment ul.flat-list.buttons a
|
||||
{
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.tagline a.author.submitter
|
||||
{
|
||||
background-color: #00007f;
|
||||
color: #ffffff;
|
||||
padding: 1px;
|
||||
}
|
||||
.tagline a.author.moderator
|
||||
{
|
||||
background-color: #228822 !important;
|
||||
color: #ffffff !important;
|
||||
padding: 1px !important;
|
||||
}
|
||||
|
||||
|
||||
.midcol .upmod
|
||||
{
|
||||
background-image: url(%%votearrows%%);
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
background-position: -16px 0px;
|
||||
margin:0;
|
||||
}
|
||||
.midcol .up
|
||||
{
|
||||
background-image: url(%%votearrows%%);
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
background-position: -0px 0px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.midcol .downmod
|
||||
{
|
||||
background-image: url(%%votearrows%%);
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
background-position: -16px -8px;
|
||||
margin:0;
|
||||
}
|
||||
.midcol .down
|
||||
{
|
||||
background-image: url(%%votearrows%%);
|
||||
width: 16px;
|
||||
height: 8px;
|
||||
background-position: 0px -8px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.midcol .score
|
||||
{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.link .midcol .up,
|
||||
.link .midcol .upmod
|
||||
{
|
||||
margin-top: 8px;
|
||||
}
|
||||
code
|
||||
{
|
||||
line-height: 18px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
color: #f00;
|
||||
font-size: 15px;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.expando .usertext .md
|
||||
{
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
font-weight: 900;
|
||||
color: #00007f;
|
||||
}
|
||||
|
||||
.submit_text
|
||||
{
|
||||
overflow: hidden;
|
||||
}
|
21
RedditCSS/stylepusher.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import bot
|
||||
import os
|
||||
import praw
|
||||
import sys
|
||||
import time
|
||||
|
||||
r=bot.rG()
|
||||
|
||||
SUBREDDIT = r.get_subreddit(sys.argv[1])
|
||||
FILENAME = sys.argv[2]
|
||||
prevtime = 0
|
||||
while True:
|
||||
newtime = os.path.getmtime(FILENAME)
|
||||
if newtime != prevtime:
|
||||
f=open(FILENAME)
|
||||
style = f.read()
|
||||
f.close()
|
||||
print('Pushing stylesheet. %d bytes' % len(style))
|
||||
SUBREDDIT.set_stylesheet(style)
|
||||
prevtime = newtime
|
||||
time.sleep(5)
|
6
SpinalTap/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
Spinal
|
||||
========
|
||||
|
||||
spinal.py is a couple of tools for copying files and directories
|
||||
|
||||
spinal_client.py is a wip tkinter interface for creating and running backup configurations. I probably won't finish it.
|
260
SpinalTap/spinal.py
Normal file
|
@ -0,0 +1,260 @@
|
|||
'''
|
||||
-----:::
|
||||
...-----------:::::::::
|
||||
............---------:::::::,,,,
|
||||
..`````````.......--------:::::::,,,,,
|
||||
.```````````````...:vv,------:::::::,,,,,"
|
||||
..``````````````````-zz+z:------::::::,,,,,,""
|
||||
....`````` `````-zzzz:------:::::::,,,,,,"""
|
||||
.....````` `````xzzx.-------::::::,,,,,,""""
|
||||
---..::-````` ````,zzzz".------:::::::,,,_~~""""_
|
||||
-----xzzzJ?~-``` `````_Jzzzzz~------::::::"vJonnnT"""__
|
||||
------L+zzzzzz?".`````.:~xzzzzz+++J/":--:::,;Jooonnnn+"""___
|
||||
:------/z+zzzzzzzxL??xzzzzzzz+++++++TTzJJJ+ooooonnnoL""""___
|
||||
:::-------;J++zzzzzzzzzzzzzzzxxxJ+++TTTTTTToooooonT?""""""____
|
||||
:::::-------~L+++++++++++z/,------"v+TTTTTooooooz/","""""_____
|
||||
::::::::-------,vz+++++++z,----------"+TTooooooL_,,,""""""______
|
||||
,,:::::::::------:L++++++x---------:::JooooooJ",,,,""""""_______
|
||||
,,,,::::::::::::---?TTTTTTv:---::::::vooooooL,,,,,""""""________
|
||||
,,,,,,,::::::::::::~TTTTTTT+xv/;;/?xToooooon;,,,,""""""_________
|
||||
,,,,,,,,,,:::::::,zooooooooooooooooooooonnn+",""""""__________
|
||||
""",,,,,,,,,,,,,,zoooooooooooooooooonnnnnnnn+"""""____________
|
||||
"""""",,,,,,,,,,ooooooooooooonnnnnnnnnnnnnnn_""_____________
|
||||
""""""""""",,,,,+nnnnnnnnnnnnnnnnnnnnnnnnZZT"_______________
|
||||
____"""""""""""vnnnnnnnnnnnnnnnnnnnnZZZZZZ?_______________
|
||||
________"""""""znnnnnnnnnnnZZZZZZZZZZZZZz_______________
|
||||
______________JZZZZZZZZZZZZZZZZZZZZZZz______________
|
||||
______________/+ZZZZZZZZZZZZZeeeeZ+/______________
|
||||
______________;xoeeeeeeeeeeeeox;______________
|
||||
_______________~vxJz++zJxv~_______________
|
||||
______________________________________
|
||||
________________________________
|
||||
_______________________
|
||||
________
|
||||
|
||||
'''
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
|
||||
BYTE = 1
|
||||
KILOBYTE = BYTE * 1024
|
||||
MEGABYTE = KILOBYTE * 1024
|
||||
GIGABYTE = MEGABYTE * 1024
|
||||
TERABYTE = GIGABYTE * 1024
|
||||
|
||||
CHUNKSIZE = 64 * KILOBYTE
|
||||
# Number of bytes to read and write at a time
|
||||
|
||||
EXC_SRCNOTDIR = 'srcnotdir'
|
||||
EXC_SRCNOTFILE = 'srcnotfle'
|
||||
EXC_RECURDIR = 'recurdir'
|
||||
# These strings will become the `description` attribute
|
||||
# of a SpinalError when it is raised. Use it to determine
|
||||
# what type of SpinalError has occured.
|
||||
|
||||
|
||||
class SpinalError(Exception):
|
||||
def __init__(self, err, desc):
|
||||
super(SpinalError, self)
|
||||
self.description = desc
|
||||
|
||||
|
||||
def copyfile(src, dst, overwrite=True, callbackfunction=None):
|
||||
'''
|
||||
Copy a file from src to dst.
|
||||
|
||||
src : the file to copy.
|
||||
|
||||
dst : the filename of the new copy.
|
||||
|
||||
overwrite : if True, copy src to dst even if
|
||||
dst already exists.
|
||||
else, do nothing.
|
||||
|
||||
default = True
|
||||
|
||||
callbackfunction : if provided, this function will be called
|
||||
after writing each CHUNKSIZE bytes to dst
|
||||
with three parameters:
|
||||
name of file being copied,
|
||||
number of bytes written so far,
|
||||
total number of bytes needed.
|
||||
|
||||
default = None
|
||||
|
||||
RETURN : [dst filename, number of bytes written to dst]
|
||||
'''
|
||||
|
||||
src = os.path.abspath(src)
|
||||
dst = os.path.abspath(dst)
|
||||
|
||||
if not os.path.isfile(src):
|
||||
raise SpinalError("Source file is not a file: %s" % src,
|
||||
EXC_SRCNOTFILE)
|
||||
|
||||
totalbytes = os.path.getsize(src)
|
||||
dstexists = os.path.exists(dst)
|
||||
if dstexists and overwrite is False:
|
||||
if callbackfunction is not None:
|
||||
callbackfunction(dst, totalbytes, totalbytes)
|
||||
return [dst, totalbytes]
|
||||
elif dstexists:
|
||||
src_modtime = os.path.getmtime(src)
|
||||
dst_modtime = os.path.getmtime(dst)
|
||||
if src_modtime == dst_modtime:
|
||||
if callbackfunction is not None:
|
||||
callbackfunction(dst, totalbytes, totalbytes)
|
||||
return [dst, totalbytes]
|
||||
|
||||
writtenbytes = 0
|
||||
srcfile = open(src, 'rb')
|
||||
dstfile = open(dst, 'wb')
|
||||
while True:
|
||||
filedata = srcfile.read(CHUNKSIZE)
|
||||
datasize = len(filedata)
|
||||
if datasize == 0:
|
||||
break
|
||||
|
||||
dstfile.write(filedata)
|
||||
writtenbytes += datasize
|
||||
|
||||
if callbackfunction is not None:
|
||||
callbackfunction(dst, writtenbytes, totalbytes)
|
||||
|
||||
srcfile.close()
|
||||
dstfile.close()
|
||||
shutil.copystat(src, dst)
|
||||
return [dst, writtenbytes]
|
||||
|
||||
def copydir(srcdir, dstdir, overwrite=True, precalcsize=False,
|
||||
callbackfunction=None, callbackfile=None):
|
||||
'''
|
||||
Copy all of the contents from srcdir to dstdir,
|
||||
including subdirectories.
|
||||
|
||||
srcdir : the directory which will be copied.
|
||||
|
||||
dstdir : the directory in which copied files are placed.
|
||||
|
||||
overwrite : if True, overwrite any files in dstdir with
|
||||
the copies from srcdir should they already exist.
|
||||
else, ignore them.
|
||||
|
||||
default = True
|
||||
|
||||
precalcsize : if True, calculate the size of srcdir
|
||||
before beginning the operation. This number
|
||||
can be used in the callbackfunction.
|
||||
else, callbackfunction will receive
|
||||
written bytes as total bytes.
|
||||
|
||||
default = False
|
||||
|
||||
callbackfunction : if provided, this function will be called
|
||||
after each file copy with three parameters:
|
||||
name of file copied,
|
||||
number of bytes written to dstdir so far,
|
||||
total bytes needed (from precalcsize).
|
||||
|
||||
default = None
|
||||
|
||||
callbackfile : will be passed into each individual copyfile() as
|
||||
the callbackfunction for that file.
|
||||
|
||||
default = None
|
||||
|
||||
RETURN : [dstdir path, number of bytes written to dstdir]
|
||||
|
||||
'''
|
||||
|
||||
srcdir = os.path.abspath(srcdir)
|
||||
dstdir = os.path.abspath(dstdir)
|
||||
|
||||
if dstdir.startswith(srcdir):
|
||||
raise SpinalError("Will not copy a dir into itself %s" % dstdir,
|
||||
EXC_RECURDIR)
|
||||
|
||||
if os.path.isfile(srcdir):
|
||||
raise SpinalError("Destination dir is a file: %s" % dstdir,
|
||||
EXC_SRCNOTDIR)
|
||||
|
||||
if precalcsize is True:
|
||||
totalbytes = getdirsize(srcdir)
|
||||
else:
|
||||
totalbytes = 0
|
||||
|
||||
walker = os.walk(srcdir)
|
||||
writtenbytes = 0
|
||||
for step in walker:
|
||||
# (path, [dirs], [files])
|
||||
srcpath = step[0]
|
||||
dstpath = srcpath.replace(srcdir, dstdir)
|
||||
files = step[2]
|
||||
if not os.path.exists(dstpath):
|
||||
os.makedirs(dstpath)
|
||||
for filename in files:
|
||||
srcfile = os.path.join(srcpath, filename)
|
||||
dstfile = os.path.join(dstpath, filename)
|
||||
copied = copyfile(srcfile, dstfile, overwrite=overwrite,
|
||||
callbackfunction=callbackfile)
|
||||
copiedname = copied[0]
|
||||
writtenbytes += copied[1]
|
||||
if callbackfunction is None:
|
||||
continue
|
||||
|
||||
if totalbytes == 0:
|
||||
# precalcsize was not used. Just report the written bytes
|
||||
callbackfunction(copiedname, writtenbytes, writtenbytes)
|
||||
else:
|
||||
# provide the precalcsize
|
||||
callbackfunction(copiedname, writtenbytes, totalbytes)
|
||||
|
||||
return [dstdir, writtenbytes]
|
||||
|
||||
def getdirsize(srcdir):
|
||||
'''
|
||||
Using os.walk, return the total number of bytes
|
||||
this directory contains, including all subdirectories.
|
||||
'''
|
||||
|
||||
srcdir = os.path.abspath(srcdir)
|
||||
|
||||
if not os.path.isdir(srcdir):
|
||||
raise SpinalError("Source dir is not a directory: %s" % srcdir,
|
||||
EXC_SRCNOTDIR)
|
||||
|
||||
totalbytes = 0
|
||||
walker = os.walk(srcdir)
|
||||
for step in walker:
|
||||
# (path, [dirs], [files])
|
||||
path = step[0]
|
||||
files = step[2]
|
||||
for filename in files:
|
||||
fpath = os.path.join(path, filename)
|
||||
totalbytes += os.path.getsize(fpath)
|
||||
|
||||
return totalbytes
|
||||
|
||||
def cb(filename, written, total):
|
||||
'''
|
||||
Example of a callbackfunction.
|
||||
|
||||
Prints the number of bytes written,
|
||||
total bytes needed,
|
||||
and percentage so far.
|
||||
'''
|
||||
|
||||
name = os.path.basename(filename)
|
||||
|
||||
if written >= total:
|
||||
ends = '\n'
|
||||
else:
|
||||
ends = '\n'
|
||||
percentage = (100 * written) / total
|
||||
percentage = '%03.3f' % percentage
|
||||
written = '{:,}'.format(written)
|
||||
total = '{:,}'.format(total)
|
||||
written = (' '*(len(total)-len(written))) + written
|
||||
status = '%s %s / %s (%s)\r' % (name, written, total, percentage)
|
||||
print(status, end=ends)
|
77
SpinalTap/spinal_client.py
Normal file
|
@ -0,0 +1,77 @@
|
|||
import spinal
|
||||
import tkinter
|
||||
|
||||
class Path:
|
||||
def __init__(self, src='', dst='', overwrite=False, precalcsize=False):
|
||||
self.src = src
|
||||
self.dst = dst
|
||||
self.overwrite = overwrite
|
||||
self.precalcsize = precalcsize
|
||||
def __str__(self):
|
||||
return 'Path: %s -> %s' % (self.src, self.dst)
|
||||
|
||||
class SpinalClient:
|
||||
def __init__(self):
|
||||
self.windowtitle = 'Spinal'
|
||||
|
||||
self.font_large = ("Consolas", 16)
|
||||
self.font_med = ("Consolas", 12)
|
||||
self.font_small = ("Consolas", 10)
|
||||
|
||||
self.t = tkinter.Tk()
|
||||
self.t.title(self.windowtitle)
|
||||
self.w = 450
|
||||
self.h = 350
|
||||
self.screenwidth = self.t.winfo_screenwidth()
|
||||
self.screenheight = self.t.winfo_screenheight()
|
||||
self.windowwidth = self.w
|
||||
self.windowheight = self.h
|
||||
self.windowx = (self.screenwidth-self.windowwidth) / 2
|
||||
self.windowy = ((self.screenheight-self.windowheight) / 2) - 27
|
||||
self.geometrystring = '%dx%d+%d+%d' % (
|
||||
self.windowwidth, self.windowheight, self.windowx, self.windowy)
|
||||
self.t.geometry(self.geometrystring)
|
||||
|
||||
self.panes_main = tkinter.PanedWindow(self.t, orient='vertical',
|
||||
sashrelief='raised', sashpad=8)
|
||||
self.panes_main.pack(expand=True, fill='both')
|
||||
|
||||
### FRAME_CONFIG ###
|
||||
#
|
||||
self.frame_config = tkinter.Frame(self.t)
|
||||
self.button_configload = tkinter.Button(self.frame_config,text='Load')
|
||||
self.button_configload.grid(row=0, column=0)
|
||||
self.button_configload.configure(bg="#6fd5f6",
|
||||
activebackground="#6fd5f6", relief="flat", width=4)
|
||||
#
|
||||
self.enter_configpath = tkinter.Entry(self.frame_config)
|
||||
self.enter_configpath.grid(row=0, column=1, sticky='nesw')
|
||||
self.enter_configpath.configure(font=self.font_small)
|
||||
#
|
||||
self.button_configsave = tkinter.Button(self.frame_config,text='Save')
|
||||
self.button_configsave.grid(row=0, column=2)
|
||||
self.button_configsave.configure(bg="#76E22E",
|
||||
activebackground="#46E22E", relief="flat", width=4)
|
||||
#
|
||||
### END FRAME_CONFIG ###
|
||||
|
||||
|
||||
### FRAME_PRIMARY ###
|
||||
#
|
||||
self.frame_primary = tkinter.Frame(self.t)
|
||||
self.paths = []
|
||||
#
|
||||
### END FRAME_PRIMARY ###
|
||||
tkinter.Grid.columnconfigure(self.frame_config, 1, weight=10)
|
||||
self.panes_main.add(self.frame_config)
|
||||
self.panes_main.add(self.frame_primary)
|
||||
|
||||
def mainloop(self):
|
||||
self.t.mainloop()
|
||||
|
||||
def add_pathline(self):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
s = SpinalClient()
|
||||
s.mainloop()
|
27
SpinalTap/spinaltest.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import spinal
|
||||
import os
|
||||
|
||||
def catchexc(function, fargs=(), fkwargs={}, goalexc=''):
|
||||
'''
|
||||
Call function with *args fargs and **kwargs fkwargs,
|
||||
expecting to get an exception.
|
||||
If the raised exception has the description == goalexc,
|
||||
we got what we wanted. Else (or if no exception is raised)
|
||||
something is wrong.
|
||||
'''
|
||||
try:
|
||||
function(*fargs, **fkwargs)
|
||||
raise Exception("This should not have passed")
|
||||
except spinal.SpinalError as e:
|
||||
if e.description != goalexc:
|
||||
raise e
|
||||
|
||||
if __name__ == '__main__':
|
||||
os.chdir('testdata')
|
||||
spinal.os.remove('dstfile.txt')
|
||||
spinal.copyfile('srcfile.txt', 'dstfile.txt', callbackfunction=spinal.cb)
|
||||
spinal.copyfile('srcfile.txt', 'dstfile.txt', callbackfunction=spinal.cb)
|
||||
spinal.copyfile('srcfile.txt', 'dstfile_no_overwrite.txt', overwrite=False, callbackfunction=spinal.cb)
|
||||
spinal.copydir('.', '..\\t',precalcsize=True, callbackfile=spinal.cb)
|
||||
catchexc(spinal.copyfile, ('nonexist.txt', 'nonexist2.txt'), {'overwrite':False}, goalexc=spinal.EXC_SRCNOTFILE)
|
||||
print('You did it!')
|
1
SpinalTap/t/dstfile.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test data.
|
1
SpinalTap/t/dstfile_no_overwrite.txt
Normal file
|
@ -0,0 +1 @@
|
|||
This won't be overwritten by srcfile.txt
|
BIN
SpinalTap/t/largerfile.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
1
SpinalTap/t/srcfile.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Test data.
|
1
SpinalTap/t/subfolder/subfile.txt
Normal file
|
@ -0,0 +1 @@
|
|||
submarines
|
1
SpinalTap/testdata/dstfile.txt
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Test data.
|
1
SpinalTap/testdata/dstfile_no_overwrite.txt
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
This won't be overwritten by srcfile.txt
|
BIN
SpinalTap/testdata/largerfile.png
vendored
Normal file
After Width: | Height: | Size: 1.1 MiB |
1
SpinalTap/testdata/srcfile.txt
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Test data.
|
1
SpinalTap/testdata/subfolder/subfile.txt
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
submarines
|
|
@ -20,6 +20,8 @@ while True:
|
|||
break
|
||||
|
||||
url = item[7]
|
||||
if 'youtube.com' in url and '?v=' not in url:
|
||||
continue
|
||||
cur2.execute('SELECT * FROM totaldl_urls WHERE url=?', [url])
|
||||
if cur2.fetchone():
|
||||
continue
|
||||
|
|
|
@ -63,7 +63,7 @@ if DOWNLOAD_DIRECTORY != '':
|
|||
class StatusExc(Exception):
|
||||
pass
|
||||
|
||||
def download_file(url, localname):
|
||||
def download_file(url, localname, headers={}):
|
||||
localname = DOWNLOAD_DIRECTORY + localname
|
||||
if 'twimg' in url:
|
||||
localname = localname.replace(':large', '')
|
||||
|
@ -72,14 +72,15 @@ def download_file(url, localname):
|
|||
print('\t%s already exists!!' % localname)
|
||||
return localname
|
||||
print('\tDownloading %s' % localname)
|
||||
downloading = request_get(url, stream=True)
|
||||
downloading = request_get(url, stream=True, headers=headers)
|
||||
localfile = open(localname, 'wb')
|
||||
for chunk in downloading.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
localfile.write(chunk)
|
||||
localfile.close()
|
||||
return localname
|
||||
|
||||
def request_get(url, stream=False):
|
||||
def request_get(url, stream=False, headers={}):
|
||||
global last_request
|
||||
now = time.time()
|
||||
diff = now - last_request
|
||||
|
@ -87,8 +88,10 @@ def request_get(url, stream=False):
|
|||
diff = SLEEPINESS - diff
|
||||
time.sleep(diff)
|
||||
last_request = time.time()
|
||||
req = requests.get(url, stream=stream, headers=HEADERS)
|
||||
if req.status_code != 200:
|
||||
h = HEADERS.copy()
|
||||
h.update(headers)
|
||||
req = requests.get(url, stream=stream, headers=h)
|
||||
if req.status_code not in [200,206]:
|
||||
raise StatusExc("Status code %d on url %s" % (req.status_code, url))
|
||||
return req
|
||||
|
||||
|
@ -188,6 +191,24 @@ def handle_gfycat(url, customname=None):
|
|||
pass
|
||||
|
||||
|
||||
def handle_vidme(url, customname=None):
|
||||
if customname is None:
|
||||
customname = url.split('/')[-1]+'.mp4'
|
||||
pagedata = request_get(url)
|
||||
pagedata = pagedata.text
|
||||
pagedata = pagedata.split('\n')
|
||||
pagedata = [l for l in pagedata if '.mp4' in l and 'og:video:url' in l]
|
||||
pagedata = pagedata[0]
|
||||
pagedata = pagedata.split('content="')[1].split('"')[0]
|
||||
pagedata = pagedata.replace('&', '&')
|
||||
headers = {'Referer': 'https://vid.me/',
|
||||
'Range':'bytes=0-',
|
||||
'Host':'d1wst0behutosd.cloudfront.net',
|
||||
'Cache-Control':'max-age=0'}
|
||||
|
||||
return download_file(pagedata, customname, headers=headers)
|
||||
|
||||
|
||||
def handle_vimeo(url, customname=None):
|
||||
name = url.split('/')[-1]
|
||||
name = name.split('?')[0]
|
||||
|
@ -332,6 +353,7 @@ HANDLERS = {
|
|||
'imgur.com': handle_imgur,
|
||||
'gfycat.com': handle_gfycat,
|
||||
'vimeo.com': handle_vimeo,
|
||||
'vid.me': handle_vidme,
|
||||
'liveleak.com': handle_liveleak,
|
||||
'youtube.com': handle_youtube,
|
||||
'youtu.be': handle_youtube,
|
||||
|
|