query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b329ea97935f7866173cf42e4f16411b | 531a64db222a439c4995df67aff1606a | Method to reset the whole system...regiser taken from the lpc datasheet | void reset_system(void)
{
WDMOD |= 3;
WDFEED = 0xAA;
WDFEED = 0x55;
WDFEED = 0xAA;
WDFEED = 0x00;
} | 1 |
799fe66cc17efb7299e85a56a63ccdbe | 1f73242bdc111a6583c1a56c94c18000 | Clamp the mouse movement to the window bounds. | public void Clamp(ref int x, ref int y)
{
x = x.Clamp(0, width - 1);
y = y.Clamp(0, height - 1);
} | 1 |
0436a36bfd0b3e04f7229f4587a37a1f | f3afae15202940b37993883b17856a93 | Instrumentation Summaries field.
Returns the Work Instrumentation Summaries. | class StationSummary(object):
def imts(self):
return self._imts | 0 |
df96ec0c713749190b975aae947f336d | 1e061185640d322c783fff9fd825cda2 | reads bz2 file line by line and yields dicts
Yields:
dict: individual posts | def iterate_files(files):
if isinstance(files, basestring):
files = [files]
for filename in files:
if filename.endswith('.gz'):
fin = gzip.open(filename, 'r')
else:
fin = open(filename, 'r')
for line in fin:
banner = simplejson.loads(line)
... | 0 |
49fd4f7ffb5e410171d5ac9b85f36eb0 | 597c1348ac50caafaff2d4992a3bcb8b | Добавляет к текущему значению переданное в параметре число | public function plus(StringObject | NumberObjectInterface | string | float | int $num): NumberObjectInterface; | 1 |
079b4035c17c2f8365503c129fa41932 | ed4b283478f239927dfeabf319e8ecf6 | Запись информации о посещении пользователем страницы с просмотром изображения с камеры | def page_visited(request):
post_data = json.loads(request.body)
url = post_data['url']
username = post_data['idUser']
url_domain = urlparse.urlparse(url)[1]
categories = opendns.getCategories(url_domain)
user = User.objects.get(username=username)
categorized_domain = CategorizedDomain.object... | 0 |
1ea64f8f0a8bf5050c3f521b6eb296c0 | 81c7bb8b989c402906340bc0baee1cb9 | CALCULA EL SUELDO PROMEDIO POR DIA | class tm
public function Calcular()
{
$total=0;
foreach ($this->ventas as $key => $value) {
$total=$total+$value;
}
echo "el ticket medio es".$total/count($this->ventas);
} | 0 |
1c3f8345fffced3c3accb7aa0178c475 | 1380bb536a3aafde880b1079e0f703f1 | Collect club age grade statistics, based on collected athlinks statistics (collectathlinksresults) | mayLst = analyzer['popularity']["ByAges"]
catDict = lt.getElement(mayLst,cat)
inStat = catDict["in"]
outStat = catDict["out"]
route = catDict["route"]
return (inStat,outStat,route) | 0 |
1d2e877999d95bb4ea43d629338f61da | e83d32c0414cb693adb3a8012977f74c | his gets a collection of every employee, then calls a function to sort the collection into a collection of just copilots and returns that | class EmployeeRepository extends EntityRepository
public function findCaptainEmployees() {
return $this->findEmployeesByEmployeeTypeId(EmployeeTypeEntity::EMPLOYEE_TYPE_CAPTAIN);
} | 0 |
e3bc3f91f02fbb215fd785b472cbc536 | 9ae48dbd4d4fcbad640cc311bc6ccbcc | Увеличение Ловкости | global k, h
if k > 1:
h += 10
k -= 2
sound1 = pygame.mixer.Sound('лечение.wav')
sound1.play() | 0 |
4030c19b0fa22d9aec940ad32760f337 | 3a3d264c4dfb2b840bc8825648ae6154 | Update a saved query with the given parameters. | return this.client.post<SavedQuery>({
service_stack: AlLocation.InsightAPI,
service_name: this.serviceName,
account_id: accountId,
path: '/queries',
data: savedQueryParams,
});
} | 0 |
491591f27a78db3dffb1c392cd83c968 | 1f549a4454643f654ed4acb5781386e3 | Average actor_loss_grad. | kl = self._get_kl(mb_obs, mb_sftmax_old, epi_length)
kl = kl.mean()
kl_grads = torch.autograd.grad(kl, self.actor_new.parameters(), create_graph=True)
flat_kl_grads = torch.cat([grad.view(-1) for grad in kl_grads])
kl_v = (flat_kl_grads * torch.autograd.Variable(v)).sum()
... | 0 |
679225d62dbf9f1de5c725c45fcdf536 | 2450178e497dd30467ac4763adbe4c14 | Before Insert, keep only last 5 rows and delete the rest | a_file = open(KEY_BASE+"/importedKey/importedPrivateKeys", "r")
lines = a_file.readlines()
a_file.close()
if(len(lines) > 55):
del lines[0:5]
new_file = open(KEY_BASE+"/importedKey/importedPrivateKeys", "w")
for line in lines:
new_file.write(line)
new_file.close() | 0 |
243991d5ac70a59f440171c5c03d51db | 745d6de6526e9e1cff3b6bb4e8621476 | 跳转到取消订单界面 | Intent intent = new Intent(context, MyOrderQuoteListActivity.class);
intent.putExtra(CommonData.MAPS, maps);
startActivityForResult(intent, CommonData.REQUEST_ORDER_CANCEL);
} | 1 |
0e11dfc1004740cb02316a95f44bebe2 | d15b31fbd976a753644648028029225b | set sensor selection using locally saved item | public class ConnectActivity extends AppCompatActivity{
public void onItemClick(AdapterView parent, View v, int position, long id) {
String deviceName = mAdapter.getItem(position).toString();
if (setSensorByName(deviceName)) {
nextActivity();
}
} | 1 |
0542990e5223b110b99b13fed4ba2626 | 184fe3843fa431cc102b6d74a359965b | Defines lookaround patterns for matching before and after emoticons. | {
static boost::regex re (
"^"
"(?:\\h*)"
"([^\\h\\v]+)"
"(?:\\h*)"
"([^\\h\\v]*)"
"$"
, boost::regex::perl |
boost::regex_constants::match_flag... | 0 |
5008bede17255a6943f4a91c26625172 | 751d882998184d48e214177fa7447bdb | 调用Dao中方法获取所在OLT下的CM列表数量 | public List<CmAttribute> getCmListByOlt(Long cmId, Integer start, Integer limit) {
return cmDao.getCmListByOlt(cmId, start, limit);
} | 0 |
181caf8a4a3b1c304d4e2b41f1ec37c1 | 1cf7e8bcfde05a0b74d238ca4eb1a6d0 | Integer num of the installed proc units on the system. | public static partial class runtime_package
private static int getncpu()
{
{
var n__prev1 = n;
var (n, ok) = sysctlInt(new slice<uint>(new uint[] { _CTL_HW, _HW_NCPUONLINE }));
if (ok)
{>>MARKER:FUNCTION_closeonexec_BLOCK_PREFIX<<
... | 1 |
52e5a48ec8b811faa7bfbcf3cfb3e466 | 7edad8702bad9b2327ea3ccd01848e6a | Easing equation function for an elastic (exponentially decaying sine wave) easing out/in: deceleration until halfway, then acceleration. | float kElasticEaseOut(float p) { return sin(-13 * M_PI_2 * (p + 1)) * pow(2, -10 * p) + 1; } | 1 |
42fc513e8cc4ad7f48962c17443a4e38 | e038d131e80fe48a1e1c17d8e837ab37 | NewSparseFlowReport returns a new SparseFlowReport. | func New() hash.Hash32 | 0 |
a406b1ecbdf2a7bf8128d09cd8eddd17 | 7f89f3703f883a08c4cdf13f2e42198a | Test case for update_notification_rule
Update Notification Rule (Partial) # noqa: E501 | class TestConfigurationApi(unittest.TestCase):
def test_update_iceberg_notifications_notifications_by_id(self):
pass | 0 |
c38aaf11025796d713613f6b009ac071 | 2a71f5658663b71eccc675aebaeca211 | merge one line and remove consecutive white space | {
std::vector<std::string> lines = splitlines(m_value);
std::string::size_type common_whitespace = std::string::npos;
for (size_t i = 0; i < lines.size(); ++i)
{
const std::string& line = lines[i];
const std::string::size_type firstchar = line.find_first_not_of(" \t");
if (firstc... | 0 |
56dbf186a4ee4129f88cdf8709928d95 | 241136b0623b0191e253fb385ac61baa | Creating GUI. Here you can set bounds for your buttons and labels | class Counter(tk.Frame):
def initGUI(self):
self.master.title("JumpRope Counter")
self.style=Style()
self.style.theme_use("default")
self.pack(side="top", fill=tk.BOTH, expand=True)
self.grid_rowconfigure(0, weight=1)
self.grid_rowconfigure(1, weight=1)
self.grid_columnconfigure(0, weight=1)... | 1 |
779a888daf36989ef9f1faae12913ce6 | bbf6e66f9e4608db18b6218e540c4d8b | Store the given fundamental object, and publish the given notifications on pubsub. | class DbBackendAbc(ABC):
def set_and_publish(self, ns: str, channels_and_events: Dict[str, List[str]],
data_map: Dict[str, bytes]) -> None:
pass | 1 |
e9102e5bffc4cfbe67f5accaac367e01 | f1d98130c7794fde45b1ede1391545f7 | Return whether the User is allowed to use Application or not. | return is_admin or (user_email and
(user_email in constants.WHITELISTED_APP_ACCOUNTS or
user_email.endswith('@google.com'))) | 1 |
e159723fa1a838e92cf89af6bba40a47 | 53f3b4be7e9fa06741ab3341c4c3f37c | Fetch records that have <code>eventId IN (values)</code> | Set<Integer> events = new HashSet<>();
StringBuilder SQLBuilder = new StringBuilder();
SQLBuilder.append("select distinct ").append(getPersonIdField())
.append(" from ").append(getTableName())
.append(" INNER JOIN ").append(eventsTable.getTableName()).append(" ON ... | 1 |
1bdceaba1166f3ff74556b1e668fcdcb | 57dda550706ded3e96842904e34be405 | This function prints the list of the questions received according the amount | {
if (count < 5)
liteQuestions(theme);
else if (count > 4 && count < 10)
middleHardQuestions(theme, 'middle');
else if (count < 15)
middleHardQuestions(theme, 'hard');
} | 0 |
ce3672e6ccb8b01dbf9d1a00152a2348 | b34d4e25e44d750011bf87f1b5c74aa8 | disable the codec_i2s peripheral (in case it hasn't already been disabled) | {
int result;
unsigned long flags;
if (!(p->running & SNDRV_SB_CSP_ST_PAUSED))
return -EBUSY;
spin_lock_irqsave(&p->chip->reg_lock, flags);
result = set_codec_parameter(p->chip, 0x80, 0x00);
spin_unlock_irqrestore(&p->chip->reg_lock, flags);
if (!(result))
p->running &= ~SNDRV_SB_CSP_ST_PAUSED;
return resul... | 0 |
13c9c541ad60ad1a2b02e641dde70e67 | 34b2e31cd9e135b62f7ecb8faee835f1 | Overrides IsTemporary flag for the current table. This call will have effect only for databases that support
temporary tables.
<para>Supported by: DB2, Oracle, PostgreSQL, Informix, SQL Server, Sybase ASE.</para> | IDataBulkCopy TableLock(bool value = true); | 0 |
7dd6b8b22c99a0042c43d8459963dad1 | 2867deedc6349c64c87dbeda5bdc2f54 | Tests successful describe with default output format. | res = self.service.call_py({
"version": "1.1",
"id": 0,
"method": "system.describe",
})
assert res['version'] == '1.1'
assert res['id'] == 0
print(res)
assert res['result']['sdversion'] == '1.0'
assert res['result']['name'] == '... | 1 |
bf96fe094104e1636d4fa3d0c6c647ed | f94fb40f0ad3315851ed4bad381c4f1e | 检测用户名和密码是否有效 | class RegisterAndLogin(object):
def test_user_name_and_pwd(self, user_name, pwd):
ret = self.db.search_info(user_name)
if ret:
if ret[0] == user_name and ret[1] == pwd:
return True
return False | 1 |
84d06f9c0a8bb98f46d1ef350ade6529 | f6f6f1370538d2e0e29357715b52b426 | 최근 배송지 | {
$conditions[] = array('delivery_status', DELIVERY_STATUS_UNDELIVERED);
$conditions[] = array('delivery_schedule', '<=', \DB::expr('now()'));
return static::find('first', array(
'where' => array(
$conditions
),
'order_by' => array(
... | 0 |
614b3c0b29fe4bcc5277689956daafc3 | 65f8ae0c2f877c61354ae4c6e4fc4eb7 | Combine all the subtrees to get the final tree generated by the CKY parser. | class CKYSolver:
def _backtrack(self, next):
low = next[0]
high = next[1]
label = next[2]
if next not in self.backPointers:
if next in self.terminals:
word = self.origText[next[0]]
t = Tree(label=label, subs = None, wrd=word, span=(low, high))
... | 1 |
c25f15bd13aa15ace8faec83a32294fb | dc193ed8afc5d49d77f5a0105d91d918 | Constructs the led graphics based on its state and style properties | if (this._active && this._hover && this.val) {
this._drawState(this._style.fillBgActive);
this._drawCheck(this._style.fillCheckActive);
}
else if (this._active && this._hover && !this.val) {
this._drawState(this._style.fillBgActive);
}
else if (this._hover && this.val) {
this... | 1 |
9dbb9e77ed8e0d3133c4396d669431d4 | 41af673ce8016098391d46d5e1bf1c83 | 默认只展开第一个节点及其子节点 | if(selectFirstNode){
var node = getFirstRootNode($checkableTree);
if(node){
if(!node.state.selected){
var $a = $("li[data-nodeid='"+node.nodeId+"']",$el);
if($a&&$a.length!=0){
$a.click();
}
}
if(levels>1&&!node.state.expanded){
$checkableTree.treeview('expandNode',node.no... | 1 |
04c444c386120b61638ebc7217ec62d1 | aba30ecc5d6c6639567bf501a3732e57 | 设置问诊面板布局 | choosePaneId = 0;
VBox vBox = new VBox();
vBox.setPadding(new Insets(20, 0, 20, 0));
HBox hBox = new HBox();
Label label = new Label("门诊号");
TextField textField = new TextField();
hBox.getChildren().addAll(label, textField);
Button btn1 = new Button("药物信息录... | 1 |
c5a0f67dbb35598899b6c3b8a22055d6 | 8b960e4699503a84e26cf8c2e9c2bc6f | Gets the visible state of component (wtAutoCompleteBank_Category_2) | namespace ssCaseConferencing.Flows.FlowBackofficeFlow public class ScrnAutoCompleteBank_Edit: OSPageViewStateCompressed, IWebScreen, INegotiateTabIndexes, IBookmarkableURL
public bool inputwtAutoCompleteBank_Category_1_isMandatory() {
return false;
} | 0 |
70ff77c18e8864266d56633abad54aad | 2cec8d7804eb0232dd3b21923be69830 | Access method that returns the value of SideC. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "TrdCapRptSideGrp_Block_t",
propOrder = {
"pty",
"ptyDetl",
"lmtAmts",
"clrInst",
"regTrdID",
"comm",
"commData",
"contAmt",
"stip",
"miscFees",
"alloc",
"trdRegTS",
"settlDetails",
"trdRptOrdDetl",
"q... | 0 |
7cb5aad428cfbbc1aa7d761789a4a2ee | c2b81b473a1d012106806f780dc589c9 | here we get the 4-connected neighbours | class Square():
def neighbour_box_co(self,arrayij):
neighbours=[[arrayij[0],arrayij[1]],[arrayij[0]-1,arrayij[1]+1],[arrayij[0],arrayij[1]+1],[arrayij[0]+1,arrayij[1]+1],[arrayij[0]+1,arrayij[1]],[arrayij[0]-1,arrayij[1]],[arrayij[0]-1,arrayij[1]-1],[arrayij[0],arrayij[1]-1],[arrayij[0]+1,arrayij[1]-1]]
... | 0 |
f904327bff86e27b838d422a664026d1 | fdb6d79326c44453ce1aa530af8d8baf | Method which maps the <see cref="NotPaymentToCourtDocDetail"/> to <see cref="NotPaymenttoCourtDocDetailEntity"/>. | {
CaseOriginatingCaseEntity caseOriginatingCaseEntity = null;
try
{
caseOriginatingCaseEntity = Mapper.Map<CaseOriginatingCase, CaseOriginatingCaseEntity>(caseOriginatingCase);
caseOriginatingCaseEntity.CourtId = Mapper.Map<MCourtType, MCourtTy... | 0 |
cf895b2a626f950723735def55960524 | d349326e9d6e6e47c00f4bd742606425 | navigate back to patient home window with the user details | searchResult = null;
Intent intent = new Intent (this, ActivityUserProfile.class);
intent.putExtra("Patient", patient_ID);
startActivity(intent);
} | 0 |
316476281f61e52ebbc82f2b0d16f2d4 | 0c21a0a1db722079a8fc28f9eb4b3821 | Should return the correct number of assets placed within a range of dates. | start_date = self.p_date + timedelta(days=-1)
end_date = self.p_date + timedelta(days=1)
response = self.client.get(
reverse("pricelist-view-date-range"),
{
'start_date': start_date.strftime('%Y-%m-%d'),
'end_date': end_date.strftime('%Y-%m-%d'),
'stock': self.stock.id,
}
)
price_list = P... | 1 |
1bbc65fa2cba34e87919755396b0d4a2 | fe7705b464e1ba348be9b9fa76107a65 | 重设用户的登录密码 -- 使用配置文件中的初始登录密码 | @Controller
public class AccountController extends BaseController
@RequestMapping(value="/account/resetPassword",produces="text/plain;charset=UTF-8")
@ResponseBody
public String resetPassword(Model model, HttpServletRequest request,String id) {
List<SysConfig> keys=sysManageService.querySysConfigListByKey(Constant... | 1 |
a262bc8d875c138105fa3ba5955a4726 | 9c40a0e91242214550c45092a70a6054 | Merge options of application binary interface. | mergedOption: MergedOptionsT,
getFlavorOption: BaseFlavor.() -> CoreOptionsT?,
getBuildTypeOption: BuildType.() -> CoreOptionsT?
) {
mergedOption.reset()
val defaultOption = defaultConfig.getFlavorOption()
if (defaultOption != null) {
mergedOption.append(d... | 1 |
fb29b56a78161c806c051e4a32c79537 | 55365cbf9d3cd80eb96d473cad724ff4 | 出库时间. | @Table(name = "archives_record")
public class ArchivesRecord implements Serializable
public String getOutTime() {
return outTime;
} | 1 |
a51806aee931b748e4050181c0445484 | 8f8a08ade2f9f221d4109a415158048e | 获取数据库用户登陆名 | namespace Uts.BO
public class ProcessBO : SingleBase<ProcessBO>
public string LoginGetName()
{
return ConfigurationManager.AppSettings["SeatUser"];
} | 0 |
30377f0955da455915193eae1640cb83 | 39059076498550e619a48b8f02afa3e9 | リポジトリの作成(ないとき)と、ユーザー名/メールアドレス/自動改行変換の設定 | func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (*models.Repository, error) {
if !doer.IsAdmin && !u.CanCreateRepo() {
return nil, models.ErrReachLimitOfRepo{
Limit: u.MaxRepoCreation,
}
}
if len(opts.DefaultBranch) == 0 {
opts.DefaultBranch = setting.Repository.DefaultBranch
}
... | 0 |
8ca5dd5c26944fdb3ac6f36fc6f8cb3d | 915959c9ae0d968b169d56b66ad88d92 | 发送枚举型的端点数据 | {
if (posSendType == 1)
{
ds.AddSignedFixedPoint(11, 8, pos.x);
ds.AddSignedFixedPoint(11, 8, pos.y);
ds.AddSignedFixedPoint(11, 8, pos.z);
}
else if (posSendType == 2)
{
ds.Add<float>(pos.x);
ds.Add<float>(pos.y);
ds.Add<float>(pos.z);
}
if ... | 0 |
eb94492b1950003a02bba66f31667aeb | 02b2339c9da7e65b9c6201512e45e204 | Waits for an asynchronous call to the ModifyMonitoredItems service to complete. | namespace Workstation.ServiceModel.Ua
public static class MonitoredItemServiceSet
public static async Task<DeleteMonitoredItemsResponse> DeleteMonitoredItemsAsync(this IRequestChannel channel, DeleteMonitoredItemsRequest request, CancellationToken token = default)
{
if (request == null)
... | 0 |
c8725c5f61840c83a07d493d88129692 | 88bfe6bf414244cce81b5bfec24fa204 | Establece el estado del docente para visualizar en la vista. | public class ConsultarExpediente_Docente implements Initializable
public void SetUsuario() {
lbNombre.setText(LoginSession.GetInstance().GetDocente().getNombres());
lbApellidos.setText(LoginSession.GetInstance().GetDocente().GetApellidos());
lbCedulaProfesional.setText(LoginSession.GetInstance()... | 0 |
d27141950a9478cef7ae4026971721af | c7afb220f2458357a969e4af97476a73 | Sets site UUID. | @Table(name = "upload_history")
@Entity
@JsonPropertyOrder({"dateTime"})
public class UploadHistory
public void setSiteID(UUID siteID)
{
this.siteID = siteID;
} | 1 |
e27d78057f65606c59f486e3a9fe3864 | a54947d6d3bac132231bd12082f1146a | Get named profile credentials. | DConnectProfile getProfile(final String name); | 1 |
9fec8ce42183fdb6ac05290a19aa9706 | 6539f3cf7809ff22fb20fe7f81abf9aa | Function for notify that the training is ended | class MyCallBack(Callback):
def on_train_end(self, logs=None):
print('On train end', logs)
return | 1 |
61487244d7ac53076ac7eca5944e62dc | 6bb90d9df37a8a538849c18723e94996 | SkillService constructor. | class ProfessionalSkillController extends Controller
public function __construct(ProfessionalSkillService $professionalSkillService)
{
$this->professionalSkillService = $professionalSkillService;
} | 0 |
07ecd53c52c308d19952ad0be70982ef | 73eecac42ec95c96ebabeb338551141a | Safe shortcodes_generator setter. | class WP_Hamazon_Service_Amazon extends WP_Hamazon_Service implements WP_Hamazon_Service_Required{
public function set_shortcode() {
$this->short_codes = array('tmkm-amazon', 'tmkm-amazon-list');
} | 0 |
d2ef71f93abefa014359f7faad15e5cd | 23250669b0cd4b136b006bd9c57cea7c | 品质问题分页查询 | export default class assessmentService
static async seleteEquipmentProblemByPage (data) {
return rbHttp.sendRequest({
method: 'POST',
data: data,
url: assessment + `/seleteEquipmentProblemByPage`
}).then(function (data) {
return data
})
} | 1 |
fa2b9878e3b5b496e7ee657b5433c4f9 | 94d4c95664c87c50356d9a6902ca1df5 | Refresh session. Email and password are not needed. | public final class AuthenticationPresenter extends BasePresenter<AuthenticationView> implements ContactAuthentication.AuthenticationResponseCallback
public static void refreshSession(final AuthenticationService.IAuthenticationResponseCallback authenticationResponseCallback) {
HawkAuthenticationService authentic... | 1 |
556912f36df89f727ec87a95573fcf71 | de05590ed20291872a0385c1239bcfd3 | #----------------------------------------------------------------#
# READ IN FREQUENCYxPOP TABLE, REMOVE POPS IN exclude
#
# Notes
# -----
# - assumes snpfile has colname 'index' which has pop names
# - the rest of the colnames are names for each locus in dataset
#-------------------------------------------------------... | getReferenceFrequencies <- function(ref, pop, carrier_frequency = FALSE) {
assert_that(
is.data.frame(ref),
colnamesMatches(ref, c("var", "population", "frequency")),
is.character(pop),
characterMatches(pop, unique(ref$population)),
isTRUEorFALSE(carrier_frequency)
)
ref <- dplyr::filter(ref, ... | 0 |
336e90c400e31ede5faf39086ab1370a | 91538ec7f803e542fdc37feef5a7ad31 | reminds about soon account expiration | class BookingMailer
def send_expiry_reminder_two(booking)
@booking = booking
@account = @booking.account
@subject = I18n.t(:send_expiry_reminder_two_subject)
mail(to: @account.email,
subject: @subject,
bcc: 'go@wundercoach.net')
end | 1 |
41d9bffca30a4ef85d88f1ab787611bb | a0817933363e4c9b6f9190f2f4763e1f | Outputs the number of identical values in the input for each neighbourhood | if not 'object_id' in neighborhood_data.columns:
raise ValueError("Dataframe doesn't have a column object_id")
counts_per_neighborhood = neighborhood_data.groupby(
['object_id']).size().reset_index(name='count')
return visualize_neighborhood(counts_per_neighborhood, 'count', path) | 1 |
1c505a2d98797757d6b538caa0dfacaa | b1059693ed6b7b05566d7ae3f622100a | test edit stock route with a stock symbol which is not in the User_Stock portfolio | url = reverse('stock_detail', args=(self.default_bar,))
self.assertTrue(self.client.login(username='barman', password='password1234'))
response = self.client.post(url, self.data_post, format='json')
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
self.client.log... | 1 |
ccb90fbcbacab02a67d6979ff962c3eb | 927649eb4c97a4cad5bf2caafa2cd501 | filter that enables/disables molt option in filter | static boolean snp125MolTypeFilterItem(void *item)
{
struct snp125 *el = (struct snp125 *)item;
if (! snp125MolTypeFilterOn)
return TRUE;
else
return slNameInList(snp125MolTypeFilter, el->molType);
} | 1 |
ff91d8dd04225c5b9e275ba42c80317e | ddf0a7b6ebec70f021efee931f12fbfa | Off-diagonal regularization (complementary regularization) | class ConvBPDN(GenericConvBPDN):
def obfn_reg(self):
rl1 = np.linalg.norm((self.wl1 * self.obfn_gvar()).ravel(), 1)
return (self.lmbda*rl1, rl1) | 0 |
00a69f6e0f83cff91a576f96503f9a7c | e5816f55c8c0f53be7e656d23733c95c | ランキングタイプに対応するスコアの範囲で商品情報を降順で取得する | $objQuery =& SC_Query_Ex::getSingletonInstance();
$objProduct = new SC_Product_Ex();
$interval0 = date("Y-m-d") . " 00:00:00";
$interval7 = date("Y-m-d", strtotime("-7 day")) . " 00:00:00";
$interval14 = date("Y-m-d", strtotime("-14 day")) . " 00:00:00";
$str = <<< __EOS__
SELECT... | 1 |
caeae12a7aa1def57dd7dd7abd228542 | 846affcdb09d586c9baf8ca485811ecb | Creates a form to create a Book entity. | class BookType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('authors', EntityType::class, [
'class' => 'LibraryBundle\Entity\Author',
'choice_label' => 'fullName',
'label'... | 1 |
f4220ec2193ef05ab7ed5aef3fea3fc4 | c5aba57f567229e64cc67104d8bf176a | The WM_MENUCHAR message is sent when a menu is active and the user presses
a key that does not correspond to any mnemonic or accelerator key.
Ignore so we don't produce an error beep. | {
if (m.Msg == 0x203) { m.Result = IntPtr.Zero; }
else base.WndProc(ref m);
} | 1 |
37cf98d5ec887c28b7160f921f9e2457 | 14a38f9b77992b3851014562af7990ce | Test the counts -> TPM conversion for some expression data. | identifier = 'symbol'
norm = normalize.Normalizer(identifier=identifier)
counts = expression_data.counts
tpm = expression_data.tpm
tpm_calc = norm.tpm_from_counts(counts, counts.columns)
assert (tpm.columns == tpm_calc.columns).all()
assert (tpm.index == tpm_calc.index).all()
assert np.a... | 1 |
9ccf7251b9859b63c7e0bccadd308b39 | 52a652bffb37ab64e002671ff19da672 | The CAS client's default service URL.
This can typically be overriden in any method call. | class CasRestController extends Controller
public function getCASRestUrl()
{
return $this->casRestUrl;
} | 0 |
8a40532957c4fc3c4ccfbab4d2b42ffb | bc99338e26953e57597eefaf83661cef | 首充号白名单处理 | pl = {"whiteMobile.oprCode": "01",
"businessTypeName": "白名单业务",
"whiteMobile.serviceCode": "10657109018606",
"whiteMobile.serviceId": "QSH0010500",
"whiteMobile.serviceType": "01",
"whiteMobile.mobile": mobile}
msg = self.__session.po... | 1 |
6f7d037f51d7a7e063c44e277552e6f1 | fd345020b0ccf510d798484a014a5b2a | Устанавливает имя поля для связи с target-коллекцией | class VkMetricInfoManagerUploadQueueItem extends PartnerInfoManagerUploadIdQueueItem
public function setTargetName($targetName) {
$this->targetName = $targetName;
return $this;
} | 1 |
7545cfc065b0b8987b790da92a86f510 | 577829fe04c1df324ebfcb8099ba5d2f | is the filter button visible | namespace ssContactManager.Flows.FlowMainFlow public class ScrnContact_List: OSPageViewStateCompressed, IWebScreen, INegotiateTabIndexes, IBookmarkableURL
public bool cntFilters_Wrapper_isVisible() {
return true;
} | 1 |
8ff0672ecf4a58c8ad26ccb43589229f | 85da1604154b2521819c2f72970ba39f | 将字节数组内每个字节值反转。<para>用255减之。</para> | byte[] b = Value.ToByteArray().Reverse().ToArray();
if (b[0] == 0)
return b.Skip(1).ToArray();
return b;
} | 0 |
fa60a6ec58dc2c8cb7e3124e24b88b22 | c4de4cb64f21a11dffc3377afb34e321 | Function Name: RTC_1_DayOfWeek
Calculates Day Of Week value use Zeller's congruence.
Day Of Week value. | {
double dow = FlMod((rd - RD0 + SUNDAY), 7);
return (int)dow;
} | 0 |
843cff28aa0ee9e3271477bb7dd1b272 | 6c07d0e9c1800f5d72f7cbbf01e0980b | This setter calculates the new possible moves once the position has changed. | class Piece(object):
def __init__(self, position, colour):
def position(self, value):
self.position = value
self.calculate_possible_moves() | 1 |
3a2346b2db8fb6d1229af99056cc3ecd | 50335e261a68d8fb8d27a9dca9914f56 | 通用,吐司提示。显示时长自定义 | @ColorInt int textColor, @ColorInt int tintColor, int duration) {
View toastLayout = LayoutInflater.from(mContext).inflate(R.layout.xtoast_view, null);
ImageView toastIcon = (ImageView) toastLayout.findViewById(R.id.xtoast_icon);
TextView toastText = (... | 1 |
b60f3f850cd843922b4d523fed4913f6 | 109364eda98727569d1e1d6a0cf4af7c | 检查设备用户是否是指定用户的好友 | void judgeIsFriend(String userId, ICallback callback); | 1 |
530735bef290e18944fca81abe5743c9 | e6e46c23bf513d8e1ef1ded8be4b7185 | Unsets the value of the '{@link Gtm.Delivery#getReplacedDeliveryId <em>Replaced Delivery Id</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void unsetDeliveryMode(); | 0 |
dfd40edab47d49ef1eeaaef24307324f | 86a50a4ce57bd15a82ec5193c8064aaf | 统计定时任务个数 | def ttsCount(time):
if time is None:
count = db.get(
"select count( *) n from job where type =2 ")
else:
count = db.get(
"select count( *) n from job where type =2 and create_time >='%s' and create_time <='%s'" % (
time[0], time[1]))
return count['... | 1 |
ffd99b11a9cb5543d4e441106efeb747 | fcfb59e9f4644828d9ce5dbec92bc778 | 查询模块树的下一级,不按权限过滤 | return super
.findList(
"from Module where (parent.id = ? or parent.id is null) and id !=? and 1=?",
1, id, 1);
} | 1 |
c2f610051a0c7e1115b00e4e4eacee4f | 75a731dd3e7050b6f81b55f761744a87 | Allelic fraction of the "other" (non-ref, non-alt) alleles among all
fragments at this site. | class IsovarResult(object):
def fraction_alt_reads(self):
return safediv(self.num_alt_reads, self.num_total_reads) | 0 |
451d8c78a1a8b504d87d9620e2ded68d | 7e338b18013f785c932a48418590be00 | negative value: buffer below threshold, buffer almost empty
positive value: buffer above threshold, buffer filling | EnterCriticalSection(&buffer_lock);
int fullness = dac_buffer_fullness;
LeaveCriticalSection(&buffer_lock);
if (fullness == BUFFER_NFRAMES) {
fprintf(fp, "bouncing\n");
fflush(fp);
Sleep(1);
return GET_STATUS_BUSY;
} else {
return GET_STATUS_READY;
}
} | 0 |
1486f709fee1dff30b404c4b269dfa0d | c87955a8165dc63f328117fe49242aac | This is the Recursive approach for finding the Max of the Linked List | def findMaxRec(currNode):
if currNode.right is None:
return currNode
else:
return currNode.right.findMaxRec() | 0 |
805144754e345280767c63f40bde5f7b | 7ff58b0834b9f5891fd56e6786f41322 | Compute the 64-bit (long) identifier for a coadd.
Subclasses must override | class RMQ_block(RMQ_base):
def _compute_block_id(self, block):
raise NotImplementedError("This method must be implemented by the subclass") | 1 |
335efa19b0de2e640e35d857cdc43fdf | 3d4f594c3356afb3d815d5904f3b4e28 | Returns the meta object for the containment reference '{@link de.unidue.ecg.dialogScript.dialogScript.Script#getSwitchesDefinition <em>Switches Definition</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getSwitchesDefinition(); | 1 |
6b0611921ca1d8b44068b62e839c085f | 098bfbfe69d44acb0f8797ed94ed6991 | Get artwork url (logo) 100x100 | $path = $this->lonely->escape($this->getThumbPath('700px'));
$name = $this->lonely->escape($this->getName());
return "<img src=\"".$path."\" alt=\"".$name."\">";
} | 0 |
a0c239dcac46dffef3e158ea6a4a1409 | b78f21ade6e86832173951c0a667c9ae | Método para gerar um numero aleatorio de forma que os valores não se repitam | {
Random gerador = new Random();
int[] vetor = new int[100];
for (int n = 0; n < vetor.Length - 1; n++)
{
bool existe;
do
{
existe = false;
vetor[n] = gerador.Next(1, 100);
... | 1 |
fb126e70a0529422f35c45f2fd35a10a | 349c8a2701095122431540fb368f2a63 | Initializes the offset calculator with calculations' parameters. | class DisplacmentVectorCalculator(object):
def __init__(self):
self._logger = logging.getLogger(__name__ + ".DisplacmentVectorCalculator") | 0 |
249f81e9d40e096601e8d626aed7f397 | e778f26ac0d01bb49240d7d8305f15e3 | Display the full tree parsed from the gmond server stats. | class Driver:
def showTree(self):
print html.tostring(self.tree) | 1 |
757901c803dbead9350347ae5528780c | 87bcd0078d817c96872a3a767de76898 | Default supported formats. Use ResetSupportedFormats to over write. | PrintDebugMessage("PrintGetSupportedFormats", "Begin", 1);
string[] result = GetSupportedFormats();
PrintStrList(result);
PrintDebugMessage("PrintGetSupportedFormats", "End", 1);
} | 0 |
a13c16dc2f6e7bcfd0ea0f087b7aeee3 | c67ea8b2877b1dda1da4164516fb33f0 | POST /owners/:owner_id/addresses | class OwnersController
def edit
end | 0 |
efc3c18da98370861ff2ce7b8948ce73 | 62901ffdec3bc304ef8cd0f49d4b45cc | This method returns the value of the database column system_menus.ct_user | public class C_organization implements java.io.Serializable
public String getC_user_id() {
return c_user_id;
} | 0 |
00b5d821f3eed02e091e8706d8c8e5d8 | b75c4223b77e0b499c63f688b9bb1e0e | Display recognition feedback to user | def Display_FeedBack(diagnosis):
print("Diagnosis: ", diagnosis) | 1 |
fe9afb4139c0482cc8435599a2154ec4 | 58b4953a5d1e365f08bc1e8528771efe | start on a fresh line | class FunkyLexer:
def t_NEWLINE(self, t):
self.at_line_start = True
t.lineno += len(t.value) | 1 |
8391e07174ad4aa5093741d0a0658f47 | ad7d491829223b5bc4bbb8ee68fb8b92 | Action executed on loot. Make this function return true if the loot is picked up and the action is performed | public abstract class PersistentLoot : MonoPersistent
protected abstract bool OnLoot(PlayerController player); | 1 |
55262d445207f1046799fb5ae1f379e9 | ff9e54553b4ab304db5f60f14ae23fd4 | Récupération du nombre d'enregistrements 'LogUtilisateur' enfants | {
$this->log->write("Re7->getValidationUtilisateurs_count()", 0);
$sReq = "SELECT ";
$sReq .= "COUNT(validation_utilisateur_id) as 'idcount' ";
$sReq .= "FROM validation_utilisateur ";
if (($rs = $this->connection->select($sReq)) !== false)
return $rs->field("idcount");
else
{
$this->log->write("R... | 0 |
03d518e1527ef7d34c28d86dca3bea24 | 5f5f6dd0f19e15686974e4e3dff911e7 | Checks if all spaces are occupied | {
for(int i = 0; i < _boardSize; i++)
{
for(int j = 0; j < _boardSize; j++)
{
if(_boardArray[i][j] == ' ')
{
return false;
}
}
}
return true;
} | 1 |
e8c36f6573fdf029eb250c9fe9c75d5c | dce684dad3864ba75746fe4ce3734db3 | send subscribe message to the given phone number | resp = sns_client.publish(phone_number: phone, message: text)
if resp.error.nil? && resp.message_id
respond_with_status :success
else
respond_with_status :unknown_failure
end
end | 1 |
be963a3dce44e598f30e50f0de8dc36c | 2d2c47fef6476c7b122c0eb8f493daa3 | Get the publication data from the database that matched the location ID. | conn = sqlite3.connect(file_db)
cursor = conn.cursor()
cursor.execute('SELECT * FROM locations WHERE location_id = "' + location_id + '"')
data = cursor.fetchone()
return data | 1 |
222aa617ba7eb0ce5177cb3af730d35f | 5b89365f61ff7d4ec2a124ac55a8976b | Gets the VCD variables with their id string. | self.each_inner do |sig|
sig.get_vars_with_idstr(vars_with_idstr)
end
self.each_behavior do |beh|
beh.block.get_vars_with_idstr(vars_with_idstr)
end
self.each_systemI do |sys|
sys.systemT.get_vars_with_idstr(vars... | 1 |
1c4efd2bce3ed4aa88cac751f8ee9c24 | 8ef952bf37a0c1e25c7eb9803762946b | 对单一NALU的RTP包进行解包为原始的H264帧,同时输出当前Package的序列号 | static void tms_dump_h264_packet(int nb_packets, AVPacket *pkt, InputStream *ist)
{
AVStream *st = ist->st;
uint8_t *pkt_data = pkt->data;
int nal_unit_type = pkt_data[4] & 0x1f;
ast_debug(1, "读取 packet #%d size= %d nal_unit_type = %d dts = %s pts = %s duration = %s duration_av_time = %s\n",
nb_pac... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.