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 | |
# Usage: ./youtube-dl.sh <path/to/file/of/youtube/links> | |
readonly TMP_DIR="/tmp/ytdl" | |
readonly ARGS="$@" | |
main() { | |
while read url | |
do |
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 | |
readonly TMP_DIR="/tmp/ytdl" | |
readonly TMP_OUT="/tmp/out" | |
readonly ARGS="$@" | |
download_video() { | |
echo "================================ Downloading $1 ================================" | |
youtube-dl $1 --output ${TMP_DIR}/%\(title\)s | |
} |
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 Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.println("Enter a number to check if it's prime:"); | |
int possiblePrime = scanner.nextInt(); |
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
package main | |
import ( | |
"code.google.com/p/go.net/html" | |
"flag" | |
"fmt" | |
"github.com/ziutek/mymysql/mysql" | |
_ "github.com/ziutek/mymysql/native" | |
"io" | |
"io/ioutil" |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var sum int | |
for i := 0; i < 1000; i++ { | |
if i%3 == 0 || i%5 == 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
package main | |
import ( | |
"fmt" | |
"flag" | |
) | |
func main(){ | |
tempMorning := flag.Int("morning", 60, "Temperature in the morning.") | |
tempAfternoon := flag.Int("afternoon", 75, "Temperature in the afternoon.") |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math" | |
"os" | |
"strconv" | |
"strings" | |
) |
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
nums = input().split() | |
num_students = int(nums[0]) | |
num_assignments = int(nums[1]) | |
students = [] | |
for i in range(0, num_students): | |
line = input() | |
student_avg = sum([float(x) for x in line.split()[1:num_assignments + 1]]) | |
students.append([line.split()[0], student_avg, student_avg / num_assignments]) |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
var numLines int | |
fmt.Scanf("%d", &numLines) |
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
package main | |
import ( | |
"fmt" | |
"regexp" | |
"os" | |
"log" | |
"strings" | |
"strconv" | |
"math/rand" |
NewerOlder