seed
stringlengths
1
14k
source
stringclasses
2 values
* * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser G...
ise-uiuc/Magicoder-OSS-Instruct-75K
2) Seq2SeqEncoder, e.g. BiLSTM 3) Append the first and last encoder states 4) Final feedforward layer Optimized with CrossEntropyLoss. Evaluated with CategoricalAccuracy & F1. """ def __init__(self, vocab: Vocabulary, text_field_embedder: TextFieldEmbedder, te...
ise-uiuc/Magicoder-OSS-Instruct-75K
activate, button, get_submenu, menu, scroll, selection_value, submenu, wait_for_exit, };
ise-uiuc/Magicoder-OSS-Instruct-75K
type = str, default = 'en') args = parser.parse_args(args=args) return translate_process( args.path, args.scheme, args.from_lang, args.to_lang) # ------------------------------------------------------------------- # main file # --------------------------------------------------------...
ise-uiuc/Magicoder-OSS-Instruct-75K
| 'EnrollmentResponse' | 'EpisodeOfCare' | 'ExpansionProfile' | 'ExplanationOfBenefit' | 'FamilyMemberHistory' | 'Flag' | 'Goal' | 'GraphDefinition' | 'Group' | 'GuidanceResponse' | 'HealthcareService'
ise-uiuc/Magicoder-OSS-Instruct-75K
### compute running sum for average psnr_fbp_avg += psnr_fbp ssim_fbp_avg += ssim_fbp psnr_cvx_avg += psnr_cvx ssim_cvx_avg += ssim_cvx num_test_images += 1 ### save as numpy arrays #### out_filename = phantom_path + 'phantom_%d'%idx + '.npy'
ise-uiuc/Magicoder-OSS-Instruct-75K
keywords=['python', 'csv', 'reader', 'writer'], packages=find_packages(), zip_safe=False )
ise-uiuc/Magicoder-OSS-Instruct-75K
mfield = Field(mfield) self.mfield = mfield self.spatial_coordinates = mfield.spatial_coordinates self._x = self.spatial_coordinates self._dx = symbols(' '.join([f"d{xi}" for xi in self.spatial_coordinates])) if not isinstance(self._dx, tuple): self._dx =...
ise-uiuc/Magicoder-OSS-Instruct-75K
testing_function(model_name) def test_error_on_importing_model(): with pytest.raises(ValueError) as e: Importer().import_model_config("unknown") assert "unknown model has not been implemented. please select from" in str(e) @pytest.mark.skip(reason="This is a functional method.")
ise-uiuc/Magicoder-OSS-Instruct-75K
classifiers=[ "Development Status :: 3 - Alpha", "Topic :: Software Development :: Build Tools", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.9", ], keywords="crypto", packages=["cryptysto"], python_requires=">=3.6, <4", install_r...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert np.allclose(accr, 7/8)
ise-uiuc/Magicoder-OSS-Instruct-75K
import calendar #read arguments parser = argparse.ArgumentParser() parser.add_argument('result') parser.add_argument('user') parser.add_argument('password') args = parser.parse_args() #initiate spark context spark = SparkSession.builder.appName("DumsorWatch SAIDI/SAIFI cluster size").getOrCreate() ### It's really im...
ise-uiuc/Magicoder-OSS-Instruct-75K
mosaic_config = MosaicSettings() api_config = ApiSettings()
ise-uiuc/Magicoder-OSS-Instruct-75K
def convert_time(_time) -> str: """ Convert time into a years, hours, minute, seconds thing. """ # much better than the original one lol # man I suck at docstrings lol try: times = {} return_times = [] time_dict = { "years": 31536000, "months": 26...
ise-uiuc/Magicoder-OSS-Instruct-75K
# if you do not want to use Unicode: # return make_response(json.dumps(result, ensure_ascii=False)) @api.errorhandler(404) def not_found(error): return make_response(jsonify({'error': 'Not found'}), 404) if __name__ == '__main__': api.run(host='0.0.0.0', port=8000)
ise-uiuc/Magicoder-OSS-Instruct-75K
@guvectorize(["void(float32[:], int32, int32, float32[:])", "void(float64[:], int32, int32, float64[:])", "void(int32[:], int32, int32, int32[:])", "void(int64[:], int32, int32, int64[:])"], "(n),(),()->(n)", nopython=True, cache=True) def trap_filter(wf_in, rise...
ise-uiuc/Magicoder-OSS-Instruct-75K
class QuestionDetails(APIView): def get(self,request): obj = Questions.objects.all() serializer = QuestionSerializer(obj,many=True) return Response(serializer.data) def post(self,request): serializer = QuestionSerializer(data = request.data) if serializer.is_valid()...
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!isset($array[$kodeDirektorat])) $array[$kodeDirektorat] = array(); if (str_starts_with($item->kode, $kodeDirektorat)) { $array[$kodeDirektorat][] = $item;
ise-uiuc/Magicoder-OSS-Instruct-75K
RegressionTestRunner, \ RegressionTestStorage, \ clear_registry, \ registry_entries
ise-uiuc/Magicoder-OSS-Instruct-75K
def boolean_true(): return value # Change the varable named value to the correct answer print(boolean_true())
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Skipping {}, we already set that tokenURI!".format(token_id)) def set_tokenURI(token_id, nft_contract, tokenURI): dev = accounts.add(config["wallets"]["from_key"]) attacker = accounts.add(config["wallets"]["from_attacker_key"]) nft_contract.setTokenURI(token_id, tokenURI, {"from": dev})...
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>src/deck.cs /* deck.cs ** */ using System.Collections.Generic;
ise-uiuc/Magicoder-OSS-Instruct-75K
createList(someParameters)
ise-uiuc/Magicoder-OSS-Instruct-75K
net2 = MLP() net2.load_state_dict(torch.load(path)) """ pass def init(): pass class Net(nn.Module): def __init__(self): super().__init__()
ise-uiuc/Magicoder-OSS-Instruct-75K
@au.customElement("md-breadcrumbs") @au.autoinject export class MdBreadcrumbs { constructor(private element: Element, private aureliaRouter: au.Router) { } @au.bindable
ise-uiuc/Magicoder-OSS-Instruct-75K
else: site = 'http://alexa.chinaz.com/Country/{}_{}.html'.format(area,page)
ise-uiuc/Magicoder-OSS-Instruct-75K
elif isinstance(node, numbers.Number): return node elif isinstance(node, list): return [to_dict(each) for each in node] elif isinstance(node, ast.AST): data = { "class": node.__class__.__name__, **{
ise-uiuc/Magicoder-OSS-Instruct-75K
return Math.Sqrt(Math.Pow(x.X - y.X, 2) + Math.Pow((x.Y - y.Y), 2)); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
fn bench_year_flags_from_year(bh: &mut test::Bencher) { bh.iter(|| { for year in -999i32..1000 { true
ise-uiuc/Magicoder-OSS-Instruct-75K
->asArray() ->all(); return $this->render('permission_u', [ 'thePermission'=>$thePermission, 'theRoles'=>$theRoles, ]); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright 2021 <NAME> // SPDX-License-Identifier: Apache-2.0 #pragma once #include "TestBase/Application.hpp" #include "TestBase/DefaultProcessingPipeline.hpp" #include "Object.hpp" namespace Flint { class Sponza
ise-uiuc/Magicoder-OSS-Instruct-75K
return representedObjects
ise-uiuc/Magicoder-OSS-Instruct-75K
def plugin_settings(settings): """Settings for the instructor plugin.""" # Set this to the dashboard URL in order to display the link from the # dashboard to the Analytics Dashboard. settings.ANALYTICS_DASHBOARD_URL = None
ise-uiuc/Magicoder-OSS-Instruct-75K
while retries: try: return self.session.get(self.request.url) except: time.sleep(2) retries -= 1 return self.get_retry() def update(self): """Returns the current state of the website by refreshing the session."...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo Verified with ${DEBUG_KEY_NAME} exit 0 fi exit 1
ise-uiuc/Magicoder-OSS-Instruct-75K
you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ...
ise-uiuc/Magicoder-OSS-Instruct-75K
for test_case in test_file.tests { if skipped_tests.iter().any(|st| st == &test_case.description) { println!("Skipping {}", test_case.description); continue; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def random_string_digits(string_length=10): """Generate a random string of letters and digits.""" letters_and_digits = string.ascii_letters + string.digits return ''.join(random.choice(letters_and_digits) for _ in range(string_length))
ise-uiuc/Magicoder-OSS-Instruct-75K
cd libjpeg-turbo cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=ON -DENABLE_STATIC=OFF -DREQUIRE_SIMD=ON . cmake --build . --config Release -- -j`nproc` strip --strip-unneeded libturbojpeg.so cp libturbojpeg.so ../x64/ cd .. rm -rf libjpeg-turbo
ise-uiuc/Magicoder-OSS-Instruct-75K
for opponent_position, opponent_size in opponent_positions.items(): opponent_impact_score += compute_opponent_impact( our_size, opponent_size, our_position, opponent_position )
ise-uiuc/Magicoder-OSS-Instruct-75K
# build web bash ./scripts/setEventTracking.sh $1 VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` sed -i "s/CPACK_PACKAGE_VERSION_TEMPLATE/$VERSION/g" ./scripts/deb/CMakeLists.txt sed -i "s/CPACK_PACKAGE_VERSION_TEMPLATE/$VERSION/g" ./scripts/rpm/CMakeLists.txt npm inst...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert actual == expected
ise-uiuc/Magicoder-OSS-Instruct-75K
# Check that the slice membership lines up self.assertTrue(np.allclose(slice_matrix, np.array([[0, 1]] * 6)))
ise-uiuc/Magicoder-OSS-Instruct-75K
return email from index
ise-uiuc/Magicoder-OSS-Instruct-75K
station_D = MonitoringStation('ID D', 'Measurement ID D', 'Name D', (4,9), (2,8), 'river 4', 'Town 4') station_A.latest_level = 5.8 station_B.latest_level = 1.7 station_C.latest_level = 6 station_D.latest_level = 6.7 list = stations_level_over_threshold((station_A, station_B, station_C, st...
ise-uiuc/Magicoder-OSS-Instruct-75K
def to_markdown(self, statement: str): return f"##{statement.strip().replace(':', '', 1)[len(self.keyword):]}\n\n"
ise-uiuc/Magicoder-OSS-Instruct-75K
let sub: TokenAmount = std::cmp::min(&available, req).clone(); if sub.is_positive() { self.add(key, &-sub.clone())?; } Ok(sub) } /// Subtracts value from a balance, and errors if full amount was not substracted.
ise-uiuc/Magicoder-OSS-Instruct-75K
GsInputAssemblyState { topology: vk::PrimitiveTopology::TRIANGLE_LIST, primitive_restart_enable: false, } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
raw_text = raw_dict[utt_id] text = text_cleaner(raw_text) g2p_phones = frontend.get_phonemes(text) g2p_phones = sum(g2p_phones, []) gt_phones = ref_dict[utt_id].split(" ") # delete silence tokens in predicted phones and ground truth phones g2p_phones = [phn for ph...
ise-uiuc/Magicoder-OSS-Instruct-75K
MultiClassClassificationTask, RegressionTask, Task ) class OpenMLTask(Task): def __init__(self, openml_id: int, train_size: float = 0.8, seed: Optional[int] = None): """ Base class for task that get data from [OpenML](https://www.openml.org). Args: openml_id (int)...
ise-uiuc/Magicoder-OSS-Instruct-75K
>>> a = [0,1,1,0,0,0,1,0,1] >>> get_edge_bin(a) [(1, 3), (6, 7), (8, 9)] >>> b = [True, False, True, True, False, False] >>> get_edge_bin(b) [(0, 1), (2, 4)] """ array1 = np.int64(array) array1 = np.insert(array1, 0, 0) array1 = np....
ise-uiuc/Magicoder-OSS-Instruct-75K
.collect() }) .collect(); // Part 1 let c = passports.clone().into_iter().filter(part1_validate).count();
ise-uiuc/Magicoder-OSS-Instruct-75K
0);
ise-uiuc/Magicoder-OSS-Instruct-75K
# assert isinstance(self.gamma, ) return self.chi.chiT(q) / self.gamma()
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_eq!( llvm[0].args.len(), 0); assert_eq!( args_builder(&llvm[0]), "[]"); assert_eq!( llvm[1].llvm_code, "llvm.aarch64.sdiv.v16i8"); assert_eq!( llvm[1].gnu_builtin, "sdiv_v16i8");
ise-uiuc/Magicoder-OSS-Instruct-75K
@Before public void setUp() throws IOException { npmFolder = temporaryFolder.newFolder(); flowResourcesFolder = temporaryFolder.newFolder(); task = Mockito.spy(new TaskGeneratePackageJson(npmFolder, null, flowResourcesFolder)); Mockito.doReturn(null).when(task).getPackageJson(...
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Construct an instance of ImageUploadException.""" message = f"An error occurred when uploading image '{path}'. {details}"
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "PInvokeUtils.h" #include "pinvoke_api.h" #include <foundation/com_ptr.h> #include <foundation/pv_util.h> #include <foundation/library/disposable_util.h> #include <pal/pal_load_library.h> using namespace foundation; HRESULT EnsureLibraryPackage() { static _pal_module_t hLibPackage = nullptr;...
ise-uiuc/Magicoder-OSS-Instruct-75K
func testExample() throws {
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace Nimbus.IntegrationTests.Tests.AbstractBaseTypeMessageTests.Handlers { public class SomeConcreteCommandTypeHandler : IHandleCommand<SomeConcreteCommandType> { public async Task Handle(SomeConcreteCommandType busCommand) { MethodCallCounter.RecordCall<SomeConcreteCommandTypeH...
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Функция построения графика энтропии файла. Входные параметры: args.box -- входной файл для анализа args.save -- выходное файл для сохранения графика """
ise-uiuc/Magicoder-OSS-Instruct-75K
Debug::fmt(self, formatter) } } impl error::Error for StringLiteralParseError { #[inline(always)] fn source(&self) -> Option<&(dyn error::Error + 'static)> { use StringLiteralParseError::*; match self { InvalidUtf8Parse(cause) => Some(cause),
ise-uiuc/Magicoder-OSS-Instruct-75K
# python 3 raises error here - unicode is not a proper type there try: if type(r) is unicode:
ise-uiuc/Magicoder-OSS-Instruct-75K
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion const method = req.method!.toUpperCase(); if (this.endpoints.includes(path) && method === 'POST') { // Handle incoming ReceiverEvent
ise-uiuc/Magicoder-OSS-Instruct-75K
mock_servicediscovery = base_decorator(servicediscovery_backends)
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_given_an_empty_relative_datetime(): actual = load(StringIO('!relative_datetime')) assert isinstance(actual, RelativeDatetime) now = datetime.now() resolved = actual.resolve(ValueContext(origin_datetime=now)) assert resolved.value == now
ise-uiuc/Magicoder-OSS-Instruct-75K
public handleSelectItem = (page: Page) => { this.setState({ page }); };
ise-uiuc/Magicoder-OSS-Instruct-75K
""" def test_import_module(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
<hr> @forelse($posts as $post)
ise-uiuc/Magicoder-OSS-Instruct-75K
return LocalizedStringKey("From 5am to 12pm") } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
config = EasyConfig(filepath, defaults={'main': {'option': value} }) """ def __init__(self, filepath, defaults={}): self._filepath = filepath self._config = defaults self._callbacks = {} def get(self, section, key, default=None): """ Returns the value at sec...
ise-uiuc/Magicoder-OSS-Instruct-75K
Simctl.main()
ise-uiuc/Magicoder-OSS-Instruct-75K
REQUIRE(old_sd.hello().empty()); REQUIRE(to_string(old_sd.host()) == to_string(event.host())); REQUIRE(old_sd.port() == event.port()); REQUIRE(old_sd.round_trip_time() == -1); REQUIRE(to_string(old_sd.type()) == "Unknown"); REQUIRE(to_string(new_s...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod print; pub mod random; pub mod restore; pub mod sign;
ise-uiuc/Magicoder-OSS-Instruct-75K
pkg_meta: Dict[str, str] = _get_project_meta() project: Optional[str] = pkg_meta.get("name") version: Optional[str] = pkg_meta.get("version")
ise-uiuc/Magicoder-OSS-Instruct-75K
loadlist = [modname, ] loaded = [] for modname in loadlist: modname = modname.replace("..", ".") loaded.extend(self.loaddeps(modname, force, showerror, [])) return loaded def fetch(self, plugname): mod = self.getmodule(plugname) if mod: se...
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php //Arithmetic Operators (29-8-19) $a = 47; $b = 7; $sum = $a + $b; $diff = $a - $b; $prod = $a * $b; $div = $a / $b; $rem = $a % $b; $expo = $a ** $b; echo "A = $a"." & "."B = $b";
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Using AWS for STT client") return boto3.client("transcribe") def transcribe_storage_uri(client, uploaded_file, locale): # must be unique (required by aws api) job_name = time.ctime().replace(" ", "-").replace(":", "-") storage_uri = os.path.join(AWS_UPLOAD_BUCKET_URL, uploaded_file) # ...
ise-uiuc/Magicoder-OSS-Instruct-75K
format!("{}", hash_str(&str)).parse().unwrap() }
ise-uiuc/Magicoder-OSS-Instruct-75K
import os import csv import glob import numpy as np import pandas as pd import nltk import string import re from numpy import genfromtxt
ise-uiuc/Magicoder-OSS-Instruct-75K
public class RegistryManagerMain { public static void main(String[] args) { Logger log = Logger.getLogger("");
ise-uiuc/Magicoder-OSS-Instruct-75K
else voronoi_zones.at1d(i) = 0; } label_components(voronoi_zones,false);
ise-uiuc/Magicoder-OSS-Instruct-75K
EXPECT_EQ("",iom.find_resource_file("substances/Oxygen5.xml")); }
ise-uiuc/Magicoder-OSS-Instruct-75K
elif self.family_type == 'GAUGE':
ise-uiuc/Magicoder-OSS-Instruct-75K
assertThat(firmwareManager.firmwares, contains( `is`(firmwareInfo: fwInfo1, state: .downloading, progress: 50, canDelete: false))) assertThat(cnt, `is`(2)) // mock download succeed backend.downloadTask?.state = .success backend.downloadTask?.remaining = [] b...
ise-uiuc/Magicoder-OSS-Instruct-75K
import pytest import sheraf from tests.utils import close_database def test_close_database(): db = sheraf.Database() assert db == sheraf.Database.get() close_database(db)
ise-uiuc/Magicoder-OSS-Instruct-75K
gpg --import /tmp/key.asc # Build binary and debian package cp -r /src/* . go get -t go build -o /artifacts/gemnasium dpkg-buildpackage -tc -k689FC23B -p/bin/gpg_wrapper.sh mv ../gemnasium* /artifacts
ise-uiuc/Magicoder-OSS-Instruct-75K
U, singularValues, V = svd(movieRatings) logging.info("u values and v%s", U)
ise-uiuc/Magicoder-OSS-Instruct-75K
with tempfile.TemporaryDirectory() as dir_path:
ise-uiuc/Magicoder-OSS-Instruct-75K
return size; } public int getDatabaseCount() { return databaseCount; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
help='Whether to perform binary classification or multi-class classification.') p.add_argument('--setting-name', help='name for this particular setting, for saving corresponding data, model, and results') p.add_argument('-c', '--classifier', choices=['rf', 'gbdt', 'mlp'], ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def is_error(self): return len(self.__messages) > 0 def find_name(self, name): for n in reversed(self.namespaces): if name in n: return n[name] return TypeVariable(name, [], {}, None)
ise-uiuc/Magicoder-OSS-Instruct-75K
# Add experiments to run here. experiments = [ ("gaussian_unbiased_covar", run_gaussian_covar, {'window': None}, {"gamma": gamma}), ("gaussian_unbiased_l1", run_gaussian_norm, {'window': None}, {"gamma": gamma, "regularization": 1}), ("gaussian_unbiased_l2", run_gaussian_norm, {'window'...
ise-uiuc/Magicoder-OSS-Instruct-75K
ulimit -n 512000 nohup ${python_ver} server.py m>> ssserver.log 2>&1 &
ise-uiuc/Magicoder-OSS-Instruct-75K
if len(filters_sql) > 0: final_sql = sql.SQL('{0} WHERE {1}').format(base_sql, sql.SQL(' AND ').join(filters_sql))
ise-uiuc/Magicoder-OSS-Instruct-75K
int main() {
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, variables=None, related_variable=None): self.variables = [variables] self.related_variables = related_variable def fit(self, X, y=None): return self def transform(self, X): X = X.copy() for variable in self.variables: X[variable] = X[...
ise-uiuc/Magicoder-OSS-Instruct-75K
public boolean displayUI; //Will tell if the user has a program running in the interpreter. True means that they do not have a program runnning //and false means that they do have a program running(or the program hasn't began to run) public boolean check; //Creates a users Machine object, which will ho...
ise-uiuc/Magicoder-OSS-Instruct-75K
if (userServiceModelFromRepo == null) { return NotFound(); } _repository.DeleteUserService(userServiceModelFromRepo); _repository.SaveChanges();
ise-uiuc/Magicoder-OSS-Instruct-75K
:param str resource_group_id: The resource group id of NAT gateway. :param str specification: The specification of NAT gateway. Valid values `Middle`, `Large`, `Small` and `XLarge.1`. Default value is `Small`. :param str status: The status of NAT gateway. Valid values `Available`, `Converting`, `Creating`, ...
ise-uiuc/Magicoder-OSS-Instruct-75K