seed
stringlengths
1
14k
source
stringclasses
2 values
from .device import Device from .api import BasicAPIHandler
ise-uiuc/Magicoder-OSS-Instruct-75K
command = 'bsub '+opts+' -W ' + wt + " -n " + n + " -q " + q + " -o " + output_log + " -J " + jid + " '" + path2script + "'" os.system(command + " > " + pt + "/temp/temp" + jid + "_" + r + ".txt") uds = get_pid(pt + "/temp/temp" + jid + "_" + r + ".txt", 3) return uds
ise-uiuc/Magicoder-OSS-Instruct-75K
func openActionSheet(title : String, message : String, firstTitle: String, secondTitle : String?, thirdTitle : String?, firstSelected : Bool, secondSelected : Bool, thirdSelected : Bool, firstAction : (()->())?, secondAction : (()->())?, thirdAction : (()->())?){ let actionSheetController = UIAlertControl...
ise-uiuc/Magicoder-OSS-Instruct-75K
// "h1,h2,h3": { // color: `white`, // backgroundColor: `black`, // }, // "a.gatsby-resp-image-link": {
ise-uiuc/Magicoder-OSS-Instruct-75K
elections = ['parl.2017-06-08'] csv_delimiter = '\t'
ise-uiuc/Magicoder-OSS-Instruct-75K
try: return int(stripped) except ValueError: if stripped[-1] in ('K', 'M', 'G', 'T'): return int(int(stripped[:-1]) * conv_factor[stripped[-1]]) else: ValueError(f"Invalid unit {stripped[-1]}")
ise-uiuc/Magicoder-OSS-Instruct-75K
# TODO: Find a better way to extend to addition flight parameters splits = connection_string.split(";") client = flight.FlightClient('grpc+tcp://{0}:{1}'.format(splits[2].split("=")[1], splits[3].split("=")[1])) client.authenticate(HttpDremioClientAuthHandler(splits[0].split("=")[1], sp...
ise-uiuc/Magicoder-OSS-Instruct-75K
#[storage(VecStorage)] #[serde(deny_unknown_fields)] pub struct DeathOnContact { pub collides_with: Vec<CollisionLabel>, }
ise-uiuc/Magicoder-OSS-Instruct-75K
let mut mp = MessageBytes::from_bytes(w.freeze()); assert_eq!(Question::parse(&mut mp), a);
ise-uiuc/Magicoder-OSS-Instruct-75K
from epicteller.core.util import ObjectDict from epicteller.core.util.enum import ExternalType from epicteller.core.util.seq import get_id def _format_character(result) -> Optional[Character]: if not result: return character = Character( id=result.id, url_token=result.url_token, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
console.log(aVal, bVal);
ise-uiuc/Magicoder-OSS-Instruct-75K
If not specified, an argument will default to the saved arguments from the last call to train(). Args: n_epochs (int): Number of epochs.
ise-uiuc/Magicoder-OSS-Instruct-75K
records = db_cur.fetchall() consumer.stop() assert len(records) == 1 for row in records: assert row[1] == "https://www.qwe.com" assert row[2] == 200 assert row[3] > 0
ise-uiuc/Magicoder-OSS-Instruct-75K
import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.support.annotation.Nullable;
ise-uiuc/Magicoder-OSS-Instruct-75K
if pid >= min_pid: if query in orfs: orfs[query][subject] = {'blastresult':line.strip()} else: orfs[query] = {subject:{'blastresult':line.strip()}}
ise-uiuc/Magicoder-OSS-Instruct-75K
permission = permissions[view.action] opts = type('', (), {})() opts.app_label = view.model._meta.app_label opts.model_name = view.model._meta.model_name codename = get_permission_codename(permission, opts) return request.user.has_perm("%s.%s" % (opts.app_label, codename...
ise-uiuc/Magicoder-OSS-Instruct-75K
public class ProofPrinter { /// <summary> /// Utility method for outputting proofs in a formatted textual /// representation. /// </summary> /// <param name="proof"></param> /// <returns></returns> public static string printProof(Proof proof)
ise-uiuc/Magicoder-OSS-Instruct-75K
SYSVER=($($PRESIDENTIELCOINCLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }')) # Create a footer file with copyright content. # This gets autodetected fine for presidentielcoind if --version-string is not set, # but has different outcomes for presidentielcoin-qt and presidentielcoin-cli. echo "[COPYRIGHT]" > ...
ise-uiuc/Magicoder-OSS-Instruct-75K
__author__ = '<NAME>' __email__ = '<EMAIL>' __date__ = '2021/4/8 20:12'
ise-uiuc/Magicoder-OSS-Instruct-75K
passed.append(validator.__name__) except Exception as e: failed.append("Error: %s - %s - %s" % (state.upper(), validator.__name__, e)) print("\n\nVALIDATION RESULTS") print("Passed: %s" % len(passed)) print("Failed: %s" % len(failed))
ise-uiuc/Magicoder-OSS-Instruct-75K
non_empty_quads = make_staggered_quads(gt, (gt_hist < np.median(gt_hist)).astype(int), 16, 4) print('done making quads') n_ne_quads = len(non_empty_quads)
ise-uiuc/Magicoder-OSS-Instruct-75K
* The background colour of the board. */ private static final Color BACKGROUND_COLOR = Color.BLACK; /** * The size (in pixels) of a square on the board. The initial size of this * panel will scale to fit a board with square of this size. */ private static final int SQUARE_SIZE = 16; /** * The game to ...
ise-uiuc/Magicoder-OSS-Instruct-75K
private $data; public function __construct(array $data) { $this->data = $data; } public function build() { return $this->to($this->data['to_address'])
ise-uiuc/Magicoder-OSS-Instruct-75K
Scheduler - initialize from schedule data pulled by ScheduleFinder - determine if a task and arguement combination should run Registry - manage the state of all jobs in progress """
ise-uiuc/Magicoder-OSS-Instruct-75K
print(src_ip + " = " + "Location Info: " + country + " | " + sub + " | " + city) except: try: true_ip = socket.gethostbyname(src_ip) country, sub, city = determine_location(true_ip) print(src_ip + " = " + "Location Info: " + country + " | "...
ise-uiuc/Magicoder-OSS-Instruct-75K
pipeline_step = PythonScriptStep(
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "Downloading $download_url" curl -SsL "${checksum_url}" -o "${kanister_sum_file}" curl -SsL "${download_url}" -o "$KANISTER_TMP_FILE" echo "Checking hash of ${kanister_dist}" pushd "${KANISTER_TMP_ROOT}"
ise-uiuc/Magicoder-OSS-Instruct-75K
Bolivia Brazil Chile Colombia Ecuador French Guiana Guyana Paraguay Peru Suriname Uruguay Venezuela Belize Costa Rica
ise-uiuc/Magicoder-OSS-Instruct-75K
.max_by_key(|&(_, count)| count) .map(|(value, _)| *value);
ise-uiuc/Magicoder-OSS-Instruct-75K
/* ***************************************************************************** Copyright (c) 2016-2017, The Regents of the University of California (Regents). All rights reserved.
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.AlterModelOptions( name='position', options={'ordering': ['name'], 'verbose_name': 'Job Positions', 'verbose_name_plural': 'Job Positions'}, ), migrations.AlterField( model_name='department', name='parent', field=mptt.fields....
ise-uiuc/Magicoder-OSS-Instruct-75K
.get_or_init(|| async { message.cannonical_addr }) .await; match &message.payload { Payload::RequestPeers => { let peers = self .state .upgrade() .ok_or(Error::DanglingHandler)? ....
ise-uiuc/Magicoder-OSS-Instruct-75K
/// <param name="autoFillRef">The auto fill cell reference.</param> /// <param name="result">The result.</param> /// <returns> /// True if extrapolation was successful. /// </returns> public bool TryExtrapolate( CellRef cell, CellRef currentCell, CellRef...
ise-uiuc/Magicoder-OSS-Instruct-75K
code. Returns: dict: Returns a nested dictionary object with the deserialized data and statistics from the agent's last run. Returns an empty dictionary if the method is unable to retrieve or deserialize the summary data. """ run_summary =...
ise-uiuc/Magicoder-OSS-Instruct-75K
from unittest import TestCase from pascals_triangle import Solution class TestSolution(TestCase): def setUp(self) -> None: self.solution = Solution() def test_generate(self): self.assertListEqual( [[1]], self.solution.generate(1)
ise-uiuc/Magicoder-OSS-Instruct-75K
result_set = ( cursor.callfunc(fn, type.value, keywordParameters=params) if params != None else cursor.callfunc(fn, type.value) ) safely_exec(lambda c: c.close(), args=[cursor]) # * Close cursor return self.__proccess_result(result_set, type, schema) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
guard let presented = presentedViewController else { assertionFailure("Presented View Controller is missing") return completion?() ?? () } presented.dismiss(animated: animated, completion: completion) } func dismissToRoot(animated: Bool = true, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
video_codec_configuration_240p = bitmovin.codecConfigurations.H264.create(video_codec_configuration_240p).resource audio_codec_configuration_stereo = AACCodecConfiguration(name='example_audio_codec_configuration_stereo', bitrate=128000, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
pool = yield from aiopg.create_pool(dsn) with (yield from pool.cursor()) as cur: yield from cur.execute("SELECT 1") ret = yield from cur.fetchone()
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright 2013 <NAME>, <NAME> # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
ise-uiuc/Magicoder-OSS-Instruct-75K
print(sum_primes_under(10))
ise-uiuc/Magicoder-OSS-Instruct-75K
} impl<'cx> Index<ImportId<'cx>> for CtxtS<'cx> { type Output = StoredImport<'cx>; fn index(&self, id: ImportId<'cx>) -> &StoredImport<'cx> { &self.imports[id.0] } } ///////////////////////////////////////////////////////////////////////////////////////////////////// // Import alternatives
ise-uiuc/Magicoder-OSS-Instruct-75K
for r in range(iterable1_count - 1): for c in range(iterable2_count - 1): if iterable1[r] == iterable2[c]: mem[r + 1][c + 1] = mem[r][c] else: mem[r + 1][c + 1] = min( mem[r][c] + 1, mem[r + 1][c] + 1, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
author='vandot', author_email='<EMAIL>', url='https://github.com/vandot/pysoftether', packages=['softether'], )
ise-uiuc/Magicoder-OSS-Instruct-75K
search = "http://api.crunchbase.com/v/1/search.js?query=stanford&entity=person&api_key=XXXX" ##Replace XXXX with CrunchBase API key people_info = [] for i in range(300): page = i url = search + str(page) print(i) req = urllib2.Request(url) j = urllib2.urlopen(req) js = json.load(j) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
pub struct DnaDefBuf { dna_defs: CasBufFreshSync<DnaDef>, } impl DnaStore for RealDnaStore {
ise-uiuc/Magicoder-OSS-Instruct-75K
return Radical.objects.get(pk=pk) except Word.DoesNotExist: raise Http404 def get(self, request, pk, format=None): radical = self.get_object(pk) serializer = RadicalSerializer(radical) json = serializer.data json['status'] = status.HTTP_200_OK
ise-uiuc/Magicoder-OSS-Instruct-75K
to: CGPoint( x: width * segment.curve.x + xOffset, y: height * segment.curve.y ), control: CGPoint( x: width * segment.control.x + xOffset, ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# === Generating the header file def needsForwardDeclaration(type): return isInterfaceType(type) or (type.kind == 'native' and type.specialtype is None) def getTypes(classes, map={}):
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>1-10 #from utvollib.UTVolumeLibrary import * from UTpackages.UTvolrend.UTVolumeLibrary import *
ise-uiuc/Magicoder-OSS-Instruct-75K
def twoSum(self, numbers: List[int], target: int) -> List[int]: if len(numbers) <= 1: return [None, None] idx2 = len(numbers)-1 idx1 = 0 while idx1 < idx2: if numbers[idx1] + numbers[idx2] == target:
ise-uiuc/Magicoder-OSS-Instruct-75K
} // MARK: StreamDelegate func stream(_ aStream: Stream, handle eventCode: Stream.Event) { if eventCode == .hasSpaceAvailable && state.rawValue != newState { state.rawValue = newState
ise-uiuc/Magicoder-OSS-Instruct-75K
TEST_CONTAINER_PREFIX = 'tests' class TestContainers(unittest.TestCase): def setUp(self): self.loop = asyncio.get_event_loop() self.bs = TableService(account_name=ACCOUNT_NAME, account_key=ACCOUNT_KEY)
ise-uiuc/Magicoder-OSS-Instruct-75K
from urllib.parse import urlparse # Use a Chrome-based user agent to avoid getting needlessly blocked. USER_AGENT = (
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>oicr-gsi/pysmmips # -*- coding: utf-8 -*- """ Created on Tue Oct 20 16:04:52 2020 @author: rjovelin """
ise-uiuc/Magicoder-OSS-Instruct-75K
template = loader.get_template('direct/direct.html') return HttpResponse(template.render(context, request)) @login_required def UserSearch(request):
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Get the UUID for this stream (optional operation). *
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "base/win/win_util.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" namespace { const char* kTerminateEventSuffix = "_service_terminate_evt"; base::string16 GetServiceProcessReadyEventName() { return base::UTF8ToWide( GetServiceProcessScopedVersionedName("_servic...
ise-uiuc/Magicoder-OSS-Instruct-75K
case AVLayerVideoGravityResizeAspectFill: gpuImageView!.fillMode = .PreserveAspectRatioAndFill default: gpuImageView!.fillMode = .Stretch } AwesomeVisualMessage(.Info, info: "GPUImage view initialized.") return ...
ise-uiuc/Magicoder-OSS-Instruct-75K
tar -xvf kafka.tgz kafka_path=/opt/tsap/kafka_2.11-1.1.0/ ${kafka_path}bin/zookeeper-server-start.sh ${kafka_path}config/zookeeper.properties > /dev/null 2>&1 & ${kafka_path}bin/kafka-server-start.sh ${kafka_path}config/server.properties > /dev/null 2>&1 & ${kafka_path}bin/kafka-topics.sh --create --zookeeper localhos...
ise-uiuc/Magicoder-OSS-Instruct-75K
def process(record): ids = (record.get('idsurface', '') or '').split(' ') if len(ids) > 4:
ise-uiuc/Magicoder-OSS-Instruct-75K
props = { 'Artifacts': (Artifacts, True), 'Description': (basestring, False), 'EncryptionKey': (basestring, False), 'Environment': (Environment, True), 'Name': (basestring, True),
ise-uiuc/Magicoder-OSS-Instruct-75K
return view } func simulateFeedImageViewNearVisible(at row: Int) {
ise-uiuc/Magicoder-OSS-Instruct-75K
} forceUpdate(); }; return <TupleItemPickerDropdownCandidate onClick={onClicked}> <TupleItemPickerDropdownCandidateIcon icon={ICON_SELECTED} data-checked={picked}/> <span>{getNameOfCandidate(candidate)}</span> </TupleItemPickerDropdownCandidate>; };
ise-uiuc/Magicoder-OSS-Instruct-75K
// // C7Crosshatch.swift // ATMetalBand // // Created by Condy on 2022/2/15. // import Foundation /// 绘制阴影线 public struct C7Crosshatch: C7FilterProtocol {
ise-uiuc/Magicoder-OSS-Instruct-75K
################################################################### # PRIVATE (HELPER) FUNCTIONS # ################################################################### ############################################ # CODE TO BE DEPECIATED # ########################...
ise-uiuc/Magicoder-OSS-Instruct-75K
public function __construct(News $news) { $this->news = $news; } /** * Execute the job. * @throws \Exception */ public function handle()
ise-uiuc/Magicoder-OSS-Instruct-75K
assertThatDeleteDeliversNoErrorOnNonEmptyCache(on: sut) } func test_delete_emptiesPreviouslyInsertedCache() { let sut = makeSUT() assertThatDeleteEmptiesPreviouslyInsertedCache(on: sut) } // MARK: - Helpers
ise-uiuc/Magicoder-OSS-Instruct-75K
@GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private Long idCarrito; @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "carrito_item_product") private ProductModel produc...
ise-uiuc/Magicoder-OSS-Instruct-75K
s.integer(bitData); s.integer(bitOffset); s.array(output); s.integer(readBank); s.integer(readAddress); s.integer(writeBank); s.integer(r6003);
ise-uiuc/Magicoder-OSS-Instruct-75K
/usr/lib/python3.6/encodings/kz1048.py
ise-uiuc/Magicoder-OSS-Instruct-75K
token_response.raise_for_status() token = token_response.json() response = client.get( '/api/auth/users/me/', headers={'Authorization': f'Bearer {token["access_token"]}'}) response.raise_for_status() user = response.json() assert user['username'] == user_data['username'] c...
ise-uiuc/Magicoder-OSS-Instruct-75K
remote_url URL to where the data is on the web update Controls whether CAADA redownloads the needed data or not. Possible values are:
ise-uiuc/Magicoder-OSS-Instruct-75K
@login_required def edit(request,cfgid): title = 'Edit an Item' if request.method == "POST": cfgitem = ConfigurationItem.objects.get(pk=cfgid) form = EditForm(request.POST,instance=cfgitem) if form.is_valid(): form.save() request.user.message_set.create(message='Th...
ise-uiuc/Magicoder-OSS-Instruct-75K
_navigationService.NavigateTo("/Views/StopDetailsView.xaml", p); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
return "Updating done ("+time.asctime()+")<br><br>"+\ self.finmagirc() finmagircupdate.exposed = True # CherryPy always starts with cherrypy.root when trying to map request URIs # to objects, so we need to mount a request handler object here. A request # to '/' will be mapped to cherry...
ise-uiuc/Magicoder-OSS-Instruct-75K
t_children_0: vec![], } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
// You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. #include "ftpConfig.h" #include "fs.h" #include "log.h" #include <sys/stat.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
sudo ip route add default via 10.1.0.2 dev ens18
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Network serialization configuration.""" from __future__ import annotations
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace App\Models; use Illuminate\Database\Eloquent\Model; class Member extends Model { protected $table = 'members'; public function groups() { return $this->belongsToMany('App\Models\Group');
ise-uiuc/Magicoder-OSS-Instruct-75K
return [dict(record) for record in records] @router.get(
ise-uiuc/Magicoder-OSS-Instruct-75K
<button name="submit" class="btn btn-primary">delete</button> </form> </td> </tr> @endforeach </tbody> </table> </div> <div class="col-md-6"> <h4 class="font-weight...
ise-uiuc/Magicoder-OSS-Instruct-75K
x (Foo y (Bar : description
ise-uiuc/Magicoder-OSS-Instruct-75K
$id = $_POST["p_id_cliente"]; $direccion = $_POST["p_direccion_completa"]; $latitud = $_POST["p_latitud"]; $longitud = $_POST["p_longitud"];
ise-uiuc/Magicoder-OSS-Instruct-75K
// prettier-ignore export const BRIGHTNESS_CONTRAST: any[] = ["svg", { viewBox: "0 0 32 32" }, ["path", { d: "M15 2h2v3h-2zM27 15h3v2h-3zM15 27h2v3h-2zM2 15h3v2H2zM5.45 6.884l1.414-1.415 2.121 2.122-1.414 1.414zM23 7.58l2.121-2.12 1.414 1.414-2.121 2.121zM23.002 24.416l1.415-1.414 2.12 2.122-1.413 1.414zM5....
ise-uiuc/Magicoder-OSS-Instruct-75K
('title', models.CharField(max_length=250)),
ise-uiuc/Magicoder-OSS-Instruct-75K
datasetMF = merged_inner.groupby(['plot_id','taxa','sex']) #groups the dataset by the site and the taxa and the sex Counts_PTMF = datasetMF.count()['record_id'] #count the number of obs for the grouped data axes2 = Counts_PTMF.unstack(level=[1, 2]).plot(kind='bar', stacked=True) #plots the bar graph, stacking the data...
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.conf.urls import patterns, url import views urlpatterns = patterns( '', )
ise-uiuc/Magicoder-OSS-Instruct-75K
CString FormatBinary(UINT n, UINT w) { CString s; for(UINT i = 0; i < w; i++) { /* format bits */ s = ((n & 1) ? _T("1") : _T("0")) + s; n >>= 1; } /* format bits */ return s; } // FormatBinary
ise-uiuc/Magicoder-OSS-Instruct-75K
ab+ Pg+nK; } B1UW = dO+ S +tqvJ//yss + tpOwm ;} { volatile int P06d,tK8d , r5c ,//ENq
ise-uiuc/Magicoder-OSS-Instruct-75K
# Open the file ds = gdal.Open(str(input_file)) GDAL_ERROR.check("Error parsing input file", ds) # Calculate the extent from the input file source_min_lat, source_min_long, source_max_lat, source_max_long = get_raster_boundaries_gps(ds) log.debug(f"Source boundaries top(max_lat)={source_max_l...
ise-uiuc/Magicoder-OSS-Instruct-75K
// // PassthroughVisualOutletFactory.swift // JABSwiftCore // // Created by Jeremy Bannister on 6/20/18. // Copyright © 2018 Jeremy Bannister. All rights reserved. // import UIKit public class PassthroughVisualOutletFactory { private init () { }
ise-uiuc/Magicoder-OSS-Instruct-75K
def solve(self): if self.is_solved(): return
ise-uiuc/Magicoder-OSS-Instruct-75K
misc = MINIDUMP_MISC_INFO.parse(chunk) t.ProcessId = misc.ProcessId t.ProcessCreateTime = misc.ProcessCreateTime t.ProcessUserTime = misc.ProcessUserTime t.ProcessKernelTime = misc.ProcessKernelTime else: misc = MINIDUMP_MISC_INFO_2.parse(chunk) t.ProcessId = misc.ProcessId t.ProcessCreateTime...
ise-uiuc/Magicoder-OSS-Instruct-75K
fp_type = 1)
ise-uiuc/Magicoder-OSS-Instruct-75K
def with_cookies(uri): return uri + "|Cookie=" + "; ".join(["%s=%s" % (c.name, c.value) for c in COOKIE_JAR])
ise-uiuc/Magicoder-OSS-Instruct-75K
// Need to keep a strong reference to our data source.
ise-uiuc/Magicoder-OSS-Instruct-75K
from .panoptic_seg import PanopticFCN from .build_solver import build_lr_scheduler
ise-uiuc/Magicoder-OSS-Instruct-75K
# Rules
ise-uiuc/Magicoder-OSS-Instruct-75K