seed
stringlengths
1
14k
source
stringclasses
2 values
past_day = datetime.datetime.today() + datetime.timedelta(days=-keep_days) past_day_string = past_day.strftime("%Y%m%d") for filename in os.listdir(data_dir): if past_day_string in filename and include_string in filename: from_path = os.path.join(data_dir, filename) to_path ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def __getitem__(self, name): return getattr(self, name) def __setitem__(self, name, value): return setattr(self, name, value) def __str__(self): str_e = self.left.__str__() if self.left else None str_d = self.right.__str__() if self.right else None if not (str_e or ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} ]) def tearDown(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
public exJson: boolean; public native: boolean = false; constructor(private sqlite: SQLiteService, private detailService: DetailService) { } ionViewWillEnter() { if(this.sqlite.platform === "android" || this.sqlite.platform === "ios") this.native = true; this.exConn = this.detailSer...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert len(predictions) == truth.shape[0] for actual_class in range(num_outputs):
ise-uiuc/Magicoder-OSS-Instruct-75K
drop_R = np.array([[0, 1, 0], [0, 0, -1], [-1, 0, 0]]) move_height = .2 aug_traj = create_augmented_traj(env.sim.robot, pick_pos, drop_pos, pick_R, drop_R, move_height)
ise-uiuc/Magicoder-OSS-Instruct-75K
export const initialOptions = {}; export const initialMeta = {};
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash fw_depends postgresql java ./gradlew clean build jetty
ise-uiuc/Magicoder-OSS-Instruct-75K
'f_name' => ['required', 'string', 'max:255'], 'l_name' => ['required', 'string', 'max:255'], 'ff_name' => ['required', 'string', 'max:255'], 'mobile' => ['required', 'numeric', 'digits:11', 'unique:users,mobile', new ValidationMobile()], 'national_code' => ['...
ise-uiuc/Magicoder-OSS-Instruct-75K
return session
ise-uiuc/Magicoder-OSS-Instruct-75K
// import SwiftUI struct FeatureCard: View { var scene: Scene var body: some View { scene.featureImage?
ise-uiuc/Magicoder-OSS-Instruct-75K
line_search.advance_and_retreat(a0, h0, t, a, b); ASSERT_LE(a, 3.0); ASSERT_GE(b, 3.0);
ise-uiuc/Magicoder-OSS-Instruct-75K
# Store the fact that CSRF is in use for this request on the request request._csrf = True def handle_csrf(fn, _verify_origin=_verify_csrf_origin,
ise-uiuc/Magicoder-OSS-Instruct-75K
pub lookup: *mut bpf_sk_lookup, } impl SkLookupContext { pub fn new(lookup: *mut bpf_sk_lookup) -> SkLookupContext { SkLookupContext { lookup } } } impl BpfContext for SkLookupContext {
ise-uiuc/Magicoder-OSS-Instruct-75K
show: false }, categoryLabels: { show: true } }; visualBuilder.updateRenderTimeout(dataView, () => { let selector: string = ".enhancedScatterChart .mainGraphic...
ise-uiuc/Magicoder-OSS-Instruct-75K
from ...database import BaseModel if TYPE_CHECKING: from ..user.models import User
ise-uiuc/Magicoder-OSS-Instruct-75K
] }, <Question> { "id": 2, "appid": 2, "text": "When was <NAME> born?", "order": 2,
ise-uiuc/Magicoder-OSS-Instruct-75K
grade: number @Column() title: string // entity relation @OneToMany( () => OfflineCourseEntity,
ise-uiuc/Magicoder-OSS-Instruct-75K
from .__misc__ import __version__, __data_version__ from maro.utils.utils import deploy, check_deployment_status if not check_deployment_status(): deploy()
ise-uiuc/Magicoder-OSS-Instruct-75K
func updateAllDisplays(value : Double) { for display in self.valueDisplays { display.updateValue(value) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
} #[test] fn graphemes_fano() { roundtrip(TEXT, "grapheme", "fano"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
print(even(4)) print(even(-5))
ise-uiuc/Magicoder-OSS-Instruct-75K
res++; current = next; } return res; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
n = len(L1) for i in range(0, n): if L1[i] != L2[i]: equal = False if equal: print("Lists are equal.") else: print("Lists aren't equal.")
ise-uiuc/Magicoder-OSS-Instruct-75K
from PIL import Image from tqdm import tqdm from src.align.align_trans import get_reference_facial_points, warp_and_crop_face # sys.path.append("../../") from src.align.detector import detect_faces if __name__ == "__main__": parser = argparse.ArgumentParser(description="face alignment") parser.add_argument( ...
ise-uiuc/Magicoder-OSS-Instruct-75K
Create content types for models in the given app. """ if not app_config.models_module: return app_label = app_config.label try: app_config = apps.get_app_config(app_label) ContentType = apps.get_model('contenttypes', 'ContentType') except LookupError: return
ise-uiuc/Magicoder-OSS-Instruct-75K
Err(_) => return Ok(Response::new(Body::new(None))), }; let res = response.into_inner(); let output_bytes = encoder.encode(res).unwrap(); let gd = Response::new(Body::new(Some(output_bytes))); Ok(gd) } pub struct Rpc<T> { codec: T, } impl<T> Rpc<T>
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php $link = route('gestaotrocasuser.email-verification.check', $user->verification_token).'?email='.urlencode($user->email); ?> Clique aqui para verificar sua conta <a href="{{$link}}">{{$link}}</a> </p> <p>Obs.: Não responda este email, ele é gerado automaticamente</p>
ise-uiuc/Magicoder-OSS-Instruct-75K
super(self.__class__, self).keep_alive(context, cancellation_context)
ise-uiuc/Magicoder-OSS-Instruct-75K
@cache.cached(timeout=cache_timeout) def get(self): disciplines = [{'name': d, 'display': d.split('_')[0].title()} for d in sorted(data.DISCIPLINE_MAP.keys())] return ([marshal(d, discipline) for d in disciplines], 200, {'Expires': formatdate(timeval=time() + cache_timeout, usegm...
ise-uiuc/Magicoder-OSS-Instruct-75K
void draw() { static ovrPosef eyePoses[2]; ovrHmd_BeginFrame(hmd, getFrame()); ovrHmd_EndFrame(hmd, eyePoses, eyeTextures); } }; RUN_OVR_APP(DistortedExample)
ise-uiuc/Magicoder-OSS-Instruct-75K
def get_client(self, clazz, url, timeout): if self._is_metrics_enabled and self._metrics_collector is None: admin_client = ThreadSafeClient(AdminService.Client, self._credential, url, timeout, self._agent, self._protocol, None) metric_admin_client = RetryableClient(admin_client, True) self._met...
ise-uiuc/Magicoder-OSS-Instruct-75K
for k,v in test_set.items(): r.get(k) r.wait(3, 0) end = time.time() runtime = end - start ops = size * 2 throughput = float(ops/runtime) latency = float(1/throughput) print("total run time: {runtime}s \n\ number of total operations with 50% Set and 50% Get: {ops} \n\
ise-uiuc/Magicoder-OSS-Instruct-75K
go build sudo ./wireguird
ise-uiuc/Magicoder-OSS-Instruct-75K
wildcard_seed = True, wildcard_list = linkages, wildcard_na...
ise-uiuc/Magicoder-OSS-Instruct-75K
_jspx_th_c_005fout_005f3.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${actionBean.order.billToFirstName}", java.lang.Object.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null)); int _jspx_eval_c_005fout_005f3 = _jspx_th_c_005fout_005f3.doStartTag();...
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, tag, children=None, span=None): self.tag = tag self.children = children if children is not None else [] self.span = span self.index = None def __str__(self): child_string = ' + '.join(child.tag for child in self.children) return f'{self.span} {...
ise-uiuc/Magicoder-OSS-Instruct-75K
EPUBHUB_DATA_DIR = here('../data') try: from secret import SECRET_KEY except ImportError: def gen_secret_key(): print "Django's SECRET_KEY not found, generating new." from random import choice secret_key = ''.join([choice('<KEY>#$%^&*(-_=+)') for i in range(50)]) f = open(here('...
ise-uiuc/Magicoder-OSS-Instruct-75K
with open(file_path, 'w') as f: for thread in threads: f.write(f'{get_datetime(thread[0])}\t{get_datetime(thread[-1])}\t{len(thread)}\n')
ise-uiuc/Magicoder-OSS-Instruct-75K
required: [], members: { Destination: { shape: { type: "string" }, locationName: "destination" },
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 from sys import argv from base64 import b64encode with open("data", 'rb') as fIn: b = fIn.read() print(b64encode(b).decode())
ise-uiuc/Magicoder-OSS-Instruct-75K
match do_new_process(&path, &args, &host_stdio_fds) { Ok(pid_t) => pid_t as i32, Err(e) => { eprintln!("failed to boot up LibOS: {}", e.backtrace()); EXIT_STATUS_INTERNAL_ERROR }
ise-uiuc/Magicoder-OSS-Instruct-75K
this.classInvocationMap.put(createInvocationPattern, cls); } arguments.get(0).asVariable().setBuiltInResult(createClassBuiltInArgument(cls)); // Bind result to first parameter } return true; } /** * For every pattern of second and subsequent arguments, create an OWL individ...
ise-uiuc/Magicoder-OSS-Instruct-75K
import com.beeij.entity.Mouse;
ise-uiuc/Magicoder-OSS-Instruct-75K
EXAMPLE_SVG_PATH = os.path.join(os.path.dirname(__file__), 'example.svg') IDS_IN_EXAMPLE_SVG = {'red', 'yellow', 'blue', 'green'} IDS_IN_EXAMPLE2_SVG = {'punainen', 'keltainen', 'sininen', 'vihrea'} with open(EXAMPLE_SVG_PATH, 'rb') as infp: EXAMPLE_SVG_DATA = infp.read() EXAMPLE2_SVG_DATA = ( EXAMPLE_SVG_DA...
ise-uiuc/Magicoder-OSS-Instruct-75K
traceback.print_exc(); ## exec(str(cmdinput)); try: exec(code.compile_command(str(cmdinput))); except Exception: traceback.print_exc(); sys.exit(0); if(sys.argv[1]=="shebang" or sys.argv[1]=="shabang" or sys.argv[1]=="hashbang" or sys.argv[1]=="poundbang" or sys.argv[1]=="hashexclam" or sys.argv[1]=="h...
ise-uiuc/Magicoder-OSS-Instruct-75K
useFormStore(formId, (state) => state.formProps?.subaction);
ise-uiuc/Magicoder-OSS-Instruct-75K
geo_line = next(iter_content).strip() except StopIteration: raise RuntimeError("Config ends after <GEOMETRY> tag!?") while not geo_line.startswith("</GEOMETRY>"): geo_block.append(geo_line) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
{ return false; } if (damage > 0) { this.intelligence.RegisterHit(attacker); } if (damage >= this.Health) { this.Alive = false; this.Health = 0; return tr...
ise-uiuc/Magicoder-OSS-Instruct-75K
from json.decoder import JSONDecodeError from contextlib import suppress from datetime import datetime, timedelta
ise-uiuc/Magicoder-OSS-Instruct-75K
## Check that the server is well restarted ## Try to open this URL in your browser: ## http://localhost ## Should display the welcome page ("It works !")
ise-uiuc/Magicoder-OSS-Instruct-75K
maxlLan1 = max( maxlLan1, len( data[lan[1]][i] ) ) if n == 0: return False, [], [] lan0 = np.zeros( ( n, maxlLan0 ) ) lan1 = np.zeros( ( n, maxlLan1 ) ) # lan1d = np.zeros( ( n, maxlLan1, dictLength ) ) n = 0 for i in range( len( data[lan[0]] ) ): if len( data[lan[0]][...
ise-uiuc/Magicoder-OSS-Instruct-75K
of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, s...
ise-uiuc/Magicoder-OSS-Instruct-75K
"Defender", defend_pos.offset(0., symbol_size * 1.1), 20., false, ); mesh_helper.draw_white_text( ctx, msg,
ise-uiuc/Magicoder-OSS-Instruct-75K
/* TODO: output more fields whe nappropriate */
ise-uiuc/Magicoder-OSS-Instruct-75K
if return_code != 0: raise subprocess.CalledProcessError(return_code, args) break except KeyboardInterrupt: pass if __name__ == '__main__': main_cli()
ise-uiuc/Magicoder-OSS-Instruct-75K
from .heroku_client import HerokuClient
ise-uiuc/Magicoder-OSS-Instruct-75K
check_item = { "ID" : member.id, "Joined" : member.joined_at } total = len(joinedList) position = joinedList.index(check_item) + 1 before = ""
ise-uiuc/Magicoder-OSS-Instruct-75K
oid sha256:103436d8dd65fd7b785925a71590d8f451cf9c1024b05f2779295e8efd23ca48 size 1477
ise-uiuc/Magicoder-OSS-Instruct-75K
<br>
ise-uiuc/Magicoder-OSS-Instruct-75K
set -e # You can run it from any directory. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ise-uiuc/Magicoder-OSS-Instruct-75K
public enum OCKStoreError: LocalizedError { /// Occurs when a fetch fails. case fetchFailed(reason: String) /// Occurs when adding an entity fails. case addFailed(reason: String) /// Occurs when an update to an existing entity fails. case updateFailed(reason: String) /// Occurs when delet...
ise-uiuc/Magicoder-OSS-Instruct-75K
global.fetch = (request: Request, options) => { requestUsed = request; fetchOptions = options; return { then: (callback) => { let result = callback({ json: () => { return commandResult; } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->assertSame('', Str::firstIn('t', 'ttttt')); } public function testLastIn() { $this->assertSame('me', Str::lastIn('test.me', '.', true)); $this->assertSame('.me', Str::lastIn('test.it.for.me', '.')); $this->assertSame('тестер', Str::lastIn('привет тестер', ' ', true));...
ise-uiuc/Magicoder-OSS-Instruct-75K
num_float = float(string[num_index+1:]) print(num_float, type(num_float))
ise-uiuc/Magicoder-OSS-Instruct-75K
for c in line: if c in matches.keys(): stack.append(c) elif c in matches.values(): l = stack.pop() else: print(f"Unexpected {c}") return "".join([matches[c] for c in stack[::-1]])
ise-uiuc/Magicoder-OSS-Instruct-75K
initialize(options?) { super.initialize(options) this.collection = new BackboneSimpleTest1Collection() this.collection.on('add remove', this.render.bind(this)) } add(e: JQuery.TriggeredEvent<any, any, any, HTMLButtonElement>) { const input = this.$('.toAdd') as JQuery<HTMLInputElement> this.c...
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public void onCountdownEnd() { if (!mSelectedByUser) { mRunning = true; mMaskView.setVisibility(View.GONE); fillQuestion(mCurrentPosition); } else { toString();
ise-uiuc/Magicoder-OSS-Instruct-75K
ctar.addfile(cinfo, cstream) sclist = [] scpath = tmpdir / "scriptlets" for f in scpath.glob(f"{pkgname}.*"): if f.is_file() and f.suffix in _scriptlets: sclist.append(f.suffix) sclist.sort() for f in sclist: ctar.add(scpath / f...
ise-uiuc/Magicoder-OSS-Instruct-75K
IPAddress.Parse("127.0.0.1"), // IPv4 Loopback IPAddress.Parse("192.168.10.20"), // IPv4 Address (Private Network Range) IPAddress.Parse("::"), // IPv6 Any IPAddress.Parse("::0"), // IPv6 None IPAddress.Parse("::1"), // ...
ise-uiuc/Magicoder-OSS-Instruct-75K
}, shorthands: { paddingX: ['paddingLeft', 'paddingRight'], anotherPaddingX: ['paddingLeft', 'paddingRight'], }, }); export const conditionalProperties = defineProperties({
ise-uiuc/Magicoder-OSS-Instruct-75K
private readonly string connectionString; public ResourceService(string connectionString) => this.connectionString = connectionString; public async Task<List<string>> GetResourcesAsync(string resourceGroup) { List<string> resources = new(); using (SqlConnection ...
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; public interface CustomerService { Customer createCustomer(Customer customer); Page<Order> getCustomerOrdersById(int customerId, Pageable pageable); }
ise-uiuc/Magicoder-OSS-Instruct-75K
#lets call the genDSA result,signature,status=genDSA(base64.b64decode(message.encode()),private_key,algorithm) if result: data={'result':1,'signature':base64.b64encode(signature).decode()} else:
ise-uiuc/Magicoder-OSS-Instruct-75K
time_series = get_time_series_for_geometry_collection(ctx, 'demo', 'conc_tsm', dict(type="GeometryCollection", geometries...
ise-uiuc/Magicoder-OSS-Instruct-75K
use App\Repository\MailRepository; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\Validator\Constraints as Assert; use Doctrine\ORM\Mapping as ORM; /**
ise-uiuc/Magicoder-OSS-Instruct-75K
export version=${CIRCLE_BRANCH_LOWERCASE}.${CIRCLE_SHA1:0:7} export tag=${app}.${version}
ise-uiuc/Magicoder-OSS-Instruct-75K
eat();
ise-uiuc/Magicoder-OSS-Instruct-75K
pushd $WORKSPACE go get ./... popd pushd "$WORKSPACE/cmd/cf-lc-plugin" go build -ldflags "-X main.version=$version" -o $WORKSPACE/build_artifacts/log-cache-cf-plugin-dev popd pushd "$WORKSPACE/cmd/lc" go build -ldflags "-X main.version=$version" -o $WORKSPACE/build_artifacts/log-cache-standalone-dev popd
ise-uiuc/Magicoder-OSS-Instruct-75K
* @return collection of nodes */ Collection<N> getNodes(NodeType type); /** * All Redis nodes used by Redisson. * This collection may change during master change, cluster topology update and etc. * * @return collection of nodes */ Collection<N> getNodes(); /**
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Module for testing the pandas submodule."""
ise-uiuc/Magicoder-OSS-Instruct-75K
if event.x is not None and event.y is not None: if event.key in self.registrar.keys():
ise-uiuc/Magicoder-OSS-Instruct-75K
var formArrayGroup = undefined; let annotationProps = []; if (customValidations) annotationProps = customValidations.filter(t => t.annotationProps); Object.keys(object).forEach((key, index) => { var validations: any[] = []; if (instanceContainer) { let annotations = instanceCon...
ise-uiuc/Magicoder-OSS-Instruct-75K
return $this->belongsTo(Product::class,'order_id'); }
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.apps import AppConfig class HistoryConfig(AppConfig): name = 'safe_transaction_service.history' verbose_name = 'Safe Transaction Service' def ready(self): from . import signals # noqa
ise-uiuc/Magicoder-OSS-Instruct-75K
num_index = self._find_num(nums, num) if num_index != -1: return [i, num_index]
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod follow_me;
ise-uiuc/Magicoder-OSS-Instruct-75K
else: code = 0x00 # 将中文转成16进制编码
ise-uiuc/Magicoder-OSS-Instruct-75K
# Sign and post a xml example: objServ = Services( certificateContent=open("./certfiles/converted.crt", "rb").read(), rsaKeyContent=open("./certfiles/privRSAkey.pem", "rb").read(), privateKeyContent=open("./certfiles/privateKey.key", "rb").read() ) taxId = "00623904000173" taxPayerId = "00623904000173" re...
ise-uiuc/Magicoder-OSS-Instruct-75K
try: import pycurl # type: ignore except ImportError: pass else: import tornado.curl_httpclient
ise-uiuc/Magicoder-OSS-Instruct-75K
if attachment_path.exists(): if not export_attachment_path.exists(): export_attachment_path.mkdir() for attachment in attachment_path.glob('*.*'): shutil.copy2(attachment, export_attachment_path)
ise-uiuc/Magicoder-OSS-Instruct-75K
# Note that ongoing projects will not be affected by this findTeams(contributors, projects) workingProjectExists = False for index,project in enumerate(projects): if project.working: workingProjectExists = True # If a project is been worked t...
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/bash # Copyright Intel Corp. All Rights Reserved. # # SPDX-License-Identifier: Apache-2.0 SCRIPTDIR="$(dirname $(readlink --canonicalize ${BASH_SOURCE}))" FPC_TOP_DIR="${SCRIPTDIR}/../.." FABRIC_SCRIPTDIR="${FPC_TOP_DIR}/fabric/bin/" : ${FABRIC_CFG_PATH:=$(pwd)} . ${FABRIC_SCRIPTDIR}/lib/common_utils.sh
ise-uiuc/Magicoder-OSS-Instruct-75K
case ${opt} in "yes") echo "" echo "Yes, uninstall & remove all of this tendermint node" if $(systemctl -q is-active tmcore.service) ; then systemctl stop tmcore.service fi rm -fr /etc/tmcore rm -fr /home/tmcore rm -fr /usr/local/tmcore rm -fr /etc/systemd/system/tmcore.ser...
ise-uiuc/Magicoder-OSS-Instruct-75K
return srv loop = asyncio.get_event_loop() loop.run_until_complete(init(loop)) loop.run_forever()
ise-uiuc/Magicoder-OSS-Instruct-75K
} } static var chatTextMaxWidth:CGFloat = 0.7 * UIScreen.main.bounds.size.width static var baseColor:UIColor{ get{
ise-uiuc/Magicoder-OSS-Instruct-75K
break; }
ise-uiuc/Magicoder-OSS-Instruct-75K
// Probailistic search parameters used by NLFIT only: const int nPopX = 600; // Maximum number of populations in GA or random starts const int maxBitX = 16; // Maximum number of bits in GA string const int maxBestX = 150; // Maximum number of good solutions to be saved #endif
ise-uiuc/Magicoder-OSS-Instruct-75K
set -o errexit set -eo pipefail set -o nounset
ise-uiuc/Magicoder-OSS-Instruct-75K
long_desc = """The aim of this module is to provide a common base \ representation of python source code for projects such as pychecker, pyreverse, pylint... Well, actually the development of this library is essentially governed by pylint's needs. It rebuilds the tree generated by the compiler.ast [1] module (python <...
ise-uiuc/Magicoder-OSS-Instruct-75K