content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import numpy as np
import matplotlib.pyplot as plt
#LOAD IMAGE
name='luna-1.jpeg'
x=plt.imread(name)
#ROTATE BY SWITCHING X AND Y DIMENSIONS
if(name=="luna-2.jpeg"):
plt.imshow(x); plt.show()
x=np.transpose(x,axes=[1,0,2])
#SHOW IMAGE
plt.imshow(x); plt.show()
#QUICK INFO ON IMAGE
get_info(x)
#CROP
pl... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
2,
35613,
8959,
11879,
198,
3672,
11639,
75,
9613,
12,
16,
13,
73,
22071,
6,
198,
87,
28,
489,
83,
13,
320,
961,
7,
3672,
... | 2.09434 | 371 |
import dataclasses
import enum
import os
import typing
import dacite
# import jsonschema
import yaml
import default
import util
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
@dataclasses.dataclass
class EnumValueYamlDumper(yaml.SafeD... | [
11748,
4818,
330,
28958,
198,
11748,
33829,
198,
11748,
28686,
198,
11748,
19720,
198,
198,
11748,
288,
330,
578,
198,
2,
1330,
44804,
684,
2395,
2611,
198,
11748,
331,
43695,
198,
198,
11748,
4277,
198,
11748,
7736,
628,
628,
198,
31,
... | 2.599617 | 522 |
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from django.core.validators import FileExtensionValidator
from django.db import models
from utils.model_utils import PathAndRename, default_1d_array
from utils.slug import slugify
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
7353,
34239,
13,
25747,
1330,
15690,
15878,
198,
6738,
42625,
14208,
13,
7295,
13,
12102,
2024,
1330,
9220,
11627,... | 3.357143 | 84 |
from maya import cmds
from maya import mel
commandDict = {}
commandDict['uvTextureEditor'] = "textureEditor.png"
commandDict['uVSetEditor'] = "sphere.png"
commandDict['uvProjection_automatic'] = "polyAutoProj.png"
commandDict['uvProjection_automatic_options'] = "polyAutoProj.png"
commandDict['bestPlaneTextur... | [
6738,
743,
64,
1330,
23991,
82,
198,
6738,
743,
64,
1330,
7758,
628,
198,
21812,
35,
713,
796,
23884,
628,
628,
628,
628,
198,
198,
21812,
35,
713,
17816,
14795,
32742,
17171,
20520,
796,
366,
41293,
17171,
13,
11134,
1,
198,
21812,
... | 2.909639 | 166 |
msg = ('Hello World')
print(msg) | [
19662,
796,
19203,
15496,
2159,
11537,
198,
198,
4798,
7,
19662,
8
] | 2.75 | 12 |
import streamlit as st
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import requests, os
from gwpy.timeseries import TimeSeries
from gwosc.locate import get_urls
from gwosc import datasets
from gwosc.api import fetch_event_json
from copy import deepcopy
import base64
# Use the non-interactiv... | [
11748,
4269,
18250,
355,
336,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
7007,
11,
28686,
198,
6738,
308,
86,
9078,
13,
2235... | 2.699965 | 2,853 |
import pandas as pa
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import Imputer,LabelEncoder,OneHotEncoder
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import cross_val_score
#%%
datset=pa.read_cs... | [
11748,
19798,
292,
355,
14187,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
220,
220,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
1846,
10549,
11,
33986,
27195,
12342,
11,
3198,
21... | 2.455357 | 336 |
import build
import numpy as np
from collections import defaultdict
import pickle
import random
random.seed = 1
from mm.path_inference_private.proj_templates import get_em_evaluation_fnames, get_evaluation_em_data_file
from mm.path_inference_private.evaluation import LEARNING_METHOD_IDX, METRIC_NAME_IDX, STRAT_NAME_ID... | [
11748,
1382,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
1330,
4277,
11600,
198,
11748,
2298,
293,
198,
11748,
4738,
198,
25120,
13,
28826,
796,
352,
198,
6738,
8085,
13,
6978,
62,
259,
4288,
62,
19734,
13,
1676,
73,
62... | 2.419333 | 2,907 |
import glob
import os
import sys
import time
from random import randint
import cv2
import numpy as np
import torch
from PIL import Image
from models import *
from utils.datasets import *
from utils.utils import *
# from utils.utils import xyxy2xywh
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
trackerTypes = [
'BOOS... | [
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
673... | 2.023203 | 1,767 |
import os
import numpy as np
import pandas as pd
from scipy.misc import imread
import tensorflow as tf
from six.moves import urllib
import keras
from keras.models import Sequential
from keras.layers import Dense, Flatten, Reshape, InputLayer
from keras.regularizers import L1L2
from scipy.misc import imsave
import gz... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
629,
541,
88,
13,
44374,
1330,
545,
961,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
2237,
13,
76,
5241,
1330,
2956,
297... | 2.505125 | 2,439 |
from behave import given, when, then
@given(u'this step exists')
@when(u'I run "python manage.py behave"')
@then(u'I should see the behave tests run')
@then(u'django_ready should be called')
| [
6738,
17438,
1330,
1813,
11,
618,
11,
788,
628,
198,
31,
35569,
7,
84,
470,
14363,
2239,
7160,
11537,
628,
198,
31,
12518,
7,
84,
6,
40,
1057,
366,
29412,
6687,
13,
9078,
17438,
1,
11537,
628,
198,
31,
8524,
7,
84,
6,
40,
815,
... | 2.970149 | 67 |
from flask import Flask, jsonify, request, redirect, session, render_template, url_for
from flask_mail import Mail, Message
import uuid
from app import db, serializer, mail
from itsdangerous import URLSafeTimedSerializer, SignatureExpired
| [
6738,
42903,
1330,
46947,
11,
33918,
1958,
11,
2581,
11,
18941,
11,
6246,
11,
8543,
62,
28243,
11,
19016,
62,
1640,
201,
198,
6738,
42903,
62,
4529,
1330,
11099,
11,
16000,
201,
198,
11748,
334,
27112,
201,
198,
6738,
598,
1330,
20613... | 3.424658 | 73 |
"""A CSV annotation writer that reads the bbox in x, y, w, h format."""
from discolight.annotations import BoundingBox
from .types import CSVRow, CSVAnnotationLoader
class WidthHeightCSV(CSVAnnotationLoader):
"""Loads annotations from a CSV file in the following format.
image_name, x_min, y_min, width, heig... | [
37811,
32,
44189,
23025,
6260,
326,
9743,
262,
275,
3524,
287,
2124,
11,
331,
11,
266,
11,
289,
5794,
526,
15931,
198,
6738,
1221,
349,
432,
13,
34574,
602,
1330,
347,
9969,
14253,
198,
6738,
764,
19199,
1330,
9429,
13024,
322,
11,
... | 2.366197 | 355 |
import asyncio
import random
import discord
import drop.errors
from discord.ext import commands
from data.extdata import get_language_str, wait_for_user, get_file_type
from drop.tempban import *
from drop.errors import *
with open("data/embed_colors.json") as f:
colors = json.load(f)
color_list = [c for c in... | [
11748,
30351,
952,
198,
11748,
4738,
198,
198,
11748,
36446,
198,
11748,
4268,
13,
48277,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
1366,
13,
2302,
7890,
1330,
651,
62,
16129,
62,
2536,
11,
4043,
62,
1640,
62,
7220,
11,
651,
... | 2.533998 | 1,103 |
from models.Sizers.Sizer import Sizer as Sizer
import backtrader as bt
from dataclasses import dataclass
from dataclasses import field
@dataclass
class DefaultSizer(Sizer):
"""
This is the default sizer used in Engine
It's a PercentSizer, paremetered with 10%
"""
sizer: bt.Sizer = bt.sizers.Perce... | [
6738,
4981,
13,
50,
11341,
13,
50,
7509,
1330,
311,
7509,
355,
311,
7509,
198,
11748,
736,
2213,
5067,
355,
275,
83,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
330,
28958,
1330,
2214,
628,
198,
31,
19608,
... | 2.836879 | 141 |
# -*- coding: utf-8 -*-
import os
import subprocess
import sys
import warnings
from pathlib import Path
from pprint import pprint
from typing import Dict, List
import yaml
from envparse import env
from duplicity_backup_s3.defaults import (
FULL_IF_OLDER_THAN,
DUPLICITY_BACKUP_ARGS,
DUPLICITY_VERBOSITY,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
14601,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
19720,
13... | 2.272026 | 6,742 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8
#
# ctm2tg: a script to convert CTM files from Kaldi aligner
# to Praat's TextGrid format
#
# Grupo FalaBrasil (2021)
# Universidade Federal do Pará
#
# author: apr 2019
# cassio batista - https://cassota.gitlab.io
# updated on apr 2021
impo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
900,
2393,
12685,
7656,
28,
40477,
12,
23,
198,
2,
198,
2,
269,
17209,
17,
25297,
25,
257,
4226,
... | 1.984542 | 3,752 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# 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 cop... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
2864,
383,
3012,
9552,
15417,
4816,
46665,
290,
383,
12905,
2667,
32388,
3457,
13,
1074,
13,
198,
2,
15069,
357,
66,
8,
2864,
11,
15127,
23929,
44680,
6234,
13,
220,
1439,
2489,
10395,
13,... | 2.270387 | 4,157 |
# Copyright (c) 2022, Leonardo Lamanna
# All rights reserved.
# This source code is licensed under the MIT-style license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os.path
import sys
import Configuration
from Util.Simulator import Simulator
from Util import preproces... | [
2,
15069,
357,
66,
8,
33160,
11,
38083,
10923,
7697,
198,
2,
1439,
2489,
10395,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
12,
7635,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
... | 2.298271 | 11,104 |
# coding:utf-8
# 2019-4-20
"""根据二值分割将原图进行分割
解决原因:对图像进行分割前对原图进行了增强处理,进行分割时是对增强图片进行分割,而不是基于原图分割。
现在根据对增强图片进行分割保存的二值图对原图进行分割,保存原图的分割图。
"""
import numpy as np
import os
import cv2
from tool import util
from tool import api
def getImageDict(originalFiles, binaryFiles):
"""获得原图对应的分割图路径
@param originalFiles 原图文件路径列表
... | [
2,
19617,
25,
40477,
12,
23,
198,
2,
13130,
12,
19,
12,
1238,
198,
37811,
43718,
117,
162,
235,
106,
12859,
234,
161,
222,
120,
26344,
228,
30298,
110,
49546,
43889,
253,
32368,
122,
32573,
249,
26193,
234,
26344,
228,
30298,
110,
1... | 1.817536 | 1,688 |
#!/usr/bin/env python3
# Copyright (c) 2021 Mobvoi Inc. (authors: Binbin Zhang)
#
# 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 ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
357,
66,
8,
33448,
16540,
13038,
72,
3457,
13,
357,
41617,
25,
20828,
8800,
19439,
8,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,... | 2.146588 | 1,876 |
from models import ResNet_Spec, ResNet
import hiddenlayer as hl
import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print("device = ", device)
model = ResNet(ResNet_Spec[18])
hl_graph = hl.build_graph(model, torch.zeros([1, 3, 512, 512]).to(device=device))
hl_graph.theme = hl.graph.TH... | [
6738,
4981,
1330,
1874,
7934,
62,
22882,
11,
1874,
7934,
198,
11748,
7104,
29289,
355,
289,
75,
198,
11748,
28034,
198,
198,
25202,
796,
28034,
13,
25202,
7203,
66,
15339,
25,
15,
1,
611,
28034,
13,
66,
15339,
13,
271,
62,
15182,
34... | 2.692857 | 140 |
import sys, re, glob
import numpy as np
import matplotlib.pyplot as plt
from cctk import GaussianFile, Molecule
import cctk.parse_gaussian as parse
#### Usage: ``python analyze_dipole.py "path/to/output/*.out"``
#### NOTE: It's crucial to wrap the wildcard-containing path in quotes!
#### NOTE: This file will reject ... | [
11748,
25064,
11,
302,
11,
15095,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
269,
310,
74,
1330,
12822,
31562,
8979,
11,
25726,
23172,
198,
11748,
269,
310,
74,
13... | 2.25258 | 1,647 |
import logging
import boto3
from ec2mgr import EC2Manager
from ssmmgr import SSMManager
class AWSDriver:
"""
The main program that handles the AWS related activities
"""
def init_vars(self, event, logger):
""" variable initialization """
self.logger = logger
self.logger.... | [
11748,
18931,
198,
11748,
275,
2069,
18,
198,
198,
6738,
9940,
17,
76,
2164,
1330,
13182,
17,
13511,
198,
6738,
37786,
3020,
2164,
1330,
6723,
44,
13511,
628,
198,
4871,
14356,
10305,
38291,
25,
198,
220,
220,
220,
37227,
198,
220,
22... | 2.31769 | 1,385 |
import argparse
import os
def run(path, flags):
"""TODO: Add method description!
Args:
path (str):
flags (argparse.Namespace):
"""
if flags.config and flags.default:
pass # Should raise error that flags cannot be both used
elif flags.config:
config(path, flags)
... | [
11748,
1822,
29572,
198,
11748,
28686,
628,
198,
4299,
1057,
7,
6978,
11,
9701,
2599,
198,
220,
220,
220,
37227,
51,
3727,
46,
25,
3060,
2446,
6764,
0,
628,
220,
220,
220,
943,
14542,
25,
198,
220,
220,
220,
220,
220,
220,
220,
31... | 2.379734 | 977 |
from typing import ClassVar
from .. import command, module, util
| [
6738,
19720,
1330,
5016,
19852,
198,
198,
6738,
11485,
1330,
3141,
11,
8265,
11,
7736,
628
] | 4.1875 | 16 |
first = Node();
first.data = 5;
ll = LinkedList();
ll.add(first);
blah = Node();
ll.add(blah);
print(first);
| [
197,
197,
198,
197,
198,
197,
197,
628,
198,
11085,
796,
19081,
9783,
198,
198,
11085,
13,
7890,
796,
642,
26,
198,
198,
297,
796,
7502,
276,
8053,
9783,
198,
297,
13,
2860,
7,
11085,
1776,
628,
198,
2436,
993,
796,
19081,
9783,
1... | 2.1 | 60 |
import cauldron as cd
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams.update({'figure.max_open_warning': 0}) # NOQA
import seaborn as sns
sns.set() # NOQA, need this for styling
import pandas as pd
import os, sys # NOQA
sys.path.append('../../src/data')
import make_dataset # NOQA, need the lines above t... | [
11748,
269,
45637,
355,
22927,
198,
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
489,
83,
13,
6015,
10044,
4105,
13,
19119,
15090,
6,
26875,
13,
9806,
62,
9654,
62,
43917,
10354,
657,
30... | 3.119086 | 613 |
# -*-coding:Utf-8 -*
# -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copy... | [
2,
532,
9,
12,
66,
7656,
25,
18274,
69,
12,
23,
532,
9,
198,
2,
532,
9,
12,
66,
7656,
25,
18274,
69,
12,
23,
532,
9,
198,
198,
2,
15069,
357,
66,
8,
3050,
12,
5539,
12509,
10351,
5777,
18653,
198,
2,
1439,
2489,
10395,
13,
... | 2.279186 | 2,604 |
import logging
import os
import shutil
import sys
import portend
from django.apps import apps
from django.core.management import call_command
from django.db.utils import OperationalError
from .conf import KOLIBRI_HOME
from .conf import OPTIONS
from .options import generate_empty_options_file
from .server import get_s... | [
11748,
18931,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
198,
11748,
2493,
437,
198,
6738,
42625,
14208,
13,
18211,
1330,
6725,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
869,
62,
21812,
198,
6738,
42625,
... | 2.467692 | 1,950 |
# -*- coding: utf-8 -*-
"""
Sensitization Visit view.
"""
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from mspray.apps.main.models.sensitization_visit import (
create_sensitization_visit
)
class SensitizationVisitView(APIView):
"""S... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
50,
641,
270,
1634,
16440,
1570,
13,
198,
37811,
198,
198,
6738,
1334,
62,
30604,
1330,
3722,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
... | 2.842105 | 190 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import logging
import os
import sys
from django.core.management.base import BaseCommand
from optparse import make_option
from unin... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
257,
72,
40379,
28,
19,
39747,
28,
19,
2123,
1509,
28,
19,
14364,
198,
198,
6738,
11593,
37443,
834,
... | 2.657534 | 146 |
from __future__ import print_function
# to filter some unnecessory warning messages
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import os
import numpy as np
import pandas as pd
import glob
import keras
from... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
2,
284,
8106,
617,
11689,
652,
6509,
6218,
198,
11748,
14601,
198,
198,
40539,
654,
13,
24455,
40539,
654,
7203,
46430,
1600,
3275,
2625,
77,
32152,
13,
67,
4906,
2546,
3421,
4943,
1... | 2.421053 | 380 |
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/filebrowser/', include('fi... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
12708,
... | 2.859031 | 227 |
import numpy as np
import cv2
TOTAL_IMAGES = 1000
STORE_IMAGES = False
IMAGE_DIMENSION = 100
NUM_CHANNELS = 1
PADDING_MIN = 10
PADDING_MAX = 20
MIN_BOX_DIM = 40
if __name__ == "__main__":
main()
| [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
198,
51,
27510,
62,
3955,
25552,
796,
8576,
198,
2257,
6965,
62,
3955,
25552,
796,
10352,
198,
3955,
11879,
62,
35,
3955,
16938,
2849,
796,
1802,
198,
41359,
62,
3398,
22846... | 2.266667 | 90 |
#!/usr/bin/env python
import torch
from .robot_model import RobotModel
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28034,
198,
6738,
764,
305,
13645,
62,
19849,
1330,
16071,
17633,
198,
220,
220,
220,
220
] | 2.884615 | 26 |
import os
from unittest import TestCase
from litter_getter import pubmed
| [
11748,
28686,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
25359,
62,
1136,
353,
1330,
2240,
1150,
628,
628
] | 3.5 | 22 |
#!/usr/bin/python3
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget
from gui.button_panel import *
from gui.video_panel import *
from gui.xy_pad_panel import *
if __name__ == '__main__':
GuiThread()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
25064,
198,
6738,
9485,
48,
83,
20,
1330,
33734,
14055,
11,
33734,
8205,
72,
11,
33734,
54,
312,
11407,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
234... | 2.663265 | 98 |
# 配置
import logging
from redis import StrictRedis
zd={'ts':tiaoshi,'xs':xianshang} | [
2,
16268,
227,
235,
163,
121,
106,
198,
11748,
18931,
198,
6738,
2266,
271,
1330,
520,
2012,
7738,
271,
628,
628,
198,
89,
67,
34758,
6,
912,
10354,
83,
544,
13704,
4032,
34223,
10354,
87,
1547,
33255,
92
] | 2.263158 | 38 |
# -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
from ..items import SchoolSpiderItem
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
15881,
88,
198,
6738,
15881,
88,
13,
4023,
1330,
19390,
198,
6738,
11485,
23814,
1330,
3961,
41294,
7449,
628,
198
] | 3.114286 | 35 |
import numpy as np
import json
import PIL.ImageFont as ImageFont
import PIL.Image as pil
from PIL import ImageDraw
import matplotlib as mpl
import matplotlib.cm as cm
import cv2 as cv
import torch
from torch.utils.data import DataLoader
import torch.nn.functional as F
from torchvision import transforms
... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
33918,
201,
198,
11748,
350,
4146,
13,
5159,
23252,
355,
7412,
23252,
201,
198,
11748,
350,
4146,
13,
5159,
355,
5560,
201,
198,
6738,
350,
4146,
1330,
7412,
25302,
201,
198,
11748,
2603,
... | 2.70318 | 283 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 15 13:23:25 2018
@author: BallBlueMeercat
"""
# Eq of state parameters for known fluids:
w_r = 1/3 # radiation
w_m = 0.0 # matter
w_de = -1.0 # cosmological constant (dark energy?)
def zfirstderivs(v, t, gamma):
"""
Takes in:
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
3158,
1315,
1511,
25,
1954,
25,
1495,
2864,
198,
198,
31,
9800,
25,
6932,
14573,
5... | 1.669956 | 912 |
""" Smoke test site runner """
# pylint:disable=invalid-name
import logging
import os
try:
import authl.flask
except ImportError:
authl = None
try:
import whoosh
except ImportError:
whoosh = None
import flask
import publ
import publ.image
APP_PATH = os.path.join(os.path.dirname(os.path.abspath(__f... | [
37811,
25416,
1332,
2524,
17490,
37227,
198,
2,
279,
2645,
600,
25,
40223,
28,
259,
12102,
12,
3672,
198,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
6284,
75,
13,
2704,
2093,
198,
16341,
17267... | 2.264849 | 1,027 |
import streamlit as st
import pandas as pd
import numpy as np
import time
import uber_display
from scipy import stats
"# Numpy and Pandas Tutorial"
"### Semana i 2019"
"Made in Streamlit"
if st.checkbox('Show Uber Data'):
st.subheader('Uber data data')
uber_display.main()
"""# Numpy exercises """
"- **Show... | [
11748,
4269,
18250,
355,
336,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
48110,
62,
13812,
198,
6738,
629,
541,
88,
1330,
9756,
198,
198,
1,
2,
399,
32152,
290,
16492,
292,
... | 2.334873 | 866 |
from secrets import token_urlsafe
from starlette.config import Config
# Config will be read from environment variables and/or ".env" files.
from starlette.datastructures import Secret
config = Config(".env")
DEBUG = config("DEBUG", cast=bool, default=False)
TESTING = config("TESTING", cast=bool, default=False)
HTTP... | [
6738,
13141,
1330,
11241,
62,
6371,
21230,
198,
198,
6738,
3491,
21348,
13,
11250,
1330,
17056,
198,
198,
2,
17056,
481,
307,
1100,
422,
2858,
9633,
290,
14,
273,
27071,
24330,
1,
3696,
13,
198,
6738,
3491,
21348,
13,
19608,
459,
1356... | 3.079208 | 202 |
"""Order 30: Crawl all cainiao stations
from url 'https://cart.taobao.com/cart.htm?spm=875.7931836%2FB.a2226mz.11.67fc5d461PCKtS&from=btop'
"""
import time
from faker import Faker
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from scrapy import Selector
from scrapy.http ... | [
198,
37811,
18743,
1542,
25,
327,
13132,
477,
269,
391,
13481,
8985,
198,
198,
6738,
19016,
705,
5450,
1378,
26674,
13,
8326,
672,
5488,
13,
785,
14,
26674,
13,
19211,
30,
2777,
76,
28,
31360,
13,
3720,
36042,
2623,
4,
17,
26001,
13... | 2.330097 | 412 |
#!/usr/bin/python3
# -*- coding! utf-8 -*-
import os
import time
from subprocess import Popen, PIPE
from datetime import datetime
import psutil
if __name__ == '__main__':
bat_sign = []
while True:
os.system('xsetroot -name "{}"'.format(sys_state()))
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
0,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
11748,
28686,
198,
11748,
640,
198,
6738,
850,
14681,
1330,
8099,
268,
11,
350,
4061,
36,
198,
6738,
4818,
8079,
133... | 2.518519 | 108 |
""" Python Workplace Simulation
Author: Garrett Guevara
Written/Tested in Python Version 3.5.2
Task: Your company is headquartered in Portland, OR.
They've opened two new branches in NYC and London. They
ask that you create a program that tells if the branches
are open or closed based on the current time at HQ.
All b... | [
37811,
11361,
5521,
5372,
41798,
198,
198,
13838,
25,
27540,
402,
518,
85,
3301,
198,
25354,
14,
51,
7287,
287,
11361,
10628,
513,
13,
20,
13,
17,
198,
198,
25714,
25,
3406,
1664,
318,
48583,
287,
10727,
11,
6375,
13,
198,
2990,
105... | 3.008143 | 614 |
"""
reddit_detective.analytics provides basic metrics for a given Node.
For more complex stuff, use Neo4j GDSC or this package:
https://github.com/neo4j-graph-analytics/networkx-neo4j
"""
| [
37811,
198,
10748,
62,
15255,
13967,
13,
38200,
14094,
3769,
4096,
20731,
329,
257,
1813,
19081,
13,
198,
198,
1890,
517,
3716,
3404,
11,
779,
21227,
19,
73,
402,
5258,
34,
393,
428,
5301,
25,
198,
5450,
1378,
12567,
13,
785,
14,
71... | 3.048387 | 62 |
import http.client
import re
from collections import OrderedDict
from urllib.parse import urlparse
from django.core.exceptions import SuspiciousOperation
from django.http import HttpResponse, JsonResponse # NOQA
from django.utils.encoding import iri_to_uri
'''Add some missing HttpResponse sub-classes'''
STATUS_CO... | [
198,
11748,
2638,
13,
16366,
198,
11748,
302,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
29572,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
31922,
6243,
32180,
198... | 2.923986 | 592 |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from typi... | [
2,
16529,
45537,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321,
13,
198,
2,
16529,
35937,
198,
1... | 2.260766 | 4,598 |
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 8 16:20:20 2020
@author: Eilder Jorge
"""
# To run this, download the BeautifulSoup zip file
# http://www.py4e.com/code3/bs4.zip
# and unzip it in the same directory as this file
from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# Ignore SSL ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
5979,
220,
807,
1467,
25,
1238,
25,
1238,
12131,
198,
198,
31,
9800,
25,
412,
688,
263,
34687,
198,
37811,
198,
198,
2,
1675,
1057,
428,
... | 2.67433 | 261 |
import random
import typing
from gym_super_mario_bros import make
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from keras.layers import Dense
from keras.optimizers import Adam
from keras.models import Sequential
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv
from numpy import argmax, float32, re... | [
11748,
4738,
198,
11748,
19720,
198,
198,
6738,
11550,
62,
16668,
62,
3876,
952,
62,
65,
4951,
1330,
787,
198,
6738,
11550,
62,
16668,
62,
3876,
952,
62,
65,
4951,
13,
4658,
1330,
23749,
16437,
62,
44,
8874,
12529,
198,
6738,
41927,
... | 2.304636 | 755 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2018-11-11 20:58
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
319,
2864,
12,
1157,
12,
1157,
1160,
25,
3365,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,... | 2.754717 | 53 |
import mysql.connector
import re
| [
11748,
48761,
13,
8443,
273,
201,
198,
11748,
302,
201,
198,
201,
198,
201,
198
] | 2.6 | 15 |
from collections import defaultdict
import logging as log
from utils.AlertGenerator import emit_alert
from db.Models import DataCollector, Issue, AlertType
| [
6738,
17268,
1330,
4277,
11600,
198,
11748,
18931,
355,
2604,
198,
198,
6738,
3384,
4487,
13,
36420,
8645,
1352,
1330,
27588,
62,
44598,
198,
6738,
20613,
13,
5841,
1424,
1330,
6060,
31337,
273,
11,
18232,
11,
23276,
6030,
628,
628
] | 4 | 40 |
import unittest
import json
import random
import string
import os
from unittest.case import SkipTest
import twython
from sneakers.channels import twitter
import sneakers
basePath = os.path.dirname(os.path.abspath(sneakers.__file__))
| [
11748,
555,
715,
395,
198,
11748,
33918,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
28686,
198,
198,
6738,
555,
715,
395,
13,
7442,
1330,
32214,
14402,
198,
11748,
665,
7535,
198,
198,
6738,
42649,
13,
354,
8961,
1330,
17044,
198,
... | 3.309859 | 71 |
from app import apfell, db_objects
from sanic.response import raw, json
from app.database_models.model import StagingInfo
import base64
import app.crypto as crypt
import json as js
from app.api.callback_api import create_callback_func
import app.database_models.model as db_model
# this is an unprotected API so that a... | [
6738,
598,
1330,
2471,
23299,
11,
20613,
62,
48205,
198,
6738,
5336,
291,
13,
26209,
1330,
8246,
11,
33918,
198,
6738,
598,
13,
48806,
62,
27530,
13,
19849,
1330,
520,
3039,
12360,
198,
11748,
2779,
2414,
198,
11748,
598,
13,
29609,
7... | 3.152838 | 229 |
#!/usr/bin/env python3
"""
Renders index.html
"""
from mako.lookup import TemplateLookup
from pypugjs.ext.mako import preprocessor as pug_preprocessor
from libtales import Tales
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
49,
7338,
6376,
13,
6494,
198,
37811,
628,
198,
6738,
285,
25496,
13,
5460,
929,
1330,
37350,
8567,
929,
198,
6738,
279,
4464,
1018,
8457,
13,
2302,
13,
76,
25496,
13... | 2.833333 | 78 |
API_KEY = "2nqrb7e20f9gy2mp"
api_secret = "24hppoib99gudt5t4glq7yw5m9dr29ax"
# ====================================================
access_token = "GSzV0EA2hdw0ptoCqwz2Cn3Qpz7kBlRI"
| [
198,
17614,
62,
20373,
796,
366,
17,
77,
80,
26145,
22,
68,
1238,
69,
24,
1360,
17,
3149,
1,
198,
15042,
62,
21078,
796,
366,
1731,
71,
16634,
571,
2079,
70,
463,
83,
20,
83,
19,
4743,
80,
22,
88,
86,
20,
76,
24,
7109,
1959,
... | 2.103448 | 87 |
#------------------------------------------------------------------------------
#
# Copyright (c) 2014-2015, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only
# under the conditions descri... | [
2,
10097,
26171,
198,
2,
198,
2,
220,
15069,
357,
66,
8,
1946,
12,
4626,
11,
2039,
28895,
11,
3457,
13,
198,
2,
220,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
770,
3788,
318,
2810,
1231,
18215,
739,
262,
2846,
286,
262,
347,
... | 4.304878 | 164 |
from typing import Any, Dict, List, Optional
from transformers import T5Tokenizer
| [
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
32233,
198,
198,
6738,
6121,
364,
1330,
309,
20,
30642,
7509,
628
] | 3.818182 | 22 |
# Copyright 2019 Internap.
#
# 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, so... | [
2,
15069,
13130,
2445,
499,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
... | 3.814433 | 194 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
| [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
5964,
13,
628
] | 4.352941 | 17 |
from datetime import datetime
from pkg.statistics import get_avg, get_percentiles
from pkg import all_data_file
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
279,
10025,
13,
14269,
3969,
1330,
651,
62,
615,
70,
11,
651,
62,
25067,
2915,
198,
6738,
279,
10025,
1330,
477,
62,
7890,
62,
7753,
198
] | 3.228571 | 35 |
import argparse
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('--path', '-p', default='./validation_results.csv')
args = parser.parse_args()
path = args.path
df = pd.read_csv(path)
md = df.to_markdown(index=False)
print(md)
| [
11748,
1822,
29572,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
48610,
13,
2860,
62,
49140,
10786,
438,
6978,
3256,
705,
12,
79,
3256,
4277,
28,
4458,
14,
12102,
341,
62,... | 2.712766 | 94 |
import random
import time
import os
import signal
import sys
import logging
import argparse
import envirophat
from prometheus_client import Gauge, start_http_server
def _daemonize(pid_file, func, *args):
"""Call func in child process"""
pid = os.fork()
if pid > 0: # Main process
with open(pid_fil... | [
11748,
4738,
198,
11748,
640,
198,
11748,
28686,
198,
11748,
6737,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
1822,
29572,
198,
198,
11748,
17365,
7058,
746,
265,
198,
6738,
1552,
36916,
62,
16366,
1330,
35094,
469,
11,
923,
62,
... | 2.468288 | 946 |
import os
from abc import ABC, abstractmethod
from anadroid.device.DeviceState import get_known_state_keys, DeviceState
from anadroid.results_analysis.filters.Filters import Filters
from anadroid.utils.Utils import get_resources_dir
DEFAULT_CFG_ANALYZERS_FILE = os.path.join(get_resources_dir(), "config", "analyzer_f... | [
11748,
28686,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
198,
6738,
281,
324,
3882,
13,
25202,
13,
24728,
9012,
1330,
651,
62,
4002,
62,
5219,
62,
13083,
11,
16232,
9012,
198,
6738,
281,
324,
3882,
13,
43420,
62,
20930,
... | 2.516353 | 1,009 |
# -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
15741,
13,
9078,
198,
220,
220,
220,
220,
15116,
198,
220,
220,
220,
2343,
248,
94,
158,
248,
94,
158,
248,
94,
12549,
11,
4401,
6551,
11,... | 3.423913 | 184 |
#!/usr/bin/env python
cisco_dev1 = {'device_type': 'cisco_ios',
'ip': '184.105.247.70',
'username': 'pyclass'
'password': '88newclass'}
cisco_dev2 = {'device_type': 'cisco_ios',
'ip': '184.105.247.71',
'username': 'pyclass'
'password': '88n... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
66,
4861,
62,
7959,
16,
796,
1391,
6,
25202,
62,
4906,
10354,
705,
66,
4861,
62,
4267,
3256,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
541,
10354,
... | 1.736413 | 736 |
'''
Create an RSS feed
'''
import os
import sys
# point this to the folder where mdiocre.py is located
sys.path.append(os.path.abspath('..'))
from mdiocre.core import MDiocre
from mdiocre.wizard import Wizard
from feedgen import feed
import datetime
# directory where the blog files are
BLOG_DIR = "source/blog"
WEBS... | [
7061,
6,
198,
16447,
281,
25012,
3745,
220,
198,
7061,
6,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
2,
966,
428,
284,
262,
9483,
810,
285,
10989,
27945,
13,
9078,
318,
5140,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
... | 2.358641 | 1,001 |
# Copyright 2017 Battelle Energy Alliance, LLC
#
# 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 t... | [
2,
15069,
2177,
12350,
13485,
6682,
10302,
11,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,... | 2.280856 | 5,793 |
#!/usr/bin/env python
import code
import cpp
import cpp_file_parser
import file_parser
import parser_addition
import to_string
import util
import os
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
2438,
198,
11748,
269,
381,
198,
11748,
269,
381,
62,
7753,
62,
48610,
198,
11748,
2393,
62,
48610,
198,
11748,
30751,
62,
2860,
653,
198,
11748,
284,
62,
8841,
198,
11748,... | 3.037037 | 54 |
import os
import gym
from stable_baselines.common.policies import MlpPolicy
from stable_baselines import PPO2
from stable_baselines.common import make_vec_env
from TetrisBattle.envs.tetris_env import TetrisSingleEnv
# load env var
CASE_NAME = get_var_from_env("CASE_NAME", "ppo2_tetris_test")
TRAIN_STEPS = int(floa... | [
198,
11748,
28686,
198,
11748,
11550,
198,
198,
6738,
8245,
62,
12093,
20655,
13,
11321,
13,
79,
4160,
444,
1330,
337,
34431,
36727,
198,
6738,
8245,
62,
12093,
20655,
1330,
350,
16402,
17,
198,
6738,
8245,
62,
12093,
20655,
13,
11321,
... | 2.408547 | 585 |
import hmac
from hashlib import sha1
from sys import argv
from time import time
from datetime import date
storeurl = flow.getVariable("Url")
expirytime = flow.getVariable("expirytime")
containerName = flow.getVariable("containerName")
date_now = str(date.today().isoformat())
url = storeurl + '/' + containerName +... | [
11748,
289,
20285,
198,
6738,
12234,
8019,
1330,
427,
64,
16,
198,
6738,
25064,
1330,
1822,
85,
198,
6738,
640,
1330,
640,
198,
6738,
4818,
8079,
1330,
3128,
628,
198,
8095,
6371,
796,
5202,
13,
1136,
43015,
7203,
28165,
4943,
198,
10... | 3.115385 | 130 |
# due to phone contact is bound to profile since we need preload phone contact data from some nasty way
# which means I have to bind PhoneContact to Profile
# which means this friend app should have be a child app in the account app
# friend module has many logic based on account app...
# which means I prefer profileId... | [
2,
2233,
284,
3072,
2800,
318,
5421,
284,
7034,
1201,
356,
761,
662,
2220,
3072,
2800,
1366,
422,
617,
17166,
835,
198,
2,
543,
1724,
314,
423,
284,
11007,
14484,
17829,
284,
13118,
198,
2,
543,
1724,
428,
1545,
598,
815,
423,
307,
... | 4.453333 | 75 |
from typing import Dict, List, Optional
| [
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
628
] | 4.1 | 10 |
"""
Module for Edible SceneElement
"""
from abc import ABC
from typing import Optional, Union
from ..element import InteractiveElement
from ...common.definitions import ElementTypes, CollisionTypes
from ...configs.parser import parse_configuration
# pylint: disable=line-too-long
class Edible(InteractiveElement, AB... | [
37811,
198,
26796,
329,
1717,
856,
28315,
20180,
198,
37811,
198,
6738,
450,
66,
1330,
9738,
198,
6738,
19720,
1330,
32233,
11,
4479,
198,
198,
6738,
11485,
30854,
1330,
21365,
20180,
198,
6738,
2644,
11321,
13,
4299,
50101,
1330,
11703,
... | 2.549769 | 864 |
import hashlib
import random
| [
11748,
12234,
8019,
198,
11748,
4738,
628,
198
] | 3.875 | 8 |
import pyautogui
width, height= pyautogui.size()
print(f"{width} x {height}") | [
11748,
12972,
2306,
519,
9019,
198,
198,
10394,
11,
6001,
28,
12972,
2306,
519,
9019,
13,
7857,
3419,
198,
4798,
7,
69,
1,
90,
10394,
92,
2124,
1391,
17015,
92,
4943
] | 2.516129 | 31 |
# -*- coding: utf-8 -*-
# License: BSD 2 clause
import os
import torch
import torch.nn as nn
import pickle
import warnings
import torchvision.models as models
from ._loss import callLoss
from ._dlbase import BaseControler
from pyhealth.data.data_reader.ecg import mina_reader
from collections import OrderedDict
from t... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
13789,
25,
347,
10305,
362,
13444,
198,
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
2298,
293,
198,
11748,
1460... | 3.381944 | 144 |
# -*- coding:utf-8 -*-
from selenium import webdriver
import time,json
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
driver.find_element_by_xpath('//*[@id="account"]').clear()
driver.find_element_by_xpath('//*[@id="account"]').send_keys('1192328490@qq.com')
time.sleep(2)
driver.find_element_by_xpath... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
11748,
640,
11,
17752,
198,
198,
26230,
796,
3992,
26230,
13,
1925,
5998,
3419,
198,
26230,
13,
1136,
10786,
5450,
1378,
... | 2.443769 | 329 |
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter
| [
6738,
1366,
62,
43681,
13,
27604,
13,
9503,
1746,
1330,
7308,
55,
8439,
11522,
17818,
42350,
34,
21370,
3546,
26634,
628
] | 4 | 21 |
from AutoClean.AutoClean import AutoClean | [
6738,
11160,
32657,
13,
27722,
32657,
1330,
11160,
32657
] | 4.555556 | 9 |
import json
import os
import hcl
import sh
| [
11748,
33918,
198,
11748,
28686,
198,
11748,
289,
565,
198,
11748,
427,
628,
628,
628,
628,
628,
628,
628,
628
] | 2.9 | 20 |
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Tramonto(CMakePackage):
"""Tramonto: Software for Nanostructured Fluids in Materials and B... | [
2,
15069,
2211,
12,
1238,
1828,
13914,
45036,
3549,
2351,
4765,
11,
11419,
290,
584,
198,
2,
1338,
441,
4935,
34152,
13,
4091,
262,
1353,
12,
5715,
27975,
38162,
9947,
2393,
329,
3307,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
... | 2.994253 | 174 |
"""
Trying to construct test case to reproduce
https://github.com/pytti-tools/pytti-core/issues/82
"""
from omegaconf import OmegaConf
from pytti.workhorse import _main as render_frames
from pathlib import Path
video_fpath = str(next(Path(".").glob("**/assets/*.mp4")))
print(video_fpath)
params = {
# "scenes": ... | [
37811,
198,
51,
14992,
284,
5678,
1332,
1339,
284,
22919,
198,
220,
3740,
1378,
12567,
13,
785,
14,
9078,
35671,
12,
31391,
14,
9078,
35671,
12,
7295,
14,
37165,
14,
6469,
198,
37811,
198,
198,
6738,
267,
28917,
7807,
69,
1330,
19839,... | 2.192496 | 1,226 |
from django.conf.urls import patterns, url
from affiliates.facebook import views
from affiliates.base.views import handler404, handler500
urlpatterns = patterns('affiliates.facebook.views',
url(r'^/?$', views.load_app, name='facebook.load_app'),
url(r'^pre_auth/?$', views.pre_auth_promo, name='facebook.pre_... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
198,
198,
6738,
29116,
13,
19024,
1330,
5009,
198,
6738,
29116,
13,
8692,
13,
33571,
1330,
21360,
26429,
11,
21360,
4059,
628,
198,
6371,
33279,
82,
796,
7572,
10786,
... | 2.426267 | 868 |
import ravendb
import unittest
import test_base
| [
11748,
24343,
437,
65,
201,
198,
11748,
555,
715,
395,
201,
198,
11748,
1332,
62,
8692,
201
] | 2.941176 | 17 |
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 14 14:13:49 2018
@author: srivastavau
"""
import psutil as psu
import pandas as pd
import time
print("What is happening to my CPU...?")
time.sleep(3)
ob=mcpu()
print("\n\t \tVirtual Memory Info\n")
ob.vm()
print("\n\t \tHard Disk Info\n")
ob.du()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3300,
3158,
1478,
1478,
25,
1485,
25,
2920,
2864,
201,
198,
201,
198,
31,
9800,
25,
264,
15104,
459,
615,
559,
201,
198,
37811,
201,
... | 2.235714 | 140 |
from django.contrib import admin
from django.urls import path, include
import debug_toolbar
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('aircheck.urls')),
path('__debug__', include(debug_toolbar.urls)),
]
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
11748,
14257,
62,
25981,
5657,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
28482,
14,
3256,
13... | 2.788235 | 85 |
import numpy as np
import torch
def compute_iou(occ1, occ2):
''' Computes the Intersection over Union (IoU) value for two sets of
occupancy values.
Args:
occ1 (tensor): first set of occupancy values
occ2 (tensor): second set of occupancy values
'''
occ1 = np.asarray(occ1)
occ2... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
628,
198,
4299,
24061,
62,
72,
280,
7,
13966,
16,
11,
1609,
17,
2599,
198,
220,
220,
220,
705,
7061,
3082,
1769,
262,
4225,
5458,
625,
4479,
357,
40,
78,
52,
8,
1988,
329,
734,
562... | 2.195435 | 701 |
from goscale.cms_plugins import GoscaleCMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
import models
GOSCALE_FEEDS_PLUGIN_TEMPLATES = getattr(settings, 'GOSCALE_FEEDS_PLUGIN_TEMPLATES', (
('posts.html', _('Posts')),
... | [
6738,
308,
17500,
1000,
13,
46406,
62,
37390,
1330,
402,
17500,
1000,
34,
5653,
37233,
14881,
198,
6738,
269,
907,
13,
33803,
62,
7742,
1330,
13877,
62,
7742,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
7... | 2.426316 | 570 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function )
import codecs
import pandas as pd
from jinja2 import Environment, PackageLoader
from flask import Flask, render_template_string
from .utilities import latitude,longitude, map_templates
from .check_da... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
357,
48546,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
1267,
198,
198,
11748,
40481,
... | 2.358045 | 1,821 |
from .models import Likes, Reviews, Bookmarks, BaseCollection # noqa: F401
| [
6738,
764,
27530,
1330,
46077,
11,
20871,
11,
4897,
14306,
11,
7308,
36307,
220,
1303,
645,
20402,
25,
376,
21844,
198
] | 3.619048 | 21 |
"""Package for containing data manager functions to convert user input to commands."""
from manager.data_manager.mirror import PortMirrorConfig
from manager.data_manager.vlan import VlanConfig
__all__ = [
PortMirrorConfig,
VlanConfig,
]
| [
37811,
27813,
329,
7268,
1366,
4706,
5499,
284,
10385,
2836,
5128,
284,
9729,
526,
15931,
198,
198,
6738,
4706,
13,
7890,
62,
37153,
13,
10793,
1472,
1330,
4347,
27453,
1472,
16934,
198,
6738,
4706,
13,
7890,
62,
37153,
13,
85,
9620,
... | 3.430556 | 72 |
# import pchcloud api
import usermanager
import timerecording
import device
import pprint
import json
from datetime import datetime, timedelta
import dateutil.parser
import os
from pathlib import Path
parentdir = Path(__file__).parents[1]
pp = pprint.PrettyPrinter(indent=4)
if __name__ == "__main__":
# ge... | [
2,
1330,
279,
354,
17721,
40391,
198,
11748,
514,
2224,
3536,
198,
11748,
640,
8344,
1284,
198,
11748,
3335,
198,
198,
11748,
279,
4798,
198,
11748,
33918,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
11748,
3128... | 2.228461 | 1,033 |
import torch
IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Train/Images'
MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Train/labels'
VALID_IMAGE_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/Images'
VALID_MASK_DIR = 'E:/Computer Vision/Segmentation/Data/Validation/labels'
MODEL_SAVE_DIR = 'E:/Com... | [
11748,
28034,
201,
198,
201,
198,
3955,
11879,
62,
34720,
796,
705,
36,
14079,
34556,
19009,
14,
41030,
14374,
14,
6601,
14,
44077,
14,
29398,
6,
201,
198,
31180,
42,
62,
34720,
796,
705,
36,
14079,
34556,
19009,
14,
41030,
14374,
14,... | 2.647799 | 159 |
# Copyright (C) 202 The Dagger Authors.
#
# 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 wr... | [
2,
15069,
357,
34,
8,
22131,
383,
36320,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,... | 2.774614 | 843 |
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import cv2
import numpy as np
import time
start_time = time.time()
batch_size = 20
num_classes = 10... | [
11748,
41927,
292,
201,
198,
6738,
41927,
292,
13,
19608,
292,
1039,
1330,
285,
77,
396,
201,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
201,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
11,
14258,
448,
11,
1610,
... | 2.199574 | 1,408 |