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
#![feature(plugin)] | |
#![plugin(rocket_codegen)] | |
extern crate rocket; | |
use std::fmt; | |
use rocket::request::{self, Request, FromRequest}; | |
use rocket::outcome::Outcome::*; | |
#[derive(Debug)] |
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 | |
# rrrrrreeaaal lazy usage, still awesome -> for i in *;do ./post.sh $i "+$count hour" && count=$(($count+1)) && echo $count && sleep 1;done | |
token="your api token , make sure it has page upload permissions, too lazy to figure out how to make one? try this page: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET" | |
photka="$1" | |
sched_time=$(date -d "$2" +"%s") | |
if [ -z "$1" ]; then | |
echo "usage: <photka path> [<pub-time>]" | |
echo "" | |
echo "<pub-time> values: +1 day, +1 hour, just like with date" | |
echo "" |
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 | |
token="your api token , make sure it has page upload permissions, too lazy to figure out how to make one? try this page: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET" | |
photka="$1" | |
sched_time=$(date -d "$2" +"%s") | |
if [ -z "$1" ]; then | |
echo "usage: <photka path> [<pub-time>]" | |
echo "" | |
echo "<pub-time> values: +1 day, +1 hour, just like with date" | |
echo "" | |
echo "examples:" |
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 | |
token="EAACEdEose0cBAOekRbHcKZBCGgbuyQGMCIc6k2rGY2VLH5l3I4hbXdAUsnrZBZCZAhqpaIKDy9x4hmEyDX8B3v0vxkZBRKmD8yFRTfNUKk2WZCjxISfphlcExK7gIwgjehwfLIonGINWQupBLRmHwgqeRZBbyKYWqnQvIezi4dpMZCIB74vtvGHe" | |
photka="$1" | |
sched_time=$(date -d "$2" +"%s") | |
if [ -z "$1" ]; then | |
echo "usage: <photka path> [<pub-time>]" | |
echo "" | |
echo "<pub-time> values: +1 day, +1 hour, just like with date" | |
echo "" | |
echo "examples:" |
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 | |
// Connecting to the database | |
$top = "<html> | |
<head> | |
<link rel="stylesheet" href="StyleSheet.css" type="text/css"> | |
<style> | |
img { | |
display: block; | |
margin: 0 auto; |
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"> |
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
#!/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
#!/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/python | |
import csv | |
class Analyzer(object): | |
def __init__(self, filename): | |
self.parsed_file = {"file_name": filename} | |
data = [] | |
with open(filename, "r") as csv_file: |