Skip to content

Instantly share code, notes, and snippets.

View sleepypioneer's full-sized avatar
👩‍💻
Living, breathing programming ❤️

Jessica Greene sleepypioneer

👩‍💻
Living, breathing programming ❤️
View GitHub Profile
Hi everyone! I will try to explain all the possibilities here. I will stick to free and community led options.
Let's start with the mentorship programs! We'll dive into the Berlin learning meetups and groups right after. I will also share
some other recourses that can get you free conference tickets etc. at the end.
"Learn it, Girl"
Links: https://www.learnitgirl.com/, https://www.facebook.com/learnitgirl
A global free program where you sign up and you get a personal mentor that will guide you and work with you for 3 months.
You can pick a project and a programming language if you have an idea for it, or if you don't know where to start, they will
import time
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
HOST_NAME = 'localhost' # !!!REMEMBER TO CHANGE THIS!!!
PORT_NUMBER = 9000
class MyHandler(BaseHTTPRequestHandler):
@sleepypioneer
sleepypioneer / number-guess-game.py
Created August 15, 2018 11:01
Rework of number guess game by @IntotheLine
# This is a number guess game.py
import random
print("Hey, whats your name")
name = input()
print("Choose your difficulty by entering 1 = easy, 2 = normal, 3 = hard")
game = int(input())
while game > 3 or game < 1:
print("error, please enter a number between 1 and 3")
game = int(input())
asyncFind(query) {
this.isLoading = true
this.usersOrGroups = []
// let response = OC.linkToOCS('cloud', 2) + 'groups?search=' + query
api.get(OC.linkToOCS('cloud', 2) + 'groups?search=' + query, 2).then(response => {
console.log(response) // eslint-disable-line
this.usersOrGroups.push(response)
this.isLoading = false
})
console.log(this.usersOrGroups) // eslint-disable-line
@sleepypioneer
sleepypioneer / gist:f749838e27de9c0b5857ef57655fae30
Last active March 28, 2018 12:58
RA query to find all pizzerias that serve every pizza eaten by people over 30. https://stanford.io/2GkWfPx
/* Flawed as assumes 2 pizzas eaten by those over 30 should be free from this */
(\project_{pizzeria}(
\rename_{pizza}( // renames as Pizza so they can then be joined with Serves to collect the Pizzeria
\project_{pizza1}( // take only first pizza
\select_{pizza1 < pizza2}(( // gives one column for pizza 1 and a collumn for pizza 2
\rename_{pizza1}( // need to rename to be able to do cross product
\project_{pizza}((
\project_{pizza}(( // Select pizzas from table with pizzas eaten by people over 30
@sleepypioneer
sleepypioneer / gist:5b17283bc82b14b7fc665338f6f11e38
Created March 28, 2018 11:02
RA query to find the age of the oldest person (or people) who eat mushroom pizza. https://stanford.io/2GkWfPx
(
\project_{age}(
\select_{pizza='mushroom'}(Person\join Eats)
)
)
\diff
(
\project_{age1}
(
(
@sleepypioneer
sleepypioneer / insert_json_data_to_php_database
Created January 5, 2018 08:28
php import from JSON (converted to values array) and inserted to php database - Book Club app
<?php
$jsondata = file_get_contents("books.json");
$json = json_decode($jsondata, true);
include('dbconnection.php');
foreach($json['books'] as $key => $value){
$array = array();
foreach($value as $prop){
array_push($array, "'". $prop ."'");
}
$a = implode(' ,', $array);