seed
stringlengths
1
14k
source
stringclasses
2 values
for current in diffs:
ise-uiuc/Magicoder-OSS-Instruct-75K
//Type 1 fonts find unicodes through glyphnames then Adobe glyph list reference table //We fallback on isoLatin1 encoding if no encoding is provided. override func characterIdToUnicode(_ char: PDFFontFile.CharacterId) -> Unicode.Scalar? { let res = toUnicodeCharMapLookup(char) ?? differences.characterIdToUnicode(char) ?? encodingConvertCharacter([UInt8(char)]) ?? self.fontFileCharMapLookup(char) ?? String(bytes: [UInt8(char)], encoding: .isoLatin1)?.unicodeScalars.first //TODO: fallback to isoLatin1 is probably wrong. Try to look somewhere for the proper encoding. return res } override func guessSpaceCharacterId() { super.guessSpaceCharacterId() if spaceCharId == nil { if let differencedReversedLookup = self.differences.charUnicodes.first(where: { $0.value == Unicode.Scalar(0x0020) })?.key {
ise-uiuc/Magicoder-OSS-Instruct-75K
// // Created by Vidhu Appalaraju on 9/28/18. // Copyright © 2018 Vidhu Appalaraju. All rights reserved. //
ise-uiuc/Magicoder-OSS-Instruct-75K
return redirect(route('admin.index')); } }else{ return $next($request); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
) print(entry) time.sleep(0.2) dbEntry.save() print("done, you fuck.")
ise-uiuc/Magicoder-OSS-Instruct-75K
public static string GetLocalPath(this XmlSchemaObject obj) { var baseUri = obj.GetBaseUri(); return (baseUri == null) ? null : new Uri(baseUri).LocalPath; } public static string GetSchemaName(this XmlSchemaObject obj) { var localPath = obj.GetLocalPath();
ise-uiuc/Magicoder-OSS-Instruct-75K
from search_helpers import show_tree, display_steps # Now we feed in the necessary data and plot the tree structure. # In[15]: # node colors, node positions and node label positions node_colors = {node: 'white' for node in simple_tree.locations.keys()} node_positions = simple_tree.locations node_label_pos = { k:[v[0]-3,v[1]] for k,v in simple_tree.locations.items() }
ise-uiuc/Magicoder-OSS-Instruct-75K
sleep(10) print("loop") except KeyboardInterrupt: exit(0)
ise-uiuc/Magicoder-OSS-Instruct-75K
), migrations.AddField( model_name="paymentrelation", name="status", field=models.CharField( choices=[ ("pending", "pending"), ("succeeded", "succeeded"), ("done", "done"), ("refunded", "refunded"), ("removed", "removed"), ], default="succeeded", max_length=30,
ise-uiuc/Magicoder-OSS-Instruct-75K
``` ''' return ''.join(x + '、' for x in xs[:-2]) + '或'.join(xs[-2:])
ise-uiuc/Magicoder-OSS-Instruct-75K
public static double GenerateRandomScore(int minimum, int maximum) { Random random = new Random(); double randscore = (random.NextDouble() * (maximum - minimum)) + minimum;
ise-uiuc/Magicoder-OSS-Instruct-75K
headers = { "Connection" :"keep-alive", "Cache-Control" :"no-cache" } if hasattr(response, "headers"):
ise-uiuc/Magicoder-OSS-Instruct-75K
buildphp() { cd "${PHP_SRC}" if [ ! -f ./configure ] then info Autoconf PHP ./buildconf --force fi
ise-uiuc/Magicoder-OSS-Instruct-75K
opt['datafile'] = 'unused_path'
ise-uiuc/Magicoder-OSS-Instruct-75K
groups = groupby(events, lambda o: o['date']) events = { date: list(events) for date, events in groups }
ise-uiuc/Magicoder-OSS-Instruct-75K
loop.stop() loop.run_forever() loop.close() levels = [logging.ERROR, logging.WARN, logging.INFO, logging.DEBUG] logging.basicConfig(level=levels[3]) stats.report() parse.report()
ise-uiuc/Magicoder-OSS-Instruct-75K
import React, { SVGProps } from "react"; const SvgNotificationImportant = (props: SVGProps<SVGSVGElement>) => ( <svg width="1em" height="1em" viewBox="0 0 24 24" {...props}> <path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zM12 6c2.76 0 5 2.24 5 5v7H7v-7c0-2.76 2.24-5 5-5zm0-4.5c-.83 0-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-2 2v1h18v-1l-2-2v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5zM11 8h2v4h-2zm0 6h2v2h-2z" /> </svg> ); export default SvgNotificationImportant;
ise-uiuc/Magicoder-OSS-Instruct-75K
['title' => 'Relativity...', 'year' => 2018], ], ];
ise-uiuc/Magicoder-OSS-Instruct-75K
url=URL, install_requires=INSTALL_REQUIRES, packages=find_packages() )
ise-uiuc/Magicoder-OSS-Instruct-75K
version(id: number): T[] { let instances = this.generator.version(id); for (const transformer of this.transformers) { instances = transformer(instances); } return instances; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
return true } }
ise-uiuc/Magicoder-OSS-Instruct-75K
//! once, without locking. Actually, even the inner implementation is [lock-free] and the lookups //! are [wait-free] (though even the lookup methods may invoke collecting garbage in //! [crossbeam-epoch] which while unlikely might contain non-wait-free functions). //! //! # Downsides //! //! The concurrent access does not come for free, if you can, you should prefer using the usual //! single-threaded alternatives or consider combining them with locks. In particular, there are //! several downsides. //! //! * Under the hood, the [crossbeam-epoch] is used to manage memory. This has the effect that //! removed elements are not deleted at precisely known moment. While the [crossbeam-epoch] is
ise-uiuc/Magicoder-OSS-Instruct-75K
.subscribe { print($0)} .disposed(by: disposeBag) //var a = 1 //var b = 2 //a + b // Reactive Programing 반응형프로그래밍 let a = BehaviorSubject(value: 1) let b = BehaviorSubject(value: 2) Observable.combineLatest(a, b) { $0 + $1 }
ise-uiuc/Magicoder-OSS-Instruct-75K
# ====================================================================================================================== # Globals # ====================================================================================================================== SKIP_EVERYTHING = False if getenv('SKIP_EVERYTHING') is None else True
ise-uiuc/Magicoder-OSS-Instruct-75K
"Linux") echo "linux";; "Darwin") echo "darwin";; *) die "This script only works on Linux and macOS.";; esac } get_android_ndk_dir() { echo "/tmp/android-ndk" } check_program_exists() { which "$1" >/dev/null 2>&1 }
ise-uiuc/Magicoder-OSS-Instruct-75K
for token in value: if not self._allowed.has_key(token.lower()): raise ValueError( "Supplied token %r is not allowed" % token ) class FilenameMember(_base.BasePremapMember): """ Filename storage """
ise-uiuc/Magicoder-OSS-Instruct-75K
""" message = "Unknown log entry kind %r" % value super(UnknownLogKind, self).__init__(message) class NoExtraField(ValueError): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
GPIO.output(15, GPIO.HIGH) #LED on #setting up the binary for the number 0(000) else: GPIO.output(11, GPIO.LOW) #LED off GPIO.output(13, GPIO.LOW) #LED off GPIO.output(15, GPIO.LOW) #LED off user_guess = 0 # You can choose to have a global variable store the user's current guess, # or just pull the value off the LEDs when a user makes a guess pass # Guess button def btn_guess_pressed(channel):
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Associated max probabilities/confidences:") print(m) # next, all probabilities above a certain threshold print("DEBUG::y_test:") print(data.y_test) prediction_indices = probabilities > p_threshold y_pred = np.zeros(data.y_test.shape)
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "✅ success"
ise-uiuc/Magicoder-OSS-Instruct-75K
start = time.time() for x, y in train_iter: continue print('%.2f sec' % (time.time() - start))
ise-uiuc/Magicoder-OSS-Instruct-75K
// Created by Adriano Dias on 26/09/20. // import XCTest @testable import TheFeels class TheFeelsTests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. }
ise-uiuc/Magicoder-OSS-Instruct-75K
use anyhow::*; use liblumen_alloc::erts::exception; use liblumen_alloc::erts::term::prelude::*; pub fn flag_is_not_a_supported_atom(flag: Term) -> exception::Result<Term> { Err(anyhow!("flag ({}) is not a supported atom (label, monotonic_timestamp, print, receive, send, serial, spawn, strict_monotonic_timestamp, or timestamp)", flag).into()) }
ise-uiuc/Magicoder-OSS-Instruct-75K
if field.name == field_name: return field.type return None
ise-uiuc/Magicoder-OSS-Instruct-75K
customContentPlaceholder.heightAnchor.constraint(equalTo: customView.heightAnchor), ])
ise-uiuc/Magicoder-OSS-Instruct-75K
process.kill(process.pid, 'SIGUSR1') }) })
ise-uiuc/Magicoder-OSS-Instruct-75K
icon = ':snowflake:' elif (iconid == '50d') or (iconid == '50n'): icon = ':foggy:' else: icon = iconid output = ("{0}, {1} Temperature: {2}ºC (max: {3}ºC min: {4}ºC) Conditions: {5} {6} - {7} Humidity: {8}% Wind: {9}km/h").format(location, country, temp, temp_max, temp_min, emoji.emojize(icon, use_aliases=True), conditions1, conditions2, humidity, wind,) irc.reply(_(output)) def forecast(self, irc, msg, args, argv): """<location> [results (1-5)] Returns the weather forecast for the given location. """ argv2 = str(argv).split(" ") if (argv2[0] == "None"):
ise-uiuc/Magicoder-OSS-Instruct-75K
#eth.ifconfig = (IP_ADDRESS, SUBNET_MASK, GATEWAY_ADDRESS, DNS_SERVER)
ise-uiuc/Magicoder-OSS-Instruct-75K
interface NewItemPage { System.Windows.Forms.Control Control { get; } void Execute(IAdaptable parent); bool CanOperateOn(IAdaptable parent); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
num -= 1
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. // * // */ // //using System; //using System.Linq;
ise-uiuc/Magicoder-OSS-Instruct-75K
class Comment(models.Model): review = models.ForeignKey( Review,
ise-uiuc/Magicoder-OSS-Instruct-75K
let name: String? let flag: String?
ise-uiuc/Magicoder-OSS-Instruct-75K
const ConnectionBlock: FunctionComponent = () => { return ( <> <h2 id="connection">{res('optionsConnection')}</h2> {canUseOnlyAppConnection ? null : <ConnectMode />} {model.useWebApp ? <ConnectionWeb /> : null}
ise-uiuc/Magicoder-OSS-Instruct-75K
#[link_name = "\u{1}_axlib_destroy_application"] pub fn destroy_application(application: ApplicationRef); #[link_name = "\u{1}_axlib_running_processes"] fn axlib_running_processes(process_flags: u32) -> ApplicationArray; } pub unsafe fn get_running_processes<'a>(process_flags: u32) -> &'a [ApplicationRef] { let app_array = axlib_running_processes(process_flags); ::std::slice::from_raw_parts::<'a, ApplicationRef>(app_array.arr, app_array.len) }
ise-uiuc/Magicoder-OSS-Instruct-75K
make run
ise-uiuc/Magicoder-OSS-Instruct-75K
print (json.dumps(sh_ver_ios, indent=4)) print sh_ver_ios # list print type(sh_ver_ios)
ise-uiuc/Magicoder-OSS-Instruct-75K
DB.init_app(app) # create route to pass Users to application # populate user object in html template # sets title of application @app.route('/') def root(): users = User.query.all()
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * @hidden
ise-uiuc/Magicoder-OSS-Instruct-75K
return num_iterations def create_oracle(oracle_method): oracle_text={"log":"~A & ~B & C","bit":"00001000"} # set the input global num_iterations print("Enter the oracle input string, such as:"+oracle_text[oracle_method]+"\nor enter 'def' for a default string.") oracle_input=input('\nOracle input:\n ') if oracle_input=="def": oracle_type=oracle_text[oracle_method] else: oracle_type = oracle_input
ise-uiuc/Magicoder-OSS-Instruct-75K
protected $primaryKey = 'id'; protected $guarded = []; }
ise-uiuc/Magicoder-OSS-Instruct-75K
from spark_auto_mapper_fhir.fhir_types.uri import FhirUri from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode
ise-uiuc/Magicoder-OSS-Instruct-75K
def gimme(dictkey): if prefsdict.has_key(dictkey):
ise-uiuc/Magicoder-OSS-Instruct-75K
line = 1; state = 0; hz.clear(); pz.clear(); Array.Resize(ref hz.header, 68000); // Compile the COMP section of header RToken("comp"); hz.header[2] = (byte)RToken(0, 255); // hh hz.header[3] = (byte)RToken(0, 255); // hm hz.header[4] = (byte)RToken(0, 255); // ph hz.header[5] = (byte)RToken(0, 255); // pm int n = hz.header[6] = (byte)RToken(0, 255); // n
ise-uiuc/Magicoder-OSS-Instruct-75K
DESTDIR=$RELPART/d1 export RELEASEDIR export DESTDIR if [ ! -d $RELEASEDIR ]; then mkdir -p $RELEASEDIR chown -R build $RELEASEDIR fi if [ ! -d DESTDIR ]; then mkdir -p $DESTDIR chown -R build $DESTDIR
ise-uiuc/Magicoder-OSS-Instruct-75K
can.drawPath(p, stroke=1, fill=1) can.showPage() can.save()
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ public function testPropertyStrikeDamageToPlayersArmorAmount() { } /** * Test attribute "strike_damage_to_players_shield_amount"
ise-uiuc/Magicoder-OSS-Instruct-75K
return "200 OK" API --- """
ise-uiuc/Magicoder-OSS-Instruct-75K
'name', 'version',
ise-uiuc/Magicoder-OSS-Instruct-75K
class PetTypeUpdate(PetTypeBase): pass class PetTypeInDBBase(PetTypeBase): id: int class Config: orm_mode = True
ise-uiuc/Magicoder-OSS-Instruct-75K
var floatValue: CGFloat { let db = Double(self) ?? 0 return CGFloat(db) } }
ise-uiuc/Magicoder-OSS-Instruct-75K
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
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Get low price time series. """ return self.low_array @property def close(self): """ Get close price time series. """ return self.close_array
ise-uiuc/Magicoder-OSS-Instruct-75K
def index(request): return render(request, 'index.html', {}) def team(request): team_sisi ='hello mates!' return render(request, 'team.html', {'team_sisi': team_sisi})
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>docker/run.sh docker run -p $2:6543 -d badgerman/$1-cgi
ise-uiuc/Magicoder-OSS-Instruct-75K
all((s % 2 == 1 for s in kernel_size)) or _raise(ValueError('kernel size should be odd in all dimensions.')) channel_axis = -1 if backend_channels_last() else 1 n_dim = len(kernel_size) # TODO: rewrite with conv_block
ise-uiuc/Magicoder-OSS-Instruct-75K
from datetime import datetime, time file_not_found = IOError(errno.ENOENT, 'File not found') bad_ping = CalledProcessError(1, 'returned non-zero exit status 1')
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 export interface UserResponse {
ise-uiuc/Magicoder-OSS-Instruct-75K
self.r.map_tensor_float(int(self.color_tex_3d), int(self.width), int(self.height), self.pc_tensor.data_ptr()) results.append(self.pc_tensor.clone()) return results def render(self, modes=('rgb', 'normal', 'seg', '3d'), hidden=()): """ A function to render all the instances in the renderer and read the output from framebuffer into pytorch tensor. :param modes: it should be a tuple consisting of a subset of ('rgb', 'normal', 'seg', '3d').
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.db import connections from django_sql_reporter.models import SQLResultReport from django.core.mail import send_mail from pathlib import Path import glob
ise-uiuc/Magicoder-OSS-Instruct-75K
uniprot = eachres.uniprot if uniprot is None: continue
ise-uiuc/Magicoder-OSS-Instruct-75K
return None @staticmethod def get_market_cap_by_date(coingecko_id, date, currency): date_string = date.strftime('%d-%m-%Y') url = COIN_GECKO_BASE_URL + 'coins/' + coingecko_id + '/history?date=' + date_string response = requests.get(url) while response.status_code != 200: log.warning(response.status_code) response = requests.get(url)
ise-uiuc/Magicoder-OSS-Instruct-75K
"Location": "https://www.nhsx.nhs.uk/covid-19-response/data-and-covid-19/national-covid-19-chest-imaging-database-nccid/" }, }
ise-uiuc/Magicoder-OSS-Instruct-75K
}; int main() { std::cout << "up2date hawkBit-cpp client started..." << std::endl; auto clientCertificatePath = getEnvOrExit(AUTH_CERT_PATH_ENV_NAME); auto provisioningEndpoint = getEnvOrExit(PROVISIONING_ENDPOINT_ENV_NAME); // special variable for cloud auto xApigToken = getEnvOrExit(X_APIG_TOKEN_ENV_NAME); std::ifstream t((std::string(clientCertificatePath))); if (!t.is_open()) {
ise-uiuc/Magicoder-OSS-Instruct-75K
Hue, Saturation, Brightness, } }
ise-uiuc/Magicoder-OSS-Instruct-75K
dev.OutputMerger.SetRenderTargets((RenderTargetView)null); quad.Unbind(); tmpTex?.Dispose();
ise-uiuc/Magicoder-OSS-Instruct-75K
else { this.drawCreativeTabHoveringText(EnumChatFormatting.RED + "Invalid statistic/achievement!", p_73863_1_, p_73863_2_); } } GL11.glDisable(GL11.GL_LIGHTING); } super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); }
ise-uiuc/Magicoder-OSS-Instruct-75K
if try_gpu and torch.cuda.is_available(): log.info("CUDA is available; using it.") device = torch.device("cuda:0") else: log.info("CUDA is not available; using CPU.") device = torch.device("cpu") return device
ise-uiuc/Magicoder-OSS-Instruct-75K
print("Testing model...") obama_vec.accuracy('/home/syafiq/data/questions-words.txt')
ise-uiuc/Magicoder-OSS-Instruct-75K
return mappings
ise-uiuc/Magicoder-OSS-Instruct-75K
"""The supported grading systems.""" FRENCH = "French" YDS = "YDS"
ise-uiuc/Magicoder-OSS-Instruct-75K
if [[ ! `compgen -G "$f/pytorch_model*"` ]]; then echo rm -rf $f rm -rf $f echo rm -rf "logs/$(basename $f)" rm -rf "logs/$(basename $f)" fi
ise-uiuc/Magicoder-OSS-Instruct-75K
glfw.poll_events()
ise-uiuc/Magicoder-OSS-Instruct-75K
describe('RegisterCityComponent', () => { let component: RegisterCityComponent; let fixture: ComponentFixture<RegisterCityComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ RegisterCityComponent ]
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright 2020 Gaitech Korea Co., Ltd. # # 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 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
new_name='l3_preco_porcao', ), migrations.RenameField( model_name='pedido', old_name='l3_quant_pocao', new_name='l3_quant_porcao',
ise-uiuc/Magicoder-OSS-Instruct-75K
CREATE TABLE Genes ( gid TEXT PRIMARY KEY, name TEXT );
ise-uiuc/Magicoder-OSS-Instruct-75K
* * @category PM * @package Modules\Timesheet * @author <NAME> <<EMAIL>>
ise-uiuc/Magicoder-OSS-Instruct-75K
@staticmethod def _team_quotient(team: Team): return 10 ** (team.rating / 400)
ise-uiuc/Magicoder-OSS-Instruct-75K
w_encoder = space.getitem(w_functuple, space.wrap(0)) space.sys.w_default_encoder = w_encoder # cache it return w_encoder
ise-uiuc/Magicoder-OSS-Instruct-75K
lazy var deepLinkService: DeepLinkService = { return AppDeepLinkService() }() }
ise-uiuc/Magicoder-OSS-Instruct-75K
super(QMainWindow, self).__init__(parent) self.controller = in_controller self.model = self.controller.model self.ui = Ui_GraphWindow() self.ui.setupUi(self, in_parameters) self.model.addObserver(self)
ise-uiuc/Magicoder-OSS-Instruct-75K
num_words = 256 words_per_row = 4 local_array_size = 15 output_extended_config = True output_datasheet_info = True netlist_only = True nominal_corner_only = True
ise-uiuc/Magicoder-OSS-Instruct-75K
message = destroy.text counter = int(message[5:7]) text = str(destroy.text[7:]) text = (
ise-uiuc/Magicoder-OSS-Instruct-75K
// Whenever there is no localized translation, use the English version. // Whenever this lines is not commented out, it means that there are // still strings that need to be localized (just search for this function name).
ise-uiuc/Magicoder-OSS-Instruct-75K
public class Main { public static void main(String[] args) { Solution solution =new Solution(); int [] nums1= new int[]{1,4,2}; int [] nums2= new int[]{1,2,4}; System.out.println(solution.maxUncrossedLines(nums1,nums2)); int [] nums3= new int[]{2,5,1,2,5}; int [] nums4= new int[]{10,5,2,1,5,2}; System.out.println(solution.maxUncrossedLines(nums3,nums4));
ise-uiuc/Magicoder-OSS-Instruct-75K
from distutils.core import setup setup( name='pytrafik', version='0.2.1', description='PyTrafik', long_description='Wrapper for Västtrafik public API.', url='https://github.com/axelniklasson/PyTrafik', download_url = 'https://github.com/axelniklasson/PyTrafik/tarball/0.2', author='<NAME>',
ise-uiuc/Magicoder-OSS-Instruct-75K
if elem is not None: self._page._net.addItem(elem, self._page)
ise-uiuc/Magicoder-OSS-Instruct-75K
var tests = [XCTestCaseEntry]() tests += SlackPetTests.allTests() XCTMain(tests)
ise-uiuc/Magicoder-OSS-Instruct-75K
ret.update(d2) for (k,v) in d1.items(): if k in ret:
ise-uiuc/Magicoder-OSS-Instruct-75K