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
"""2023-10-25_FY-34010_add-source-to-class-resource | |
/home/paulh/apps/finetune/service-fym/submodules/ft-core/migrations/versions/2023_10_25_fy_34010_add_source_to_class__2be8a742c105.py | |
Revision ID: 2be8a742c105 | |
Revises: 6088d1b424e3 | |
Create Date: 2023-10-25 15:10:40.516490 | |
""" | |
from alembic import op | |
import sqlalchemy as sa |
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
--Abstract | |
Despite strong performance on a variety of tasks, neural sequence models trained with maximum likelihood have been shown to exhibit issues such as length bias and degenerate repetition. We study the related issue of receiving infinite-length sequences from a recurrent language model when using common decoding algorithms. To analyze this issue, we first define inconsistency of a decoding algorithm, meaning that the algorithm can yield an infinite-length sequence that has zero probability under the model. We prove that commonly used incomplete decoding algorithms - greedy search, beam search, top-k sampling, and nucleus sampling - are inconsistent, despite the fact that recurrent language models are trained to produce sequences of finite length. Based on these insights, we propose two remedies which address inconsistency: consistent variants of top-k and nucleus sampling, and a self-terminating recurrent language model. Empirical results show that inconsistency occurs in practice, and that the propos |
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 itertools | |
A = 10 | |
L = [1, 4, 5, 6, 1, 1, 2, 3] | |
rezultat = [] | |
# `range` creaza o lista incepand de la primul argument pana la al doilea argument dar excluzandu-l [a, b) | |
# range(1, 2) returneaza `[1]` | |
# range(1, 3) returneaza `[1, 2]` |
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
SELECT | |
author.id, | |
coauthors.co_list, | |
json_extract(author.affiliation_current, '$.affiliation-country') AS country_origin, | |
author.cited_by_count | |
FROM | |
author | |
INNER JOIN coauthors ON author.id = coauthors.id | |
WHERE | |
author.cat LIKE '%BIOC%' |
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
# config/intializers/page_request_info.rb | |
module ActionController | |
class PageRequestInfo | |
# http://guides.rubyonrails.org/active_support_instrumentation.html | |
# http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html | |
# call() is called as an ActiveSupport::Notifications subscriber callback - see the very bottom of this file for the subscriber registration | |
# We manipulate the Notification event payload so that lograge can log out extra information easily. | |
def call(name, started, finished, unique_id, payload) | |
request_info = Thread.current[:page_request_info] || {} | |
log_info = {} |
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
# config/intializers/page_request_info.rb | |
module ActionController | |
class PageRequestInfo | |
# http://guides.rubyonrails.org/active_support_instrumentation.html | |
# http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html | |
# call() is called as an ActiveSupport::Notifications subscriber callback - see the very bottom of this file for the subscriber registration | |
# We manipulate the Notification event payload so that lograge can log out extra information easily. | |
def call(name, started, finished, unique_id, payload) | |
request_info = Thread.current[:page_request_info] || {} | |
log_info = {} |
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
# config/intializers/page_request_info.rb | |
module ActionController | |
class PageRequestInfo | |
# http://guides.rubyonrails.org/active_support_instrumentation.html | |
# http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html | |
# call() is called as an ActiveSupport::Notifications subscriber callback - see the very bottom of this file for the subscriber registration | |
# We manipulate the Notification event payload so that lograge can log out extra information easily. | |
def call(name, started, finished, unique_id, payload) | |
request_info = Thread.current[:page_request_info] || {} | |
log_info = {} |
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
# config/intializers/page_request_info.rb | |
module ActionController | |
class PageRequestInfo | |
# http://guides.rubyonrails.org/active_support_instrumentation.html | |
# http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html | |
# call() is called as an ActiveSupport::Notifications subscriber callback - see the very bottom of this file for the subscriber registration | |
# We manipulate the Notification event payload so that lograge can log out extra information easily. | |
def call(name, started, finished, unique_id, payload) | |
request_info = Thread.current[:page_request_info] || {} | |
log_info = {} |
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
@withAuthorization | |
class Users extends Endpoint { | |
static url = '/users'; | |
static create(data, success, error) { | |
return this.post(data).then( | |
success, error |
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
<?php | |
/** | |
* Widget class library | |
* | |
* @author Paul Hrimiuc <[email protected]> | |
*/ | |
class Widget { | |
/** |