Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/* | |
Can you solve this ? | |
You are given a deck containing N cards. While holding the deck facedown: | |
1. Deal all the cards facedown onto a table into Y piles like you would if you were playing with a group of people (i.e. card 1 to P1, card 2 to P2, ..., card Y to PY, card Y + 1 to P1, etc). | |
2. Combine all the piles into a deck by placing P1 onto P2, then P1+P2 onto P3, and so on. This is a round. | |
3. Pick up the deck from the table and repeat steps 1-2 until the deck is in the original order. | |
4. For each round, vary the pile count according to a repeating pattern. Start with 3 piles, then 4, then 5, then loop back to 3, then 4 and so on. | |
Write a program to determine how many rounds it will take to put a deck back into the original order. This will involve creating a data structure to represent the order of the cards. Do not use an array. This program should be written in C only. It should take a number of cards in the deck as a command line argument and write the result to stdout. Please ensure the program com |
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
FROM ubuntu:20.04 | |
RUN apt-get update | |
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y kmod remmina libgtk2.0-0 libwebkit2gtk-4.0-37 | |
RUN dpkg-reconfigure --frontend noninteractive tzdata | |
RUN mkdir -p /usr | |
COPY anyconnect-linux64-4_9_01095-core-vpn-webdeploy-k9.sh /install-vpn.sh | |
COPY run.sh /run.sh |
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 base64 | |
import sys | |
import json | |
s = base64.b64decode(sys.argv[1]) | |
j = json.loads(s) | |
file = open('test.txt', 'w') | |
file.write(str(j)) |
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
#!/bin/env python | |
import os | |
from slackeventsapi import SlackEventAdapter | |
from slack import WebClient | |
import string | |
from collections import OrderedDict | |
import unicodedata | |
import json | |
import re |
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
# | |
# Copyright (c) 2018 The Gupta Empire - All Rights Reserved | |
# Please refer to LICENCE.md in the project root directory for | |
# licence information. If no Licence file is provided, please | |
# contact Aryan Gupta <me@theguptaempire.net> for more info | |
# | |
#=============================================================================== | |
# @author Aryan Gupta <me@theguptaempire.net> | |
# @title Makefile | |
# @brief This is a generic Makefile I use for my C++ projects |
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
#include <iostream> | |
using namespace std; | |
using ENUM_TYPE = int; | |
/// LEGEND: | |
/// | |
/// for( range_declaration : range_expression ) | |
/// | |
/// translates to: |
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
// A lot of this implementation was used from | |
// http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf | |
// This is a good read if you want to better | |
// understand what's going on here | |
// Please see ari::any in my libari repo for an updated version | |
// including small item optimization and fixed decay error | |
// LINK: https://github.com/aryan-gupta/libari/blob/master/include/any.hpp |
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
#include <array> | |
#include <iostream> | |
// This function is th heart of the range loop. Returns | |
// an array that is allocated on the stack. Because this | |
// is a constexpr, this array of incrementing numbers is | |
// calculated at compile time. Please note that if negative | |
// numbers needs to be used, change \tparam T to a signed | |
// integer |
NewerOlder