Skip to content

Instantly share code, notes, and snippets.

View c650's full-sized avatar
🛰️

c650

🛰️
View GitHub Profile
@c650
c650 / __template.cpp
Last active July 2, 2018 15:42
competition template
/* c650Alpha __template.cpp */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define FI first
#define SE second
typedef long long ll;
typedef std::pair<ll,ll> pairll;
/*
Problem 6: Drizzle
from the Mercer 2018 Spr Programming contest
Charles Bailey
03 02 2018
*/
#include <bits/stdc++.h>
typedef long long ll;
/*
Mercer 2018 Problem 10: Nth Derivative.
Charles Bailey. 03/01/2018
*/
#include <bits/stdc++.h>
#include <regex>
typedef long long ll;
@c650
c650 / template for code formatting discord
Created February 16, 2018 04:35
template for code formatting discord
```c
// code here
```
/*
Ways to Represent Graphs
Charles (@c650)
Showing how to represent _unweighted_ graphs
in C++.
*/
#include <iostream>
#include <vector>
def f(x,y)
(((-0.0447 * x ** 6 + 0.2731 * x ** 5 - 0.7935 * x ** 4 + 1.7751 * x ** 3 - 2.561 * x ** 2 + 0.9885 * x + 1.0821) ** 2) - (y ** 2)) ** 0.5
end
startx = 0
endx = 2
starty = -1.2
endy = 1.2
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
=begin
count-all-code.rb
@author Charles Bailey
@version 1.0.0 11/7/16
Ever wanted to know how much code you've written?
This nifty little script will download ALL of your
public repositories so you can find out!
=end
@c650
c650 / eclipsifier.rb
Last active September 20, 2016 23:37
converts directory of java files into an eclipse project
#! /usr/bin/ruby
# by charles bailey (@c650)
# under MIT License
# 9.20.16
require 'fileutils'
if ARGV.length != 4
puts "Usage: ./program [code dir] [new project dir] [example dir] [project name]"
@c650
c650 / Quadratic.java
Created August 26, 2016 17:07
CLI Quadratic Formula Calculator
public class Quadratic {
public static void main(String[] args) {
double a,b,c;
if (args.length != 3) {
System.out.println("Wrong number of Args.\nUsage: [a] [b] [c]");
System.exit(1);
}
a = Double.parseDouble(args[0]);
b = Double.parseDouble(args[1]);
c = Double.parseDouble(args[2]);