query_id
string
corpus_id
string
query
string
code
string
label
int64
7949eac6ac6ce28efb784cc99daf0816
e01009795ae0898592670fc9be4ba71f
Test the SN SNR metric
class NObsNoSinglesMetric(BaseMoMetric): def __init__(self, snrLimit=None, **kwargs): super(NObsNoSinglesMetric, self).__init__(**kwargs) self.snrLimit = snrLimit
0
1c36f7a0787e56596753b7830dd72966
2841eba240796faf70efd1b1c47386d9
Test case for projectProjectsIdNotesCountGet .
class DefaultApiTest extends \PHPUnit_Framework_TestCase public function testProjectsProjectIdKeysKeyIdCommentsIdGet() { }
0
7f4b52f9eda002b57a5cfd38ade1d1ca
98bd356298a425033ee10d2d0d8cebc2
Gets the day start.
public class NewGameCharInterface public String getStartDay() { return dateField.getText(); }
1
cea1c816d49d5b8e4ecae836c66f4d4e
d3c36949a28a1a359eca65c330bdf96b
Returns a new CompoundWithCoeff with coeff = -self.coeff.
c = 1.0/self.coef d = dict() for var, deg in self._fdict.items(): d[var] = -deg return Monomial(c, **d)
0
707b0f4b769313b34fd99a3a3ed46769
d16431a99fdfe855255495ca42edf86f
Defines win lines array due to result reel positions of slot-machine.
public class GameEngine private static boolean[] defineWinLines(int[] pos) { boolean line1 = getReelValue(pos[0] + 1) == getReelValue(pos[1] + 1) && getReelValue(pos[0] + 1) == getReelValue(pos[2] + 1); boolean line2 = getReelValue(pos[0]) == getReelValue(pos[1]) ...
1
c527d8e681fc1a2fe655cbf85d1956ca
5c5df27f72809e6e1761aebe956be8c9
实时获取CPU当前频率(单位GHZ)
def cpu_freq(*args, **kwargs): pass
0
29abcf1c6457b4d3a3f0ce1baeeed02b
fdc6f1a8726b6b84ecd4f502d579fee7
Returns the number of edges leaving this vertex
namespace RogueSharp.Algorithms public class EdgeWeightedDigraph public int OutDegree( int vertex ) { return _adjacent[vertex].Count; }
1
9396e62ba46bd36f55b5dc832b55451b
d9d7b97bb93f8ba4e9bd6ca1779eac66
Function to update the dataframe column statistics in the status bar.
class EncDecFrame(ttk.Frame): def _update(self, fname, fstat, statdict): self._update_listbox_color(fname, fstat) statdict[fstat] += 1 self.master.update()
0
ba0993215637771596a346d32de51d5a
6c5b9c6149579eeaa4b6591e0fbf791f
=====Sobrecarga do operador "="=====
if( this != &cad) { delete[] s_; s_ = cad.s_; tam_ = cad.tam_; cad.tam_ = 0; cad.s_ = nullptr; } return *this; }
1
811182a50cda88b4df222fa5675ff4f0
93fe8a79e675abf8d6590e76a054be7e
读取数据,将每个句子用一个以词分割的列表表示
data_list = [] for i, line in enumerate(open(data_path)): if i % 1000 == 1: LOGGER.log('iter = %d' % i) segs = line.split('\t') words = split_word(segs[1].strip(), stopwords) label = int(segs[2]) - 1 data_list.append(words + "\t" + str(label)) return data_...
1
3e9f57140c0a69f8f7b4b09d35e3019d
489d770cb8d1b8cbfc7e7bdd847eae8a
получить скидку2 для сделки
{ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Discount2); if (bd == null) return Env.ZERO; return bd; }
1
cdef7266012b89871dd94d961ecc1984
a730e771940bff263f37681208658455
Check if user id belongs to a system admin. Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights Reserved.
class User extends RowObject public function isAdministrator() { return $this->_data['idtype'] == 'SYS'; }
1
bc3b8d98eb9e52e050799d8d8060a2c1
01a9b2b28c1732e4252e460f353e637c
The information level supported by the SUT for quering file information.
namespace Microsoft.Protocol.TestSuites.Smb [InitialMode("SmbState.Init")] public static partial class BaseModelProgram public static IEnumerable<InformationLevel> InfoLevelSetByFsAdditional() { yield return InformationLevel.FileFsControlInformaiton; yield return InformationLevel...
1
2cfe36f49673d2dbc4f5fe8c5658b156
97002a15a7623734a80f9ea560c3bfba
Returns available space in TX fifo in bytes
static inline int remaining_space(struct txbuff *txbuff) { unsigned int used = (txbuff->len + 7) & ~7; return MAX_PKT_SIZE - used; }
1
3930ec12553e55b4bd0840d2c3e49ef8
fe3f0819f49c206e9c6be939b4655db1
Station has changed, remove tracks from previous station from tracklist.
if len(self.segments) > 0: if self in self.segments[0].firstPoint.lines: self.segments[0].firstPoint.lines.remove(self) for i in range(len(self.segments)): if self in self.segments[i].lastPoint.lines: self.segments[i].lastPoint.lines.remove(self) ...
1
0e8c7e6e0cea9a646b16dd8c70b64f31
7cd0dfdb1198e848f62f298128f457e7
returns the tags and their story counts.
namespace DigitalArchiveAPI.AzureServices public class AzureSearch internal async Task<DocumentSearchResult<StorySearchDocument>> StorySearchTagCounts(string tags) { var tagFacet = new List<string> { "tags, count:200" }; SearchParameters sp = new SearchParameters() { ...
1
9c542e0efcb9be51efa7a17b44b45b5d
873db4a5556752464998ecae36180933
Transfers state from emulator to device,
{ struct tcm_chip *chip = dev_get_drvdata(dev); if (chip == NULL) return -ENODEV; tcm_transmit(chip, savestate, sizeof(savestate)); return 0; }
1
ddeb63cb73df3c7667a8539463b47a3f
e2d50bd0ebf6c8ac23a4d4de804ccfc2
Initial implementation of hittest for billboard. Needs further improvement.
namespace UnU.DirectX.Toolkit.Wpf.SharpDX public class BillboardTextModel3D : MeshGeometryModel3D public override bool HitTest(Ray rayWS, ref List<HitTestResult> hits) { return false; }
1
df689145e8844ab4b640350652775509
ee96acd7ebf4322ad9e8558e653bfbcf
Open Configured Databases (step 1 of final ready process)
db_parse_order = [databases.Hetionet, databases.CTD, databases.EPA, databases.AOPWiki] dbs = etl_all(stdscr, db_parse_order, ont) return ont
1
f30a9455796c2756b8210878f2abb71e
f90d57175536dd5b2ea3963a8a4a7564
Gets the tab the manager is currently on.
public int getTab();
1
312cabada1ca5c68e35423ee6e213d7e
10e671cf09f2501451b1d3e674a5077c
We have two monkeys, a and b, and the parameters a_smile and b_smile indicate if each is smiling. We are in trouble if they are both smiling or if neither of them is smiling. Return True if we are in trouble.
def monkey_trouble(a_smile, b_smile): if a_smile and b_smile: return True elif not a_smile and not b_smile: return True else: return False
1
2a519cd2eac1319d148b4946f05bf8d9
5a1928a57e3eaf6e36437b2b073c643a
Bouton qui permet d'agrandir l'image en largeur en fonction de la valeur renvoyée par le slider associé
namespace VeloPublic public partial class MainWindow private void ParamEvenementImage_MouseEnter(object sender, MouseEventArgs e) { Cursor = Cursors.Hand; ParamEvenementImage.Height += 10; ParamEvenementImage.Width += 10; ParamEvenementImage.Margin = new Thick...
0
2ad7af73751dfb1a787280169be491ce
ca6da02b2c63f8636ef96b097c61a3a5
Method used to apply a dilated convolutional layer to the given input.
kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (aKernelSize, aKernelSize)) erodedImg = cv2.erode(aImg, kernel, iterations=aIterationsErode) dilatedImg = cv2.dilate(erodedImg, kernel, iterations=aIterationsDilate) return dilatedImg
0
8c4542cf9ba256e723da1bd3ffe9016a
6744242bac73298751d4ffc91c9f6722
删除对应ID的UI面板
namespace UnityEngine.UI public static class UIManager public static void DestoryPanel(BaseUIPanel panel) { UIData.GetData.DestoryPanel(panel); }
0
0ee23a98943c3bf5a7cad0a26d8ee8e6
381cd043689fddfe32e1f6770ad44c5c
Arrondit une variable sensée contenir une donnée financière
{ int arrondi=floor(n)+1; if (arrondi==n+1) { arrondi=arrondi-1; } return arrondi; }
0
f4e9e280b44b92ff48adad445a5b56d4
22b7c7474e887dc20303066c379ba6e2
融资金额を設定する
public class Fctn0001s01FinancingInfoEntity implements BaseEntity public void setFinancingBalance(BigDecimal financingBalance) { this.financingBalance = financingBalance; }
1
3f4a53e7cdfaaa19603d9cdcb4411658
3ad42cbb3c0c1fef49acb890f4705849
Finds the right number of clusters.
km = KMeansAlgorithm( { 'n_clusters': 0, 'init': 'k-means++', 'n_init': 10, 'max_iter': 300, 'tol': 0.0001, 'precompute_distances': 'auto', 'verbose': 0, 'random_state': No...
0
d64a6dd252a26e9f26175029f1b7db67
c23d21e10edb423ce4a75625ee7ff946
Calculates the first sets of every symbol
let changed = true; for (let index in this.symbols) this._first.push(this._symbols[index].type == 'nonterminal' ? [] : [Number(index)]); while (changed) { changed = false; for (let index in this._symbols) { if (this._symbols[index].type != 'non...
1
f38dbd38316aa0bf6cf8687d0389fcbd
43cd80cba7a01904d938add462809389
Prep the connector with configuration data.
public class CouchbaseConnectorTarget extends RecordTarget @Override protected List<ConfigIssue> init() { List<ConfigIssue> issues = super.init(); LOG.info("Connecting to Couchbase " + config.version + " with details: " + config.URL + " " + config.bucket); try { if (config.version == CouchbaseVersi...
1
5e0e624cbf77e30ae4961e6311f506d9
6fb479357cd24aaf5751f2d0e15bd47b
Computes the combined apparent magnitude of two objects.
arr_ones = np.ones(len(redshift)) abs_mag_blue = self.absolute_magnitude(arr_ones*par.mag_faint, redshift, arr_ones*0) abs_mag_red = self.absolute_magnitude(arr_ones*par.mag_faint, redshift, arr_ones*2)...
0
2807560cc588dddc7b656c68309665ab
dd656a9fa642609d073fc35512b02def
Check whether stream has ended. This function is required for point cloud streams of files
gtk_media_stream_get_ended (GtkMediaStream *self) { GtkMediaStreamPrivate *priv = gtk_media_stream_get_instance_private (self); g_return_val_if_fail (GTK_IS_MEDIA_STREAM (self), FALSE); return priv->ended; }
1
b7b2296462ca1e47fe6520bbbfbaedfc
d8a5f3bf82e648e22ae25cfa5628e3f5
Returns a truly random integer betwen two indexes (including both the start and end indexes)
@SuppressWarnings("PMD") public class TestUtils public static int getNum(int start,int end) { return (int)(Math.random() * (end - start + 1) + start); }
1
1a1341f4f3f69b869113a2c227aa438c
ba6a8d809a4cdfcf806cc88729ddfc0e
Adds user statuses entries into database.
class UserDibiMapper extends \Nette\Object implements \Workity\Mappers\IUserMapper public function addStateInfo(\Workity\Entities\UserEntity $stateInfo) { if (!($stateInfo instanceof \Workity\Entities\UserEntity)) { throw new \Workity\Exceptions\InvalidArgumentException("Parameter \$stateInfo needs ...
1
cafb6c807a767ce59270bc86ef36126f
b997ce0b1975396b3493f975a66c9724
Create plan and allocate memory.
CUDPPScanPlan::CUDPPScanPlan(CUDPPManager *mgr, CUDPPConfiguration config, size_t numElements, size_t numRows, size_t rowPitch) : CUDPPPlan(mgr, config, numElements, numRows, rowPitch), m_blockSums(0...
1
01a46ec43f6b8031732cd31add6e3a28
1f0a56980fa61b1194cbf36a736446f3
Pulls an item out of the bag.
{ if (bag < 0 || bag >= mBags.Length) { return null; } return mBags[bag]; }
0
1addf37ff9155ad5f7737b2250fe0aed
2a4559177e2bc7a9ab0e6506a3759c64
class that handles all cables, showing them all on one page
class Electra143CableSet(cabsys.CabSys): def __init__(self): super().__init__() self.cabledata_cable = [] self.thermal_resistance = [] self._info['thermal_resistance'] = {iec.TYPE: float, iec.UNIT: '°C.m/W', iec.DESCRIPTION: 'ladder thermal res...
0
06ebf838a1d5d08a50a4fe41a22427ba
7bd601e157d9f711318d1a890c7f008c
the thread running this method waits until the entire viewer is exiting and then shuts down the XML-RPC server which is running in a different thread
namespace Uml.Robotics.XmlRpc public class XmlRpcServer : XmlRpcSource private void exit() { _disp.Exit(); }
0
15bc9aca6bc9cc1d7cc1615856612842
0911be10a508a7fcd5dda8e6a408bf62
Adds the selected customer to the new project
class MainWindow(QtWidgets.QMainWindow, win1): # Set all initial selected values to None def add_customer(self): customer_dialog = customerdialog.CustomerDialog() customer_dialog.exec_() self.refresh_customers()
0
248063e45c4d91d9d06f92a2443d1a1c
46ea6e7b017353022d8cf94d0ea3ccfb
test that utf8 decodes to wide
class LoadEventTestCase(unittest.TestCase): def test_utf8(self): data = load_event( b'{"x":"\xe2\x82\xac\xf0\x90\x8c\x82\xf4\x8f\xbf\xbd"}') self.assertIsInstance(data, dict) self.assertEqual(data, {'x': '\u20AC\U00010302\U0010fffd'})
1
a8cba08c5b9f778c1884af8a2b65235e
2ebb10dac84a0cbd05530f849ab1e465
The Amazon Resource Name (ARN) for the private CA issues the certificate. :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-acmpca-certificate.html#cfn-acmpca-certificate-certificateauthorityarn
class _CertificateAuthorityCertificateState: def certificate_authority_arn(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "certificate_authority_arn")
1
ff08826b0c42faf9239697601b55ab2c
c69ed29069f2a287c350763cb2db2bfd
Gets the StudySessions related to this module.
abstract protected function getStudyContents();
0
cc00dc6cf66b9d68a2b3d8e2652522f0
3019da21ddbf2a7f2e078974a2c3981a
Compares literals of synonym and the specified SynSet, returns true if their have same literals.
void WordNet::addSynSetsWithLiteralToList(vector<SynSet> result, string literal, Pos pos) { SynSet* synSet; for (Literal current : literalList.find(literal)->second){ synSet = getSynSetWithId(current.getSynSetId()); if (synSet != nullptr && synSet->getPos() == pos){ result.emplace_ba...
0
02cf1cb3b38722cbcac3c84546ef5ae0
414f7e00b46bc9654a796e80b519c0ad
Boot the config for the package.
class Config extends ServiceProvider implements ProviderInterface public function boot(): void { $this->configPublish(); }
1
56caa004ed235fd993fa978a50121bf4
65ac58b980976e8b47271c02c46ea8aa
return the minimum number of votes any remaining candidate has
min_vote = min((dict2.values())) remaining_candidates = set() for key, value in dict2.items(): if value != min_vote: remaining_candidates.add(key) return remaining_candidates
0
fb46c3b0e77c4d55859443020a9b1436
0722045da23ccb5b27de3eb6efad98b5
@warning: block has no effect on this implementation
impl<'a, 'gcx, 'tcx> BitDenotation for ActiveBorrows<'a, 'gcx, 'tcx> fn start_block_effect(&self, _entry_sets: &mut IdxSet<ReserveOrActivateIndex>) { }
1
6bbba6ff612055af10170e4e7f590fbc
044fe14b8c2c01db336d165661300d57
GET: Note/ShowOnlyFinished
{ IEnumerable<MvcNotesModel> notesList; HttpResponseMessage responseMessage = GlobalVariables.webApiClient.GetAsync("/api/Notes").Result; notesList = responseMessage.Content.ReadAsAsync<IEnumerable<MvcNotesModel>>().Result; return View(notesList); }
0
2a8bef06d3fccea79a3a73ef365d28e0
750e8994cae662ea8e9924a67f0a8002
Gasim pretul unei rezervari
def get_pret(rezervare): if len(rezervare) == 0: return 0 return rezervare[3]
1
ccfdf031f2e1e5949c5c07a59d786ea3
899b8a9eb646a537166c6a4567da1ff0
overwrite the yoast og image to use imgix as the domain
function convergence_jetpack_alter() { add_filter('jetpack_open_graph_image_width', 'convergence_jetpack_width'); add_filter('jetpack_open_graph_image_height', 'convergence_jetpack_height'); }
0
9827f59ac3ee2b89d5e41842b04c10bc
50662807b9fd7c6bfebea16f47257936
Gets all elements of a object store.
List<E> getAllElements() throws OperationException;
1
5ae230f4be90d017de1ab51e9ce26f84
d52d6353399bc203e6009a3ae717b354
\brief Initializes Temperature sensor I2C pins.
void TempSensor::tempSensorInitialize() { if (!isInitialized) { mcp3004Setup(PIN_BASE, SPI_CHAN); isInitialized = true; } }
0
d705e00b02de3682dd2498d4e50dc267
9ed599d04b4f6b0bc6b367fe6808af14
Forward select mode to cells
this.selectCellForEvent = (...args) => { const [cell] = args; if (this.isPart(cell)) { args[0] = this.model.getParent(cell); mxGraph.prototype.selectCellForEvent.call(this, args); return; } mxGraph.prototype.selectCe...
1
01de3fc389cb34d06722a1eeb11c5aa0
6a15e5d20a210ae4bad7bd8fe3014f25
获得商品已添加属性中 属性类型为单选属性(即可选规格)的商品属性列表
{ TdProductAttributeCriteria sc = new TdProductAttributeCriteria(); sc.setFlag(false); sc.setStatus((byte)1); List<TdProductAttribute> attrList = tdProductAttributeService.findBySearchCriteria(sc); List<TdProductTypeAttribute> typeAttrList = tdProductTypeAttributeService.findByTypeId(typeId); if(null != at...
0
ca45e30f392bacb782d099fe42129517
d3608e5ef4b37544a40bec78037aefd1
Remove where...<br /> 移除满足条件的成员,并最终返回筛选后的结果
namespace System.Linq public static partial class ExtenIEnumerable public static void RemoveWhere<Obj>(this ICollection<Obj> List, Func<Obj, bool> Del) { #region 本地函数 #region 适用于IList void RemoveIList(IList<Obj> list) { var index = list.PackInd...
0
d9cdd89acae8395c81a814efe389c7e6
93e03251a299e00a6be9e51d6541c1da
查询车次途径站点列表
public class RetrofitUtil @POST(DataUtil.ShuttlePointProList) Observable<ShuttleProList> inquireShuttlePointProList();
1
49f90aeb37bd178f3a4c77bb2a119f8a
e7f12ebdbe1cd68401ed60ee51a4cab8
Este metodo plotea solo la estacion que le pasemos como argumento
{ $sql="select a.*,b.Nombre as Estado, c.Nombre as Ciudad, d.Nombre as Zona,e.Nombre as Pais from t_planesunicos as a left join estados as b on a.estado=b.id and a.pais=b.idPais left join ciudades as c on c.id=a.ciudad and c.idEstado=b.id LEFT JOIN zonas as d on d.id=a.zona LEFT JOIN paises as e on e...
0
875775549b0d5a315edc8419d606a67f
a5440af51b0d1f916c6f892491dbe628
This refreshes all matchups in the grid to take into account changes input by the user
namespace TrackerUI public partial class TournamentViewerForm : Form private void matchupListBox_SelectedIndexChanged(object sender, EventArgs e) { LoadMatchupInfo(); }
0
d12c9e7af6c220f07af6aa4f3df3d168
7337fba8907d5e311211fefd96f8fdb6
Creates a window and widgets for editing the pre-made characters. This is only for the Remastered version of the ROM.
self.dir_box.destroy() self.char_folder_button.destroy() self.convert_btn.destroy() root.update() self.filename_dict, self.max_width, self.max_height = mugenrivals.main(self.folder_name.get()) self.character_creation_screen()
0
fac02f70a9069a1202fbc444f2bd3ad3
024fc87e461830fc34a5f32576406081
初始化头部横向滑动条
var scroll = new window.BScroll(header_hooks, { scrollY: false, scrollX: true, probeType: 3, click: true }); }
1
12b57f351c51557126a0e7a5fa6a2f39
5aef6c66efeb572c75c109d9ce74c773
Returns a generator of consonant-vowel-consonant pseudo-word.
class PronounceableGenerator(WordGenBase): def data(self): if not self._syllables: self._syllables = map(''.join, itertools.product(initial_consonants, vowels, fi...
1
abb28ac8ae41195a8dfd70f263f0ce3d
570e99a67e458ae55f4b2d6ef6412741
记录总流量
if($num>=0){ $sign="+"; }else{ $sign=""; } $date=date("Y-m-d",time()); if($this->check_valid($e_id,$date)){ $sql=<<<ECHO UPDATE "T_User_record" SET record_add_tm=record_add_tm {$sign} {$nu...
0
fe013011cf9da4f2c1c05c28a06af2be
b028de7283178c731efe6137743b3c5b
updates the costs for the entire population
double [] tmp = new double[POP_SIZE]; for (int i = 0; i < POP_SIZE; i++) { tmp[i] = getValue(pop[i],coefs); } fitness = tmp; }
1
57fd5411e7fad51c1de87ed2925d2089
97ae5d64e82eca878bbcc708a890b386
Removes the ith "pointProperty" element
void removeNameElement(int i);
0
034a91d14a41f23a1b96767bf9725d98
e758dd60e072e51534d10ec09b55db60
Insert a row into the parameter_file table for the provided FileID,
(_, rFile) = self.relationFile(relId) if rFile: tupleId = rFile.insertTuple(tupleData) return tupleId
0
1ad8be9898fcd4313779ad8e7124b0f1
d58386ad9488afea4213e53d94cb29aa
Make reuse model.
EList<COREModelReuse> getModelReuse();
0
9dbe71e34f0683153a65ca5cf39252dd
d3951121d8abc3d901bc460b3ef5f348
指定日志文件路径。
public class LogData public String getFilePath() { return this.FilePath; }
0
8e7367afd52281f6896069313ef84644
6ea1731387b564ec72d0cd1df0e3cdba
Don't let logged in users sign up again
LoggerRegistry::debug('UserIntegrationModule::signUpController()'); if ($this->getEngine()->getUserManager()->isLoggedIn()) { return new RedirectResponse(UrlUtilities::getReturnUrl($request)); } $view['form-key'] = $this->config('sign-up.form.key'); return null; }
1
c5b20f269898262fab6a387f10a71ff0
22d128912079c9791497fd668c760806
Create an instance of {@link InsertRecsIntoCRMExtWebFormRequest }
@XmlRegistry public class ObjectFactory public NewSubscriberExtRequest createNewSubscriberExtRequest() { return new NewSubscriberExtRequest(); }
0
fa9f1bfd2ed0502345c58694b31ddf11
7952845e8fb5b2baf7828a5e8a737942
Constructor para la clase Limpiador de texto
class limpiadorTexto: def __init__(self): self.dirname = ''
1
1bd3eaf62084dba211a1186e5de97a40
be01c9655d3e1475cf1bf72f810ee40b
从被删除节点的父亲开始重平衡AVL树
public class AVLTree<E> extends BBST<E> @Override protected void afterRemove(Node<E> node, Node<E> repalcement) { while ((node = node.parent) != null) { if (isBalanced(node)) { updateHeight(node); } else { rebalance(node); } } }
1
ff1c57fb3882e38e25933f4fb51e64d3
b132773e138b7ce9b240f72a44b41eb4
检查Item(工种)是否全部被选中
var k = 0; var oInput = document.getElementsByName("ItemC"); for ( var i = 0; i < oInput.length; i++) { if (oInput[i].checked == false) { k = 1; break; } } if (k == 0) { document.getElementById("recordCheckAllC").checked = true; } else { document.getElementById("recordCheckAllC").checked = false; }...
1
7089689bf1f3ff4814afd2acd79275f7
dccf9f6e8ef85465841349d1f7614106
获取已知卫星的频率带宽
class BFT(Base): def get_fre_band_arr(self): fn = self._lib['bftObj_getFreBandArr'] fn.argtypes = [POINTER(OpaqueBFT)] fn.restype = c_void_p p = fn(self._obj) ret = np.frombuffer((c_float * self.num).from_address(p), np.float32).copy() return ret
1
f2ae8b36b8abef7e7740bfe57a7d4cd8
a4cfff7bc404c8e53d28e12e732d5311
在屏幕上创建一个新的字母
function createLetter() { var letter = {}; letter.dom = document.createElement("div"); letter.dom.className = "letter"; divLetterContainer.appendChild(letter.dom); var maxLeft = divLetterContainer.clientWidth - 100; letter.left = getRandom(0, maxLeft); letter.top = -100; letter.value ...
1
69036b90db221328d7ba7f3b65222197
00961c3e95bee251baf6de7f55c16402
will be left with 'year-month-day hour-minute-second'
def date_format(dt): t = time.strptime(' '.join(dt), '%d/%m/%Y %H:%M:%S') return (t.tm_year, t.tm_mon, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec)
1
4c57dd453dd61ee68f994b015864f049
09affbdaa1913955abcb11bd0dd906ff
Zwraca czy istnieje błąd niepozwalający na poprawne wypchnięcie zmian.
class DataManager public static get penalties(): boolean { return this.setting.penalties; }
0
0bb42656015412f5e97883a4d9f63cd2
5719bfac2cd754793ee2e1190ac5f6bf
Gets the number of ship cells left.
int AmountOfShip = 0; for (Ship ships : board.getShips()) { if (ships.getIsAlive()) { AmountOfShip++; } } return AmountOfShip; }
0
70c88259f1a4bd8f3c2f898b99f7c5fc
de1158ae0ac3af178ee4b67f12cc3239
This function will append evaluation metrics for each model type, target variable, and metric type, along with the metric value into our eval_df data frame object.
y_pred_prob = classifier_model.predict_proba(X_eval)[:,1] y_pred = classifier_model.predict(X_eval) y_loss = log_loss(y_eval, y_pred_prob) y_auc = roc_auc_score(y_eval, y_pred_prob) y_auc_ci = compute_metric_ci_by_bootsrap(roc_auc_score, y_eval, y_pred_prob) y_bac = balanced_accuracy_score(y_eval, y_pred) y_bac_...
0
91dbbf7053da62a07d46fdce2e030c26
4530ceff3c398de28126244d83b6fee7
Take the intersection of two Counting Bloom Filters
{ byte[] small, big; big = _bits.Length > other._bits.Length ? _bits : other._bits; small = _bits.Length > other._bits.Length ? other._bits : _bits; byte[] newbits = (byte[])small.Clone(); for (int i = 0; i < small.Length; i++) newbits[i] &= big[i]; OrdinalList result = new OrdinalList(...
1
14bac9fa4395d82d588350e053f42e49
8d53e2be972dbc20dd4ddfdde1cb35b3
Decrypt encrypted data using a provided cipher context
def decrypt(data, dec_func_name, ctx): data = ctx.call(dec_func_name, data) logger.info(data) return data
1
c83bfeb212391b1a5487c82eee2212ac
70a6a084a4dc4a588bb0bd49e7dd370c
批量更新(首页分类名称关联产品分类)信息
@RequestMapping("ybcat") @Controller @ResponseBody public class GoodsClassifyController @RequestMapping("/productCategoryBatchEdit") public Map<String, Object> productCategoryBatchEdit(HttpServletRequest request) { String category_list = request.getParameter("category_list"); return goodsClassifySer...
1
a08d199168b97a898eb6b41dee2cf873
464520d0bf1385cc5afdfa9ea54aeae5
Get the current floor height from object's transformation
namespace AppData.Warehouse ObjectTransformation[] GetFloor();
0
5b23eccaa3a283288d1fb7a26522faae
35310711c39f70cc8fccc64d28cdcb1c
Helper function to write the full (noisy) simulate dataset to an H5 file.
env_list = self.specs['sim_envs'] tb_specs = self.specs[tb_type] results_dir = tb_specs['results_dir'] os.makedirs(results_dir, exist_ok=True) fname = os.path.join(results_dir, 'data.hdf5') with h5py.File(fname, 'w') as f: for key, val in self._constants.items...
1
3268e9de8f32c9c93c1cea107ed60e50
c200b83183ed3ee0e3b0e9354e878ea8
Add a command module from a <see cref="Type" />.
namespace Lab.Lib public class CommandManager public static void AddCommand(Type type) { if (type.IsDefined(typeof(CommandAttribute), false)) { var ctor = type.GetConstructor(Type.EmptyTypes); if (ctor != null) { var...
1
01b59ba950bb552e046bcc22ab6f3a7e
3a60447f00990c7b4f72ccc53ea7419b
State will include (i) joint angles and (ii) joint velocities
rigid2d::WheelVelocities rigid2d::DiffDrive::getJointStateFeedforward() const { WheelVelocities jointstates; jointstates.w_left=angle_left; jointstates.w_right=angle_right; return jointstates; }
0
6061661f917d72262cb9c689f7c11552
30ff0a17f319f73f0e9e5a5b4f7e5ed5
Retrieves advertisers with the IDs specified in [advertiserIDs], from the topology or the stubs database. For each ID It will always check the topology first. Therefore, if the topology contains a node a specified ID and the stubs database includes a stub with the same ID, then the node from the topology will be used. ...
throws XmlRpcException, IOException { return vectorToArrayMaps(execute( PUBLISHER_ADVERTISER_STATISTICS_METHOD, id, startDate)); }
0
87d363ce24bb45902b014a72d114995c
56d688daff2010a7c0d9435ddcded2c2
Method used to get the list of custom fields associated with a given project.
namespace CSJSONBacklog.API IEnumerable<CustomField> GetCustomFieldList(string projectIdOrKey);
1
bd96193e33ab193da5b1d2021179d158
4944c56f4ecf3bbab699a714edaacd91
localStrageが利用できるかどうかを判別
for(int i = 0; i < Utils.localEXList.Count; i++) { if (str[0].Equals(((string[])(Utils.localEXList[i]))[0])) { return true; } } return false; }
0
73737b19d413e892caa39d668a206531
f2896f3ebdb6746544cf2c4f832e40f1
Retourne de façon formatté les instructions JS
class CoreProfiler protected function getJavaScript() { return implode("\n", array( 'function meeliaProfilerShow(profile_id){', ' element = document.getElementById(\'meelia_profiler_detail_\' + profile_id);', 'console.log(element);', '', ' var pa...
1
fc564f0e113cea1356345703b903a8d6
0825a8f9cf276c307061c8b2fa9daafa
Imprime la petición en el formato estándar. Es llamado desde el método __toString de la petición y su formato de salida es igual a como se debe introducir la petición en la barra de direcciones del navegador: Cadena de texto con la salida estándar de la petición.
class HttpRequest implements IHttpRequest public function toString() { return $this->_method.' '.$this->_uri; }
1
86b52b13a807c42b5809f83a1dabdc21
1a93ee44e8a2d5b2a8ce2966c481e24b
Setter for <code>order.BalanceVip.remains</code>. 当月余额
public class Apl0004s05ParamDto extends ParamBaseDto public void setRemainderAmount(BigDecimal remainderAmount) { this.remainderAmount = remainderAmount; }
0
8004034e67f94bcf671fd7ca0acd2723
ec42b14fe8529f5e29277d6380401d6a
布尔条件初始化为false
listFlag = new ArrayList<Boolean>(); int len = allResult.size(); for (int i = 0; i < len; i++) { listFlag.add(false); } }
1
297ed6371ff45ab1d239b0b36013b87e
c7d488bdf91f7525991d1135e711d9c7
öğrenci idsine göre öğrenciyi ait ekinliği siler
{ $this->validate($request, [ 'lecture_id' => 'required|integer|min:1|exists:lectures,id' ]); $trainee = Trainee::find($id); if ($trainee) { $trainee->Lecture()->detach($request['lecture_id']); return redirect()->route('attendance.index')->with('alert-class', 'alert-success')->with('message', 'Do...
0
07d32525b3f4bf4ca7b6a40a369b3d86
e2fe7c136f82f88902ccac75e242b39b
Callback executed when there is a redis error.
public function onError($client);
1
affb1c6cf1b8c738ce7d626b374d46cc
228e4bdbc35e6137c9adee749464590d
Subscribes to the joined world event.
{ $this->webSocket->promiseSession()->then(function (ClientSession $session) { $session->subscribe(self::EVENT_INCOMING_JOIN, function($_, $args) { if (!isset($args->playerName) || strlen($args->playerName) < 3) { return; } $thi...
1
2d59923fe89280240aebba00a680fe07
32dc8d913d300ef2655313bc9b9e33b3
Reads a single word from a file assuming SPACE + TAB + EOL to be word boundaries
{ static char word[MAX_INPUT_LENGTH] = "\0\0\0\0\0\0\0"; char *pword = NULL; char cEnd = '\0'; if (DEBUG > 2) log_info("called %s with %08zx", __PRETTY_FUNCTION__, (size_t)fp); do { cEnd = getc(fp); } while (isspace(cEnd)); if (cEnd == '\'' || cEnd == '"') { p...
1
fec469735d25679189679b233b892397
222694fb6648731b253faa6a8cbe708d
Get Print Parameter
namespace FRB.Web.Areas.Company.Controllers [OutputCacheAttribute(VaryByParam = "*", Duration = 0, NoStore = true)] public class RegistrationController : Controller [HttpPost] public JsonResult GetPrintingCharges() { CommonSetting commonsetting = new CommonSetting(); comm...
1
e7ab1e595d094bb62cb9e8d60c1cd95e
59383eec0f9fa01a2442ffe03bb143fa
Transpose the upper 3x3 part and zero the rest. For building the normal matrix from the inverse of model matrix.
{ m_m4[0] = (m_m1[0]*m_m3[33]+m_m1[10]*m_m3[13]-m_m1[15]*m_m3[3]-m_m1[5]*m_m3[23]); m_m4[5] = (m_m1[0]*m_m3[63]+m_m1[10]*m_m3[43]-m_m1[20]*m_m3[3]-m_m1[5]*m_m3[53]); m_m4[10] = (m_m1[0]*m_m3[83]+m_m1[15]*m_m3[43]-m_m1[20]*m_m3[13]-m_m1[5]*m_m3[73]); m_m4[15] = (m_m1[0]*m_m3[93]-m_m1[10]*m_m3[73]+m_m1[15]*m_m3[53]-m...
0
06b07722af2313fe6a4efcc5dc7108c5
7540774785d5832359368e7369fb49ff
Returns a Device with a vetu ploye field. tinctures: a list of exactly two tinctures. The outer sections are the 0th tincture, and the inner lozenge is the 1st tincture. location: a Rect representing the location on the screen of the vetu ploye portion of the field. For a vetu ploye field on the full shield, the Rect s...
arcade.draw_point(x, y, arcade.color.RED, 5) arcade.draw_circle_filled(300 + x, 200 + y, 60, arcade.color.RED_DEVIL) arcade.draw_circle_filled(300 + x, 280 + y, 50, arcade.color.WHITE) arcade.draw_circle_filled(300 + x, 340 + y, 40, arcade.color.ROYAL_BLUE) arcade.draw_circle_filled(285 + x, 350 + y...
0
3c5d215d25ff2306b664f7db7404ae0c
d02fd79e83129942dd8bf071441d722e
Get nrolegajo.
class clsTramiteAsignatura{ private function getmaterno(){ return $this->materno; }
0
536d243445b9ce3838a53cfad6f27010
42d5cbbc35c29710c0dceba501e809a5
初始化坦克状态
namespace GameSystem.OnlineGame public class OnlineTankManager : Photon.MonoBehaviour public void InitTank() { isMine = photonView.isMine; playerColor = new Color(PlayerPrefs.GetFloat("colorR"), PlayerPrefs.GetFloat("colorG"), PlayerPrefs.GetFloat("colorB")); ChangeColor....
1
f34d7648eaf87db663c79ea80033830b
76951f8ecaa71336cdcb17475966cda5
Get recurrence end date.
try { if (originalEvent.getRepeatUntilDate() != null) { return originalEvent.getRepeatUntilDate(); } if (originalEvent.getRepeatCount() <= 0) { return null; } DateTime ical4jEventFrom = new DateTime(originalEvent.getFromDateTime()); VEvent vevent = new VE...
1