SELECT
concat(date(created_at), ' ', LPAD(hour(created_at), 2, '0'), '-', LPAD(IF(hour(created_at)=23, 0, hour(created_at)+1), 2, '0')) as time_slice,
count(*) as '# entries'
FROM entries
GROUP BY time_slice
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
| "<!--" | |
| "><!--" | |
| "||[];" | |
| "--><!--" | |
| "--></" | |
| "----" | |
| "!--<" | |
| "//--></" | |
| "//-->" | |
| "...</" |
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
| """ | |
| This demo program outputs raw SQL query by analyzing table, which is run by agent executer, via SQL adapter. | |
| """ | |
| import os | |
| import sqlite3 | |
| from langchain.agents import * | |
| from langchain.sql_database import SQLDatabase | |
| from langchain.chains import create_sql_query_chain | |
| from langchain_community.llms import OpenAI |
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
| require 'rails_helper' | |
| RSpec.describe "your favorite app" do | |
| it 'boots' do | |
| assert_nil Rails.application.eager_load! | |
| end | |
| context 'sidekiq server' do | |
| it 'boots too!' do | |
| allow(Sidekiq).to receive(:server?).and_return true |
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
| interface StatusRequestBody { | |
| query: { | |
| match: { status_id: string }; | |
| }; | |
| } | |
| await new Promise(resolve => setTimeout(resolve, 500)); | |
| return new Promise<void>((resolve, reject) => { | |
| this.client.quit(); |
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
| gunzip < dump.sql.gz | sed -n -e '/DROP TABLE.*`my_table`/,/UNLOCK TABLES/p' > my_table.sql |
module Mod
def x
puts "x"
end
end
class C1
extend Mod
end
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
| cat /etc/lsb-release | |
| sudo apt autoremove | |
| sudo apt update && sudo apt upgrade | |
| sudo apt-cache search | |
| apt-cache show | |
| sudo apt-get install --reinstall apparmor apparmor-profiles apparmor-utils | |
| sudo ntpdate il.pool.ntp.org | |
| grep microcode /proc/cpuinfo |
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
| #!/usr/bin/env ruby | |
| require 'optparse' | |
| require 'digest/sha1' | |
| require 'data_mapper' | |
| FILE_STDIN = '/dev/stdin'.freeze | |
| def debug_log(msg) | |
| puts msg |
NewerOlder