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 !') |
| - bin | |
| - theirmod | |
| - __init__.py/ | |
| - mymod/ | |
| - __init__.py | |
| - more/ | |
| - __init__.py | |
| - other.py | |
| - magic.py |
| #!/usr/bin/python | |
| import sys, csv, re | |
| class ColumnCollapser: | |
| @classmethod | |
| def _safe_print(cls, content): | |
| print(re.sub(r"[0-9]{13,16}","[COLLAPSERFILTERED]", str(content))) | |
| @classmethod | |
| def _handle(cls, header, index, row): |