seed
stringlengths
1
14k
source
stringclasses
2 values
namespace App; use Illuminate\Database\Eloquent\Model; use Validator; class Movie extends Model {
ise-uiuc/Magicoder-OSS-Instruct-75K
from .item import Item from .coordinates import Coordinates from copy import deepcopy class Shop: def __init__(self, name: str = "", owner: List = [], items: List = [], coords: Coordinates = Coordinates(), post: str = None, id: int = -1): super().__init__() self.id = id self.name = name self.owner: L...
ise-uiuc/Magicoder-OSS-Instruct-75K
self.state: str = state self.status: Dict[str, str] = status
ise-uiuc/Magicoder-OSS-Instruct-75K
import time from eth_utils.address import to_checksum_address import os API_KEY = os.environ['MORALIS_KEY'] or None if not API_KEY:
ise-uiuc/Magicoder-OSS-Instruct-75K
def validate(self): if not Form.validate(self): return False else:
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Is directory? * @return bool Is directory? */ public function isDirectory() { } /** * Base name * @return string base name */ public function basename() { return $this->basename;
ise-uiuc/Magicoder-OSS-Instruct-75K
// 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. // // ---------------------------------------------------------------------------- import BigNumber from 'bignumber.js'; import sinon from...
ise-uiuc/Magicoder-OSS-Instruct-75K
formfield_overrides = { models.TextField: {'widget': AdminPagedownWidget} }
ise-uiuc/Magicoder-OSS-Instruct-75K
fn run(&self, jd: JohnnyDecimal) -> Result<()> { let mut last_area_name = String::default(); let mut last_category_name = String::default(); for result in jd.index.search(&self.expr) { // TODO: This is super slow since we still search the full tree, // implement it i...
ise-uiuc/Magicoder-OSS-Instruct-75K
from dotenv import load_dotenv load_dotenv() import os import boto3 #s3 = boto3.resource('s3') s3 = boto3.resource('s3', aws_access_key_id=os.environ.get("AWS_KEY_ID"), aws_secret_access_key=os.environ.get("AWS_SECRET_KEY")) for bucket in s3.buckets.all(): print(bucket.name)
ise-uiuc/Magicoder-OSS-Instruct-75K
under_score, underscore, } #[remain::sorted] enum NumberingSimple { E1, E9, E10, } #[remain::sorted]
ise-uiuc/Magicoder-OSS-Instruct-75K
throw new PlatformNotSupportedException($"ProcessKind {processKind} is not supported: {originalError}"); if (processKind == ProcessKind.AppDomain && config.EnableFakeProcesses) return ProcessKind.DirectlyInRootProcess; if (processKind.IsFakeProcess())
ise-uiuc/Magicoder-OSS-Instruct-75K
proto_layer = node.pb
ise-uiuc/Magicoder-OSS-Instruct-75K
@extends('layouts.app') @section('content')
ise-uiuc/Magicoder-OSS-Instruct-75K
# django/core/management, it caches the apps; this ensures that syncdb # will see our appended models) settings.INSTALLED_APPS = new_installed loading.cache.loaded = False
ise-uiuc/Magicoder-OSS-Instruct-75K
static exactContent(content: string) { return ByBase.xpath(`.//*[normalize-space() = '${content}']`); } static tagAndContent(tag: string, content: string) { return ByBase.xpath(`//${tag}[contains(text(), '${content}')]`) } } export function isBy(locator: Locator): locator is By { return (locator as ...
ise-uiuc/Magicoder-OSS-Instruct-75K
guard let activeTextField = activeTextField else { return } let info = notification.userInfo as! [String: AnyObject] let kbSize = (info[UIResponder.keyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue.size let contentInsets = UIEdgeInsets(top: 0, left: 0, bottom: kbSize.height, right:...
ise-uiuc/Magicoder-OSS-Instruct-75K
for root, dirs, files in os.walk(path): for name in files: file_paths.append(os.path.join(root, name)) imdb_ids.append(name.split('.')[0]) return zip(file_paths, imdb_ids)
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.springframework.transaction.annotation.Transactional; import java.util.HashSet; import java.util.Set; /** * Spring Securty class for log users */ @Service public class UserDetailsServiceImpl implements UserDetailsService {
ise-uiuc/Magicoder-OSS-Instruct-75K
SCRIPT_BASEDIR=$(dirname "$0") RUBYOPT=-w TZ=Europe/Vienna
ise-uiuc/Magicoder-OSS-Instruct-75K
def run(self, ex, ch): ch.returncode, ch.stdout, ch.stderr = self.execute("python3 " + ch.rootpath + ex.mainfile + " " + ch.input_params)
ise-uiuc/Magicoder-OSS-Instruct-75K
import copy
ise-uiuc/Magicoder-OSS-Instruct-75K
source_size } }
ise-uiuc/Magicoder-OSS-Instruct-75K
class EloquentManhole extends BaseModel { use UuidsTrait; /** * The primary key for the model. * * @var string */ protected $primaryKey = 'guid'; /**
ise-uiuc/Magicoder-OSS-Instruct-75K
DEFAULT_CONFIG_NAME = ".wifihawk.ini"
ise-uiuc/Magicoder-OSS-Instruct-75K
bool UpdateQuestionBank(QuestionBankDAO newQuestionBank); [OperationContract] [FaultContract(typeof(KaskServiceException))] bool DeleteQuestionBank(int id); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
private static void AssertNoAsyncVoidMethods(Assembly assembly) { var messages = assembly .GetAsyncVoidMethods() .Select(method => $"'{method.DeclaringType.Name}.{method.Name}' is an async void method.") .ToList();
ise-uiuc/Magicoder-OSS-Instruct-75K
println!("#4 {:?}", U32_SARRAY); assert_eq!(U32_SARRAY, [255, 2, 3, 4, 2, 3, 0]); }
ise-uiuc/Magicoder-OSS-Instruct-75K
this.sprite.play();
ise-uiuc/Magicoder-OSS-Instruct-75K
#!/bin/sh docker pull registry.cn-chengdu.aliyuncs.com/zx-tech/tpler docker rm -fv tpler && \ docker run -d --name=tpler --restart=always \ -p 8079:8080 \ -v /usr/share/zoneinfo:/usr/share/zoneinfo:ro \ -v /etc/ssl/certs:/etc/ssl/certs:ro \ -e TZ=Asia/Shanghai \ -e LOG_LEVEL=1 \ --link postgres:postg...
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>usuarios/views.py from django.shortcuts import render from django.shortcuts import redirect from django.contrib.auth import authenticate from django.contrib.auth import login from django.contrib.auth import logout from django.contrib.auth.models import User from products.models import Product from cart.models...
ise-uiuc/Magicoder-OSS-Instruct-75K
omnisci.reset() import rbc.omnisci_backend as np from numba import types cast = dict( trunc=types.int64, sext=types.int8, zext=types.uint8, fptrunc=types.float64, fpext=types.float32)[suffix] def fn_issue197(x): y = np.zeros_like(x) for i in...
ise-uiuc/Magicoder-OSS-Instruct-75K
self._new_des_id = 0 def _branch_a_func(self, f): fil = self.func_instrs(f)
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('tests', nargs='*') args = parser.parse_args() OUT_DIR = "./build/wasm-torture" results_lock = threading.Lock() compile_count = 0 compile_failures = [] run_count = 0 run_failures = []
ise-uiuc/Magicoder-OSS-Instruct-75K
sudo ip route add 192.168.222.0/24 via 10.19.56.15 # Route to InternalAPIDCN1 on tripleo-03 sudo ip route add 172.25.2.0/24 via 10.19.56.9
ise-uiuc/Magicoder-OSS-Instruct-75K
public void setId(String Id) { this.Id = Id; } /** * * @return * The description
ise-uiuc/Magicoder-OSS-Instruct-75K
request.put("loan", loanSummary); } private static void addAdditionalServicePointProperties(JsonObject request, ServicePoint servicePoint) { if (servicePoint == null) { String msg = "Unable to add servicepoint properties to request {}, servicepoint is null"; log.info(msg, request.getString(...
ise-uiuc/Magicoder-OSS-Instruct-75K
let tokenName= String::new() + "Token" + &upperLine; print!("{{ {}{} }}", "\\_ -> ", tokenName); tokenList.push(tokenName); println!(); } println!("Token list:\n"); for token in tokenList { print!("{} | ", token); } println!();
ise-uiuc/Magicoder-OSS-Instruct-75K
pub use self::web::*;
ise-uiuc/Magicoder-OSS-Instruct-75K
async def main(client, message, params): pass
ise-uiuc/Magicoder-OSS-Instruct-75K
# -*- coding: utf-8 -*- __all__ = ['interpolate', 'polynomial', 'SmoothSpline'] from .interpolate import SmoothSpline
ise-uiuc/Magicoder-OSS-Instruct-75K
# When we run this program, we see the output of the # blocking call first, then the interleaved output of the # two goroutines. This interleaving reflects the # goroutines being run concurrently by the Go runtime. $ go run goroutines.go direct : 0 direct : 1 direct : 2 goroutine : 0 going
ise-uiuc/Magicoder-OSS-Instruct-75K
config.store_layout, ); let trait_object = generate_trait_object( &mut stash, config .trait_object_visibility .unwrap_or_else(|| trait_visibility.clone()), config.inline_vtable, has_static_bound, &config.trait_object_attributes, &ma...
ise-uiuc/Magicoder-OSS-Instruct-75K
})); let actual_req_body_str = match &i.request.body { OptionalBody::Present(body, _) => body.clone(), _ => Bytes::new(), };
ise-uiuc/Magicoder-OSS-Instruct-75K
version_file = os.path.join(here, '{0}/__init__.py'.format(PROJECT_MODULE)) ver_find = r'^\s*__version__\s*=\s*[\"\'](.*)[\"\']$' with io.open(version_file, 'r', encoding='utf-8') as ver_file:
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Key representing the default container identifier for the `default` container to use for debug builds. public static let DebugContainerIDKey = "RFDebugContainerID" /// Key representing the default container's database identifier for the `default` container. public static let DefaultDatabaseIDKe...
ise-uiuc/Magicoder-OSS-Instruct-75K
if not j: if self.is_even(q)^self.is_even(k): unnamed[q][0][0]=q+1 else: unnamed[q][0][0]=1 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} catch(Exception ex){ } } } public static void copyStream(InputStream in, OutputStream out){ try { byte[] buf = new byte[in.available()]; in.read(buf); out.write(buf); } catch(Exception ex){ throw new RuntimeException(ex); } finally { close(in);
ise-uiuc/Magicoder-OSS-Instruct-75K
bodyFile: string; template: boolean; }
ise-uiuc/Magicoder-OSS-Instruct-75K
down_revision = '<KEY>' branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_unique_constraint(None, 'score', ['team_id', 'event_id'])
ise-uiuc/Magicoder-OSS-Instruct-75K
'company': company_name, 'location': company_loc }
ise-uiuc/Magicoder-OSS-Instruct-75K
double lastDelimiterStdDev = Double.POSITIVE_INFINITY; byte lastDelimiterPriority = Byte.MIN_VALUE; double lastDelimiterMean = 0; double lineLengthStdDev = 0; for (int i = 0, n = Byte.MAX_VALUE + 1; i < n; i++) { boolean set; if (i < 64) { ...
ise-uiuc/Magicoder-OSS-Instruct-75K
private String zone; }
ise-uiuc/Magicoder-OSS-Instruct-75K
def run_io_on_pool(): """ Runs the I/O on the pool and delete the pool
ise-uiuc/Magicoder-OSS-Instruct-75K
} public double Price
ise-uiuc/Magicoder-OSS-Instruct-75K
// IN THE SOFTWARE. import CoreImage /// Changes the overall hue, or tint, of the source pixels. public struct Hue: Filter { ///The name of the Core Image filter public let filterName = "CIHueAdjust" ///The angle to apply to the hue filter. Default value: 1.0 public var angle: Double = 1.0 ///Ini...
ise-uiuc/Magicoder-OSS-Instruct-75K
environment: Optional[Environment] = None globals: Environment = Environment() locals: Dict[Expr, int] = field(default_factory=lambda: {}) def resolve(self, expr: Expr, depth: int): self.locals[expr] = depth return def look_up_variable(self, name: Token, expr: Expr): distan...
ise-uiuc/Magicoder-OSS-Instruct-75K
public static let schema = defineSchema { model in let nestedTypeTestModel = NestedTypeTestModel.keys model.listPluralName = "NestedTypeTestModels" model.syncPluralName = "NestedTypeTestModels" model.fields(
ise-uiuc/Magicoder-OSS-Instruct-75K
for n in range(1): output_file = '-'.join([colour_correction, distortion_correction, rescaling, str(n)])
ise-uiuc/Magicoder-OSS-Instruct-75K
"data_downloads": reverse( "misago:api:user-data-downloads", kwargs={"pk": obj.pk} ), "details": reverse("misago:api:user-details", kwargs={"pk": obj.pk}), "change_email": reverse( "misago:api:user-change-email", kwargs={"pk": obj.pk} ...
ise-uiuc/Magicoder-OSS-Instruct-75K
model.computeRTB(s, lr, lt, gb, lbr, lbt); if (needCreateJoints) exporter.createJoints(model.boneName, model.parent, radius);
ise-uiuc/Magicoder-OSS-Instruct-75K
click_action: "FLUTTER_NOTIFICATION_CLICK", // required only for onResume or onLaunch callbacks
ise-uiuc/Magicoder-OSS-Instruct-75K
${WORK_DIR}/discord.sh \ --username "Disk space" \ --title "[${IP_ADDR}] Disk space ${DATE}" \ --description "${text_discord}" \ --text "${notify_owner}" \ --color ${couleur}
ise-uiuc/Magicoder-OSS-Instruct-75K
# Authors <NAME>, <NAME>, <NAME>, <NAME>, <NAME> # # the elastic modulus of spandex is 25 MPa = 25 x 10^6 Pa # # according to the material data sheet for EEONTEX LR-SL-PA-10E5 # it is 69% nylon + 31% spandex
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "This is src dir SRC_DIR" echo "This is CXXFLAGS: $CXXFLAGS" mkdir build && cd build # GNU extensions are required by Irrlicht CXXFLAGS=$(echo "${CXXFLAGS}" | sed "s/-std=c++/-std=gnu++/g") # -fpermessive is necessary to compile irrlicht with jpeg v9 CXXFLAGS="${CXXFLAGS} -fpermissive" cmake -DCMAKE_INSTALL_PR...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert self._command_data is None self._command_data = obj if not obj: try: obj = json.loads(self._data) except ValueError: # to next pass else: assert self._command_data is None ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# 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. from oslo_policy import policy from nova.policies import ba...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo "开始训练 3......" CUDA_VISIBLE_DEVICES=3 python train_trades_cifar10.py --model preactresnet --AT-method ST_el --dataset CIFAR10 --gpu-id 1 --seed 3 --list_aug 3 5 --alpha 4 wait echo "开始训练 4......"
ise-uiuc/Magicoder-OSS-Instruct-75K
# 21 = US Survey Feet # 22 = US Survey Inch # 23 = US Survey Yard # 24 = US Survey Mile _unit_spec = [ None, 'in', 'ft', 'mi', 'mm', 'cm', 'm', 'km', 'µin', 'mil', 'yd', 'Å', 'nm', 'µm', 'dm', 'dam', 'hm', 'gm', 'au', 'ly', 'pc', None, None, None, None,
ise-uiuc/Magicoder-OSS-Instruct-75K
import asyncio import websockets filenames = [ '1鸡哥不屑.json', '2鸡哥左右看.json', '3鸡哥邪魅一笑.json', '4鸡哥不赞同的目光.json', '5鸡哥无语.json', '6鸡哥大为震撼.json', '7鸡哥眨眼.json', '8鸡哥睁大眼睛.json'
ise-uiuc/Magicoder-OSS-Instruct-75K
return mtsInitialize(params) else: return mtsInitialize(params,p2) def execute(): mtsExecute() def info(*tp): return mtsInfo(tp) def log(*tp): return mtsLog(tp) def warn(*tp): return mtsWarn(tp)
ise-uiuc/Magicoder-OSS-Instruct-75K
if data.dtype == 'float32' or data.dtype == 'float64': max_y = np.max(np.abs(data)) elif data.dtype == 'uint8': data = data - 128 max_y = 128 elif data.dtype == 'int16': max_y = np.abs(np.iinfo(np.int16).min) else: max_y = np.abs(np.iinfo(np.int16).min) data =...
ise-uiuc/Magicoder-OSS-Instruct-75K
} #[tokio::test] async fn compact_stream_noop_with_empty_tree() -> Result<()> { let (config, _tmpdir) = Config::new_test()?; let db = Database::new(config.clone()).await?; let stream_tree = db.get_stream_tree().await?; let earliest_timestamp_opt = super::compact_stream(config, stream_tree.clone(), Non...
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 import { ItemFunc, AsyncGeneratorFunc } from './types'; export declare function mapProp<T, U extends T>(prop: string, func: ItemFunc<T, U>): AsyncGeneratorFunc<T, U>;
ise-uiuc/Magicoder-OSS-Instruct-75K
self.drone.piloting_pcmd( left_right, -front_back, turning, -up_down, self.drone_mtime )
ise-uiuc/Magicoder-OSS-Instruct-75K
BayesWindow(df=df, y='Power', treatment='stim_strength', group='mouse', detail='i_trial').data_box_detail() # In[7]: window = BayesRegression(df=df, y='Power', treatment='stim_strength', group='mouse', detail='i_trial') window.fit(add_group_slope=False, dist_y='gamma')
ise-uiuc/Magicoder-OSS-Instruct-75K
from a2c_ppo_acktr.storage import RolloutStorage from evaluation import evaluate def main(): with open("seaadrl.yaml") as f:
ise-uiuc/Magicoder-OSS-Instruct-75K
class ArticleUpdateView(UpdateView): template_name = 'articles/article_create.html' form_class = ArticleModelForm queryset = Article.objects.all() def get_object(self): id_ = self.kwargs.get("id")
ise-uiuc/Magicoder-OSS-Instruct-75K
loop over all MCTS scenarios - generate the scenarios you need to collect the data - create ''' def mctsLoop(env, policies, seed, save, animate, **kwargs): if seed is not None: world_id = int(seed) else: world_id = np.random.randint(10000) np.random.seed(world_id) env.reset()
ise-uiuc/Magicoder-OSS-Instruct-75K
#cpanm CGI::Application #cpanm XML::Parser::Expat --configure-args "EXPATLIBPATH=$PREFIX/lib" --configure-args "EXPATHINCPATH=$PREFIX/include" ./configure --prefix="$PREFIX" --with-gnu-ld # --enable-build-libxml2 --enable-build-libxslt make clean make AM_CFLAGS='-DNAN="(0.0/0.0)"' make install
ise-uiuc/Magicoder-OSS-Instruct-75K
lenOd=1 lenId=1 od=0.5 id=0.25 outline = [ (0, 0)
ise-uiuc/Magicoder-OSS-Instruct-75K
configureView() } func configureView() { // screen width and height: let screen = UIScreen.mainScreen().bounds let screenWidth = screen.size.width let screenHeight = screen.size.height self.view.backgroundColor = UIColor.whiteColor() ...
ise-uiuc/Magicoder-OSS-Instruct-75K
class LoginForm(FlaskForm): email = StringField(u'邮箱', validators=[DataRequired(), Length(1, 64), Email()]) password = PasswordField(u'密码', validators=[DataRequired()]) remember_me = BooleanField(u'记住我')
ise-uiuc/Magicoder-OSS-Instruct-75K
write!(f, "[")?; for (i, t) in self.0.iter().enumerate() { if i != 0 { write!(f, ", ")?; } write!(f, "{:?}", t)?; } write!(f, "]") }
ise-uiuc/Magicoder-OSS-Instruct-75K
class TerminalPuzzleView(TemplateView): template_name = 'terminal/puzzle.html'
ise-uiuc/Magicoder-OSS-Instruct-75K
); }
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': get_image_only()
ise-uiuc/Magicoder-OSS-Instruct-75K
__author__ = meta.authors[0] __license__ = meta.license __copyright__ = meta.copyright
ise-uiuc/Magicoder-OSS-Instruct-75K
<NavLink href="https://github.com/TheKitchenSinkDevs/SpiceRack"> <h4>GitHub</h4> </NavLink> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
warnings.filterwarnings("ignore", message="numpy.dtype size changed") from snakemake.logging import logger def samplesheet_ids(fn, sep='\t'): sample_ids = [] with open(fn) as fh: txt = fh.read().splitlines() header = txt.pop(0).split(sep) if not 'Sample_ID' in header: raise...
ise-uiuc/Magicoder-OSS-Instruct-75K
export class RedirectData { success?: RedirectStatusData; fail?: RedirectStatusData; }
ise-uiuc/Magicoder-OSS-Instruct-75K
model = models.Plan name = factory.Sequence(lambda n: 'plan%s' % n) price = factory.fuzzy.FuzzyFloat(0, 20000) @classmethod def get_url(self, plan=None): if plan is None: plan = PlanFactory() return 'http://testserver' + reverse('plan-detail', kwargs={'uuid': plan.u...
ise-uiuc/Magicoder-OSS-Instruct-75K
install ./akt "${PREFIX}/bin/"
ise-uiuc/Magicoder-OSS-Instruct-75K
rm -r ../docs/* flutter build web -v cp -r -v build/web/* ../docs
ise-uiuc/Magicoder-OSS-Instruct-75K
t_result = get_color_distance(t_palette) assert len(t_palette) == 4 # number of colors assert t_expect == t_result
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 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def readProxyIP(self): # get ip from mysql and save to resultList import mySQLConnect this = mySQLConnect.MySqlConnection() self.resultList = [] self.resultList = this.select_mysql() def getProxyIP(self,testUrl,headers): print("start") flag =...
ise-uiuc/Magicoder-OSS-Instruct-75K
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <vpu/backend/blob_format.hpp> #include <vpu/model/data_desc.hpp> #include <vpu/graph_transformer.hpp> namespace vpu { namespace ie = InferenceEngine; class BlobReader { public: BlobReader() = default; void parse(const std::vector<char>& blob);
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "base/logging.h"
ise-uiuc/Magicoder-OSS-Instruct-75K