query_id
string
corpus_id
string
query
string
code
string
label
int64
144c6be62b7a7a3e689fd4808dfc2b56
40de67acf30ebf967e229e5a3e2b4bec
退出多屏
public class MultiScreenActivity extends AppCompatActivity private void exitFullScreen() { mVideoView1.setRenderViewVisible(); mVideoView2.setRenderViewVisible(); mVideoView3.setRenderViewVisible(); mVideoView4.setRenderViewVisible(); showDivider(); mVideoView1.setVisibil...
1
b6c8e7827d0b11acb0d853d5babd9ffe
15dd3ae7fc470cc4c5ed011de81b9b99
Throw NotFoundException if expression is false (404)
public function getNotFoundException(): string;
0
15590676b5287213a2981714dd43adac
a3652ed80b22b233ef3c4966992c0ab5
Return twice the input value
def double(value): return 2 * value
1
6c2f2223e285e1be82d71cd9a54de418
cc370c1526e98a0e20cfe864679a576a
#识别淘口令
class TestController extends ControllerBase public function actionTkl() { $client = new MiaoClient(); $request = new DecodeTkl(); $request->kouling = '【【稀缺货源】Apple/苹果iPhone 8 Plus 64G 智能手机 苹果8p iPhone8p】,復·制这段描述¥ZwpObfOIFjb¥后到淘♂寳♀'; return $this->responseJson(0, $client->run($request), '淘口令解析'); }
1
6d960baf00211fc305b492fdfd535257
99aef312d866b0482ef459fd97d23103
Get events by case id.
public class ResourceClient public String getCaseEvents(String caseId){ try{ return this.client.getCaseEvents(caseId, this.handle); } catch(IOException e) { e.printStackTrace(); return null; } }
1
9c064e2753f0fae4819235049e384179
e54a1576a34aecd9f53ab3a76a032613
#勝利者を決める関数
decide_winner <- function(seats) { nseats <- sum(seats[side == "n"]) lseats <- sum(seats[side == "l"]) wseats <- sum(seats[side == "w"]) if (nseats > (lseats + wseats)) { victory <- "national_led" } else if (lseats > (nseats + wseats)) { victory <- "labour_led" } else if ((lseats == nseats) & (ws...
1
adf62637c7a3428f90efc8354be4af5f
7e58dae0e700c8e65ca30d454b685f8a
ログイン完了メッセージをプッシュ
class ApplicationController def after_sign_in_path_for(resource) flash[:notice] = "ログインに成功しました" admin_index_path end
1
c3e4edc04ced3802cb664135583c1423
d5fc0530deaec65aa491294bf984081d
Changes the days of the month when a wake up must take place. <para> Remember to call the <c>saveToFlash()</c> method of the module if the modification must be kept. </para> <para> </para>
class YWakeUpSchedule extends YFunction public function set_monthDays(int $newval): int { $rest_val = strval($newval); return $this->_setAttr("monthDays", $rest_val); }
1
903428d6be1ba99dec5e041206c24bf8
63bf36a9a5f8f77e04c091f690f19be6
Method (LEGACY) to copy field values of duplicated (copied) fields
public class CachedDatastoreService public static void copyFieldValues(Entity from, Entity to) { for(String key:to.getProperties().keySet()) to.removeProperty(key); for(String key:from.getProperties().keySet()) to.setProperty(key, from.getProperty(key)); }
1
c263fe13aeae20a3e1cadf142670eee3
1bd41d78cece572c8931183b24641e0f
Returns the structure ID of this related person.
public String getStructureId();
1
7be01a18ad76eb90a0cee316fd77a038
34c9cb6ef62a7a6698de59d6d0b6012f
Returns whether the value of the '{@link org.spiritconsortium.xml.schema.spirit._1685._2009.AddressBlockType#getUsage <em>Usage</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
boolean isSetUsageType();
1
ca714fe82004911c63325bc0fe53453e
78333eb860a8e5f8e8c7b84d8e2a2acb
Construct serializable dict of spectrum metadata and fitted models Input: `xspec.Spectrum` object Output: dict of important spectrum information, including dicts of all fitted models
def spectrum_dict(s): sdict = {} sdict['fileName'] = s.fileName sdict['index'] = s.index sdict['dataGroup'] = s.dataGroup try: sdict['background'] = s.background.fileName except: sdict['background'] = None sdict['ignoredString'] = s.ignoredString() sdict['areaScale'] = s....
1
1868071108ac23dcd91838b75a873eff
5d0b115bbfd745ccf2d982468e25a7ad
Converts a directory with dicom files to nifti files
def convert_dicomseries2mhd(dicom_series_dir, save_path): data = read_dicom_series(dicom_series_dir) save_mhd_image(data, save_path)
0
23809993872b63fce57f1efcea65c19f
86bed430693892cfca1ab6fa0701d253
https://github.com/pnpm/pnpm/blob/af3e5559d377870d4c3d303429b3ed1a4e64fedc/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts#L179
if (!importer.specifiers) return importer.dependencies = importer.dependencies ?? {} importer.devDependencies = importer.devDependencies ?? {} importer.optionalDependencies = importer.optionalDependencies ?? {} for (const { alias, pref } of wantedDeps) { if (alias && importer.specifiers[alias] !== pref) {...
1
2b0e0edebc3d6f0c14ef48e2be73c4b7
b3da50ea45283437463bc086572b9b3b
Teacher结构体解码
{ Teacher t1; int ret = 0; unsigned char *myout = NULL; int outlen = 0; Teacher *outStruct = NULL; int iTeacherType = 0; memset(&t1, 0, sizeof(Teacher)); t1.age = 32; strcpy(t1.name, "myname"); t1.p = (char *)malloc(100); strncpy(t1.p, "dsafdsafdsafdsafdsa", 9); t1.plen = 9; t1.p[t1.plen] = '...
1
af9cf70ca20632a230adf624b5e71a5a
123cbb28398e6ce36883ddb7f61d64fa
获取url get参数 主要用于 index.html?a=100#/home这种
function getarg(url) { arg = url.split("#"); return arg[1]; }
0
fcca570534b3ac2c56954419030dd655
d81b33578d80e9d377a964a4105dae1c
Sets the disabled of this MlappUniversalServing.
void setDisable(boolean disable);
1
1c74e8e18dc5c16dfdccf17f44ad53f6
3fe2ea0cf3506c106a7066b1a6958314
获取游戏房卡配置
@Component public class DZCardService{ public List<DZConfigCsv> getDzConfigCsvs(int roomType){ return dzConfigCache.getDzConfigCsvs(roomType); }
1
2a406a8b79142ae7db256812f49162a8
da09837a23f1e1ff1f5237e0cb052042
Allow comparing dates with datetimes
class Date: def __eq__(self, other): return (self.date == other.date) and (self.hour == other.hour) if isinstance(other, Date) else False
0
40c4fffd4e05601e872e9f0a49a4c7b6
7f4261ba637748013f05290ecfdc314e
ONLY MYSQL
class Life_Model extends Model public function set_only_mysql($bool = true){ $this->only_mysql = (bool)$bool; }
1
ddca1678fbf774a3be1f72e4d22930a4
0552c53bd78b413c633b8535949f32bf
LSTM.recurrence(input_, prev_hidden, prev_cell) -> hidden, cell (batchsize x hidden_size) Produces the new hidden and cell state, acting as a single computation step of an LSTM
with tf.variable_scope(scope or type(self).__name__): cell_tm1, hidden_tm1 = tf.split(1, 2, state) linear = linalg.linear([inputs, hidden_tm1], self.output_size, add_bias=False, n_splits=3, moving_par...
1
5443119a59c5ac781f6a8c08097167e7
5b3d76e7d43a65397c979725273f3df9
Find the onset and offset of a thresholded prediction.
def get_stim_times(stim,thresh1=100,thresh2=-100,minimal_dist=500): to_replace = np.where(np.isnan(stim))[0] stim[to_replace] = 0.0 off = np.where((stim<thresh1)&(stim>thresh2))[0] stim[off] = 0 stim_pad = np.hstack([np.zeros(minimal_dist),stim,np.zeros(minimal_dist)]) z = np.zeros(stim.shape) ...
1
7df97f9dc40ccb7920ce93e766318177
6ddf9f3758ec95f87ef2743005f01f0c
アダプターに自分が借りている本のリストをセットする
void setCurrentBorrowing(List<ItemInterface> currentBorrowing);
1
fc329e0f95920875dd29276e72331863
f495f9c1f62f3b53bf63e2a7b7faf087
Tries to get id from the request and returns if got it.
namespace StockSharp.Algo.Server long? TryGetTransactionId(string requestId);
1
c295de88739f7861ca60ee12dfd10138
7771010889e4afd5adac45e572ef0ea1
Given an action list,
class MafiaBot: def HandleActionList(self): random.shuffle(self.actionlist) nighthistory = '' for action in self.actionlist: nighthistory += '\x02'+MafiaAction.Lookup[action.actiontype]+'\x02 by '+str(action.source)+' on '+str(action.target)+' ' if action.actiontype == Ma...
1
a1dde47e4cd241900eed034e989ea0f5
7bbbef3a3242c7164a333b3545c97028
当文件保存在本机时, 由文件Id获取文件路径
public class NoteFileInteractor implements NoteFileContract.Interactor @Override public String getPicPath(String fileId) { return mContext.getFilesDir() + "/" + fileId + ".png"; }
1
448159beb9a0f6e4647f6a3ba951a7d3
86579484910580c2f04ee53182a4279c
Gets the DateInterval difference between the start and end date. A DateInterval object, or an empty string.
class DateInterval extends BaseInterval public static function createDiff(Datetime $start, Datetime $end) { return self::convert($start->diff($end)); }
1
c9a002af7333ef8423d7cd776226130a
ef10b06bbf6b7285718bfef0e39884be
Pings all servers to obtain their round-trips times and their high timestamps.
namespace Microsoft.WindowsAzure.Storage.Pileus public class ServerMonitor public void PingNow() { Stopwatch watch = new Stopwatch(); foreach (string server in replicas.Keys) { if (!replicas[server].IsContacted()) { Clou...
1
f2f89a97752f2d9a5d8b0eb02b0987ac
908fbeade07f70a37f2a833d02d18d05
kontrola duplicity, pokud se nekdo snazi ulozit fotku, ktera uz v tabulce je, vrati se uz hotovy row
{ this.connection.Open(); bool hasRows = false; string query = "select * from " + this.tableName + " where imgUniquePath = @imgUniquePath "; MySqlCommand cmd = new MySqlCommand(query, this.connection); cmd.Parameters.AddWithValue("imgUniquePath", uni...
1
dea97c4bcc663c2cd0d9b4648e36a0a0
36831e3bfb95381aa3cc7e8a719d5c13
1. lấy thông tin nhân viên, fill thông tin vào 2 tb mã và tên nv
namespace ChamCong_v05.UI.ChamCong public partial class frm_XemCT_GioCC : Form private void frm_ThongTinThemGio_Load(object sender, EventArgs e) { nhanvien_goc = selectedRow["cUserInfo"] as cUserInfo; NgayCong_goc = selectedRow["cNgayCong"] as cNgayCong; tbMaCC.Text = nhanvien_goc.MaNV; tbTenNV.Text = nhan...
1
db1c62eba026f8f4df91b5dc83e9ad23
0f14455d076b229e07d42fd6199d0ffc
Metodo para alterar orçamento no banco de dados
$db = new Database($this->nomeTabela); return $db->update('id = ' . $this->id, [ 'produto_id' => $this->produto_id, 'quantidade' => $this->quantidade, 'valor_unitario' => $this->valor_unitario, 'valor_total' => $this->valor_total, 'percentual_i...
1
c00ce314a08674d7e7a6b6d9da6239df
2e6c84a1ff9f10be84481f0a8e41af9b
Sets button href
class Button extends FieldAbstract public function getHref() { return $this->href; }
0
278109085312486c7331eea9d6165f72
a1d73861032bb97f29524467be82779a
test that reinsertions do not duplicate records.
{ String a1 = "happy"; String a1s = "cheerful"; String a2s = "delirious"; String b1 = "cheerful"; String b1s = "perky"; String c1 = "delirious"; String c1s = "overjoyed"; String c2s = "ill"; rogets.insert(a1,a1s); rogets.insert(a1,a2s); rogets.insert(b1,b1s); ro...
1
1cd6b05704fb96c3a72fa3f05bfc09f8
72054aaaa8cb6a5a2799c98dfbbbc9c4
Adds a member to an Azure Active Directory group
namespace Microsoft.Azure.Management.Graph.RBAC.Fluent.ActiveDirectoryGroup.Update Microsoft.Azure.Management.Graph.RBAC.Fluent.ActiveDirectoryGroup.Update.IUpdate WithMember(string objectId);
1
1db604e7d97b8da565f14cffb6f73afe
146dbb8d1d0e160a68866d1a25815372
Check if <time_happly_gift> has a value
class EggData extends \DrSlump\Protobuf\Message public function hasTimeHapplyGift(){ return $this->_has(14); }
1
99a1e0dd1f1ceb8da630cd6ef5901a39
6cf4739f864116d37042b7b6c40ad483
show the current status of the application
class HomeController extends AbstractController public function index() { $status = Session::get('status'); return View::make('home.index', array('status'=>$status)); }
1
ad71641dcf3a5ee3e959a06c6dda6111
7fe5c0e377334a67764470c1996b3a4e
Get the value of dataVencimento
class Backoffice_Model_Faturas public function getDataVencimento() { return $this->_dataVencimento; }
1
20455eaf600102c24eb6e825f5720ad5
4e0c2774390aba3ac7e79b3e1758907a
Specifies SQL Server VARBINARY(n) data type for column.
{ column.VerifyNotNull(nameof(column)); if (size < MIN_VARBINARY_SIZE || size > MAX_VARBINARY_SIZE) throw new ArgumentOutOfRangeException(nameof(size)); column.SetSqlType(SqlType.VarBinary(column, size)); return column; }
1
f2f7945720175018f9a143360c0948cb
759646b6b07e1093d717b27ecc98cb5a
Obtain the date of aperture of the each company.
collection = self._adaptor.getCollection(colName) cursor = collection.find(projection={'date': True, '_id': False}) dateList = [doc['date'] for doc in cursor] return set(dateList)
0
d5800073d06cf27b7297155636fbac2e
00581680d2c25856a551181c8c179e0f
Checks adding dinner to the planner is performed correctly
public void testAddIngredient() { mc.createMeal("KartofelnSalad", 20); mc.addIngredient("Potatoes", 20); mc.addIngredient("Tomatoes", 30); assertEquals(mc.currentMeal().getName(), "KartofelnSalad"); assertTrue(mc.currentMeal().getPrice()==20); assertTrue(mc.currentMeal().getIngredientQuantity("Potatoes")==...
0
9aa3fa765eb7f5c9dd8793917ab46cbb
45991ac913718172ae368da03a009e02
通过日频的复权因子序列,填充成指定频率de复权因子序列
sql = ''' SELECT A.ExDiviDate, A.RatioAdjustingFactor, M.SecuCode FROM QT_AdjustingFactor A, SecuMain M WHERE A.InnerCode = M.InnerCode AND M.secuMarket in (83, 90) AND M.SECUCATEGORY = 1 ORDER BY M.SecuCode ASC, A.ExDiviDate ASC ''' da...
1
029209aafb9382d2076c14dbe938479f
5cc327e0efc9c68c3687c4927b6cbe48
Refresh a token for the specified tenant.
namespace Jsinh.Onedrive.Api Task RefreshTokenAsync(Action<bool, OAuth2Token, Error> onCompleted);
1
a69bd3f00f805b3a095fe5d584a33cd6
e7bd8f49bdb0d8c0ad2a85079a940abd
String to MAC Address
{ $str = mac2hex($str); $str = '0x' . strtoupper($str) . '0000'; return machex2int($str); }
0
b709b5cd54d6e93444f87f36804d0b73
54377a0ad0acb96bc61d27428d8b9bb4
Returns the Vector with one of its values set to 0.
open external class Vector2(x: Double = definedExternally, y: Double = definedExternally){ open fun roundToZero() : Vector2
0
e1cc7f85fee1fa072231754014795583
406d222549b67ae2165edf873baf2aac
DNSc_ReqIF_Sel() @brief Select next interface for DNS process.
static bool_t select_adv (T_DHCP6_CLI_CONTEXT *ct) { if ((ct->adv_msg = select_msg(ct)) != NULL) { ct->dst = ct->adv_msg->srv; return true; } else return false; }
0
b6249908ce87c4bd9edac96f3afbc209
19aedba2f95e99bcd38db33ace8d3325
Get SystemConstant (VisualDTO) by identity
namespace Configuration.WebApi.Controllers [Microsoft.AspNetCore.Mvc.ApiControllerAttribute()] [Microsoft.AspNetCore.Mvc.ApiVersionAttribute("1.0")] [Microsoft.AspNetCore.Mvc.RouteAttribute("configApi/v{version:apiVersion}/[controller]")] public partial class SystemConstantController : Framework.Domain...
1
736d4a924c315915d2a38ae3d93c79ae
0e8aff9242b5ec0eeabc08b6947cd581
get accelerations from velocities
def acceleration(buffer): v1=buffer[1]-buffer[0] v2=buffer[2]-buffer[1] return v2-v1
1
f60c319f83fd30adeb7f80478b6ab0ad
1e2ddae585d1767bf44e958ef24b9e4c
From a list of user IDs, identify potential user groups.
group_ids = self.DetermineWhichUserIDsAreGroups(cnxn, user_ids) group_settings_dict = self.GetAllGroupSettings(cnxn, group_ids) member_ids_dict, owner_ids_dict = self.LookupAllMembers(cnxn, group_ids) indirect_ids = set() direct_ids = {uid for uid in user_ids if uid not in group_ids} for gid, se...
1
ddea1a9b98f08aac006acc8c56db0006
d723e927d46996ce830cac3edc931825
供外界调用,播放或者暂停音乐的方法(传入true代表静音,false代表不静音)
public class SoundManager public void setMuted(boolean muted) { mMuted = muted; if (mMuted) stopMainSong(); else playMainSong(); }
1
531d797c655eb3c734d247b621dfe6d5
2593266f77fb780187af4bdf5a3eb41c
获取所有好友的头像地址
def save_picture(path): bot = Bot() freinds = bot.friends(update=True) for freind in freinds: freind_name = freind.name freind.get_avatar(path + '{}.jpg'.format(freind_name)) print('微信头像获取完成!')
0
3283c757e2bb3b88bae98bddd90f9064
32d6668dba97b3ad1b5ba201ec589305
如果链表为空,则不做任何操作,防止空指针异常
public class ListDemo public static void deleteNode(ListNode deleteNode, ListNode head) { if (deleteNode.next == null) { ListNode newNode = head; while (newNode.next != deleteNode) { newNode = newNode.next; } newNode.next = null; } else { ...
0
21717509fbb361fd4756dc3db0809bb1
7a6dc5c744663119c3a40c188aeeacc0
Rotate servo to full left position.
void BeltSwingArmV2::swingLeft(){ _servo.write(_minAngle); }
1
e21acc07d9354938801132b6d70d6b75
951776e57f4a25a0d5016e642c7e06a3
Diese Methode löscht die Kamera und deaktiviert die Anzeige auf dem Bildschirm.
if (camera != null){ cameraPreviewSurfaceView.setCamera(null); camera.release(); camera = null; } }
1
ec3d11a61cad2ef3c519bf2cd24bf3b9
b24ba7f9b0ef5e09edc96d867b99fd19
Get the jockey associated with the specified runner
class Cachedate public function setJockey($jockey) { $this->jockey = $jockey; return $this; }
0
a7c815fc2306195e1f358bf31d0e7138
677b48c4b72c0e10259f03cb576f2624
Test permutations of parameters to get_version()
class TestReceivedMessage(TestCase): def test_permutations(self): on_off = True, False for prefix, params, suffix in product(on_off, on_off, on_off): with self.subTest(prefix=prefix, params=params, suffix=suffix): raw_message = self.build_message(prefix, params, suffix) ...
0
92cbc3f5d18bcde979b274d1d1d8f02d
a869c3138908f38a16ff1cefe1a115e4
영업활동 리스트 조회
@Service @RequiredArgsConstructor public class BusinessSVCImpl implements BusinessSVC @Override public List<BusinessLoadDTO> busiListBySearch(String search) { return businessDAO.busiListBySearch(search); }
1
161d00aa059513172fc6f7274bfdb2d1
19b251c13420dae4bcf1c5913c2ce4c3
Возвращает колличество вершин многоугольника
public class Facet{ public final int getVertexesQuantity(){ return vertexes.length; }
1
c1e223530b271fca11098fed968a77b4
1f14b8d5d0aafcb38a25bc0d40cb253f
Determines if the idtypeid has been modified.
public class TbPaygradeCurrencyBean implements Serializable, GeneratedBean public boolean isTbpcIdModified() { return tbpcIdIsModified; }
0
7e51efa6fd6c2f8e906c656929557e15
dfde623d4e0eda7fc80719ca492f0be3
https://gist.github.com/mattdesl/e399418558b2b52b58f5edeafea3c16c
function rgbToHsv(r, g, b) { r /= 255, g /= 255, b /= 255; var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; var d = max - min; s = max == 0 ? 0 : d / max; if (max == min) { h = 0; } else { switch (max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g:...
1
77399dc87b4af9fe0dd552e2450ab9f7
9bc3bb3b4740fccece532d30fe22fb60
Get plots dictionary Returns
class CommandButton(object, metaclass=Singleton): def _plots(self): return self.__plots
1
01d8304043a03eb1eaf82b055f8296a8
75e0903f796a243b982b11d56e1e7378
Searches a SeqRecord for each oligo in the oligo list (and for its reverse complement).
desc = record.description seek = record.seq.tostring() start_dict = {0:[], 1:[], 2:[]} stop_dict = {0:[], 1:[], 2:[]} start = re.compile(r'ATG') stop = re.compile(r'T(?!GG)[AG][AG]') def scanner(codon, seq, dic): finds = re.finditer(codon, seq) while 1: try: rec = finds.next() dic[rec.start()%3].a...
0
d7b0e0247887becb159fac3ab7ef8607
0e2ef017677ff02ff36689169998b7ff
Given an array, it returns all possible permutations of it in another array
var results = []; function permute(arr, memo) { var cur, memo = memo || []; for (var i = 0; i < arr.length; i++) { cur = arr.splice(i, 1); if (arr.length === 0) { results.push(memo.concat(cur)); } permute(arr.slice(), memo.concat(cu...
1
27eb6b0f6ed3efc3f56ecb9cd89074f3
d1158066127278c6e1e995bac70a85a2
If current data exists, overwrite with new one
func setCurrentKey(bodyAsKey []byte, currentValue []byte) error { err := DB.Update(func(txn *badger.Txn) error { err := txn.Set(bodyAsKey, currentValue) return err }) return err }
1
a6b919bafb6e52e16fe72c986057b9ca
b606af8f49e2d5e7e8b42d94475aab7d
Create an instance of the Aliyun oss driver.
bucket_url=pre_check('aliyun_oss_df_endpoint'), df_bucket=pre_check('aliyun_oss_df_bucket')): self.ac_id = ac_id self.ac_key = ac_key self.bucket_url = bucket_url self.df_bucket = df_bucket self.progress, self.trans_id, self._progress_file_name = None, None, None...
1
eb5ed2147cf5af2877a4e10875361a53
f0a974b2331bd23145aceca48142c916
Update internal data after the batch simulation
class EnvironmentSpatialLattice(EnvironmentSimulation): def apply_inner_update(self, update, now): self.simulations.update(update) for agent_id, simulation in self.simulations.items(): if simulation['time'] <= now: state = simulation['state'] if 'motile_force'...
1
1575fe6e618939538896a38d9dee85c9
7ef92d0c5aa546aa37cb33ec780e2506
Choose eur as currency for graphs
class DashboardController extends Controller protected function getEur() { return Rate::query() ->latest() ->currency(Rate::CURRENCY_EURO) ->first(); }
1
f5354970b346245bfac3e63afd050e9f
974456f5b0728dc495953119ea69aae2
Returns a boolean describing whether to apply augmentation. # Arguments
class MissingAugment(data_augmentation.DataAugment): def augment(self, sample, **kwargs): if np.random.rand() > self.skip_ratio: sample = self._do_augment(sample, **kwargs) return sample
0
3f649441087cdc05aea387ed6ad4a7dd
b7cafa3b8699baac93b34e025b486d94
Standard error of predictions. .. versionadded:: 0.5.0
class OnsetMeanEvaluation(MeanEvaluation, OnsetSumEvaluation): def std_error(self): return np.nanmean([e.std_error for e in self.eval_objects])
1
bf304d8b8b956b4b0b9ace7025bafec6
5dfb80867b4224677de32ac36bcc14fc
Deletes category name by language
{ $searchCriteriaBuilder = $this->_objectManager->get(SearchCriteriaBuilder::class); $searchCriteria = $searchCriteriaBuilder->addFilter('name', $name) ->create(); $repository = $this->_objectManager->get(CategoryListInterface::class); $items = $repository->getList($searc...
0
e88023c7a28a03a5aa959af95ae7a9f4
a60445ead07bc14fe037c567a8452d6f
Requests a list of the changes to quotas for a service.
{ var options = new InvokeOptions(); options.RequestMarshaller = GetServiceQuotaRequestMarshaller.Instance; options.ResponseUnmarshaller = GetServiceQuotaResponseUnmarshaller.Instance; return Invoke<GetServiceQuotaResponse>(request, options); }
0
e4b28fc6022b7badc73ff98bfa5e3531
fdbc56d8933d0dc6d9e31b553055eb2a
Get time of last remind
Long getLastRemindTime(User user) throws Exception;
1
164e52199cbb47cc961ca1ea44db3f62
d55666a347963e671f76d57fd0c79359
Initialize a new instance of the class LROs class.
self._filter = _filter self._lcdb = LCDB() self.navigation = navigation self.today = datetime.date.today() self.date_begin = self.__get_date_begin() self.date_end = self.__get_date_end() self.obj = type_obj or sbis.Session.ObjectName() self.id_type_doc_loa...
0
045e5df92019863578a67fec7daf1e62
caefa4159ba6446ec36cbd5f549307e1
cephOSDPoolExists checks whether a given OSD pool exists.
if _, err := os.Stat(name); err != nil { if os.IsNotExist(err) { return false, err } } return true, nil }
0
9575258ebab850520759b27246e77ebf
5e36fbb1320261240a6d2dfe9d6f02bf
Поиск вопроса по Id
namespace FRI3NDS.CryptoWallets.Core.Interfaces.Services Question GetById(Guid id);
1
432a5347ab3fd38f5f5fa9dc3d9728e0
cc6681805f1145daf358b86e28545fa6
从URL中提取出文件路径,如果是动态网页的话,还需要提取出CGI参数信息,并且返回值代表是否问静态网页
int parse_uri(char *uri, char *filename, char *cgiargs) { char *ptr; if (!strstr(uri, "cgi-bin")) { strcpy(cgiargs, ""); strcpy(filename, "."); strcat(filename, uri); if (uri[strlen(uri) - 1] == '/') strcat(filename, "home.html"); return 1; } else...
1
9a2656cdbfb9c0a1efc690e7ac15a0e3
4a1c965cb27244ba046c431de1586d4d
验证手机号是否入驻过了
produces = {"application/json;charset=UTF-8"}) public ResultEntity isRegister(@PathVariable("phoneNum") String phoneNum) throws Exception { return new ResultEntity(0,"手机号",phoneNum,0); }
0
3b3c3ec40ca86b53551f8bee42b7f84c
2f36c44df28e32c59a6853c26d90c4ff
Methor that returns weather or not a given point is inside the image
public class Item public boolean contains(double x, double y){ return myImage.contains(x, y); }
1
d3c74dac01521b973367cdc6be6595d8
f7b66f80d20b53f3fae415c9f2d66bb2
固定されている場合のマーク(赤枠)を描画
namespace EntryControl public partial class ReceptionForm : EntryControlForm private void dgvPlanAppointList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) { if (e.RowIndex >= 0) { PlanAppoint appoint = (PlanAppoint)bsPlanAppointList[e.RowIndex]; ...
1
d70c8e239553b62d75d08f58b712f68d
26372a44c7f06b1e11eea508d802a189
step1 - training
def train(): dataset = tf.data.Dataset.from_tensor_slices((input_tensor_train, target_tensor_train)) dataset = dataset.shuffle(BUFFER_SIZE) dataset = dataset.batch(BATCH_SIZE, drop_remainder=True) for epoch in range(EPOCHS): start = time.time() enc_hidden = encoder.initialize_hidden_state() total_lo...
1
7b0b37c34d071315797519fb01f484a6
b93467fe86ee977da6eae8d8f5ea5882
Set if we should show a GPS position marker
public class AgendaMapFrag extends SupportMapFragment implements OnMapLongClickListener, OnMarkerClickListener, IGraphMapper void setShowCurrentLocation(boolean show) { showSelf = show; }
1
21d12f623bc5042fbec124c6834b6d0a
b597d9abcbe9d7234fd79f4f739f6003
Set an operator in a combo box, if the operator does not exist, the first value is selected.
public class SearchQueryAnalysisTab extends CreateProjectPage public void selectSearchQueryFirstOperator(String queryFirstOperator) { selectByValueString(firstOperatorDropDown, queryFirstOperator); }
0
40b1126a1df457551adec0eb11b81b0b
d73ccda56762d06f3d298073dd93858c
获取两个日期之间的小时差,除去节假日或周末休息日
public class Tools public static long getHrsGap(String startDt, String endDt) throws ParseException { long gaps = 0L; Date stD = Tools.parseToDate(startDt, Constants.DATE_PATTEN_SEC); Date edD = Tools.parseToDate(endDt, Constants.DATE_PATTEN_SEC); gaps = ((edD.getTime() - stD.getTime()) / Constants.HOURS)+24; ...
0
67505b8666c490bbf91fc467c006fbea
2e125513df916c62cf24d5bcf81a5e6f
Initialise service, by fetching the rate conversion multipliers from the various third party providers.
class Provider public function __construct( TaxRateRepositoryInterface $taxRateRepository, Converter $converter ) { $this->taxRateRepository = $taxRateRepository; $this->converter = $converter; }
0
ffe415dac26ce91e9f11cb68f303f50f
13302b77ff86aed51ed7d8dc8a1929ff
Method invoked after circle controller middle button is clicked
void on_center_button() { }
1
2d2b17813af199f64037e16537759380
a3e99df01a1960ae85b62085ce0748e2
以插件模式加载mailer
class CLMailerExtension extends Extension public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ ...
1
b4185d1f47c2b13f9d465106ddcbb059
8b81d9f843b873b3bf525345b381474f
Checks for the presence of a field of the specified type in the packet.
namespace NetworkCryptography.Core.Networking public sealed class PacketHandlerCollection public bool Contains(ServerOutgoingPacketType packetType) => Contains((int) packetType);
0
6e5cfffeb982d7f230f44d0f4a5d8271
5a7e7bebb0881064c3509ec4dc23bee9
This function returns the coordinates of the element centers
def get_element_coords(problem_data, e_nodes): def get_node_coords_(node_no): return array(problem_data["nodes"][node_no]) return array(map(get_node_coords_, e_nodes))
0
ecb1a98affdf761c4144608a820d7eec
9d2ba8b8ed7cefe18c1a06c2a2e485c5
Высчитываем показатель освоения программы
class MeasureClass: def measure(self): try: files = os.listdir(self.path) if files: self.measure_count = max(set([int(i.split('_')[1]) for i in files if i.count('_') == 3])) else: self.measure_count = 1 except: pass ...
0
7d1901db96527275225f1a32d426e511
3366ee39c3f14b67216f55ad13204ef3
UI坐标转逻辑坐标
QPoint GameView::changeToLogic(QPoint pos) const { QPoint result; result.setX((pos.x()-board->geometry().left())/30); result.setY((pos.y()-board->geometry().top())/30); return result; }
1
904f2b2162e0fd70ebb87f064f3dd1e2
e39a0771130df184daf2f112ddf5fe4c
Handles the 1 event of the _buttonSaveLog_Click control.
{ this.saveFileDialogLog.FileName = string.Format(Variables.Instance.Culture, "Log{0:yyyyMMddHHmmss}", DateTime.Now); if (this.saveFileDialogLog.ShowDialog() != DialogResult.OK) { return; } using (StreamWriter streamWriter = new StreamW...
1
e3ea22e0de4a3a16754448ecf8e24774
7a4897aa701815e7682059008d73c950
Check - have user timezone or not
{ $tzId = $this->_ci_to_php_zone(); $tz = new DateTimeZone($tzId); $trans = $tz->getTransitions(); return ((count($trans) && $trans[count($trans) - 1]['ts'] > time())); }
0
355da9d239203868c03bc34ef1a3c100
0ee643fa001800ca946c1a0d1db4ae1e
The amount of short (sell) positions. In the case of FX instruments, it is expressed in the instrument base currency. In the case of CFD instruments, it is expressed in contracts. If short positions exist for the instrument traded, the value of this field is positive. Otherwise, the value of this field is 0.0. Returns:...
class LiquidityBucket(Base): def long_number_of_positions(self) -> float: return self.__long_number_of_positions
0
25fb4429f339d02d308377ce160e8d2f
d724ddd2d8371c1900b3112e237d84c9
Create a deep clone of all currently selected objects and display them on the slide, slightly offset from the original objects. Throws error if unsucessful.
public class StretchToContentAction extends SelectionAction public void run() { execute(createReorderCommand(getSelectedObjects())); }
0
d277120429731188ca62f359125831ca
4a1591c3dc6dec40ec2785748ab65111
定位图片中的数字
namespace DrawTool public class DrawImage private Bitmap drawNumber(string numText, int width) { StringFormat format = new StringFormat(); format.LineAlignment = StringAlignment.Center; format.Alignment = StringAlignment.Center; Font font = new Font("微...
0
d294e14577b2b751a466a7fdc6029850
3c37a76883e1586770cd7f38457e9876
找r行c列左侧下一个不为0的位置
function getLastcInRow(r,c){ for(var lastc=c-1;lastc>=0;lastc--){ if(data[r][lastc]!=0){ return lastc; } } return -1; }
1
5777cfb1df51f54942d4474cd2c21bc7
db482943a5f24add9875a3046dc7a631
<p>Preconditions</p> <p>Creates Category to use during tests</p>
public static void setup() { sessionId = Util.getSessionID(); testCategoryId = given() .header("X-session-ID", sessionId) .body("{\"name\": \"Groceries\"}") .post("api/v1/categories") .then() .assertThat() ...
1
abe45188e28cf9146ad8004ca94f53c9
28f1edd9404c3b11343be7b1db3d1619
DELETE /suspension-histories/:id : delete the "id" suspensionHistory.
public class HistoryResourceApi public ApiResponse<Void> deleteHistoryUsingDELETEWithHttpInfo(Long id) throws ApiException { com.squareup.okhttp.Call call = deleteHistoryUsingDELETEValidateBeforeCall(id, null, null); return apiClient.execute(call); }
1
e170e71aa131e6fc217f1a5e69568eb0
2350a5b749cb9de04ca4c5512958cd77
Test for allowed state transitions for non-individual, responsible postpaid subscribers.
{ final Subscriber subscriber = new Subscriber(); subscriber.setSubscriberType(SubscriberTypeEnum.POSTPAID); subscriber.setId("6000"); subscriber.setBAN(this.individualResponsibleAccount_.getBAN()); final Map<SubscriberStateEnum, Map<SubscriberStateEnum, Boolean>> map; ...
1
12d89ccc4f06dab36e58d8dd78e1f37d
ce3a7e3098c55e4ea78ffab4a3b7c403
获取指定商品的印象标签列表(父标签列表)
{ if (!$productId) { return; } $where['lr.product_id'] = $productId; $this->db->select("l.id, l.name, l.sort, l.parent_id, l.is_recommend, lr.product_id") ->from("product_label_relation AS lr") ->join("product_label AS l", "lr.label_id = l.id",...
1
cac415b774b69ca7d11541a60af396f1
a884b293b9a0308d87f702e76a00741b
Si los dos valores son iguales no despachará ninguna acción
class mipanelCondicion ( gui.panelCondicion ): def SCIgual(self): cadena = "if (" + GetTexto(self.choiceParametro1) + " == " +\ GetTexto(self.choiceParametro2) + ")\n" +\ "\t\tEstadoApp = " + GetTexto(self.choiceEstadoTrue)\ + "\n\telse:\n\t\tEstadoApp = " + GetTe...
0