Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Installation:
#
# 1. vim /etc/ssh/sshd_config
# PrintMotd no
#
# 2. vim /etc/pam.d/login
# # session optional pam_motd.so
#
/**
Author: Davide Spataro
email:davide.spataro@unical.it
www.davidespataro.it
*/
#define DOUBLE_PRECISION (1)
typedef double2 cl_double_complex;
typedef float2 cl_float_complex;
import socket
import struct
import sys
import binascii
assert len(sys.argv) ==3
IP = sys.argv[1]
PORT = sys.argv[2]
print "Connecting to",IP, "on port", PORT
#setting sync
#include <string>
#include <algorithm>
#include <vector>
#include <tuple>
#include <iostream>
#include <optional>
void usage(const std::string& progName) {
std::cout << progName << " -X FILE -P FILE -O DIRECTORY " << std::endl
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using pii = pair<int, int>;
using l = long;
using ll = long long;
using ull = unsigned long long;
void solve();
#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <unordered_map>
#include <vector>
using namespace std;
/* *
* Copyright 1993-2012 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*/
#include <stdio.h>
//problem 68---
template<class COLLECTION>
bool cmp_arr(const COLLECTION& v1, const COLLECTION& v2) {
for(int i=0; i<v1.size() ; i++) {
if(v1[i]==v2[i])
continue;
if(v1[i]<v2[i])
return true;
else
return false;
#include <bits/stdc++.h>
#include <gmpxx.h>
#include <functional>
#include <numeric>
//TYPEDEFS
typedef unsigned long long ull;
typedef signed long long ll;