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
public static async Task<bool> PostInfoAsync<T>(string url, T request, string apiKey) | |
{ | |
try | |
{ | |
byte[] reqString = Encoding.Default.GetBytes(JsonConvert.SerializeObject(request, Newtonsoft.Json.Formatting.None)); | |
using HttpClient client = new(); | |
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); | |
client.DefaultRequestHeaders.Add("Referer", Environment.MachineName); |
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
import pandas as pd | |
import json | |
memberChange = [] | |
for email in df_add.values: | |
try: | |
if email: | |
memberChange.append({'Email': email[0], 'MemberName': '', 'MemberType': 'Person', 'Action': 'Add'}) | |
except: |
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
//using System.Net.Http | |
//using System.Net.Http.Headers | |
public async Task<T> GetInfoAsync<T>(string url, string apiKey, string referer) | |
{ | |
try | |
{ | |
using (HttpClient client = new HttpClient(new HttpClientHandler() { UseDefaultCredentials = true })) | |
{ | |
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("X-API-KEY", apiKey); |
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
using CitrixSessionManagement; | |
using Microsoft.OpenApi.Any; | |
using Microsoft.OpenApi.Models; | |
using Swashbuckle.AspNetCore.SwaggerGen; | |
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Metadata; |
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
import os | |
os_name = os.sys.platform | |
pc_download_folder = '//tbd.../' | |
mac_download_folder = '/tbd.../' | |
file_name = 'tbd.csv' | |
#Mac or PC Path | |
if os_name == 'darwin': |
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
Public Class ConsoleSpinner | |
Private counter As Integer | |
Public Sub New() | |
counter = 0 | |
End Sub | |
Public Sub Turn(userText As String) | |
counter += 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
def filterForLabels(df: pd.DataFrame, label) : | |
try: | |
sideLeft = df[label,] | |
except: | |
sideLeft = pd.DataFrame() | |
try: | |
sideRight = df[:,label] | |
except: | |
sideRight = pd.DataFrame() |
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
#requires pandas and numpy | |
def corrFilter(x: pd.DataFrame, bound: float): | |
xCorr = x.corr() | |
xFiltered = xCorr[((xCorr >= bound) | (xCorr <= -bound)) & (xCorr !=1.000)] | |
xFlattened = xFiltered.unstack().sort_values().drop_duplicates() | |
return xFlattened |
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
@Styles.Render("~/Content/css") | |
@Scripts.Render("~/bundles/modernizr") | |
@Scripts.Render("~/bundles/jquery") | |
<style> | |
</style> | |
<script> | |
(function () { |
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
function postMessageXhr() { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("POST", "", true); | |
xhr.setRequestHeader('Content-Type', 'application/json'); | |
xhr.send(JSON.stringify({ | |
ApplicationName: "", | |
ComputerName: "", | |
OperatingSystem: "", | |
UserName: "", |
NewerOlder