Skip to content

Instantly share code, notes, and snippets.

@Tejkaran
Tejkaran / Selenium basic help
Created August 16, 2019 20:10
Selenium basic help
#! python3
# voobly.py
import logging, sys, requests
from selenium import webdriver
logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
#logging.disable(logging.CRITICAL) #hash this line to use logging, unhash to stop logging
logging.debug('Start of program')
# DONE open voobly
@Tejkaran
Tejkaran / Blinds thing
Last active August 14, 2019 12:49
Blinds thing
Option Explicit
Sub formatting()
'set up your workbooks and worksheet so the computer knows what to looks at.
'IE make an object for workbook and an object for worksheet
Dim wbk As Workbook
Dim ws1 As Worksheet
Set wbk = ThisWorkbook
Set ws1 = wbk.Sheets("SamsWork")
@Tejkaran
Tejkaran / VBA for copying info
Last active August 3, 2019 11:07
friend help
Option Explicit
Sub Sams_awesome_macro()
'this sets the name of your workbooks and worksheets, so you can call them quickly rather than writing the name
'of the workbook or worksheet everytime. You had made and "object" of the workbooks/worksheet
Dim wbk1 As Workbook
Dim wbk2 As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
@Tejkaran
Tejkaran / whatsapp extracts
Last active June 28, 2019 09:39
whatsapp extracts
import re
import pandas as pd
pd.set_option('display.max_rows', 500)
#the encoding is added because of the way the file is written
#https://stackoverflow.com/questions/9233027/unicodedecodeerror-charmap-codec-cant-decode-byte-x-in-position-y-character/9233174
def set_file_up(file):
print('\n')
chat = open(file, 'r', encoding="utf8")
@Tejkaran
Tejkaran / cycle through files listed on a tab
Last active January 29, 2019 07:10
cycle through files listed on a tab
Option Explicit
Sub Checks_Compiler()
'Define Variables
Dim wbk1 As Workbook 'This workbook
Dim wbk2 As Workbook 'Second workbook
Dim ws1 As Worksheet 'Summary
Dim ws2 As Worksheet 'Links
Set wbk1 = ThisWorkbook
@Tejkaran
Tejkaran / 8x8 Matrix
Last active March 12, 2018 20:54
8x8 Matrix
//rows
#define r1 5
#define r2 10
#define r3 20
#define r4 8
#define r5 13
#define r6 19
#define r7 14
#define r8 17
@Tejkaran
Tejkaran / Lights on and off
Created September 1, 2017 07:22
Lights on and off
#include "FastLED.h" // for LED's
#include "RTClib.h" // for timer
#include "Wire.h"
#define NumPixels 150 // number of LEDs in strip - count starts at 0, not 1
#define Datapin 11 // datapin - green on apa102
#define Clockpin 13 // clockpin - blue on apa102
#define DataRate_Mhz 4
CRGB leds[NumPixels]; // LED strip array
// todo: when colours(not Animation) page opens in app a signal is sent to set holdingValue to 50/non activation
#include <SoftwareSerial.h>// Serial
#include <SPI.h> // not sure
#include "FastLED.h" // LED's
#include "RTClib.h" // timer
#include "Wire.h" // timer
#define NumPixels 86 // number of LEDs in strip - twinkleCount starts at 0, not 1
#define dataRate_Mhz 4 // how fast data refreshes at
#define dataPin 11 // data pin
@Tejkaran
Tejkaran / longer piece
Created July 6, 2017 20:15
longer piece
//receive bluetooth signal from bluetooth
if (BluetoothSerial.available()>0) // Read from Bluetooth and send to Arduino Serial Monitor
{
character = BluetoothSerial.read();
Serial.print("character is : "); Serial.println(character);
}
//received the signal and what to do
switch(character)
{
@Tejkaran
Tejkaran / Random funclights
Created July 6, 2017 20:09
Random funclights
#include "FastLED.h"
#define NumPixels 50 // number of LEDs in strip, start count at 0
#define DataRate_Mhz 4 // how fast data refreshes at
#define DataPin 11 // data pin
#define ClockPin 13 // clock Pin
CRGB leds[NumPixels];
CRGBPalette16 currentPalette;
TBlendType currentBlending;