Skip to content

Instantly share code, notes, and snippets.

View yoxisem544's full-sized avatar
🥑

David Lin yoxisem544

🥑
View GitHub Profile
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):
@yoxisem544
yoxisem544 / java1.java
Created March 5, 2015 06:12
HW1 - java
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;
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)]);
}
}
import java.util.Date;
public class Account {
private int id = 0;
private double balance = 0;
private double annualInterestRate = 0;
private Date dateCreated;
public Account() {
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];
//
// animateViewController.swift
// SaviorOfTower
//
// Created by David on 2015/6/8.
// Copyright (c) 2015年 David. All rights reserved.
//
import UIKit
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)
//
// PersonalInformation.swift
// AnnGiNoCoreData
//
// Created by David on 2015/9/16.
// Copyright (c) 2015年 David. All rights reserved.
//
import UIKit
import Parse
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")
require 'json'
require "pp"
require 'csv'
file = File.read('./PersonalInformation.json')
data_hash = JSON.parse(file)
if data_hash
pp("json has data")
end