Skip to content

Instantly share code, notes, and snippets.

View gist:494f9267b4b9164f52551a45abde619e
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 {
View screen.py
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:
View binomial series -1
tmp = a^n
answer = tmp
for (i = 1; i <= n; i += 1) {
tmp = (tmp * (n-i+1) * x )/(a * i)
answer = answer + tmp
}
View error
$ 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
View dfdf
$ gem install idn-ruby -v '0.1.0' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing idn-ruby:
ERROR: Failed to build gem native extension.
current directory: /Users/hyejinan/.rvm/gems/ruby-2.6.0/gems/idn-ruby-0.1.0/ext
/Users/hyejinan/.rvm/rubies/ruby-2.6.0/bin/ruby -I /Users/hyejinan/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0 -r ./siteconf20190521-27028-kds8w9.rb extconf.rb
checking for -lidn... no
ERROR: could not find idn library!
View error
#!/bin/bash -eo pipefail
bundle install --jobs=4 --retry=3 --path vendor/bundle
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/.......
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using crass 1.0.4
View circle config yml
# Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
# List of available images: https://hub.docker.com/u/circleci/
#
version: 2
jobs:
build-job:
View dd
hyejinahn:~/qurate-platform ☀ master
❯ foreman start
10:43:56 postgres.1 | started with pid 25548
10:43:56 web.1 | started with pid 25549
10:43:56 webpack.1 | started with pid 25550
10:43:56 redis.1 | started with pid 25554
10:43:56 sidekiq.1 | started with pid 25559
10:43:56 redis.1 | 25578:C 04 Oct 2019 10:43:56.925 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
10:43:56 redis.1 | 25578:C 04 Oct 2019 10:43:56.925 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=25578, just started
10:43:56 redis.1 | 25578:C 04 Oct 2019 10:43:56.925 # Configuration loaded
View fb comment reply error
[error message 1]
F, [2019-10-17T15:08:22.010768 #22371] FATAL -- : [3da55cc7-77bc-44e1-8f01-1d8bd191c4a3]
F, [2019-10-17T15:08:22.010964 #22371] FATAL -- : [3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] Koala::Facebook::ClientError (type: OAuthException, code: 1705, message: (#1705) There was an error posting to this wall, x-fb-trace-id: HJXSeLE7etp [HTTP 400]):
F, [2019-10-17T15:08:22.011071 #22371] FATAL -- : [3da55cc7-77bc-44e1-8f01-1d8bd191c4a3]
F, [2019-10-17T15:08:22.011165 #22371] FATAL -- : [3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] app/services/qurate_io/facebook.rb:335:in `raw_reply'
[3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] app/services/qurate_io/facebook.rb:341:in `reply'
[3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] app/controllers/api/v1/mentions/replies_controller.rb:65:in `facebook_reply'
[3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] app/controllers/api/v1/mentions/replies_controller.rb:86:in `reply_service'
[3da55cc7-77bc-44e1-8f01-1d8bd191c4a3] app/controllers/api/v1/mentions/replies_controller.rb:16:in `create'
View rcwl_app.py
from PyQt5 import QtCore, QtSerialPort
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWebEngineWidgets import *
# Only needed for access to command line arguments
import sys