Google Summer of Code (GSoC) is a summer internship program arranged by Google
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 time | |
students = [] | |
# Titlecasing: | |
def get_students_tica(): | |
students_tica = [] | |
i = 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
""" To be executed from within your django application for extra initialization """ | |
import os | |
def touch_init(directory_name, alt="__init__.py"): | |
target = os.path.join(directory_name, alt) | |
with open(target, "a+") as f: | |
print("touching file: {}".format(target)) | |
f.close() |
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.net.URL; | |
import java.util.HashMap; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; |
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/python3 | |
import sys | |
import smtplib | |
import getpass | |
server_name = 'smtp.gmail.com' | |
payload = """From: {} | |
To: {} | |
Subject: Hello world! |
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 python3 | |
import os | |
import sys | |
import requests | |
from getpass import getpass | |
from typing import List | |
from bs4 import BeautifulSoup | |
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 | |
# Inspired by nnsense's answer at https://forums.docker.com/t/how-to-remove-none-images-after-building/7050/16 | |
if [ $# -ne 1 ]; then | |
echo "You must enter a single valid image id or name." | |
else | |
# Assume that the image id/name is actually valid. | |
docker save --output /tmp/image.tar $1 | |
docker image rm $1 | |
docker image prune # Just an extra cleanup step while we're at it. | |
docker load --input /tmp/image.tar |
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
<VirtualHost 127.0.1.2:80> | |
ServerName testme.net | |
ServerAlias www.testme.net | |
DocumentRoot /home/hemanth/Code/PHP/testme.net | |
ErrorLog /home/hemanth/Code/PHP/testme.net/logs/error.log | |
<Directory "/home/hemanth/Code/PHP/testme.net"> | |
Require all granted | |
</Directory> |
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
/* Disclaimer: glibc provides the deamon(3) library function as a part of | |
Linux and should be prefered over writing ad-hoc boiler plate code like | |
this. Though this C example *does* provide a good demonstration of the steps | |
to be taken to daemonize a process via. system calls in Unix especially since | |
deamon(3) is not a POSIX.1. standard function. */ | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <getopt.h> | |
#include <signal.h> |
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 ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
"sync" |
OlderNewer