Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
8
6.05M
# Generated by Django 2.2.10 on 2020-02-24 10:47 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('user', '0002_auto_20200223_2349'), ] operations = [ migrations.AlterField( model_name='message...
from Jumpscale import j import netaddr import random import nacl import os def chat(bot): """ This chat is to deploy 3bot container on the grid """ explorer = j.clients.explorer.explorer cl = j.clients.s3.get("deployer") AWS_ID = cl.accesskey_ AWS_SECRET = cl.secretkey_ user_info = b...
# cd /Users/AL/Dropbox/0. AL Current Work/3. To Submit/Dr K/AL/python/ import sdm import sdm_utils from numpy import * def mem_write_x_at_x(count=10): for i in range (count): b=sdm.Bitstring() sdm.thread_write(b,b) def mem_write_x_at_random(count=10): for i in range (count): b=sdm....
from django.conf.urls import * from tagging_autocomplete.views import list_tags urlpatterns = [ # 'tagging_autocomplete.views', url(r'^list$', list_tags, name='tagging_autocomplete-list'), ]
import numpy from numpy import array from numpy import mean from numpy import cov, var from PIL import Image from numpy.linalg import eigh, norm from matplotlib.pyplot import * import matplotlib.pyplot as plt import math f = open('ts.txt', 'r') train_images = [] tf = open('tss.txt', 'r') test_images = [...
# author: Wenrui Zhang # email: wenruizhang@ucsb.edu # # install required package using: pip install -r requirements.txt # run the code: python main.py import numpy as np from sklearn.preprocessing import StandardScaler, LabelEncoder import sklearn.model_selection as model_s from sklearn import neighbors from sklearn...
from Pages.drag_drop import DragDropPage from Utils.locators import DragDropLocators import time from Utils.Logger import Logging import allure from allure_commons.types import AttachmentType @allure.severity(allure.severity_level.NORMAL) class Test_DragDrop: logger = Logging.loggen() ################## ...
from django.shortcuts import render, get_object_or_404 from decimal import Decimal from django.conf import settings from django.urls import reverse from paypal.standard.forms import PayPalPaymentsForm from django.views.decorators.csrf import csrf_exempt import pymysql connection = pymysql.connect(host='localhost',user=...
""" :mod:`pysgutils.sg_pt` ~~~~~~~~~~~~~~~~~~~~~~ Python port of sg_pt.h from sg3_utils Comments from sg_pt.h: Copyright (c) 2005-2014 Douglas Gilbert. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the BSD_LICENSE file. """ from __future__ import absolute_import...
import matplotlib import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D def initial_plot(f): matplotlib.rcParams['xtick.direction'] = 'out' matplotlib.rcParams['ytick.direction'] = 'out' delta = 0.025 x = np.arange(-5.0, 5.0, del...
from django.conf.urls import patterns, include, url from django.contrib import admin from apps.web import views from apps.api.views import GameViewSet from rest_framework import routers router = routers.DefaultRouter() router.register(r'games', GameViewSet) urlpatterns = patterns('', url(r'^', include(views)), ...
""" Heber Cooke 10/31/2019 Chapter 6 Exercise 9 Write a program that computes and prints the average of of the numbers in a text file. You should make use of two higher-order functions to simplify the design. """ import random inpu = input("Enter a file name or C to create one ") if inpu == 'C' or inpu == 'c': # crea...
# Generated by Django 2.2.8 on 2020-06-09 08:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myapp', '0002_teach_time'), ] operations = [ migrations.AlterField( model_name='teach', name='time', fie...
#!/usr/bin/python """ Author Paula Dwan Email paula.dwan@gmail.com Student ID 13208660 Subject COMP47270 (Computational Network Analysis and Modeling) Date Jan-2015 Lecturer Dr. Neil Hurley LABORATORY | CASE STUDY 2 : laplacian.py """ # import the networkx network analysis package i...
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gio from gi.repository.GdkPixbuf import Pixbuf class openSessionWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="Open Session Overlay") self.set_border_width(10) hb = Gtk.HeaderBar(title="Ope...
# -*- coding: utf-8 -*- # @Time : 2019/11/28 15:30 # @Author : Jeff Wang # @Email : jeffwang987@163.com OR wangxiaofeng2020@ia.ac.cn # @Software: PyCharm import cv2 import numpy as np canvas = np.zeros((300, 300, 3), dtype='uint8') green = (0, 255, 0) red = (0, 0, 255) white = (255, 255, 255) cv2.line(canv...
"""empty message Revision ID: 76453dfdcd53 Revises: 2e68164a73a9 Create Date: 2020-03-29 00:39:54.361536 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '76453dfdcd53' down_revision = '2e68164a73a9' branch_labels = None depends_on = None def upgrade(): # ...
import torch import torch.nn as nn import torchvision.models as models from tqdm import tqdm from torch.utils.data import DataLoader from sklearn.metrics import accuracy_score from dataset import TextDataset from utils import get_val_augmentations, preprocess_data def main(): BATCH_SIZE = 64 NUM_WORKERS = 8 ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-15 22:48 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course', '0003_grade_is_canceled'), ] operations = [ ...
import os,re,math from time import gmtime, strftime from flask import Flask,render_template,request,session,g,redirect, url_for,abort, flash app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') # Static routing # Please check the files ending in .html in the templates folder to...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import os """dir = "cleaned_df/" file_list = os.listdir(dir) for i,element in enumerate(file_list) : print(i) df=pd.read_csv(dir+str(element)) plt.plot(df["engergy"]) plt.title(str(element)) plt.savefig("./img/"+element.re...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import os import numpy as np import torch import rasterio import rasterio.mask from rasterio.windows import Window from rasterio.plot import show # Inference def predictor_arg(tensor,model): """ args: - tensor : tensor of size N,C,W,H - model...
# -*- coding: utf-8 -*- """ Created on Tue Sep 12 17:45:23 2017 @author: modellav """ #The goal of this project is to scrape data from Google Finance #To determine the top gainers and top losers of the market, with corresponding % change #IMPORT PACKAGES import urllib.request as ul from bs4 import BeautifulSoup imp...
''' Created on Jul 10, 2013 @author: emma ''' from UnitTesting.page_objects.base_page_object import base_page_object from selenium.webdriver.common.action_chains import ActionChains import time class booksellers(base_page_object): def __init__(self, webd_wrap): base_page_object.__init__(self, webd_wr...
#!/usr/bin/python # Iskandar Setiadi 13511073@std.stei.itb.ac.id # Institut Teknologi Bandung (ITB) - Indonesia # Final Project (c) 2015 # mongodb_testcase2.py __author__ = 'freedomofkeima' import sys import time from pymongo import MongoClient def main(args): client = MongoClient('52.74.132.58', 27017) # Neare...
#对数 import matplotlib.pyplot as plt import numpy as np x = np.arange(0.01,10,0.01) y1 = np.log(x)#python以e为底 y2 = np.log(x)/np.log(0.5) plt.plot(x,y1,c='red') plt.plot(x,y2,c='yellow') plt.show()
class Call(object): def __init__(self,unique_id,class_name,caller_phone_num,timeofcall,reason_for_call): self.unique_id = unique_id self.class_name = class_name self.caller_phone_num = caller_phone_num self.timeofcall = timeofcall self.reason_for_call = reason_for_call ...
from django.http import JsonResponse from index.models import Products from .models import Message from user.models import UserProfile import json from user.logging_check import logging_check # Create your views here. @logging_check('POST') def message(request): if request.method == 'GET': goods_id = requ...
下雨天 hello 下午学习git 秦岭一日游 wo men dou yi yang
weight = float(input('Enter your weight in kgs: ')) height = float(input('Enter your height in metres: ')) result = weight / (height**2) print('Your BMI is {:.2f}'.format(result))
#!/usr/bin/env python3 from termcolor import cprint from nubia import command, argument, context @command(name_or_function="gcloud") class GCLOUD: """ Google Cloud Platform commands set. This is still not implemented. """ def __init__(self) -> None: pass @command def info(self): ...
import os import re class LanguageModelContent: def __init__(self, words,count): self.words = words self.count = count def __str__(self): return self.words + '\t' +self.count if __name__ == "__main__": dir_list = sorted(os.listdir('/Users/geekye/Documents/Dataset/LM/UniBiG...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # File Name: Action.py # By: Daniel Lamothe # # Purpose: A simple object representing an Action a Creature can take. Used to house Action information. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
"""Define test cases for KFLR.""" from test.extensions.secondorder.secondorder_settings import GROUP_CONV_SETTINGS SHARED_NOT_SUPPORTED_SETTINGS = GROUP_CONV_SETTINGS LOCAL_NOT_SUPPORTED_SETTINGS = [] NOT_SUPPORTED_SETTINGS = SHARED_NOT_SUPPORTED_SETTINGS + LOCAL_NOT_SUPPORTED_SETTINGS
import os import importlib from gmc.conf import global_settings ENVIRONMENT_VARIABLE = "GMC_SETTINGS_MODULE" class Settings: """ Module to load settings to configure gmc """ def __init__(self, *args, **kwargs): self.settings = None self.settings_module = None def __getattr__(self, ...
import os import PIL from PIL import Image from PIL import ImageEnhance from tqdm import tqdm first_num = 82 last_num = 84 folder_name = "201013-vib" for th in tqdm((1,2,3,4,5,6,7,8,9,10)): TH=str(th) os.mkdir("enhance_test/"+folder_name+"_"+TH) for num in tqdm(range (first_num,last_num)): im_nam...
import unittest import testutil import hdbfs class HiguQueryCases( testutil.TestCase ): def setUp( self ): self.init_env() h = hdbfs.Database() h.enable_write_access() red_obj = h.register_file( self._load_data( self.red ) ) yellow_obj = h.register_file( self._load_data...
# -*- coding: utf-8 -*- import scrapy import time import labsql import copy class PanyuspiderSpider(scrapy.Spider): name = 'panyuSpider' allowed_domains = ['qx.panyu.gov.cn'] start_urls = ['http://qx.panyu.gov.cn/pyinterface/wap/sk_zd.jsp'] # create sql server session conn = labsql.LabSQL('172.16...
class Section: section_number = None type = None days_of_the_week = None start_time = None end_time = None def __init__(self, json_dict=None): if json_dict is None: self.section_number = None self.type = None self.days_of_the_week = None s...
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'downloaderFNzIGb.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! #########...
import board import neopixel import time pixels = neopixel.NeoPixel(board.D18, 20) for i in range (0,20): pixels[i] = (0,0,255)
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import dataclasses import functools import itertools import json import logging import os.path from dataclasses import dataclass from pathlib import Pur...
from django.db import models GENRE_CHOICES = ( ("rock", "Rock"), ("blues", "Blues"), ) class Artist(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) artistic_name = models.CharField(max_length=255) picture_url = models.URLField() po...
#!/usr/bin/python # # Sample python code using the standard http lib only # import httplib ## Your Infinispan WAR server host hostname = "localhost:8080" webapp_name = "infinispan-server-rest" cache_name = "___defaultcache" key = "my_key" #putting data in print "Storing data on server %s under key [%s] over REST" ...
# Generated by Django 3.2.4 on 2021-07-07 13:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('churrasco', '0002_auto_20210706_1629'), ] operations = [ migrations.AlterField( model_name='produto', name='nome', ...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
13