Skip to content

Instantly share code, notes, and snippets.

View Visgean's full-sized avatar

martin Visgean

View GitHub Profile
import java.util.HashSet;
public class ABTest {
private HashSet<String> very_priv = new HashSet<String>(10);
public static void main(String[] args) {
ABTest a = new ABTest();
ABTest b = new ABTest();
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Iterator;
public class Rabbit {
Integer[][] r;
int n;
public static void main (String[] args) {
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public class Beads {
public static int rotated_index(int position, int length) {
return position % length;
}
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class CustomComparator {
public static void main(String[] args) {
String[] names = {"bba", "b", "aaaa", "ccc"};
List<String> name_list = Arrays.asList(names);
System.out.println("Before : "+Arrays.toString(name_list.toArray()));
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class Main {
-- (g) Obtain ticket numbers and names of all passengers departing from London.
SELECT "Booking"."ticketNo", "Booking"."name" FROM "Booking" LEFT JOIN "Flight" ON "Booking"."flightNo" = "Flight"."flightNo" LEFT JOIN "Airport" ON "Flight"."depAirport" = "Airport"."airportId" WHERE "Airport"."city" = 'London'
-- (h) Retrieve the flight number and flight company of all flights from London to Paris.
SELECT "Flight"."flightNo", "Flight"."flightCompany" FROM "Flight" LEFT JOIN "Airport" AS "A1" ON "Flight"."depAirport" = "A1"."airportId" LEFT JOIN "Airport" AS "A2" ON "Flight"."arrAirport" = "A2"."airportId" WHERE "A1"."city" = 'London' AND "A2"."city" = 'Paris'
-- (i) List the ticket numbers and names of all passengers travelling in Business class.
SELECT "Booking"."name", "Booking"."ticketNo" FROM "Booking" LEFT JOIN "Seat" ON "Booking"."seatNo" = "Seat"."seatNo" AND "Booking"."flightNo" = "Seat"."flightNo" WHERE "Seat"."class" = 'Economy'
conky.config = {
alignment = 'top_right',
background = false,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
draw_borders = false,
draw_graph_borders = true,
@Visgean
Visgean / hosts.sfw
Created February 3, 2017 16:51
fucking work
127.0.0.1 localhost
127.0.1.1 rewthink
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Keybase proof

I hereby claim:

  • I am visgean on github.
  • I am visgean (https://keybase.io/visgean) on keybase.
  • I have a public key ASCvFCM85-pSD1BWvq9IWnhXbpDrRoXEn5ouTZz7JRIz6Qo

To claim this, I am signing this object:

treshold = 100
matrix = []
with open('image-brightness-values.csv') as csv_file:
for line in csv_file.readlines():
matrix.append(map(int, line.split(',')))
def process_line(line):
pairs = zip(line, line[1:])