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
from operator import attrgetter | |
from ryu.app import simple_switch_13 | |
from ryu.controller import ofp_event | |
from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER | |
from ryu.controller.handler import set_ev_cls | |
from ryu.lib import hub | |
class SimpleMonitor(simple_switch_13.SimpleSwitch13): |
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
import java.util.Scanner; | |
public class Hey { | |
public static void main(String[] args) { | |
System.out.println("Subtotal and gratuity rate: "); | |
double a, b; | |
int c; | |
float g; | |
Scanner scanner = new Scanner(System.in); | |
a = scanner.nextInt() * 1.0; |
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
import java.util.Scanner; | |
public class Hey { | |
public static void main(String[] args) { | |
String[] months = {"January","Feburary","March","April","May","June","July","August","September","October","Novenber","December"}; | |
System.out.println(months[(int)(Math.random()*12)]); | |
} | |
} |
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
import java.util.Date; | |
public class Account { | |
private int id = 0; | |
private double balance = 0; | |
private double annualInterestRate = 0; | |
private Date dateCreated; | |
public Account() { |
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
import java.util.Scanner; | |
import java.io.*; | |
public class HW2 { | |
public static void main(String[] args) throws IOException { | |
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); | |
String list1 = bf.readLine(); | |
String[] l1 = list1.split(" "); | |
double[] li1 = new double[l1.length]; |
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
// | |
// animateViewController.swift | |
// SaviorOfTower | |
// | |
// Created by David on 2015/6/8. | |
// Copyright (c) 2015年 David. All rights reserved. | |
// | |
import UIKit |
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
from subprocess import Popen, PIPE | |
import tempfile | |
with tempfile.TemporaryFile() as tempf: | |
proc = Popen(['echo', 'a', 'b'], stdout=tempf) | |
proc.wait() | |
tempf.seek(0) | |
print tempf.read() | |
proc = Popen(['ifconfig'], stdout=tempf) |
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
// | |
// PersonalInformation.swift | |
// AnnGiNoCoreData | |
// | |
// Created by David on 2015/9/16. | |
// Copyright (c) 2015年 David. All rights reserved. | |
// | |
import UIKit | |
import Parse |
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
require 'json' | |
require "pp" | |
require 'csv' | |
require "time" | |
file = File.read('./Questionare.json') | |
data_hash = JSON.parse(file) | |
if data_hash | |
pp("json has data") |
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
require 'json' | |
require "pp" | |
require 'csv' | |
file = File.read('./PersonalInformation.json') | |
data_hash = JSON.parse(file) | |
if data_hash | |
pp("json has data") | |
end |
OlderNewer