Skip to content

Instantly share code, notes, and snippets.

View tjperry07's full-sized avatar
๐Ÿ˜€

tjperry07 tjperry07

๐Ÿ˜€
View GitHub Profile
@tjperry07
tjperry07 / .vale.ini
Created August 11, 2020 19:20
Vale Configuration
StylesPath = .github/styles
MinAlertLevel = suggestion
[*.md]
BasedOnStyles = Microsoft

Run Jekyll in the Terminal

Running jekyll projects on Cloud 9 requires this jekyll serve -H $IP -P $PORT --baseurl "" command in the terminal.

Setting up a new run configuration

  1. Under the menu select Run > Run Configuration > New Run Configuration.
  2. Then enter jekyll serve -H $IP -P $PORT --baseurl "" for the Command.
  3. Then enter Jekyll for the Run Configuration. This will ensure that you can access it quickly in the Run > Run Configuration > Jekyll.
import re
def all_in_string(a_string, s1, s2, s3):
string_to_split = re.findall(r"\w+|[^\w\s]", a_string) #split the string, including punctuation
print(string_to_split)
# split_the_string = a_string.lower().split(' ')
# print(split_the_string)
final_count = ''
for string in string_to_split:
if string == s1 or string == s2 or string == s3:
@tjperry07
tjperry07 / sort.py
Created November 24, 2017 20:07
Support Engineer
def sort_me(to_sort):
#using pythons built in collection Counter to sort
count = Counter(to_sort).most_common()
final = [x[0] for x in count[0:10]]
#used list comprehension to return the first value from the list and then remove everything after the _
return ''.join(final)
@tjperry07
tjperry07 / reasons.py
Last active August 11, 2017 00:59
Parse CSV
"""I left the blank cells in the file as it could provide useful to know which do not have an error reason attached. They are the first in the list with Counter and it tells how many times a blank reason is there.
I also decided to not make a list or anything for the charecters to strip since each column could have its own 'quirks', but I was careful to remove the extra charecters in the order I saw them. """
import csv
import string
from collections import Counter
#Used Counter since its a quick way get the totals of positive counts.
#The elements are the keys, and the count is the value. It has a lot of functionality with it
#open the file. using r for reading

SQL Basics Cheatsheet

Find All Columns and Rows in a Table

SELECT * FROM <table name>;

@tjperry07
tjperry07 / findString.js
Last active November 10, 2016 03:26
Find String within String.
//Tatiana Perry 11/9/2016
var s = "uwlcnfcejefjudkmylhmmpjfkmhveozojepfvgboboxknkfdoghkvzxrkamhaghahpnnzh_figzhelkapd_dnxsiurbjgq_bcctqgigfksdrzgtxvihiqvfvinuqfzgohvilwyxpuqjolleuecpxcbisaptnoxbglpkhsvvwdgaminprfrha_uemwdepnngtxgkqx_flerkbnnzazcvnh_sealovrpuafumrmaizidjedvovhtbadjelfrbknpioqiindxqiozzpdrv_bwooblumjc_oqtcgrfmxkwkczhhqiwuqzoznqgfmbdxrxigvkebypbsybanuccpsezgv_dvteybbrbrbldbpiyhgzkptloxfktrzkjmdhppucsaohfnehdnlnhexwj_yhulslwpdreogjsffy_fkqcdkobywhqxpjvv_sqbscknxrew_ivgvpolmqfkyxoxzuyqctriyxcncwvvqhdupkagguee_zfbcrexbtkcsbnjcfzqoq_wrdktpsclzrmeybxpzrylfdydknd_zbjjqcnubpjbfaaecuxbeprjjjfcybvcghfbcvnjicpliwzkqvwo_hloynyjrmiqvubsyobetklnsgovesswqatrcrirsywdvbpwnhtjaug_nglxamsybkop_gnkdvgzp_cmyxclrtjtoohniuszzbnakknd_ahe_enbouxvpueotcjebex_vpqbwyjgczobcirmgfvwnlrxaryoltdlozwdgcp__iwu_vkod_kzkmeklloeixrxymlvyvtlfyydwtzxugrhxwqgmmsvtshrublypevlpglldlumsbscjuv_cbtfjpenrervyxtbrxaaqsqs__boiiubqmgwtvzxlnxxyskbwquztepk_uggukayehrifcrdpcnrfhmlucqzbsvoojsfexvbzsrccyqjuufbiae_siovpbhhqzkcemm_wtzio_d_emtkxpkp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjperry07
tjperry07 / index.html
Created September 12, 2016 14:21
Thinkful Tube Expanded2
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@tjperry07
tjperry07 / accbootcamp.md
Last active January 30, 2018 09:17
ACC Bootcamp Information