You are tasked with implementing a complete workflow from Linear issue to GitHub draft PR. Follow these instructions precisely.
The user will invoke this command with: /autocode <LINEAR_ISSUE_ID>
Example: /autocode END-1234
import pygame | |
# Initialize Pygame | |
pygame.init() | |
# Set the window size and title | |
screen_size = (600, 400) | |
screen = pygame.display.set_mode(screen_size) | |
pygame.display.set_caption("Bouncing Ball") |
Most analytics tools are made to help app makers study what users are doing in some specific type of app. This kind of tool works okay, provided your app looks enough like the others apps the tool was built for, and your users’ behaviors are enough like the behaviors in those other apps. What if your app is unique, and the questions you have are unique? (Before Keen, the state of the art was to build your own Observatory from scratch.) | |
The data model breadth of those tools may not be enough for you. What if user behavior in the app layer is only a part of your business? What if you want to study your marketing website copy, your paid acquisition funnel, the response time performance of your your webservices layer, all in the same system? (Before Keen, the state of the art was to build your own Observatory from scratch.) | |
What if you want other humans — your customers, your partners, your merchants, or just other departments in your company — to get value from the same data? What if you wanted applications to |
// Determine if an element is in the visible viewport | |
// The function could be used by adding a “scroll” event listener to the window and then calling isInViewport(). | |
function isInViewport(element) { | |
let rect = element.getBoundingClientRect(); | |
let html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) |
// Determine if an element is in the visible viewport | |
function isInViewport(element) { | |
var rect = element.getBoundingClientRect(); | |
var html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) | |
); |
Keen.configure(window.ENV.keenProjectId,window.ENV.keenApiKey), | |
Keen.onChartsReady(function(){ | |
var e=new Keen.Series("connect",{ | |
analysisType:"count", | |
timeframe:"last_7_days", | |
interval:"daily" | |
}), | |
t=new Keen.Series("connect",{ |
adroit@Kyles-MacBook-Air:~/Dropbox/dev/Keen-Clients/ $ gem install keen | |
Building native extensions. This could take a while... | |
ERROR: Error installing keen: | |
ERROR: Failed to build gem native extension. | |
/Users/adroit/.rvm/rubies/ruby-1.9.2-p136/bin/ruby mkrf_conf.rb | |
"/Users/adroit/.rvm/rubies/ruby-1.9.2-p136/bin/ruby" -rubygems /Users/adroit/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/bin/rake RUBYARCHDIR=/Users/adroit/.rvm/gems/ruby-1.9.2-p136/gems/keen-0.1.6/lib RUBYLIBDIR=/Users/adroit/.rvm/gems/ruby-1.9.2-p136/gems/keen-0.1.6/lib | |
rake aborted! | |
no such file to load -- bundler |
# git convenience functions | |
function grso() { | |
git remote show origin ; | |
} | |
function mkremotebranch() { | |
git branch "$@" ; | |
git checkout "$@" ; | |
git push -u origin "$@" ; | |
} |
""" | |
A sample use case for DSTruct ( https://github.com/dorkitude/dstruct ) | |
Let's pretend we're implementing the in-app purchase feature of a mobile game, | |
and there's a remote payments API over which we have no control. To make | |
matters worse, their API doesn't support versioning and their client library | |
isn't properly encapsulated, so when they make an update to the API spec, we | |
have to handle it in our code. As a result, our spec demands type checking not | |
only to preempty failures when we post resources, but to vet the response. |
class BaseTestCase(unittest.TestCase): | |
""" | |
Extend this with your test cases to get some sweet shit! | |
- Provides: | |
- Instance methods: | |
- self.persist_item(item) # Use instead of item.save() | |
- self.set_up() | |
- a subclass's method *must* call super |