Skip to content

Instantly share code, notes, and snippets.

View dasu's full-sized avatar
💭
Losing

dasu

💭
Losing
  • Working is losing.
View GitHub Profile
from urllib.request import urlopen
from bs4 import BeautifulSoup
import random
import re
from datetime import datetime, timedelta
from pytz import timezone
import pytz
import time
def parse_dayname(i):
@dasu
dasu / hurr
Created August 25, 2014 20:29
values of key and vals before being sent to sadd
i wish
['i had']
wish i
['had hots']
hots of
['the storm']
had hots
['of the']
i had
['hots of']
code:
for item in schedule:
time = item.td.getText()
result:
'1/4/2015 12:00:00'
'1/4/2015 14:06:00'
'1/4/2015 15:05:00'
'1/4/2015 17:35:00'
'1/4/2015 19:45:00'
@dasu
dasu / new years goals.md
Last active February 10, 2016 19:13
for 2016

Goals

  • walk 30m a day for 70% of the year 20/255
  • read 3 VNs 0/3
  • read 5 books 0/5
  • upload a song to soundcloud
  • make a simple android app
  • be on time for work 70% of the year 0/255
  • etc
@dasu
dasu / testusers.py
Created July 28, 2016 19:22
users in channel?
import sopel
@sopel.module.commands('testusers')
def testusers(bot, trigger):
print(sopel.tools.target.Channel(trigger.sender.lower()).users)
-- HUMAN RESOURCE MACHINE PROGRAM --
COPYFROM 5
COPYTO 4
COPYTO 2
INBOX
a:
b:
c:
d:
@dasu
dasu / shadowverse.py
Created December 29, 2016 20:08
shadowverse poc
import sopel
import requests
@sopel.module.commands('sv','shadowverse')
def sv(bot,trigger):
if not trigger.group(2):
return bot.say("Please enter a card name.")
svcards = requests.get("https://shadowverse-portal.com/api/v1/cards?format=json&lang=en").json()
for index,card in enumerate(svcards['data']['cards']):
if trigger.group(2).lower() in card['card_name'].lower():
@dasu
dasu / twitch_remake.py
Created June 28, 2017 20:48
My attempt at remaking twitch.py
#As of 09-14-2016, twitch API now requires Client-ID with all requests. You will need to create one from here:
# https://www.twitch.tv/settings/connections
# better implementation coming soon™
import requests
import sopel
import re
from sopel.tools import SopelMemory
import datetime
twitchclientid = "lol"
@dasu
dasu / speedwatchvideos.ps1
Created November 22, 2017 15:55
speedwatch videos.ps1
$folder = 'U:\videos\'
$array = New-Object collections.arraylist
foreach($f in gci $folder){
$sh = New-Object -comobject Shell.Application
$shfol = $sh.namespace($folder)
$shfile = $shfol.parsename($f.Name)
$length = [timespan]::parse($shfol.getdetailsof($shfile, 27))
$array.Add($length)|Out-Null
}
$sum = [timespan]::fromseconds(($array.totalseconds|measure-object -Sum).sum)
@dasu
dasu / mdmydkeexport.js
Created March 27, 2022 21:45
masterduelmeta YDKE export
// ==UserScript==
// @name masterduelmeta YDKE export button (requires refreshing the page on the deck you want to export for button to show)
// @namespace Violentmonkey Scripts
// @match https://www.masterduelmeta.com/top-decks/*
// @grant none
// @version 1.0
// @author -
// @run-at document-idle
// @description 3/27/2022, 5:07:39 PM
// ==/UserScript==