seed
stringlengths
1
14k
source
stringclasses
2 values
<reponame>chuanhao01/MSP_Learn_Python_Turtle import turtle pen = turtle.Turtle() pen.speed("slowest") # Let's draw something a little more interesting, a 2d grid of squares # How would you draw a grid of squares? # For each row in the grid, draw a certain number of squares (number of columns) square_width = 50 num_r...
ise-uiuc/Magicoder-OSS-Instruct-75K
return True return False if __name__ == "__main__": s1 = 'abced' s2 = 'caebd'
ise-uiuc/Magicoder-OSS-Instruct-75K
if verbose: return import inspect frame = inspect.currentframe() fname = str.split(str(frame.f_back.f_code),'"')[1] # <code object dmsg at 0x7f63ad0a08a0, file "./../src/vps/vps.py", line 47> line = str(frame.f_back.f_lineno) print ('dmsg() at ' + fname + ' : ' + line + ' ' + text_s) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
s.load_settings(args.file) s.search() print("The best deck is") print(s.best_deck) print("whose probability is") print(f"{s.best_prob * 100:.2f}%") if args.dump:
ise-uiuc/Magicoder-OSS-Instruct-75K
# 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 ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License....
ise-uiuc/Magicoder-OSS-Instruct-75K
// "$ref": "#/references/address" // }, // "toAddress": { // "$ref": "#/references/address" // } // } // }
ise-uiuc/Magicoder-OSS-Instruct-75K
int getCompletedLevels(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
""" This projection tested for when the source shape file is in WGS84 Geographic coordinate syste (EPSG:4326), but generally gdal/ogr recognizes the input srs """ cmdString = "ogr2ogr -t_srs '+proj=utm +zone=" +str(utm_zone)+ " +ellps=GRS80 +datum=NAD83 units=m' "\
ise-uiuc/Magicoder-OSS-Instruct-75K
impl<O: IsA<MemoryInputStream>> MemoryInputStreamExt for O {
ise-uiuc/Magicoder-OSS-Instruct-75K
for obj_dict in json_dict.values(): cls = obj_dict['__class__'] self.new(eval('{}({})'.format(cls, '**obj_dict')))
ise-uiuc/Magicoder-OSS-Instruct-75K
), migrations.CreateModel( name='Tag', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=20)), ('color', models.CharField(blank=True, max...
ise-uiuc/Magicoder-OSS-Instruct-75K
<td>System</td><td>XARA PAYROLL </td> </tr> <tr>
ise-uiuc/Magicoder-OSS-Instruct-75K
* /trackers end point * @param rest_server The server to register with. */ void register_with_server(restServer* rest_server); /** * @brief To get the buffer information needed in the trackers dump file, * we need to have a call back to the current kotekan mode. This fun...
ise-uiuc/Magicoder-OSS-Instruct-75K
update() addTrackingArea(trackingArea) } deinit { removeTrackingArea(trackingArea) }
ise-uiuc/Magicoder-OSS-Instruct-75K
public abstract sort(): void; }
ise-uiuc/Magicoder-OSS-Instruct-75K
<output file> name of the exported src file. Default is name of .org input file with the suffix replaced. This argument disables
ise-uiuc/Magicoder-OSS-Instruct-75K
cmass : bool, optional If True, use a consistent mass matrix instead of lumped mass. (default: False) do_rayleigh : bool, optional If True, include Rayleigh damping for this element. (default: False) corot : bool, optional If True, construct a corotTruss instead of a truss. (default:...
ise-uiuc/Magicoder-OSS-Instruct-75K
bundleIdentifier: "one.hdcola.noah.CalculatorNew", displayVersion: "1.0", bundleVersion: "1", iconAssetName: "AppIcon", accentColorAssetName: "AccentColor", supportedDeviceFamilies: [
ise-uiuc/Magicoder-OSS-Instruct-75K
# Linear Scan (Solution), O(n) time, O(1) space def countBinarySubstrings(self, s: str) -> int: ans, prev, cur = 0, 0, 1 for i in range(1, len(s)): if s[i-1] != s[i]: ans += min(prev, cur)
ise-uiuc/Magicoder-OSS-Instruct-75K
# from cryptography.fernet import Fernet # from werkzeug.security import generate_password_hash, check_password_hash from flask import jsonify, request def authorization(f): @wraps(f) def decorated(*args, **kwargs): if 'CLOUD' not in os.environ:
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @author Touki <<EMAIL>> */ class Server { /** * Ratchet app * @var App */
ise-uiuc/Magicoder-OSS-Instruct-75K
result = '' if num == 0: result = '0' while num > 0:
ise-uiuc/Magicoder-OSS-Instruct-75K
if d1 == d2: res = num[2] + d1 elif d1 > d2: res = num[0] + d2 else: res = num[1] + d1 print(res) if __name__ == '__main__': main()
ise-uiuc/Magicoder-OSS-Instruct-75K
touch $VAR_SUBSYS_CHEF_NODE RETVAL=$? ;;
ise-uiuc/Magicoder-OSS-Instruct-75K
"ALTER TABLE %s ALTER COLUMN %s SET DEFAULT NEXTVAL('%s');" % (table._rname, table._id._rname, table._sequence_name) ) self.execute(query)
ise-uiuc/Magicoder-OSS-Instruct-75K
export {useCachedNode} from './useCachedNode';
ise-uiuc/Magicoder-OSS-Instruct-75K
def testIsScopeCorrectIfDelimiterNotAtBOL(self): self.append("""$foo = @" hello
ise-uiuc/Magicoder-OSS-Instruct-75K
gcc hello_world.c -o gcc.out ./gcc.out ../../submodule/llvm-project/build/bin/clang hello_world.c -o clang.out ./clang.out
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file.
ise-uiuc/Magicoder-OSS-Instruct-75K
public function down() { Schema::dropIfExists('vendas'); }
ise-uiuc/Magicoder-OSS-Instruct-75K
raise else: if is_dir: try: files = os.listdir(base) except OSError as e: if e.errno in (errno.ENOTDIR, errno.ENOENT): # The dir was deleted/replaced between the add_watch() # and listdir() if top_level: raise NoSuchDir('The dir {0} does not exist'.format(base)) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<Typography variant="h5">{state.description}</Typography> </div> </AutoSceneLayout> ); }
ise-uiuc/Magicoder-OSS-Instruct-75K
export PATH=$PATH:/usr/local/bin cd /home/carry/Outbreak_BD/Outbreak_BD_server/midend_code/process /home/carry/p36venv/bin/python precess_train.py > log/train_log_$(date +\%Y-\%m-\%d).log 2>&1 find /home/carry/Outbreak_BD/Outbreak_BD_server/midend_code/process/log -mtime +5 -name "*.log" -exec rm -rf {} \;
ise-uiuc/Magicoder-OSS-Instruct-75K
panic!("Displaying images is supported only when the feature 'display window' is enabled."); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def greet(name): return "Hello {}".format(name) print(greet("Alice"))
ise-uiuc/Magicoder-OSS-Instruct-75K
def fetch_moves(self, date_from: datetime.datetime, date_to: datetime.datetime): self._login() response = self.session.get(self.Urls.OVERVIEW) response.raise_for_status() data = response.text.split('mc.OverviewPage.default.main(')[1].split(');')[0]
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Juan J LF on 8/30/21. // import Foundation import UIKit @objc(TextView) class TextView: RCTViewManager {
ise-uiuc/Magicoder-OSS-Instruct-75K
badger.deploy_logic("CurveTokenWrapper", CurveTokenWrapper) logic = badger.logic["CurveTokenWrapper"] bridge.adapter.setCurveTokenWrapper(logic, {"from": badger.devMultisig})
ise-uiuc/Magicoder-OSS-Instruct-75K
hbox->Add(m_lp, 1, wxEXPAND | wxALL, 5); hbox->Add(m_rp, 1, wxEXPAND | wxALL, 5); m_parent->SetSizer(hbox); this->Centre(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
def timer_memory(name):
ise-uiuc/Magicoder-OSS-Instruct-75K
minuto = int(minuto)
ise-uiuc/Magicoder-OSS-Instruct-75K
from pathlib import Path INSTALL_PATH = "{}" def down(*_): with Path(INSTALL_PATH, 'test.txt').open('w') as open_file: open_file.write('test') """.format(install_path)) create_migration(self.database, self.dir, environment, '01_test4.py', 1) create_migration(self.database, self.dir, environ...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace amillot\MeetingBundle\Model\Traits; use amillot\MeetingBundle\Model\CampaignInterface; interface CampaignAwareInterface { /** * @return CampaignInterface|null */
ise-uiuc/Magicoder-OSS-Instruct-75K
("user1", "password1", "<PASSWORD>"), ("user2", "password2", "<PASSWORD>.a"), ] ], )
ise-uiuc/Magicoder-OSS-Instruct-75K
import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity;
ise-uiuc/Magicoder-OSS-Instruct-75K
format_exc(FinancialReport.max_error_chars, err) ) raise RuntimeError(err_msg) def _getFinancialIndicatorsRegEx(self): """ Returns dict. It is a JSON with configurations which maps financial indicator to ReGex. Raises RuntimeError. """ result = dict() try: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
return dwCachedWow64; } inline size_t ALIGNUP(size_t nSize) { // If we are a 32-bit app running on a 64-bit O/S we need to use 64-bit alignment when reading or writing from the registry. if (IsRunningOnWow64()) { return ((nSize + (sizeof(DWORD64) - 1)) & ~(sizeof(DWORD64) - 1)); } ...
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh echo "### Execute the command below in Worker Nodes ###" kubeadm token create --print-join-command --ttl 0 | sed 's/kubeadm join/cks cluster join --master/g' | sed 's/discovery-token-ca-cert-hash/ca-hash/g'
ise-uiuc/Magicoder-OSS-Instruct-75K
Route::get('/v1/transform', function(Request $request) { return TransformResource::collection(Transform::all()); });
ise-uiuc/Magicoder-OSS-Instruct-75K
return ans
ise-uiuc/Magicoder-OSS-Instruct-75K
] setup(name='mysite', install_requires=requires, entry_points="""\ [paste.app_factory] main = mysite:main [console_scripts] initialize_db = mysite.scripts.initialize_db:main """ )
ise-uiuc/Magicoder-OSS-Instruct-75K
self.groupList.setMaximumWidth(100) self.layout().addWidget(self.groupList) self.layout().addWidget(self.widgetStack, stretch=1) self.orphanGroupname = orphanGroupName for group,arguments in self.groupedParser.items(): if group.title in ['positional arguments', 'optional arguments']: groupName = self...
ise-uiuc/Magicoder-OSS-Instruct-75K
* limitations under the License. */ package org.jivesoftware.sparkimpl.settings; import org.jivesoftware.resource.Default; public class JiveInfo { private JiveInfo() {
ise-uiuc/Magicoder-OSS-Instruct-75K
MethodBuilder^ meb = tb->DefineMethod("M", MethodAttributes::Public | MethodAttributes::Static); array<GenericTypeParameterBuilder^>^ typeParams = meb->DefineGenericParameters(gcnew array<String^> { "T" }); // Give the method one parameter, of type T, and a // return type of T....
ise-uiuc/Magicoder-OSS-Instruct-75K
env={ "USER_ABC": f"123_{PF_USER_NAME}", "PF_JOB_TYPE": "vcjob", "PF_JOB_QUEUE_NAME": "ppl-queue", "PF_JOB_MODE": "Pod", "PF_JOB_FLAVOUR": "flavour1", },
ise-uiuc/Magicoder-OSS-Instruct-75K
time = clamp(0, 30000, time)
ise-uiuc/Magicoder-OSS-Instruct-75K
credentials = {}
ise-uiuc/Magicoder-OSS-Instruct-75K
""" db_url = gxy_db_url or self.gxy_db_url try: engine = create_engine(db_url) version = self._get_gxy_alembic_db_version(engine) if not version: version = self._get_gxy_sam_db_version(engine) if version != SQLALCHEMYMIGRATE_LAS...
ise-uiuc/Magicoder-OSS-Instruct-75K
uri = "/rest/v1/system/ports/{0}".format(interface_encoded) self.sensor._logger.debug('[AOSCXPortSensor]: Subscribe ' 'to URI {0}...'.format(uri) ) return uri # Makes a trigger from a JSON object def _make_trigger(self,...
ise-uiuc/Magicoder-OSS-Instruct-75K
argument_list|( name|message argument_list|, operator|( name|byte operator|) literal|'\r' argument_list|) expr_stmt|; name|String
ise-uiuc/Magicoder-OSS-Instruct-75K
# Save info cas_orbs = mc.mo_coeff mc = mcscf.CASCI(mf, len(mos), ele) mc.fcisolver.nroots = 2
ise-uiuc/Magicoder-OSS-Instruct-75K
ccstd::string &StringUtil::toupper(ccstd::string &str) {
ise-uiuc/Magicoder-OSS-Instruct-75K
# vtx_normal_vec = np.zeros((self.surf_vindex.size,3)) # i = 0 # for iv in self.surf_vindex: # iv_tri_index = np.argwhere(self.tri_elements==iv)[:,0] # iv_tri_nv = self.tri_normal_vec[iv_tri_index] # vtx_normal_vec[i] = iv_tri_nv.sum(axis=0) # ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Override point for customization after application launch. print(TestClassA.classMethod(print: "iTestFramework sample is working")) print("TestClassA instance \(TestClassA.shared)")
ise-uiuc/Magicoder-OSS-Instruct-75K
return if type(data[0]) != int: self.logger.info("ICN Layer expects to receive [face id, packet] from lower layer") return if not isinstance(data[1], Packet): self.logger.info("ICN Layer expects to receive [face id, packet] from lower layer") r...
ise-uiuc/Magicoder-OSS-Instruct-75K
take a while to finish.
ise-uiuc/Magicoder-OSS-Instruct-75K
friend bool operator == ( const feed_index& a, const feed_index& b ) { return std::tie( a.quote_id, a.delegate_id ) == std::tie( b.quote_id, b.delegate_id ); } };
ise-uiuc/Magicoder-OSS-Instruct-75K
// Display the graph $graph->Stroke();
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.db import migrations import picklefield.fields class Migration(migrations.Migration): dependencies = [ ('mainsite', '0014_mlmodel_type_num'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
average_price: CompetitorMetrics; @Field((type) => CompetitorMetrics, { nullable: true }) worst_price: CompetitorMetrics; }
ise-uiuc/Magicoder-OSS-Instruct-75K
filename = "frontend/views/index-optimize.html" arq = open(filename) content = arq.read() if "io.prismic.preview" in request.cookies: content = content.replace( "{{prismicjs}}", "<script type=\"text/javascript\" src=\"//static.cdn.prismic.i...
ise-uiuc/Magicoder-OSS-Instruct-75K
op.drop_table('restaurant') op.drop_table('category') op.drop_table('business_upload') # ### end Alembic commands ###
ise-uiuc/Magicoder-OSS-Instruct-75K
/** @var int */ private $min; /** @var string[] */ private $time; /** * @param int $amount * @param int $min * @param string[] $time */ public function __construct(int $amount, int $min, array $time){
ise-uiuc/Magicoder-OSS-Instruct-75K
from plenum.common.messages.node_messages import PrePrepare, Prepare, Commit class BlsBftReplica(metaclass=ABCMeta): PPR_BLS_MULTISIG_WRONG = 1
ise-uiuc/Magicoder-OSS-Instruct-75K
if i < 0xfd: return bytes([i]) order = 1 if order > 3: raise ValueError("integer too large: {}".format(i)) return bytes([0xfc+order]) + i.to_bytes(2**order, 'little')
ise-uiuc/Magicoder-OSS-Instruct-75K
class XmptConfig(AppConfig): name = 'xmpt'
ise-uiuc/Magicoder-OSS-Instruct-75K
))(i) } pub fn group(i: Input) -> Result<Expression> { between_parens(expression)(i) } // primary // : literal // | '(' expression ')' // | symbol invocation // | primary op='.' symbol invocation? // | primary arrayAccess
ise-uiuc/Magicoder-OSS-Instruct-75K
{ Amat_ = NULL; if ( mli_ != NULL ) delete mli_; } /****************************************************************************** * set up the solver *---------------------------------------------------------------------------*/
ise-uiuc/Magicoder-OSS-Instruct-75K
return values['NREF'] == len(values['DATA']) or \ 'Number of reference systems differs from NREF' result_class = ReferenceSystemSection section = ReferenceSystemSectionDefinition
ise-uiuc/Magicoder-OSS-Instruct-75K
this.currentAuthority = currentAuthority; this.type = LoginCommon.TYPE; } public LoginResponse(String status) { this.status = status; this.currentAuthority = LoginCommon.AUTHORITY; this.type = LoginCommon.TYPE; } public LoginResponse() { }
ise-uiuc/Magicoder-OSS-Instruct-75K
struct LifetimeParam<'a> { s: &'a str, } struct GenericParam<T> { t: T, } #[warn(clippy::transmute_ptr_to_ptr)] fn transmute_ptr_to_ptr() {
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Text; using System.Threading.Tasks; namespace LSH.APP.Code.Generator.Common { public class AppContext { public static DatabaseConnectionOption DatabaseInfo { get; set; }
ise-uiuc/Magicoder-OSS-Instruct-75K
@login_required def delete_purchase(id): get_purchase(id) db = get_db() db.execute('DELETE FROM pembelian WHERE id_pembelian = ?', (id,)) db.commit() return redirect(url_for('purchase.index'))
ise-uiuc/Magicoder-OSS-Instruct-75K
#list of age ranges used to make labels AGE_RANGE_LIST = list(range(0,12)) #List of education ranges used to make labels EDU_RANGE_LIST = list(range(0,7)) #Tools used in Bokeh plotting TOOLS = "pan,wheel_zoom,reset,poly_select,box_select,tap,box_zoom,save" #List of zip codes used for PSRC data USED_ZIPS_PSRC = ['98101...
ise-uiuc/Magicoder-OSS-Instruct-75K
box.resize(rows, cols); box.fill(false); goal.resize(rows, cols); goal.fill(false);
ise-uiuc/Magicoder-OSS-Instruct-75K
self.alpha_values = alpha_values
ise-uiuc/Magicoder-OSS-Instruct-75K
AlCaNano.__init__(self) self.skims=['EcalPhiSymByRun'] self.eras=Run3 self.recoSeq = ':bunchSpacingProducer+ecalMultiFitUncalibRecHitTask+ecalCalibratedRecHitTask' self.promptCustoms = [ 'Calibration/EcalCalibAlgos/EcalPhiSymRecoSequence_cff.customise' ]
ise-uiuc/Magicoder-OSS-Instruct-75K
moeda.resumo(valor, 30, 30)
ise-uiuc/Magicoder-OSS-Instruct-75K
fileName = date.today().strftime("%y%m%d")+"-beamCurrent"+".log" np.savetxt(fileName,DataOut) def close(self): self.device.write("KEY:FORCE")
ise-uiuc/Magicoder-OSS-Instruct-75K
esac versionManifestUrl=$(curl -fsSL 'https://launchermeta.mojang.com/mc/game/version_manifest.json' | jq --arg VANILLA_VERSION "$VANILLA_VERSION" --raw-output '[.versions[]|select(.id == $VANILLA_VERSION)][0].url') serverDownloadUrl=$(curl -fsSL "${versionManifestUrl}" | jq --raw-output '.downloads.server.url') cur...
ise-uiuc/Magicoder-OSS-Instruct-75K
package de.jcup.asciidoctoreditor.asciidoc; import java.util.Collections; import java.util.Map; import java.util.TreeMap; public class AsciiDocDocumentAttributeScanner {
ise-uiuc/Magicoder-OSS-Instruct-75K
self.add_field('RESERVED_5', 's', 12, value) self.add_field('RESERVED_6', 's', 12, value) self.add_field('RESERVED_7', 's', 12, value) self.add_field('RESERVED_8', 's', 12, value) self.add_field('BWC', 's', 12, value) class CSPROA(TREExtension): _tag_value = 'CSPROA' _d...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Created on Wed Oct 05 22:21:42 2016 @author: Windo """ import string # abbrevation of Chinese provinces,the first char of a plate provinces = u"京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新" digits = string.digits
ise-uiuc/Magicoder-OSS-Instruct-75K
import androidx.recyclerview.widget.RecyclerView; import com.nankung.common.R; public class AnimatedRecyclerView extends RecyclerView { private int orientation = LinearLayoutManager.VERTICAL; private boolean reverse = false; private int animationDuration = 250; private int layoutManagerType = LayoutMa...
ise-uiuc/Magicoder-OSS-Instruct-75K
import re def urljoin(*pieces): """Join a URL Joins the pieces together to an URL.
ise-uiuc/Magicoder-OSS-Instruct-75K
authData: { token: localStorage.getItem("Token"), isLogin: localStorage.getItem("Token") != null }, });
ise-uiuc/Magicoder-OSS-Instruct-75K
field = make_field(name='foo_bar', type='TYPE_BYTES') assert field.mock_value == "b'foo_bar_blob'" def test_mock_value_original_type_bytes(): field = make_field(name='foo_bar', type='TYPE_BYTES') assert field.mock_value_original_type == b"foo_bar_blob"
ise-uiuc/Magicoder-OSS-Instruct-75K
Sound(Context context, int id) { mPlayer = MediaPlayer.create(context,id); } public void play() { mPlayer.seekTo(0); mPlayer.start(); } public void stop() { mPlayer.stop(); mPlayer.release(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
msg.append(ms+('{:>'+str(len_msg)+'}').format(str(status))) print (' ' * spacing_fragments).join(msg) # Script if __name__ == '__main__': # Parse input args parser = argparse.ArgumentParser(description='Check sequencing run for missing parts of the analysis', ...
ise-uiuc/Magicoder-OSS-Instruct-75K
rm -f "${filepath}" done }
ise-uiuc/Magicoder-OSS-Instruct-75K