Group rows with a certain record value together but randomize the rest.
.open newdb.sqlite
.load ./digest.so
# Taken from http://rubykoans.com/ | |
# about_array_assignments.rb | |
def test_default_value_is_the_same_object | |
hash = Hash.new([]) | |
hash[:one] << "uno" | |
hash[:two] << "dos" | |
assert_equal ["uno","dos"], hash[:one] |
require 'json/stream' | |
class MonsterParser | |
FILE_BUFFER_SIZE = 1024 | |
def initialize(file_path,xpath) | |
@file_obj = File.open(file_path,'r') | |
@element_stack = [] |
This project covers the basic concepts behind querying with Python.
We have a movie database that's fairly comprehensive. We'd like to explore it a bit with Python. Here are the columns:
movie_title color num_critic_for_reviews movie_facebook_likes duration director_name director_facebook_likes actor_3_name actor_3_facebook_likes actor_2_name actor_2_facebook_likes actor_1_name actor_1_facebook_likes gross genres num_voted_users
## Run alongside self | |
count=0 | |
while true | |
Rails.logger.tagged(Process.pid) do | |
Dispute.with_advisory_lock("hamster_dance") do | |
Rails.logger.info "Doing hamster dance #{count}!" |
class Thing(): | |
def __init__(self): | |
self.name = 'thing' | |
print('setup') | |
def __enter__(self): | |
print('enter') | |
return self | |
def __exit__(self, *args): |
import pygame, sys | |
from pygame.locals import * | |
pygame.init() | |
board_color = (168, 173, 181) | |
line_color = (100, 100, 100) | |
DISPLAYSURF = pygame.display.set_mode((1000, 500)) | |
pygame.display.set_caption('G R A P H G A M E !') |
All developers in the modern day need to understand web technologies at some level. Whether you're interacting with a Jupyter notebook or querying a web api, understanding how a CLIENT requests information from a SERVER and to see how the SERVER produces its response is incredibly valuable.
We will make a web app that serves as both a CLIENT to an external api (exchangeratesapi.io). This app will show conversion rates for currencies, and then add some more complex data.
- bin | |
- theirmod | |
- __init__.py/ | |
- mymod/ | |
- __init__.py | |
- more/ | |
- __init__.py | |
- other.py | |
- magic.py |