seed
stringlengths
1
14k
source
stringclasses
2 values
this.argumentsPredicate = this.ArgumentsMatchesArgumentConstraints; } private MethodInfo Method { get; } /// <summary> /// Writes a description of calls the rule is applicable to. /// </summary> /// <param name="writer">The writer on which to describ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// UCBCharacteristicProperties.swift //
ise-uiuc/Magicoder-OSS-Instruct-75K
declare const CommentIcon: MdiReactIconComponentType; export default CommentIcon;
ise-uiuc/Magicoder-OSS-Instruct-75K
import bz2 import io import urllib.request import urllib.error import zipfile import zlib
ise-uiuc/Magicoder-OSS-Instruct-75K
} if free { return name } } return UUID().uuidString } // MARK: - VM functions func save(vm: UTMVirtualMachine) throws { do {
ise-uiuc/Magicoder-OSS-Instruct-75K
def create_resolver(servers=None, resolvconf=None, hosts=None): if platform.getType() == 'posix': if resolvconf is None: resolvconf = b'/etc/resolv.conf' if hosts is None: hosts = b'/etc/hosts' the_resolver = client.Resolver(resolvconf, servers)
ise-uiuc/Magicoder-OSS-Instruct-75K
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
ise-uiuc/Magicoder-OSS-Instruct-75K
using AngleSharp.Parser.Html; using FMCApp.Data; using FMCApp.Data.Models;
ise-uiuc/Magicoder-OSS-Instruct-75K
QStyle* createStyle() { if (theme() == g_dark_theme_str) { return QStyleFactory::create("Fusion");
ise-uiuc/Magicoder-OSS-Instruct-75K
### Compare Two Nodes ### -1 if self.data is less than that of arguments ### 0 if both are equal ### 1 if self.data is greater than that of argument def compare(self,Node2): if(self.data==None and Node2.data==None): return True if((self.data!=None and Node2.data==None) or (self.data!=None and Node2.data==...
ise-uiuc/Magicoder-OSS-Instruct-75K
words = set(['first','second','third','fourth','fifth','sixth','seventh','eighth','ninth','tenth','eleventh','twelfth','thirteenth','fourteenth','fifteenth', 'sixteenth','seventeenth','eighteenth','nineteenth','twentieth','twenty-first','twenty-second','twenty-third','twenty-fourth','twenty-fifth']) pickle.dump(words...
ise-uiuc/Magicoder-OSS-Instruct-75K
} return strRev(str.dropFirst()!) + String(str[str.startIndex]) } strRev("esruceR olleH esreveR olleH")
ise-uiuc/Magicoder-OSS-Instruct-75K
struct zGlobalSettings { uint16 AnalogMin;
ise-uiuc/Magicoder-OSS-Instruct-75K
db = mysql.connect( host=cfg.db_host, user=cfg.db_user, passwd=cfg.db_passwd,
ise-uiuc/Magicoder-OSS-Instruct-75K
ext_modules=[ Extension( '_festival', ['_festival.cpp'], include_dirs=[festival_include, speech_tools_include], library_dirs=[festival_lib], libraries=libraries,
ise-uiuc/Magicoder-OSS-Instruct-75K
return sequence_frequencies
ise-uiuc/Magicoder-OSS-Instruct-75K
self.scrollView.contentSize = self.keyboardState.priorContentSize
ise-uiuc/Magicoder-OSS-Instruct-75K
# if user_id was not provided get logged in user user = request.user.id obj = images.objects.get(user=user, ifile__endswith=filename) with open(obj.ifile.path, 'rb') as f: tags = exifread.process_file(f, details=False) if not tags: tags = {"":"There is no exif...
ise-uiuc/Magicoder-OSS-Instruct-75K
pdsp::ExtSequencer::ExtSequencer() { instances.push_back(this); } pdsp::ExtSequencer::~ExtSequencer() { for (size_t i = 0; i < instances.size(); ++i) { if (instances[i] == this) { instances.erase(instances.begin() + i); break; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
vinf_array = np.linspace(vinf_span[0], vinf_span[-1], num_contours) alpha_array = np.linspace(alpha_lim[0], alpha_lim[-1], N) vinf_array /= V_body # Construct the mesh for any configuration V_INF, ALPHA = np.meshgrid(vinf_array, alpha_array)
ise-uiuc/Magicoder-OSS-Instruct-75K
//more than one hit with identical largest time in cluster if (e.time == time_end_) { utpc_idx_max_ = static_cast<int>(hits.size()-1); } else if (e.time > time_end_) { utpc_idx_min_ = static_cast<int>(hits.size()-1); utpc_idx_max_ = utpc_idx_min_;
ise-uiuc/Magicoder-OSS-Instruct-75K
count = await self._row_count('warns', user_id=user_id)
ise-uiuc/Magicoder-OSS-Instruct-75K
figure = alt.layer(l, p) figure.save(f'{g}.json') # %% # Generate JSON vis for subcategories for g, d in data.groupby('subcategory'): chart= alt.Chart(d).encode( x=alt.X(field="year", type="temporal", timeUnit='year', title="year"), ...
ise-uiuc/Magicoder-OSS-Instruct-75K
import torch
ise-uiuc/Magicoder-OSS-Instruct-75K
/// /// /// protocol AssetManifestRepositoryProtocol { func fetchManifest(for url: URL) -> AnyPublisher<MediaAssetManifestEntity, Error> } /// /// Provides asset manifests for photos. An asset manifest is the list of resources associated with a photo, /// such the URLs of the available images. /// final class NAS...
ise-uiuc/Magicoder-OSS-Instruct-75K
F1 = 1.0 # High-pass filter corner F2 = 6.0 # Low-pass filter corner # Get the list of seismometers from file, data downloaded from http://www.fdsn.org/networks/detail/AM/ allStations = [] # list to save stations with open ("ShakeNetwork2020.csv", "r") as rd:
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertIsNotNone(Api(None).project())
ise-uiuc/Magicoder-OSS-Instruct-75K
load_model = keras.models.load_model DEFAULT_MODEL = "./python_src/tracker.h5" EXCEPTIONS = [ "Feature", "Branch",
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param Contracts\EntityLocator $locator * @param string $delimiter */ public function __construct(Contracts\EntityLocator $locator, string $delimiter = ':') { $this->locator = $locator;
ise-uiuc/Magicoder-OSS-Instruct-75K
dependencies = [ ('core', '0011_customersetting'), ] operations = [
ise-uiuc/Magicoder-OSS-Instruct-75K
study = Study(kf_id="SD_00000001") study.save() releases = ReleaseFactory.create_batch(10, state="staged") releases = ReleaseFactory.create_batch(10, state="published") releases = ReleaseFactory.create_batch( 10, state="staging", studies=[study] ) client = test_client(user_type) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('auth'); } /** * Display a listing of the resource. * * @return \Illuminate\Http\Response
ise-uiuc/Magicoder-OSS-Instruct-75K
{ self.Delegate?.UserCreationSuccess() } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
from libcst import CodeRange from libcst._nodes.tests.base import CSTNodeTest from libcst.testing.utils import data_provider class ElseTest(CSTNodeTest): @data_provider( ( {
ise-uiuc/Magicoder-OSS-Instruct-75K
set -x mem=32g gpus=2 cpus=2 CODALAB_WKSHT=YOUR_WKSHT_HERE bash sample_sizes.sh
ise-uiuc/Magicoder-OSS-Instruct-75K
const LayoutBoxModelObject* ancestor, PhysicalRect& rect, MapCoordinatesFlags mode, VisualRectFlags visual_rect_flags) const { NOT_DESTROYED();
ise-uiuc/Magicoder-OSS-Instruct-75K
import json def search(track_name, artist, type='track'): parsed = parse.quote_plus(query) query = "artist:{}%20track:{}".format(artist, track_name) response = auth.get( 'https://api.spotify.com/v1/search?q={}&type={}'.format(query, type)) response_object = json.loads(response.text) return...
ise-uiuc/Magicoder-OSS-Instruct-75K
@PutMapping public InvokeResult<Void> update(@Valid UpdateTakeStockConfigVo vo) {
ise-uiuc/Magicoder-OSS-Instruct-75K
} } } @Warmup(iterations = 1) @Measurement(iterations = 10) @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MILLISECONDS) @Fork(value = 1) @Threads(1) @Benchmark public void put(Blackhole blackhole, BenchmarkState state) { for (int i = 0; i < s...
ise-uiuc/Magicoder-OSS-Instruct-75K
def valid(self) -> bool: if str.isnumeric(self._reversed_card_num) and len(self._reversed_card_num) > 1: return self._sum_card() % 10 == 0 else: return False def _sum_card(self) -> int: even_digits_sum = 0 for digit in self._even_digits: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# トリム平均を取得 price = int(str(str_table[0]).split('</td>')[1].split('円')[0].split('<span class="line">')[3].replace(' ', '').replace(',', '')) print(price) time.sleep(1) # Wisdom Guildサーバーに負荷をかけないため待機 return price if __name__ == "__main__": get_price("http://wonder.wisdom-guild.net/price/Ar...
ise-uiuc/Magicoder-OSS-Instruct-75K
"code7": "code7", "code7width": "80", "code8": "code8", "code8width": "80", "code9": "code9", "code9width": "80", "code10": "code10",
ise-uiuc/Magicoder-OSS-Instruct-75K
ParallelActorContext ctx = Ray.internal().getParallelActorContext(); ctx.submitTask(instance.getActor(), instance.getInstanceId(), func, args); }
ise-uiuc/Magicoder-OSS-Instruct-75K
tera.extend(&new_tera).map_err(|err| { LuaError::external(format_err!("{}", err.to_string()))
ise-uiuc/Magicoder-OSS-Instruct-75K
# 适配器
ise-uiuc/Magicoder-OSS-Instruct-75K
from .constants import * from .DataLoader import DataLoader, create_datasets from .Dict import Dict
ise-uiuc/Magicoder-OSS-Instruct-75K
import tensorflow as tf import torch Tensor = TypeVar('Tensor', tf.Tensor, torch.Tensor, np.ndarray) def pow(tensor: Tensor, power: Union[int, float, Tensor] ) -> Tensor: """Raise a `tensor` to a given `power`. This method can be used with Numpy data:
ise-uiuc/Magicoder-OSS-Instruct-75K
pub type IToastNotificationManagerStatics3 = *mut ::core::ffi::c_void;
ise-uiuc/Magicoder-OSS-Instruct-75K
import torch.nn as nn class BatchBottle(nn.Module):
ise-uiuc/Magicoder-OSS-Instruct-75K
var cgFillRule: CGPathFillRule { switch self { case .evenOdd: return .evenOdd default: return .winding }
ise-uiuc/Magicoder-OSS-Instruct-75K
@ControllerDecorator('cats') export default class CatsParamController { @ParamDecorator('id') private paramreq(req: Request, res: Response, next: NextFunction, id: any) { console.log(id); next(); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
private static $private_value_static = 'bar'; private function private_func($x) { return $x; } private static function private_static_func($x) { return $x; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
void UIControl::addInlineVisual(UIElement* element, UIInlinePlacement layout) { PointI pts[] = { { 0, 0 }, { 1, 0 }, { 2, 0 }, { 0, 1 }, { 1, 1 }, { 2, 1 }, { 0, 2 }, { 1, 2 }, { 2, 2 },
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace RESTfulAPITemplate.Core.Interface { public interface IScetiaUserRepository { Task<AspnetMembership> GetMembershipByUserId(Guid userId); Task<AspnetUsers> GetUserByName(string userName); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
""" def render(self, context): context.update(self.get_content(context)) return '' def get_content(self, context):
ise-uiuc/Magicoder-OSS-Instruct-75K
def set_value(measurements, key, value, unit=None): if value is not None: record = {"value": value} if unit is not None: record["unit"] = unit measurements[key] = record
ise-uiuc/Magicoder-OSS-Instruct-75K
x + 2 }
ise-uiuc/Magicoder-OSS-Instruct-75K
numbers = map(int, strNumbers.split(',')) d.chart.data = [numbers] #bar charts take a list-of-lists for data if 'title' in request: d.title.text = request['title'] #get a GIF (or PNG, JPG, or whatever) binaryStuff = d.asString('gif') return HttpResponse(binaryStuff, 'image/g...
ise-uiuc/Magicoder-OSS-Instruct-75K
Cpu::str(addr & !0b11, cpu.r(15) + 2, bus); } cpu.set_r(rb, addr.wrapping_add(0x40)); } else { // P = 0, U = 1, S = 0, W = true, L = l block_data_transfer::execute(cpu, bus, (false, true, false, true, l, rb, rlist)); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
export function bindPopover( popupState: PopupState ): { id: string | undefined anchorEl: HTMLElement | undefined open: boolean onClose: () => void onMouseLeave: (event: SyntheticEvent<any>) => void } /** * Creates props for a `Menu` component.
ise-uiuc/Magicoder-OSS-Instruct-75K
#默认颜色 #sns.palplot(current_palette)
ise-uiuc/Magicoder-OSS-Instruct-75K
fn condition(&self) -> Vec<Condition> { vec![Condition::keyword().or(Condition::color())]
ise-uiuc/Magicoder-OSS-Instruct-75K
# Create a temporary directory
ise-uiuc/Magicoder-OSS-Instruct-75K
surface_markers = np.float32(surface_markers)
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ @Configuration @MapperScan("com.lkz.blog.web.mapper") public class MyBatisConfig { }
ise-uiuc/Magicoder-OSS-Instruct-75K
SAVED_PWD="$(pwd -P)" HERE=$(dirname $(readlink -e $0)) source "${HERE}/install-helpers.sh" URL='https://github.com/nlohmann/json.git' pkgdir="${LOCAL_REPO_PATH}/nlohmann_json" clone_or_update_git_repo "${URL}" "${pkgdir}" cd "${pkgdir}" mkdir build cd build
ise-uiuc/Magicoder-OSS-Instruct-75K
from app import authenticated_service
ise-uiuc/Magicoder-OSS-Instruct-75K
func createAlert(_ type: UpdateAlertType, vc: UIViewController?) -> UIAlertController? { let alert = UIAlertController(title: AppStrings.UpdateMessage.title, message: AppStrings.UpdateMessage.text, preferredStyle: .alert) alert.addAction(UIAlertAction(title: NSLocalizedString(AppStrings.UpdateMessage.actionUpdate,...
ise-uiuc/Magicoder-OSS-Instruct-75K
from settings import *
ise-uiuc/Magicoder-OSS-Instruct-75K
#Plot the Results python plot_Results.py "${PWD}/Results_${matname}/" "${matname}"
ise-uiuc/Magicoder-OSS-Instruct-75K
this.share_oppen_id = share_oppen_id; } public String getUser_oppen_id() { return user_oppen_id; }
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!result) { throw new Error( `Missing or no result for method handler at path ${methodDefinition.path}`, ) } this.logCall(methodDefinition, call, result, chronometer)
ise-uiuc/Magicoder-OSS-Instruct-75K
[ ! -f .env ] && cp sample.env .env zip -r function.zip index.js .env node_modules aws lambda update-function-code \ --function-name s3-to-sqs \ --zip-file fileb://function.zip
ise-uiuc/Magicoder-OSS-Instruct-75K
cd ../../.. mkdir -p "build/Unix Makefiles MacOSX/release" cd "build/Unix Makefiles MacOSX/release" ../../../extern/bin/macosx/cmake/bin/ccmake -DCMAKE_BUILD_TYPE:String=Release ../../.. make cd ../../..
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 #
ise-uiuc/Magicoder-OSS-Instruct-75K
bishop_sqs -= BISHOP_TABLE[bishop as usize] as i16; targets = clear_lsb(targets); } let score = PAWN_WEIGHT * pawn_diff + KNIGHT_WEIGHT * knight_diff + BISHOP_WEIGHT * bishop_diff + ROOK_WEIGHT * rook_diff ...
ise-uiuc/Magicoder-OSS-Instruct-75K
root = "..", relative_to = __file__, fallback_version='0.0.0-dev0' )
ise-uiuc/Magicoder-OSS-Instruct-75K
.num_threads(8) .build_global() .unwrap_or(()); let (rx, mut proc, tx, alt_tx) = new_pipeline::<u32, u32, bool>(3); rx.enqueue(0);
ise-uiuc/Magicoder-OSS-Instruct-75K
def forward(self, x): out = self.layer1(x) out = self.layer2(out) out = out.view(out.size(0), -1) out = self.fc(out) return out model = Model() model.cuda()
ise-uiuc/Magicoder-OSS-Instruct-75K
// This file is distributed uner the MIT license. See LICENSE.txt for details. // //===----------------------------------------------------------------------===// /// /// \file /// Unit tests for ParseDifferentialCorrectionAge(std::string CorrectionAge) /// //===---------------------------------------------------------...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" subt_fijo_var = self.termino_fijo_total + self.termino_variable_total # Cálculo de la bonificación (bono social): if self.config.con_bono_social: self.descuento_bono_social = round_money(-0.25 * round_money(subt_fijo_var))
ise-uiuc/Magicoder-OSS-Instruct-75K
handler.stop() if __name__ == '__main__': multiprocessing.freeze_support() # Allow pyinstaller use main()
ise-uiuc/Magicoder-OSS-Instruct-75K
extension URL { }
ise-uiuc/Magicoder-OSS-Instruct-75K
export const checkGuess = async (id: string, guess: string, line: number) => { const res = await fetch( `${API_HOST}/api/check?id=${id}&guess=${guess}&line=${line}`, { method: 'GET', } ); const body: CheckResp = await res.json(); return body } type ProblemLenResp = {
ise-uiuc/Magicoder-OSS-Instruct-75K
} } // end namespace detran //---------------------------------------------------------------------------// // end of Equation_DD_3D.cc //---------------------------------------------------------------------------//
ise-uiuc/Magicoder-OSS-Instruct-75K
------- - X_new: the new X with reduced dimensions """ # number of observations n = X.shape[0] # instanciation acp = PCA(svd_solver='full') X_transform = acp.fit_transform(X) print("Number of acp components features= ", acp.n_components_) #variance explained
ise-uiuc/Magicoder-OSS-Instruct-75K
tags_metadata = [ { 'name': 'task', 'description': 'Operations related to tasks.',
ise-uiuc/Magicoder-OSS-Instruct-75K
export function createI18n<U extends object, T = Locale<U>>(config: I18nConfig<U>): I18nInstance<U, T> { const i18n = original<U, T>(config); // @ts-ignore const enhanced: I18nInstance<U, T> = i18n; enhanced.use = () => hook(i18n);
ise-uiuc/Magicoder-OSS-Instruct-75K
agent_param = data["experiment"]["agent"]["parameters"] env_config = data["experiment"]["environment"] hp_indices = [] for i in range(get_sweep_num(agent_param)):
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './Content'; export * from './Navigation'; export * from './Sidebar'; export * from './Template'; export * from './Toolbar';
ise-uiuc/Magicoder-OSS-Instruct-75K
i18n: I18n, ) { this.#parser = parser; this.#sourceCode = sourceCode; this.#ruleset = ruleset; this.#i18n = i18n; this.#ast = this.#parser.parse(this.#sourceCode); this.#document = new Document(this.#ast, this.#ruleset); this.#rules = rules; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def init(): global baseURL global password global username global usertestingpassword global usertestingemail global twilliotemplate
ise-uiuc/Magicoder-OSS-Instruct-75K
for GPU in ${TRAIN_GPUS_ARRAY[@]} do tmux new-window -n "worker $I" "bash" tmux send-keys -t "$NAME:worker $I" "GPUS=$TRAIN_GPUS TASK=$I python worker.py $NAME" Enter I=$((I+1)) done tmux new-window -n "eval" "bash" tmux send-keys -t "$NAME:eval" "GPU=$EVAL_GPU python continuous_evaluate.py $NAME" Enter
ise-uiuc/Magicoder-OSS-Instruct-75K
if is_available(2): self.hour_3_clock.set_text(str(int(now.strftime('%I'))+2) + now.strftime('%p')) if int(chance_of_rain := current_search['forecast']['forecastday'][0]['hour'][current_hour+2]['chance_of_rain'])>0: self.hour_3_chance_of_r...
ise-uiuc/Magicoder-OSS-Instruct-75K
def happiness(config, arrangement): return sum([happiness_for_pair(config, p) for p in makepairs(arrangement)]) def happiness_for_pair(config, pair): opposite = (pair[1], pair[0])
ise-uiuc/Magicoder-OSS-Instruct-75K
public int getSaltHashLength() { return saltHashLength; } public void setSaltHashLength(int saltHashLength) { this.saltHashLength = saltHashLength;
ise-uiuc/Magicoder-OSS-Instruct-75K
def draw_title(self) -> None: if self.has_title: for item in self.title_ui: item.draw()
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <utility> //#include <cereal/archives/binary.hpp> #include <cereal/types/string.hpp> #if defined ENABLE_BOOST_IOSTREAMS && !defined DISABLE_BOOST_IOSTREAMS #include <boost/iostreams/device/back_inserter.hpp> #include <boost/iostreams/stream.hpp> #else #include <sstream> #endif
ise-uiuc/Magicoder-OSS-Instruct-75K
output_name='out') # Conv -> Crop -> BN spec = builder.spec.neuralNetwork np.testing.assert_equal('crop', spec.layers[1].WhichOneof('layer')) np.testing.assert_equal('batchnorm', spec.layers[2].WhichOneof('layer')) # transform the pattern tr...
ise-uiuc/Magicoder-OSS-Instruct-75K
C = '_' try: H52 = int(round(float(a['fifty_two_week_high']), 0)) except ValueError: H52 = '_' try: PE = round(float(a['price_earnings_ratio']), 1) except ValueError: PE = '_' try: Cp = int(round(float(C) / float(P) * 100))
ise-uiuc/Magicoder-OSS-Instruct-75K