This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| from collections import deque | |
| root_dir = '~/slack_messages' | |
| target_user = "UMQN69N8M" | |
| res = [] | |
| for dirpath, dirnames, filenames in os.walk(root_dir): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| sns.set() | |
| # Read data from CSV | |
| file = "otp.csv" | |
| data = pd.read_csv(file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var regexDays = function(string) | |
| { | |
| var days = new RegExp("(Mo)|(Tu)|(We)|(Th)|(Fr)|(Sa)|(Su)", "g"); | |
| daysarr = string.match(days); | |
| return daysarr; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.body.innerHTML = '<a href="https://myslice.syr.edu/psp/PTL9PROD/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL?PORTALPARAM_PTCNAV=SYR_VW_CLASS_SCHEDULE_CREF&EOPP.SCNode=EMPL&EOPP.SCPortal=EMPLOYEE&EOPP.SCName=ADMN_STUDENT_SERVICES&EOPP.SCLabel=&EOPP.SCPTcname=PT_PTPP_SCFNAV_BASEPAGE_SCR&FolderPath=PORTAL_ROOT_OBJECT.SYR_CREF_ROOT_FOLDER.SYR_STUDENT_SRVCS_FOLDER.SYR_ENROLLMENT_FOLDER.SYR_VW_CLASS_SCHEDULE_CREF&IsFolder=false">View Schedule</a>'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Parameters: {"_json"=>[{"broken_description"=>nil, "category"=>nil, "checked_out"=>false, "created_at"=>"2013-02-24T05:05:16Z", "donor"=>nil, "donor_email"=>nil, "id"=>1, "location_id"=>nil, "name"=>"NEWTOOL", "qr_code"=>"newT", "return_date"=>nil, "returnable"=>nil, "updated_at"=>"2013-02-24T05:05:16Z", "user_id"=>nil, "working"=>nil}], "api"=>{"_json"=>[{"broken_description"=>nil, "category"=>nil, "checked_out"=>false, "created_at"=>"2013-02-24T05:05:16Z", "donor"=>nil, "donor_email"=>nil, "id"=>1, "location_id"=>nil, "name"=>"NEWTOOL", "qr_code"=>"newT", "return_date"=>nil, "returnable"=>nil, "updated_at"=>"2013-02-24T05:05:16Z", "user_id"=>nil, "working"=>nil}]}} | |
| WARNING: Can't verify CSRF token authenticity | |
| (0.2ms) BEGIN | |
| SQL (0.5ms) INSERT INTO "tools" ("broken_description", "category", "checked_out", "created_at", "donor", "donor_email", "location_id", "name", "qr_code", "return_date", "returnable", "updated_at", "user_id", "working") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def new_item | |
| @tool = Tool.new | |
| @tool = Tool.new(params[:params]) | |
| respond_to do |format| | |
| if @tool.save | |
| format.json { render :json => @tool, :status => :created, :tool => @tool } | |
| else | |
| format.json { render :json => @tool.errors, :status => :unprocessable_entity } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| arted POST "/api/new_item" for 127.0.0.1 at 2013-02-24 00:08:38 -0500 | |
| Error occurred while parsing request parameters. | |
| Contents: | |
| MultiJson::LoadError (399: unexpected token at '{"broken_description":null,"category":null,"checked_out":false,"created_at":"2013-02-24T05:06:07Z","donor":null,"donor_email":null,"id":2,"location_id":null,"name"NEWTOOL,"qr_code":null,"return_date":null,"returnable":null,"user_id" 5,"working":null}]'): | |
| json (1.7.7) lib/json/common.rb:155:in `parse' | |
| json (1.7.7) lib/json/common.rb:155:in `parse' | |
| multi_json (1.6.1) lib/multi_json/adapters/json_common.rb:6:in `load' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 399: unexpected token at '{"broken_description":null,"category":null,"checked_out":false,"created_at":"2013-02-24T05:06:07Z","donor":null,"donor_email":null,"id":2,"location_id":null,"name"NEWTOOL,"qr_code":null,"return_date":null,"returnable":null,"user_id" 5,"working":null}]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** REMOTE GEMS *** | |
| pg (0.14.1 ruby x86-mingw32 x86-mingw32, 0.11.0 x86-mswin32 x86-mswin32, 0.8.0 x86-mswin32-60 x86-mswin32-60) | |
| pg-app-name (0.2.0 ruby) | |
| pg-ct (0.10.0 ruby) | |
| pg-jdguyot (0.10.0 ruby) | |
| pg-ldap-sync (0.1.0 ruby) | |
| pg-migrator (1.2.2 ruby) | |
| pg-safesys (0.0.6 ruby) | |
| pg_advisory_locker (1.0.2 ruby) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MatchesController < ApplicationController | |
| def index | |
| @skills = current_user.skills.where('wants.wants_learn' => true) | |
| @array_of_skill_ids = @skills.map | |
| @users = User.joins(:wants).where(:wants=>{:name=>@array_of_skill_ids}) | |
| end | |
| end |
NewerOlder