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
bundle init && gem list --local |head -n -1 | awk '{print "gem \47"$1"\47, " "\47"$2"\47"}'|sed 's/[()]//g' >> Gemfile |
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
class FtpServer | |
def initialize(username, password) | |
@username = username | |
@password = password | |
end | |
def fxp(destination, local_path, remote_path) | |
remote_pass = destination.@password | |
local_pass = @password |
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
public BruteCollinearPoints(Point[] points){ | |
if (points == null) | |
throw new NullPointerException(); | |
for (int p1 = 0; p1 < points.length; p1++){ | |
for (int p2 = 0; p2 < points.length; p2++){ | |
for (int p3 = 0; p3 < points.length; p3++){ | |
for (int p4 = 0; p4 < points.length; p4++){ | |
if (p1 != p2 && p1 != p3 && p1 != p4 && p2 != p3 && p2 != p4 && p3 != p4){ |
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
class A | |
def fooz | |
puts "bar" | |
end | |
end | |
class A | |
alias_method :super_send, :send | |
def send(symbol,*args) |
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
#!/usr/bin/python | |
class Analyzer(object): | |
def __init__(self, filename): | |
self.parsed_file = [] | |
data = [] | |
with open(filename, "r") as csv_file: | |
data = csv_file.readlines() | |
data = [line.split(",") for line in data] |
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
#!/usr/bin/python | |
import csv | |
class Analyzer(object): | |
def __init__(self, filename): | |
self.parsed_file = {"file_name": filename} | |
data = [] | |
with open(filename, "r") as csv_file: |
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
#!/usr/bin/python | |
import csv | |
import scipy.spatial.distance as distance | |
from collections import OrderedDict | |
import itertools | |
class Analyzer(object): | |
def __init__(self, filename): |
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
#!/usr/bin/python2.7 | |
import json | |
data = "" | |
with open("result.json", "r") as json_dump: | |
data = json.load(json_dump) | |
print("file_name: {}".format(data["file_name"])) | |
for student in data["students"]: | |
print("student first name: {}".format(student["student_name"])) | |
print("student last name: {}".format( student["student_last_name"])) |
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
<?php | |
$server = "tcp:shirfisher.database.windows.net,1433"; | |
$user = "shirfisher"; | |
$pass = "Q1W2r4e3"; | |
$database = "shirfisher"; | |
$c = array("Database" => $database, "UID" => $user, "PWD" => $pass); | |
sqlsrv_configure('WarningsReturnAsErrors', 0); | |
$conn = sqlsrv_connect($server, $c); | |
if($conn === false) | |
{ |
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
<html> | |
<head> | |
<link rel="stylesheet" href="StyleSheet.css" type="text/css"> | |
<title>Add New Car</title> | |
</head> | |
<body> | |
<h1>Add New Car</h1> | |
<h3>Fill this form in order to add new stations</h3> | |
<p><span class="error">* required field.</span></p> | |
<form method="post" action="fuck.php"> |