seed
stringlengths
1
14k
source
stringclasses
2 values
pub env: Option<String>,
ise-uiuc/Magicoder-OSS-Instruct-75K
of(new Usuario(1, 'usuario test', '123456')) ); fixture.detectChanges(); }); it('should create', () => { expect(component).toBeTruthy(); }); it('deberia actualizar un usuario', waitForAsync(() => { component.actualizar = true; component.idDocumento = '123456'; spyOn(usuarioService, 'actualizarUsuario').and.returnValue( of() );
ise-uiuc/Magicoder-OSS-Instruct-75K
for rel in to_one_path.relations ] dst_id_for_each_relation = [ self.dataset.tables[rel.dst].df[rel.dst_id].values for rel in to_one_path.relations ] src_is_unique_for_each_relation = [
ise-uiuc/Magicoder-OSS-Instruct-75K
function createDb(PDO $pdo) { $dbName = getEnvFile()->get('DB_NAME'); $sql = "CREATE DATABASE {$dbName}"; $pdo->exec($sql); } function useDb(PDO &$pdo) { $dbName = getEnvFile()->get('DB_NAME'); $sql = "USE {$dbName}"; $pdo->exec($sql); }
ise-uiuc/Magicoder-OSS-Instruct-75K
}; export default I;
ise-uiuc/Magicoder-OSS-Instruct-75K
NODE_IP = '127.0.0.1' NODE_PORT = '9718' NODE_USER = 'testuser' NODE_PWD = '<PASSWORD>' STREAM_SMART_LICENSE = 'smart-license' STREAM_SMART_LICENSE_ATTESTATION = 'smart-license'
ise-uiuc/Magicoder-OSS-Instruct-75K
echo 'now type out /flag.txt and press enter' (cat shellcode.bin; cat) | ../main.py
ise-uiuc/Magicoder-OSS-Instruct-75K
header('Access-Control-Allow-Origin: *'); $response = array("error" => false); if (isset($_POST['carpeta']) && isset($_POST['idTutor'])) { $directorio='picts/usr/'.$_POST['idTutor']; if(is_dir($directorio) ){ $directorio=$directorio."/".$_POST['carpeta']; if(!is_dir($directorio) ){ mkdir($directorio, 0777); http_response_code(200); $response["error"] = false;
ise-uiuc/Magicoder-OSS-Instruct-75K
def run(self, context): #include context a_sum = context["aSum"] #to extract from shared dictionary print(f'a_sum = {a_sum}') def __call__(self, context): self.run(context) #to run the function
ise-uiuc/Magicoder-OSS-Instruct-75K
result_1 = result_1 & cond_undefined.cast_to(Type.int_32) result_2 = result_2 & cond_undefined.cast_to(Type.int_32) self.put(result_1, "d{0}".format(self.data['c']+1)) self.put(result_2, "d{0}".format(self.data['c']))
ise-uiuc/Magicoder-OSS-Instruct-75K
'responsabilidadCivil' => $faker->dateTimeBetween($startDate = '-1 years', $endDate = 'now'), 'id_user' => function () { return factory(App\Modelos\User::class)->create()->id; } ]; }); $factory->define(App\Modelos\Cliente::class, function (Faker\Generator $faker) {
ise-uiuc/Magicoder-OSS-Instruct-75K
object: &mut smithy_json::serialize::JsonObjectWriter, input: &crate::model::CreateExperimentTemplateActionInput, ) { if let Some(var_48) = &input.action_id { object.key("actionId").string(var_48); } if let Some(var_49) = &input.description { object.key("description").string(var_49); } if let Some(var_50) = &input.parameters { let mut object_51 = object.key("parameters").start_object(); for (key_52, value_53) in var_50 { { object_51.key(key_52).string(value_53);
ise-uiuc/Magicoder-OSS-Instruct-75K
high=np.array( [23.0, 6.0, 50.0, 1500.0, 100.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0, 40.0]), dtype=np.float32) def reset(self): self.time_step_idx = 0 self.reward = 0.0
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Represents a property definition in a class. */ export default class PropertyDef extends CachableJelNode { constructor(position: SourcePosition, public name: string, public type?: JelNode, public defaultValueGenerator?: JelNode, public isNative = false, public isOverride = false, public isAbstract = false) { super(position, type ? (defaultValueGenerator ? [type, defaultValueGenerator]: [type]) : (defaultValueGenerator ? [defaultValueGenerator] : [])); } // override executeUncached(ctx: Context): JelObject|Promise<JelObject> { return Util.resolveValue(this.type && this.type.execute(ctx), (type: any)=>BaseTypeRegistry.get('Property').valueOf(this.name, type, this.defaultValueGenerator ? new LambdaExecutable(this.defaultValueGenerator) : undefined, this.isNative, this.isOverride, this.isAbstract), );
ise-uiuc/Magicoder-OSS-Instruct-75K
'x_' + args.model + '_bi_dir_{}'.format(args.bi_dir)+ '_preselect_{}'.format(args.preselect) + noise_str + 'lr=' + str(args.lr) + '_bs=' + str(args.batch_size) + '_loss_type='+args.loss_type + '_epochs=' + str(args.num_epochs)) args.exp_dir = pathlib.Path(args.exp_dir+'_uuid_'+uuid.uuid4().hex.upper()[0:6])
ise-uiuc/Magicoder-OSS-Instruct-75K
// The identity functions are used to parse the stored identity buffer
ise-uiuc/Magicoder-OSS-Instruct-75K
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DWITH_LIBWRAP=0 \ -DMYSQL_UNIX_ADDR=/data/mysql/mysql.sock \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \
ise-uiuc/Magicoder-OSS-Instruct-75K
} } public class RandomRange { private float _min; private float _max; public RandomRange(float min, float max) { _min = (min < max) ? min : max; _max = (min < max) ? max : min; }
ise-uiuc/Magicoder-OSS-Instruct-75K
impl Img { pub fn new(file: &PathBuf) -> Self { Img { file: file.clone() } } // pub fn from<'a>(file: &'a str) -> Self { // Self::new(&PathBuf::from(file)) // } pub fn edit(&self) -> Result<ImgEdit> { ImgEdit::load(self) }
ise-uiuc/Magicoder-OSS-Instruct-75K
body='Hello world' # 发送的内容 )
ise-uiuc/Magicoder-OSS-Instruct-75K
use xorf::{Filter, Fuse16}; const SAMPLE_SIZE: u32 = 500_000; fn from(c: &mut Criterion) { let mut group = c.benchmark_group("Fuse16"); let group = group.sample_size(10); let mut rng = rand::thread_rng(); let keys: Vec<u64> = (0..SAMPLE_SIZE).map(|_| rng.gen()).collect(); group.bench_with_input(BenchmarkId::new("from", SAMPLE_SIZE), &keys, |b, keys| { b.iter(|| Fuse16::try_from(keys).unwrap());
ise-uiuc/Magicoder-OSS-Instruct-75K
return null; } @Nullable @Override public String getLineText(int line, Editor editor) {
ise-uiuc/Magicoder-OSS-Instruct-75K
'task': 'NER',
ise-uiuc/Magicoder-OSS-Instruct-75K
os.mkdir(DATA_DIR, 0o777) Harvest.crawl() if __name__ == "__main__": main()
ise-uiuc/Magicoder-OSS-Instruct-75K
urlpatterns = [ path('', views.analytics, name='analytics'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
[StructLayout(LayoutKind.Sequential, Size=16, Pack =1), ApiHost] public readonly struct AsmText : IAsmText<AsmText> { public static string format(AsmText src) { Span<char> dst = stackalloc char[(int)src.Source.Length];
ise-uiuc/Magicoder-OSS-Instruct-75K
{ const QModelIndex prevIndex = previousModelIndex(); m_todoTreeView->selectionModel()->setCurrentIndex(prevIndex, QItemSelectionModel::SelectCurrent
ise-uiuc/Magicoder-OSS-Instruct-75K
Sort sort = new Sort(Sort.Direction.ASC,"sort").and(ssort); Pageable pageable = new PageRequest(start, size, sort); Page<BsBooksubject> pageFromJPA = bsBooksubjectDAO.findAll(pageable); return new Page4Navigator<>(pageFromJPA,navigatePages); }
ise-uiuc/Magicoder-OSS-Instruct-75K
pitch: 2, yaw: 3, }; let output: Vec<u8, 8> = to_vec(&interactive).unwrap(); let back: Interactive = from_bytes(output.deref()).unwrap(); assert_eq!( back, Interactive { throttle: 0, roll: 1, pitch: 2, yaw: 3, }
ise-uiuc/Magicoder-OSS-Instruct-75K
} } auto mask = f.sparkledBitFrame(); mx.show(mask); delay(25); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
# Sorted for clarity common_locations = sorted(list(common_locations)) for common_location in common_locations: # Get data and labels X, y = location_features_dict[common_location], labels[common_location] X, y = np.array(X), np.array(y) # Eliminate last days to match labels.shape X = X[:-(lead_days + days_window)]
ise-uiuc/Magicoder-OSS-Instruct-75K
def dump_policy(p): assert p.__class__.__name__ == 'iam.Policy', repr(p.__class__.__name__) return p.arn, { 'create_date': p.create_date, 'path': p.path, 'policy_id': p.policy_id, 'policy_name': p.policy_name,
ise-uiuc/Magicoder-OSS-Instruct-75K
return n.to_bytes(1, byteorder='big')
ise-uiuc/Magicoder-OSS-Instruct-75K
class Solution: def smallestDivisor(self, nums: List[int], threshold: int) -> int: def condition(divisor) -> bool: return sum((num - 1) // divisor + 1 for num in nums) <= threshold lo, hi = 1, max(nums) while lo < hi: mid = lo + (hi - lo) // 2 if condition(mid): hi = mid
ise-uiuc/Magicoder-OSS-Instruct-75K
// Use recording to get started writing UI tests. // Use XCTAssert and related functions to verify your tests produce the correct results. } }
ise-uiuc/Magicoder-OSS-Instruct-75K
result.append(retval) if max_num_results is not None and len(result) >= max_num_results: return result return result
ise-uiuc/Magicoder-OSS-Instruct-75K
"binary_coding_scheme": GIAI.BinaryCodingScheme.GIAI_96,
ise-uiuc/Magicoder-OSS-Instruct-75K
import UIComponents extension TimePicker: TaskParameterEditorInput { var container: TaskParameterEditorOutput? { get { return nil } set {} } var onChangeHeight: ((CGFloat) -> Void)? { get { return nil } set {} }
ise-uiuc/Magicoder-OSS-Instruct-75K
} if($_REQUEST['godown_id'] > 0) {
ise-uiuc/Magicoder-OSS-Instruct-75K
} #[async_trait] impl data_controller::Create<InputInfo> for InputController { /// Creates the controller.
ise-uiuc/Magicoder-OSS-Instruct-75K
NBPKGINFO_MAINTAINER = 1000 NBPKGINFO_HOMEPAGE = 1020 NBPKGINFO_COMMENT = 1000 NBPKGINFO_LICENSE = 1000 NBPKGINFO_VERSION = 1001 NBPKGINFO_RELEASE = 1002 NBPKGINFO_DESCRIPTION = 1005 NBPKGINFO_LONG_DESCRIPTION = 1005 NBPKGINFO_OS_VERSION = 1000 NBPKGINFO_COPYRIGHT = 1014
ise-uiuc/Magicoder-OSS-Instruct-75K
.flat_map(|&row| row.split_whitespace()) .map(|tile| tile.parse().unwrap()) .collect::<Vec<i64>>() }) .collect(); let mut scoreboard = boards
ise-uiuc/Magicoder-OSS-Instruct-75K
For the given board position 'state' returns the player who has won the game
ise-uiuc/Magicoder-OSS-Instruct-75K
return {'pd_raw_data': data_df[['weight', 'height']]} @require('pd_raw_data') @will_generate('pandas_hdf', 'pd_raw_data_append', append_context='append_functions')
ise-uiuc/Magicoder-OSS-Instruct-75K
_context.Channels.Add(model); } else { model = await _context.Channels .Include(c => c.Tags) .FirstOrDefaultAsync(c => c.Id == channel.Id); } model.ApplyEditChanges(channel);
ise-uiuc/Magicoder-OSS-Instruct-75K
package com.spring.pontointeligente.api.repositories; import com.spring.pontointeligente.api.entities.Empresa;
ise-uiuc/Magicoder-OSS-Instruct-75K
def coin_omp(): call(['mpirun', '-np', '1', 'coin_flip_omp', config['monte_carlo']['threads']]) def draw_seq(): call(['mpirun', '-np', '1', 'draw_four_suits_seq']) def draw_omp():
ise-uiuc/Magicoder-OSS-Instruct-75K
TargetTableComponent, TargetCardComponent, LongTargetCardComponent, GeneDetailsComponent, InteractionDetailsComponent, DiseaseAssociationDetailsComponent, KnowledgeMetricsComponent ] }) export class TargetTableModule { }
ise-uiuc/Magicoder-OSS-Instruct-75K
} export default app;
ise-uiuc/Magicoder-OSS-Instruct-75K
'security/ir.model.access.csv', 'views/report_view.xml', 'views/qrcode_label.xml', 'views/library_data.xml', 'views/library_view.xml', 'views/library_sequence.xml', 'views/library_category_data.xml', 'data/library_card_schedular.xml', 'wizard/update_prices_view.xml', 'wizard/update_book_view.xml', 'wizard/book_issue_no_view.xml', 'wizard/card_no_view.xml'], 'demo': ['demo/library_demo.xml'], 'image': ['static/description/SchoolLibrary.png'],
ise-uiuc/Magicoder-OSS-Instruct-75K
values = tf.get_collection(value_collection) return dict(zip(keys, values))
ise-uiuc/Magicoder-OSS-Instruct-75K
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '<KEY>'
ise-uiuc/Magicoder-OSS-Instruct-75K
from time import sleep
ise-uiuc/Magicoder-OSS-Instruct-75K
import { State, AuthState } from './auth.state'; export const getIsAuthorized = (state: State): AuthState => state.isAuthorized; export const getPermissions = (state: State): string[] => state.permissions; export const selectAuthState: MemoizedSelector<object, State> = createFeatureSelector<State>('auth'); export const selectIsAuthorized: MemoizedSelector<object, AuthState> = createSelector(selectAuthState, getIsAuthorized); export const selectPermissions: MemoizedSelector<object, string[]> = createSelector(selectAuthState, getPermissions);
ise-uiuc/Magicoder-OSS-Instruct-75K
recognizer = speechsdk.translation.TranslationRecognizer( translation_config=self.config, audio_config=audio_config, )
ise-uiuc/Magicoder-OSS-Instruct-75K
graphics = 'k'; } ~Knight() {} virtual bool attack(Unit&) override; virtual Knight* duplicate() override;
ise-uiuc/Magicoder-OSS-Instruct-75K
body = {'name': u'yaql ♥ unicode'.encode('utf-8')} req = self._post('/environments', json.dumps(body)) result = req.get_response(self.api)
ise-uiuc/Magicoder-OSS-Instruct-75K
} else {
ise-uiuc/Magicoder-OSS-Instruct-75K
datasets.push_back(numbers); } } std::vector<double> Memory::do_run_generation() { auto & _datasets = datasets;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.filterIp = filterIp self.ipFilterId = ipFilterId self.memo = None
ise-uiuc/Magicoder-OSS-Instruct-75K
runTestSuite({ name: 'removeAll', cases: removeAllCases, func: removeAll });
ise-uiuc/Magicoder-OSS-Instruct-75K
let fromX: CGFloat let toX: CGFloat let animationDuration: TimeInterval
ise-uiuc/Magicoder-OSS-Instruct-75K
// // UIStoryboard+Func.swift // Pods // // Created by Philip Fryklund on 17/Feb/17. // // import UIKit
ise-uiuc/Magicoder-OSS-Instruct-75K
try await insertFinalDataThenWriteResponse(response: response)
ise-uiuc/Magicoder-OSS-Instruct-75K
for k, v in sorted(vars(args).items()): comment = '' default = parser.get_default(k) if v != default: comment = '\t[default: %s]' % str(default)
ise-uiuc/Magicoder-OSS-Instruct-75K
export { create } from './dist/interpret';
ise-uiuc/Magicoder-OSS-Instruct-75K
$test_dump_yaml = __DIR__ . '/metadata/test_dump.yaml'; $fsys = new Filesystem(); $fsys->copy($this->getYamlFilename(MetadataTestCase::METADATA_NEW), $test_dump_yaml, true); $cmd = $this->app->find('metadata:dump'); $tester = new CommandTester($cmd);
ise-uiuc/Magicoder-OSS-Instruct-75K
Test.assert_equals(make_negative(42), -42)
ise-uiuc/Magicoder-OSS-Instruct-75K
NeonHelper.WaitFor(() => processId != null, timeout: TimeSpan.FromSeconds(15), pollInterval: TimeSpan.FromMilliseconds(150)); } catch (TimeoutException e)
ise-uiuc/Magicoder-OSS-Instruct-75K
fileprivate lazy var pageTitleView : PageTitleView = {[weak self] in let frame = CGRect(x: 0, y: kStatusBarH + kNavigationBarH, width: kScreenW, height: kTitleViewH) let titles = ["推荐", "游戏", "娱乐", "趣玩"] let titleView:PageTitleView = PageTitleView(frame: frame, titles: titles)
ise-uiuc/Magicoder-OSS-Instruct-75K
# A subsample offset between two signals corresponds, in the frequency # domain, to a linearly increasing phase shift, whose slope # corresponds to the delay. # # Here, we build this phase shift in rotate_vec, and multiply it with # our signal. rotate_vec = np.exp(1j * tau * omega) # zero-frequency is rotate_vec[0], so rotate_vec[N/2] is the # bin corresponding to the [-1, 1, -1, 1, ...] time signal, which # is both the maximum positive and negative frequency.
ise-uiuc/Magicoder-OSS-Instruct-75K
def set_trafficType(self, trafficType): self.add_param('trafficType', trafficType) def get_vpcId(self): return self.get_params().get('vpcId') def set_vpcId(self, vpcId): self.add_param('vpcId', vpcId)
ise-uiuc/Magicoder-OSS-Instruct-75K
return dequeueReusableCell(withReuseIdentifier: typeString, for: indexPath) as! Cell }
ise-uiuc/Magicoder-OSS-Instruct-75K
public SleepStartEvent(Long resourceId, Duration sleepDuration, LocalDateTime failUntil, Promise<AcceptResult> accept) { this.resourceId = resourceId; this.sleepDuration = sleepDuration; this.failUntil = failUntil; accepted = accept; } public static SleepStartEvent neverFail(Long resourceId, Duration sleepDuration) {
ise-uiuc/Magicoder-OSS-Instruct-75K
return batch, label def get_data_loader(self): return self.data_loader # """ # also resizes it already in advance for AlexNet # """ # # image_batch = torch.Tensor((batch_size,3,224,224)) #
ise-uiuc/Magicoder-OSS-Instruct-75K
EXPECT_NEAR(initialPosition, initialResultPosition, tolerance); } //----------------------------------- // Move the angle to make sure that Joint::SetPosition works from non-zero // initial values. const double finalPosition = 0.5*initialPosition; if (this->physicsEngine == "bullet" && std::abs(finalPosition) > 1e12) {
ise-uiuc/Magicoder-OSS-Instruct-75K
@using ATL_WebUI.Areas.Identity @using Microsoft.AspNetCore.Identity @namespace ATL_WebUI.Areas.Identity.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
ise-uiuc/Magicoder-OSS-Instruct-75K
Attributes: params: EasyDict. The overall parameters. callbacks: list. The callbacks for the trainer. models: list. All the models will be used and checkpointed. """ def __init__(self, params): """ Args: params: EasyDict. The parameters.
ise-uiuc/Magicoder-OSS-Instruct-75K
client.clone(), ); let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); let pow_block_import = sc_consensus_pow::PowBlockImport::new( client.clone(), client.clone(), Sha3Algorithm::new(client.clone()), 0, // check inherents starting at block 0 Some(select_chain.clone()), inherent_data_providers.clone(),
ise-uiuc/Magicoder-OSS-Instruct-75K
{ /** * @var TagModel[] */ private $tags; /** * @param TagModel[] */ public function __construct(array $tags) { $this->tags = $tags; }
ise-uiuc/Magicoder-OSS-Instruct-75K
* Provides general classes for entities used throughout * the api and to support files, transactions and smart contracts */ package com.hedera.sdk.common;
ise-uiuc/Magicoder-OSS-Instruct-75K
:type cppunit_filter: ``str`` :param listing_flag: Customized command line flag for listing all testcases, "-l" is suggested, for example: ./cppunit_bin -l :type listing_flag: ``NoneType`` or ``str`` :param parse_test_context: Function to parse the output which contains
ise-uiuc/Magicoder-OSS-Instruct-75K
assert value>25.0 assert price>100.0 def test_filter_does_not_return_values(): results = test_db.query_node("thing").filter(c.Property("value") > 25.0).all() assert isinstance(results[0], graff.orm.Node)
ise-uiuc/Magicoder-OSS-Instruct-75K
#print(hemisphere_data)
ise-uiuc/Magicoder-OSS-Instruct-75K
return $this->redirect($url); } else { return $this->renderAjax('export', ['model' => $model,'screenplay' => $screenplay]); } } private function getHtml($model,$notes) { if($notes=="1" || intval($notes)==1) $html = $model->getLastRevision(); else
ise-uiuc/Magicoder-OSS-Instruct-75K
func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
ise-uiuc/Magicoder-OSS-Instruct-75K
docker_count = models.IntegerField(verbose_name=u"Docker设备数量",default=0) vmx_count = models.IntegerField(verbose_name=u"VMX设备数量",default=0) class Meta: verbose_name = u'扫描后的汇总硬件统计信息' verbose_name_plural = verbose_name db_table = 'statisticsrecord'
ise-uiuc/Magicoder-OSS-Instruct-75K
Q=sig[leverage.columns[idx]] Q=Q.loc[i].values.astype(np.float) # Volatility of the views Q Omega=0.1*np.eye(sum(idx)) # Only absolute signals
ise-uiuc/Magicoder-OSS-Instruct-75K
* The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { imageView.image = img } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
class KeyValueStringHandlerTest(ValueStringHandlerTest): """ Tests ValueStringHandler Author: <NAME> Created: 11 - 10 - 2017 """ KLS = Person2 RPR = 'Person2(name=\'<NAME>\', age=32)'
ise-uiuc/Magicoder-OSS-Instruct-75K
@property def ignore(self): return bool(self._solve(self._ignore)) @property
ise-uiuc/Magicoder-OSS-Instruct-75K
for (letter, chunks) in sorted_agencies: self.assertEqual(3, len(chunks)) self.assertEqual(2, len(chunks[0])) self.assertEqual(2, len(chunks[1])) self.assertEqual(1, len(chunks[2])) def test_homepage_find_a_stop(self): """Test Find a Stop form is present on NC homepage""" response = self.client.get(reverse('md:home')) # make sure form is in context self.assertTrue('find_a_stop_form' in response.context) form = response.context['find_a_stop_form']
ise-uiuc/Magicoder-OSS-Instruct-75K
public EditViewModel() { mText = new MutableLiveData<>(); mText.setValue("This is edit fragment"); } public LiveData<String> getText() { return mText; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if color is None: color = Color(name, red, green, blue) self._colors[name] = color return color
ise-uiuc/Magicoder-OSS-Instruct-75K
let messageId :String public init(messageId:Int,uniqueId:String? = nil , typeCode:String? = nil) { self.messageId = "\(messageId)" super.init(uniqueId: uniqueId, typeCode: typeCode) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
def summaryRanges(self, nums: List[int]) -> List[str]: res = [] if not nums: return nums nums = nums + [nums[-1]+2]
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * This program specifies a reference implementation of the front end of a * social media service that has no server-side knowledge of its users * authentication credentials. */ import Vue from "vue"; import App from "./App.vue"; import router from "./router"; import store from "./store"; import Vuetify from "vuetify"; Vue.use(Vuetify); Vue.config.productionTip = false;
ise-uiuc/Magicoder-OSS-Instruct-75K
if name == 'NJoinsByDay': JBD={} fpath=DATADIR+'NJoinsByDay.txt' csvfile=open(fpath, 'rb') data = csv.reader(csvfile, delimiter=',') for row in data: JBD[row[0]]=map(int,row[1:]) del data
ise-uiuc/Magicoder-OSS-Instruct-75K
println!("{}", arg);
ise-uiuc/Magicoder-OSS-Instruct-75K