Skip to content

Instantly share code, notes, and snippets.

$ pip3 install --user -r ./requirements.txt
Collecting quamash (from -r ./requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/89/41/ba1396ebed0dcfd09854addea45323c93f498dc7c45d855943ab31791194/Quamash-0.6.1-py3-none-any.whl
Collecting PyQt5 (from -r ./requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/7f/8a/a6346c9772cda4a7fa6ad7737df1bc8588033867eeacb71a6fdad4487813/PyQt5-5.11.2-5.11.1-cp35.cp36.cp37.cp38-abi3-macosx_10_6_intel.whl (90.1MB)
2% |▊ | 2.1MB 303kB/s eta 0:04:51Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher
yield
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read
tmp = a^n
answer = tmp
for (i = 1; i <= n; i += 1) {
tmp = (tmp * (n-i+1) * x )/(a * i)
answer = answer + tmp
}
import RPi.GPIO as GPIO
import time
import os
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
input_state = GPIO.input(18)
if input_state ==False:
import 'react-dates/initialize';
import 'react-dates/lib/css/_datepicker.css';
import React from 'react';
import moment from 'moment';
import { SingleDatePicker } from 'react-dates';
const now = moment().format('MMM Do, YYYY');
export default class ExpenseForm extends React.Component {
function init_pagination() {
var hash, loading_articles, page_regexp, pushPage, title_of_article;
page_regexp = /\d+$/;
pushPage = function(page) {
if (page == "1") {
title_of_article = $("input#article_friendly_id")[0].value;
}
history.pushState(null, "InfiniteScrolling | Page " + page, title_of_article);
};
window.preparePagination = function(el) {
<div class='row'>
<div id='content-column' class="col-md-8 col-sm-9 col-xs-12">
<%= yield %>
</div>
<div class="col-md-4 col-sm-3 col-xs-12">
<%= render 'home/management_content' %>
</div>
</div>
</div>
</div>
@powerwlsl
powerwlsl / Bundle error
Created July 7, 2017 01:24
Bundle error
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/hyejinahn/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
<!DOCTYPE html>
<html>
<head>
<title>TestApp</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<meta property="fb:app_id" content="1906292329591719" />
<meta property="og:url" content="https://protected-lowlands-45584.herokuapp.com/" />
<meta property="og:title" content="TestApp" />
@powerwlsl
powerwlsl / capybara cheat sheet
Created April 21, 2017 11:12 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/hyejinan/.rvm/rubies/ruby-2.2.5/bin/ruby -r
./siteconf20170324-25168-3oi6k.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
checking for Ruby version >= 1.8.5... yes