seed
stringlengths
1
14k
source
stringclasses
2 values
without affecting the object inside the queue. """ message = {'value': [1, 2, 3]} self.channel_layer.send('channel', message)
ise-uiuc/Magicoder-OSS-Instruct-75K
dependencies = [ ('backend', '0001_initial'), ] operations = [ migrations.CreateModel( name='Song', fields=[ ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True, verbose_name='id')), ('description', models.CharField(max_length=256, verbose_name='description')), ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Album')), ], options={ 'abstract': False,
ise-uiuc/Magicoder-OSS-Instruct-75K
public let data: [LibraryPlaylistRequestTrack] }
ise-uiuc/Magicoder-OSS-Instruct-75K
convert $1 -unique-colors -scale 1000% $1_color_table.gif
ise-uiuc/Magicoder-OSS-Instruct-75K
// Print result if moves.is_empty() { println!("Not solvable"); } else { println!("{} {}", moves.len() / 2, moves); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
sim_predict_norm = (1+tf.clip_by_value(similarity_predict, 0.01, math.inf))/2 prediction = tf.argmax(similarity_predict,axis=1) embed_true = tf.nn.embedding_lookup(EMBEDDING_TENSOR, word_true) similarity = tf.matmul(embed_true, tf.transpose(EMBEDDING_TENSOR)) sim_norm = (1+similarity)/2 cross_entropy = tf.reduce_mean(-tf.reduce_sum(sim_norm * tf.log(sim_predict_norm), 1)) diff_loss = tf.reduce_mean(tf.reduce_sum(tf.square(embed_predict-embed_true)))
ise-uiuc/Magicoder-OSS-Instruct-75K
let constraints = [ widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: multiplier, constant: offset).with(priority), heightAnchor.constraint(equalTo: view.heightAnchor, multiplier: multiplier, constant: offset).with(priority) ] if isActive { NSLayoutConstraint.activate(constraints) } return constraints } @discardableResult func constrainAspectRatio(to size: CGSize, relation: ConstraintRelation = .equal, isActive: Bool = true) -> NSLayoutConstraint {
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": print("generating int list...") int_list = random.sample(range(1, 50), 10) print_list(int_list, len(int_list)) print(f'selection_sort') selection_sort(int_list, len(int_list)) print_list(int_list, len(int_list)) #insertion_sort #time complexity: O(n^2)
ise-uiuc/Magicoder-OSS-Instruct-75K
}; use core::ecs::{life_cycle::EntityChanges, Comp, Entity, Universe, WorldRef}; use std::collections::HashMap;
ise-uiuc/Magicoder-OSS-Instruct-75K
<h4 class="modal-title">Ajouter un service au client</h4> </div> <div class="modal-body row"> <div class="col-md-8 form-group"> Service <em class="text-danger">*</em><select name="Sce_code_service" id="Sce_code_service" class="form-control placeholder-no-fix"> @foreach($services as $service) <option value="{{ $service['sce_code_service'] }}">{{ $service['sce_nom_service'] }}</option> @endforeach </select> </div> <div class="col-md-4 form-group">
ise-uiuc/Magicoder-OSS-Instruct-75K
class NewsLatestEntriesPlugin(NewsPlugin): """ Non cached plugin which returns the latest posts taking into account the user / toolbar state """ name = _('Latest News') model = LatestNewsPlugin form = LatestEntriesForm filter_horizontal = ('category',)
ise-uiuc/Magicoder-OSS-Instruct-75K
if success: return user_service.response(success,status_code=200) else: return user_service.response(status_code=500) return user_service.response(status_code=403) @users_bp.route("/users/<id>", methods=["GET"]) def get_one_user(id): accessible_roles = ["SUPER_ADMIN","TENANT_ADMIN", "USER"]
ise-uiuc/Magicoder-OSS-Instruct-75K
using System.Linq; using System.Management.Automation;
ise-uiuc/Magicoder-OSS-Instruct-75K
}); }); window.addEventListener("resize", function () { dataTableInitialise(); }); function dataTableInitialise() { $('#VinylTable').dataTable({ "aoColumns": [ { "sType": "text" },
ise-uiuc/Magicoder-OSS-Instruct-75K
private: template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
public static void draw(Graphics2D g) { g.setColor(Color.black); g.fillRect(0,0,1144,800); g.setColor(new Color(180,0,0)); g.setFont(new Font("Helvetica", Font.BOLD, 75)); g.drawString("INFINITE DUNGEON CRAWLER",15,200); g.setColor(Color.white); g.setFont(new Font("Default", Font.PLAIN, 30)); g.drawString("Welcome to",485,100); g.drawString("By <NAME>",450,400);
ise-uiuc/Magicoder-OSS-Instruct-75K
</div><!-- /.form group --> <div class="form-group"> <label>Sampai Tanggal :</label>
ise-uiuc/Magicoder-OSS-Instruct-75K
user = models.OneToOneField(User, blank=True, null=True) email = models.EmailField(blank=False, unique=True) def __str__(self): if (self.user): return self.user.get_full_name() + ' (' + self.user.get_username() + ')' else: return "Awaiting Confirmation" + ' (' + self.email + ')'
ise-uiuc/Magicoder-OSS-Instruct-75K
export { Transgender32 as default } from "../../";
ise-uiuc/Magicoder-OSS-Instruct-75K
operations = [ migrations.AlterModelOptions( name='company', options={'verbose_name_plural': 'Şirketler'}, ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
model.config.vocab_size = len(token_ids_temp) old_word_embeddings_shared, old_word_embeddings_encoder, old_word_embeddings_decoder = \ model.shared, model.encoder.embed_tokens, model.decoder.embed_tokens old_word_embeddings_shared_weight, old_word_embeddings_encoder_weight, old_word_embeddings_decoder_weight = \ old_word_embeddings_shared.weight, old_word_embeddings_encoder.weight, old_word_embeddings_decoder.weight
ise-uiuc/Magicoder-OSS-Instruct-75K
enable_auto_commit=True, # How often to tell Kafka, an offset has been read auto_commit_interval_ms=1000 ) # Prints messages once, then only new ones! for message in consumer: print(loads(message.value))
ise-uiuc/Magicoder-OSS-Instruct-75K
import numpy as np import gym_electric_motor as gem import matplotlib.pyplot as plt
ise-uiuc/Magicoder-OSS-Instruct-75K
strokeTop += this.sProjectionOffsetY; } this.sStuffer.drawStroke(danmaku, lines[t], canvas, strokeLeft, strokeTop, paint);
ise-uiuc/Magicoder-OSS-Instruct-75K
df.rename(columns={df.columns[0]: area_str, df.columns[1]: pop_str}, inplace=True)
ise-uiuc/Magicoder-OSS-Instruct-75K
// System.out.println("Locale.getLanguage = " + locale2.get); // System.out.println("Locale.getLanguage = " + locale2.get); // System.out.println("Locale.getLanguage = " + locale2.get); System.out.println(); } public static void main(String[] args) { Locale locale = Locale.getDefault(); LocaleExample.printLocale("Locale.getDefault", locale); Locale locale2 = Locale.forLanguageTag("sk"); LocaleExample.printLocale("Locale.forLanguage('sk')", locale2); Locale localeDisplay = Locale.getDefault(Locale.Category.DISPLAY);
ise-uiuc/Magicoder-OSS-Instruct-75K
def setUp(self): self.article = Article.objects.create(title="September", slug="september", body="What I did on September...") self.form = django_comments_tree.get_form()(self.article) def test_get_comment_model(self): # check get_comment_model retrieves the due model class self.assertTrue(self.form.get_comment_model() == TmpTreeComment) def test_get_comment_create_data(self): # as it's used in django_comments.views.comments data = {"name": "Daniel",
ise-uiuc/Magicoder-OSS-Instruct-75K
# lr anneal & output if word_count_actual.value - prev_word_cnt > 10000: #if args.lr_anneal: # lr = args.lr * (1 - word_count_actual.value / (n_iter * args.train_words)) # if lr < 0.0001 * args.lr: # lr = 0.0001 * args.lr # for param_group in optimizer.param_groups: # param_group['lr'] = lr #sys.stdout.write("\rAlpha: %0.8f, Progess: %0.2f, Words/sec: %f, word_cnt: %d" % (lr, word_count_actual.value / (n_iter * args.train_words) * 100, word_count_actual.value / (time.monotonic() - args.t_start), word_count_actual.value)) sys.stdout.write("\rProgess: %0.2f, Words/sec: %f, word_cnt: %d" % (word_count_actual.value / (n_iter * args.train_words) * 100, word_count_actual.value / (time.monotonic() - args.t_start), word_count_actual.value)) sys.stdout.flush() prev_word_cnt = word_count_actual.value
ise-uiuc/Magicoder-OSS-Instruct-75K
WHERE noc.noc_id = noc_id ORDER BY noc_id; ''' try: cursor.execute(query) except Exception as e:
ise-uiuc/Magicoder-OSS-Instruct-75K
import { Dataset } from './entities/dataset.entity'; @Controller('datasets') export class DatasetsController { constructor( private readonly datasetsService: DatasetsService, private readonly datasetProviderService: DatasetProvidersService, ) {} @Get('providers') @ApiResponse({ status: HttpStatus.OK, description: 'The list of available dataset provider names.', type: String,
ise-uiuc/Magicoder-OSS-Instruct-75K
print(msg)
ise-uiuc/Magicoder-OSS-Instruct-75K
currentModifiers = sl::EnumSetFlagState(currentModifiers, KeyModFlags::RightGui, released); break; default: return; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': assert parse_cookie('name=Dima;') == {'name': 'Dima'} assert parse_cookie('') == {} assert parse_cookie('name=Dima;age=28;') == {'name': 'Dima', 'age': '28'} assert parse_cookie('name=Dima=User;age=28;') == {'name': 'Dima=User', 'age': '28'}
ise-uiuc/Magicoder-OSS-Instruct-75K
public setNextWarning(arg0: javax.sql.rowset.RowSetWarning): void } } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
class TestGhprbLogConfigurePage(WebAppTest): def setUp(self): super(TestGhprbLogConfigurePage, self).setUp() config_path = os.getenv('CONFIG_PATH') try: yaml_contents = open( "{}/log_config.yml".format(config_path), 'r' ).read() except IOError: pass self.log_config = yaml.safe_load(yaml_contents) self.ghprb_log_configure_page = GhprbLogConfigurePage(self.browser)
ise-uiuc/Magicoder-OSS-Instruct-75K
setUpViews() setUpConstraints() update() } public convenience init(colorName: String, colorCode: String, color: NSColor, selected: Bool) { self.init(Parameters(colorName: colorName, colorCode: colorCode, color: color, selected: selected)) } public convenience init() {
ise-uiuc/Magicoder-OSS-Instruct-75K
# "using <a href=\"password/\">this form</a>.")) # # class Meta: # model = User # # def __init__(self, *args, **kwargs): # super(UserChangeForm, self).__init__(*args, **kwargs) # f = self.fields.get('user_permissions', None) # if f is not None: # f.queryset = f.queryset.select_related('content_type')
ise-uiuc/Magicoder-OSS-Instruct-75K
}; export default _default;
ise-uiuc/Magicoder-OSS-Instruct-75K
self._sort_attrs = sort_attrs self._dict = dict(**kwargs) def __getitem__(self, key): return self._dict[key] def __setitem__(self, key, value): self._dict[key] = value def __delitem__(self, key, value): self._dict[key] = value
ise-uiuc/Magicoder-OSS-Instruct-75K
return res.json({ success: true, });
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "../Data Structures/BinarySearchTree.h" int main() { int temp; std::ifstream in("input.txt"); std::ofstream out("output.txt"); data_structures::BinarySearchTree<int> tree; while (in >> temp) { tree.add(temp); } std::function<void(int&)> print = [&out](int& key) { out << key << "\n"; };
ise-uiuc/Magicoder-OSS-Instruct-75K
export function decompress(arr: Uint8Array, max_uncompressed_size: number): Promise<Uint8Array>;
ise-uiuc/Magicoder-OSS-Instruct-75K
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ise-uiuc/Magicoder-OSS-Instruct-75K
self?.refreshViewTitle()
ise-uiuc/Magicoder-OSS-Instruct-75K
rm -Rf results mkdir results sudo docker build -t kaa-arch . sudo docker run -v $PWD/results:/kaa-dynamic/figures -v $PWD/results:/kaa-dynamic/data kaa-arch:latest \ python3 -c "from examples.test_arch21 import *; run_all_benchmarks()"
ise-uiuc/Magicoder-OSS-Instruct-75K
n, min_val, max_val = int(input('n=')), int(input('minimum=')), int(input('maximum=')) c = i = 0 while True: i, sq = i+1, i**n if sq in range(min_val, max_val+1): c += 1 if sq > max_val: break print(f'{c} values raised to the power {n} lie in the range {min_val}, {max_val}')
ise-uiuc/Magicoder-OSS-Instruct-75K
# Parameters: # code - string, value of the authorization code # refresh_token - string, value of the refresh token # grant_type - enum, one of 'authorization_code' (for an authorization code) # or 'refresh_token', for a refresh token # scope - optional, enum, one of 'read_write' or 'read_only', # defaults to the scope of the authorize request # or the scope of the refresh token. #
ise-uiuc/Magicoder-OSS-Instruct-75K
@computed_table( input_assets=[sfo_q2_weather_sample_table], columns=[Column("valid_date", date32()), Column("max_tmpf", float64())], ) def daily_temperature_highs_table(sfo_q2_weather_sample: pd.DataFrame) -> pd.DataFrame: """Computes the temperature high for each day""" sfo_q2_weather_sample["valid_date"] = pd.to_datetime(sfo_q2_weather_sample["valid"]) return sfo_q2_weather_sample.groupby("valid_date").max().rename(columns={"tmpf": "max_tmpf"})
ise-uiuc/Magicoder-OSS-Instruct-75K
bool guid::equals(const object& g) const noexcept { return dynamic_cast<const guid*>(&g) && equals(static_cast<const guid&>(g)); } bool guid::equals(const guid& g) const noexcept { for (size_t index = 0; index < 16; index++) if (data_[index] != g.data_[index]) return false; return true; } guid guid::new_guid() noexcept { return guid(native::guid::new_guid()); }
ise-uiuc/Magicoder-OSS-Instruct-75K
# tolerance for coordinate comparisons tolc = 1e-9*nm dim = 2 # cylinder radius R = 40*nm # cylinder length
ise-uiuc/Magicoder-OSS-Instruct-75K
</select> {{--<input type="text" name="selectItem" class="form-control" style="width: 100%">--}} <span class="input-group-btn search-panel"> <button type="button" class="btn btn-default" data-toggle="tooltip" onclick="oPage.addItem(this)" data-placement="bottom" title="" data-original-title="Buscar..."> <i class="fa fa-plus"></i> </button> </span> </div> </div> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
tmp = preds_list[i] tmp = tmp[2] # print(tmp.shape) tmp = torch.sigmoid(tmp) if args_in.train_data != 'ML-Hypersim': tmp = tmp.unsqueeze(dim=0) tmp = tmp.cpu().detach().numpy() res_data.append(tmp) if args_in.train_data == 'ML-Hypersim': vis_imgs = visualize_result_ml_hypersim(res_data, scene_name, arg=args_in) else: vis_imgs = visualize_result(res_data, arg=args_in)
ise-uiuc/Magicoder-OSS-Instruct-75K
] if settings.DEBUG: urlpatterns+= static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
ise-uiuc/Magicoder-OSS-Instruct-75K
} public string Value { get; private set; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
LeavePartyMessageRecord, PartyLeaderChangeMessageRecord, SelfJoinPartyMessageRecord, } from './party-message-records' // How many messages should be kept when a party is inactive const INACTIVE_PARTY_MAX_HISTORY = 500 export class PartyUserRecord extends Record({ id: 0 as SbUserId, name: '', }) implements PartyUser {}
ise-uiuc/Magicoder-OSS-Instruct-75K
CommandExtra(int cmd, String cmdName) { this.cmd = cmd; this.cmdName = cmdName; } private final int cmd; public int getCmd() { return cmd; } public String getCmdName() { return cmdName;
ise-uiuc/Magicoder-OSS-Instruct-75K
return file.delete(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>miathedev/BoostForArduino #include <boost/mpl/math/is_even.hpp>
ise-uiuc/Magicoder-OSS-Instruct-75K
import { LoginComponent } from "./login/login.component"; import { DashboardComponent } from "./dashboard/dashboard.component"; import { AuthGuard } from "./auth.guard"; import { AgGridComponent } from "./ag-grid/ag-grid.component";
ise-uiuc/Magicoder-OSS-Instruct-75K
"\\uXXXX and \\UXXXXXXXX (C, Python)", "\\u{XXXX} (JavaScript ES6+, PHP 7+)", "`u{XXXX} (PowerShell 6+)",
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copy test workspace test_workspace_dir_source = Path(data_dir) / 'actevedef_718448162' test_workspace_dir = tmp_path / 'test_ocrd_cli' shutil.copytree(str(test_workspace_dir_source), str(test_workspace_dir)) # Run through the OCR-D interface with working_directory(str(test_workspace_dir)): runner = CliRunner() result = runner.invoke(ocrd_dinglehopper, [ '-m', 'mets.xml',
ise-uiuc/Magicoder-OSS-Instruct-75K
import { TradeEntry } from './trade-entry'; export interface Trade { items: TradeEntry[]; currencies: TradeEntry[]; }
ise-uiuc/Magicoder-OSS-Instruct-75K
public void setUp() throws Exception { debugEvent = new DebugEventService(); FloodlightModuleContext fmc = new FloodlightModuleContext(); IShutdownService shutdownService = EasyMock.createMock(IShutdownService.class); shutdownService.registerShutdownListener(anyObject(IShutdownListener.class)); EasyMock.expectLastCall().once();
ise-uiuc/Magicoder-OSS-Instruct-75K
from helios.backends.fury.draw import NetworkDraw __version__ = '0.1.0' __release__ = 'beta'
ise-uiuc/Magicoder-OSS-Instruct-75K
# Kill cfprefsd killall cfprefsd fi # set the local userbackup account to manual if [ -d /private/var/userbackup/Library/Preferences/ ]; then defaults write /private/var/userbackup/Library/Preferences/com.microsoft.autoupdate2 HowToCheck -string Automatic # Correct permissions on the file chown userbackup /private/var/userbackup/Library/Preferences/com.microsoft.autoupdate2.plist # Kill cfprefsd
ise-uiuc/Magicoder-OSS-Instruct-75K
__version__ = '0.1.0' __all__ = ['Sanic', 'Blueprint']
ise-uiuc/Magicoder-OSS-Instruct-75K
} /// <summary> /// 转换可枚举集合到一个分隔的字符串 /// </summary>
ise-uiuc/Magicoder-OSS-Instruct-75K
#flash() 函数用来在视图函数里向模板传递提示消息,消息存储在session中 #get_flashed_messages() 函数则用来在模板中获取提示消息 flash("title and year are required.") return redirect(url_for('index')) elif len(year)!=4 or len(title)>60: flash("info format is invalid") return redirect(url_for('index')) movie = Movie(title=title,year=year) db.session.add(movie) db.session.commit() flash("item created.") return redirect(url_for('index')) else: user = User.query.first()
ise-uiuc/Magicoder-OSS-Instruct-75K
qDt= scrapy.Field() pass
ise-uiuc/Magicoder-OSS-Instruct-75K
blocks = [] pretrained = True self.vgg_pretrained_features = models.vgg19(pretrained=pretrained).features self.normalize = MeanShift([0.485, 0.456, 0.406], [0.229, 0.224, 0.225], norm=True).cuda() for param in self.parameters(): param.requires_grad = False def forward(self, X, Y, indices=None): X = self.normalize(X) Y = self.normalize(Y)
ise-uiuc/Magicoder-OSS-Instruct-75K
version='0.1.0', description='You work at Rossmann Pharmaceuticals as a data scientist.', author='<NAME>', license='MIT', )
ise-uiuc/Magicoder-OSS-Instruct-75K
This is not a parallel version! """ import math import random import sys from bunch import Bunch from orbit.teapot import TEAPOT_MATRIX_Lattice
ise-uiuc/Magicoder-OSS-Instruct-75K
} @Override public void getSubItems(CreativeTabs creativeTab, NonNullList itemList) { if (!this.isInCreativeTab(creativeTab)) return; for (StorageType type : CellDefinition.components) { if (type.getDefinition() == CellDefinition.GAS && !Integration.Mods.MEKANISMGAS.isEnabled()) {
ise-uiuc/Magicoder-OSS-Instruct-75K
with open("results/results_stencils.json") as file: db = json.loads(file.read()) versions = [ # (Version, Dimension, Domain dim, Radius, Iterations, Block dimensions, Host) ("1_gpus_base", "3", "1024", "16", "8", "heuristic", "heid"), ("8_gpus_base", "3", "1024", "16", "8", "heuristic", "heid"), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
from .blocking import BlockingInProcessKernelClient return BlockingInProcessKernelClient @default('session') def _default_session(self): # don't sign in-process messages return Session(key=INPROCESS_KEY, parent=self) #--------------------------------------------------------------------------
ise-uiuc/Magicoder-OSS-Instruct-75K
import struct def get_argparser(): parser = argparse.ArgumentParser(description="Calculate an application hash from the application's hex file.") parser.add_argument("--hex", help="The application hex file to be hashed", required=True) parser.add_argument("--targetId", help="The device's target ID (default is Ledger Blue)", type=auto_int) parser.add_argument("--targetVersion", help="Set the chip target version") return parser def auto_int(x): return int(x, 0) if __name__ == '__main__': from .hexParser import IntelHexParser
ise-uiuc/Magicoder-OSS-Instruct-75K
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 7d productpage ClusterIP 10.0.0.120 <none> 9080/TCP 6m ratings ClusterIP 10.0.0.15 <none> 9080/TCP 6m reviews ClusterIP 10.0.0.170 <none> 9080/TCP 6m ENDSNIP
ise-uiuc/Magicoder-OSS-Instruct-75K
self.per_person = Counter(task.assignee for task in tasks) def assign(self, task, person): task.assignee = person self.per_person[person] += 1 return task def assigned_to(self, person):
ise-uiuc/Magicoder-OSS-Instruct-75K
Parameters ---------- cookie : str The value of session cookie. Returns
ise-uiuc/Magicoder-OSS-Instruct-75K
if (newShowDerivative != showDerivative) {
ise-uiuc/Magicoder-OSS-Instruct-75K
def draw(): fill(color(255, 153, 0)) ellipse(100, 100, 50, 50)
ise-uiuc/Magicoder-OSS-Instruct-75K
id } }); res.json(user);
ise-uiuc/Magicoder-OSS-Instruct-75K
); } /** * Calculates the bonus of acute angles. */ protected static calculateAcuteAngleBonus(angle: number): number { return 1 - this.calculateWideAngleBonus(angle); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
@app.route('/login') def login(): callback = url_for( 'facebook_authorized', next=request.args.get('next') or request.referrer or None, _external=True ) return facebook.authorize(callback=callback) @app.route('/login/authorized') @facebook.authorized_handler
ise-uiuc/Magicoder-OSS-Instruct-75K
* github.com/elijahjcobb */ export * from "./PdRequest"; export * from "./PdMethod"; export * from "./PdResponse";
ise-uiuc/Magicoder-OSS-Instruct-75K
if is_prime[i]: num += 1 for j in xrange(i+i, n, i): is_prime[j] = False return num
ise-uiuc/Magicoder-OSS-Instruct-75K
set -e cat <<EOF >/etc/nginx/conf.d/default.conf server { listen 80; listen [::]:80; server_name _; return 301 https://\$server_name\$request_uri; } server {
ise-uiuc/Magicoder-OSS-Instruct-75K
# file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test that a node receiving many (potentially out of order) blocks exits initial block download (IBD; this occurs once it has passed minimumchainwork) and continues to sync without seizing. """ import random
ise-uiuc/Magicoder-OSS-Instruct-75K
@software.amazon.jsii.Jsii(module = imports.kubernetes.$Module.class, fqn = "kubernetes.HorizontalPodAutoscalerSpec")
ise-uiuc/Magicoder-OSS-Instruct-75K
return x / y; }
ise-uiuc/Magicoder-OSS-Instruct-75K
unittest.main()
ise-uiuc/Magicoder-OSS-Instruct-75K
} ) self.pattern = pattern self.count = count ?? 0..<Int.max self.consumption = consumption } // #documentation(SDGCornerstone.Repetition.init(of:count:consumption))
ise-uiuc/Magicoder-OSS-Instruct-75K
def testIndexedTransparentPixmap(self): lo = self.map.getLayerByName('INLINE-PIXMAP-PCT') lo.type = mapscript.MS_LAYER_POINT co = lo.getClass(0)
ise-uiuc/Magicoder-OSS-Instruct-75K
return {'type': data_type, 'data': data} def _get_data_and_type(attribute): return attribute['data'], attribute['type']
ise-uiuc/Magicoder-OSS-Instruct-75K
# mask RFI pix and chans before binning, pix after binning ds.mask_RFI_pixels(rmsfac=fig_params['pixflag_sigfacLS'],func=imag) ds.mask_RFI(rmsfac=fig_params['chanflag_sigfacLS']) nt = int(round(fig_params['tint_LS']/ds.dt())) # number of integrations to bin together nf = int(round(fig_params['df_MHz_LS']/(ds.df()/1e6))) # number of channels to bin together ds = ds.bin_dynspec(nt=nt,nf=nf,mask_partial=fig_params['maskpartial_LS']) ds.mask_RFI_pixels(rmsfac=fig_params['pixflag_sigfacLS'],func=imag) if dsP: dsP.mask_RFI_pixels(rmsfac=fig_params['pixflag_sigfacP']) dsP.mask_RFI(rmsfac=fig_params['chanflag_sigfacP']) # bin P band dynamic spectrum to desired resolution nt = int(round(fig_params['tint_P']/dsP.dt())) # number of integrations to bin together nf = int(round(fig_params['df_MHz_P']/(dsP.df()/1e6))) # number of channels to bin together
ise-uiuc/Magicoder-OSS-Instruct-75K
if form.validate_on_submit(): print "picTest about to generateCollage..." url = generateCollage(form.landmark1.data, form.landmark2.data) print "picTest done generateCollage" return render_template('collage/result.html', image_url=url) return render_template('collage/request.html', form=form)
ise-uiuc/Magicoder-OSS-Instruct-75K
#SBATCH --job-name evaluation #SBATCH --output=evaluation_job.out #SBATCH --mail-user=<EMAIL> #SBATCH --mail-type=FAIL ### conditions when to send the email. ALL,BEGIN,END,FAIL, REQUEU, NONE #SBATCH --gres=gpu:1
ise-uiuc/Magicoder-OSS-Instruct-75K
public static void initSwings() { String lookAndFeel = UIManager.getSystemLookAndFeelClassName(); try { UIManager.setLookAndFeel(lookAndFeel); } catch (Exception e) { e.printStackTrace(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
import java.io.IOException; public interface Session extends Closeable { String getId(); boolean isOpen(); void sendMessage(Message<?> message) throws IOException; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def tearDown(self): os.path.isdir = self.__isdir os.path.isfile = self.__isfile os.listdir = self.__listdir super(PreserveOs, self).tearDown() def full_test_tree(self): tree = {('.',): ('__init__.py', 'test_first.py', 'test_second.py', 'test_sub_first', 't_sub_first', 'test_sub_third'), ('.', '__init__.py'): None, ('.', 'test_first.py'): None, ('.', 'test_second.py'): None, ('.', 'test_sub_first'): ('__init__.py', 'test_sub_first.py'), ('.', 'test_sub_first', '__init__.py'): None,
ise-uiuc/Magicoder-OSS-Instruct-75K