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
# -*- coding: utf-8 -*- | |
import tensorflow as tf | |
from tensorflow_serving.config import platform_config_pb2 | |
from tensorflow_serving.servables.tensorflow import session_bundle_config_pb2 | |
from tensorflow_serving.servables.tensorflow import saved_model_bundle_source_adapter_pb2 | |
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
use std::mem; | |
fn main() { | |
let a = 3i64; | |
let b = [1, 2, 3, 4, 5, 6]; | |
//let c = &b[2..5]; | |
//let c = 3i64; | |
let c = "abcasdfafjekfahasid"; | |
let d = &b; |
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
/* exploit.c */ | |
/* A program that creates a file containing code for launching shell*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char shellcode[]= | |
"\x31\xc0" //xorl %eax,%eax | |
"\x50" //pushl %eax |
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
# -*- coding: utf-8 -*- | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
def run_sync(func, *sub, **kw): | |
result = func(*sub, **kw) | |
if not gen.is_future(result): | |
return result |
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
#!/usr/bin/env python | |
""" | |
Recipe for creating and updating security groups programmatically. | |
""" | |
import collections | |
import boto |
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
# -*- coding: utf-8 -*- | |
import MySQLdb | |
import threading | |
import time | |
import sqlalchemy.pool | |
MySQLdb = sqlalchemy.pool.manage(MySQLdb) | |
#db = MySQLdb.connect("localhost", "root", "", "miztest") |
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
# -*- coding: utf-8 -*- | |
""" | |
find all solutions of n-order magic square | |
""" | |
import itertools | |
class Solver(object): | |
def __init__(self, n, square=None, magic_sum=None): |
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
# hg serve --webdir-conf hgweb.cfg -p port_num | |
[paths] | |
path=dirname | |
[web] | |
allow_archive = bz2 gz | |
push_ssl = false | |
allow_push = * |
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
http://unix.stackexchange.com/questions/87432/ssh-to-private-ip | |
ssh -f -N -R 12345:localhost:22 remote |
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/bash | |
IP_LIST=("a" "b" "c") | |
for ip in ${IP_LIST[*]}; do | |
ping -c 6 $ip | |
echo " " | |
done |
NewerOlder