This file contains hidden or 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 numpy as np | |
from sklearn.model_selection import train_test_split | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.metrics import accuracy_score | |
from datetime import datetime, timedelta | |
import random | |
# Function to generate random dates |
This file contains hidden or 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
#!/bin/bash | |
# Get the current directory from which the script is executed | |
DIR="$(pwd)" | |
# Iterate over sub-directories | |
for SUB_DIR in "$DIR"/*; do | |
if [ -d "$SUB_DIR" ]; then | |
echo "Processing $SUB_DIR..." | |
This file contains hidden or 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
#!/bin/bash | |
# Generate a self-signed certificate | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost" | |
# Read the contents of the certificate and private key into environment variables | |
CA_CERT=$(cat cert.pem) | |
CA_KEY=$(cat key.pem) | |
# Cleanup the generated certificate and key files from the local file system |
This file contains hidden or 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
Below is a basic RFC (Request for Comment) template suitable for software engineering teams working on Federal projects: | |
--- | |
## **RFC: [Your Proposal Name]** | |
**RFC Number:** [Unique number or identifier for the RFC] | |
**Date:** [Creation date] |
This file contains hidden or 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
version: 2 | |
updates: | |
- package-ecosystem: 'npm' # See documentation for possible values | |
directory: '/' # Location of package manifests | |
open-pull-requests-limit: 25 | |
schedule: | |
interval: 'daily' | |
- package-ecosystem: 'github-actions' # See documentation for possible values | |
directory: '/' # Location of package manifests | |
open-pull-requests-limit: 25 |
This file contains hidden or 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
const liters = {canonical: 'liters', | |
metric: [{type: 'milliliters', | |
to: {divide: 1000}, | |
from: {multiply: 1000}}, | |
{type: 'centiliters', | |
to: {divide: 100}, | |
from: {multiply: 100}}, | |
{type: 'deciliters', | |
to: {divide: 10}, | |
from: {multiply: 10}}, |
This file contains hidden or 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
module BattleShip | |
class Board | |
SHIPS = {C: 5, B: 4, S: 3, D: 3, T: 2} | |
def initialize | |
@grid = (1...10).map {(1...10).map {'.' }} | |
end | |
def randomly_load_ships | |
SHIPS.each do |ship,cells| |
This file contains hidden or 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 add_minutes(time, signed_integer_minutes) | |
if time_regex = time.match(/(\d{1,2}+):(\d{2}+) (AM|PM)/) | |
total_minutes = time_regex[2].to_i + (signed_integer_minutes.abs % 60) | |
final_minutes = total_minutes % 60 | |
total_hours = time_regex[1].to_i + (signed_integer_minutes.abs / 60 % 60) + (total_minutes / 60 % 60) | |
final_modulo_hours = total_hours % 12 | |
This file contains hidden or 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
facebook_ids = [ | |
"cirospizzeriabeerhousegaslamp", | |
"lavalenciahotel", | |
"tendergreensfood", | |
"craftpizzaco", | |
"tapiocaexpress", | |
"singlefinsd", | |
"thebakedbear", | |
"artofespresso", | |
"julianbakery", |
This file contains hidden or 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
business - The Business associated with this Page. Visible only with a page access token or a user access token that has admin rights on the page | |
can_checkin - Whether this page has checkin functionality enabled - bool | |
can_post - Whether the current session user can post on this Page - bool | |
category - The Page's category. e.g. Product/Service, Computers/Technology - string | |
category_list - The Page's sub-categories - list<pagecategory> |
NewerOlder