content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
import FWCore.ParameterSet.Config as cms
##############################################################################
##############################################################################
##############################################################################
####################################... | [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
628,
198,
29113,
29113,
7804,
4242,
2235,
628,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
29113,
29113,
7804,
4242,
2235,
198,
198,
29113,
29113,
7804,
4242,
2235,
198,
... | 8.621849 | 119 |
## TODO: insert your ShapeNetCore.v2, textures, training and testing background paths
# NOTE that HDF5 is not generated here, to convert the dataset to HDF5 use dataloaders/conversion.py
g_datasets_path = '/mnt/lascar/rozumden/dataset'
g_shapenet_path = g_datasets_path + '/ShapeNetv2/ShapeNetCore.v2'
g_textures_path ... | [
2235,
16926,
46,
25,
7550,
534,
25959,
7934,
14055,
13,
85,
17,
11,
20028,
11,
3047,
290,
4856,
4469,
13532,
220,
198,
2,
24550,
326,
5572,
37,
20,
318,
407,
7560,
994,
11,
284,
10385,
262,
27039,
284,
5572,
37,
20,
779,
4818,
282... | 2.243925 | 2,140 |
# -*- coding:utf-8 -*-
import numpy
import numpy.random
import numpy.linalg
from . import svd
def nmf(matrix,
dim=None,
distance="euclid",
init=svd_init,
max_iter=10000,
threshould=0.001,
epsilon=1e-9,
seed=None):
"""Non-negative Matrix Factorization func... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
198,
11748,
299,
32152,
13,
25120,
198,
11748,
299,
32152,
13,
75,
1292,
70,
198,
198,
6738,
764,
1330,
264,
20306,
628,
198,
198,
4299,
28642,
69,
... | 2.217808 | 730 |
import datetime
import datetime
from altair.vegalite.v4.schema.core import Legend
import pandas
from pandas.core.frame import DataFrame
import streamlit as st
import time
import bubbletea
st.header("LIVEPEER Stake Movement")
urlvars = bubbletea.parse_url_var([{'key':'startdate','type':'datetime'}, {'key':'enddate','t... | [
11748,
4818,
8079,
198,
11748,
4818,
8079,
198,
6738,
5988,
958,
13,
303,
13528,
578,
13,
85,
19,
13,
15952,
2611,
13,
7295,
1330,
9883,
198,
11748,
19798,
292,
198,
6738,
19798,
292,
13,
7295,
13,
14535,
1330,
6060,
19778,
198,
11748... | 2.101393 | 2,298 |
from vaccine_feed_ingest.utils import match
| [
6738,
12319,
62,
12363,
62,
278,
395,
13,
26791,
1330,
2872,
628,
628,
198
] | 3.428571 | 14 |
# Copyright (c) 2013, University of Liverpool
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program ... | [
2,
15069,
357,
66,
8,
2211,
11,
2059,
286,
11761,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
12892,
263,
3611,
5094,
13789,
355,
... | 2.75125 | 800 |
#!/usr/bin/python3
import sklearn
from sklearn.datasets import load_iris
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
from sklearn import tree
from sklearn.metrics import accuracy_score
#loading iris
iris=load_iris()
#traning flowers.features is stored in i... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
1341,
35720,
198,
6738,
1341,
35720,
13,
19608,
292,
1039,
1330,
3440,
62,
29616,
198,
6738,
1341,
35720,
13,
710,
394,
32289,
1330,
509,
46445,
32289,
9487,
7483,
198,
6738,
1341,
... | 2.798956 | 383 |
#!/usr/bin/env python
def humanize(n, base=10, digits=1, unit=''):
'''convert a floating point number to a human-readable format
Parameters
----------
n : float or str
number to convert, it can a string representation of
a floating point number
base : int
base to use, eith... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
4299,
1692,
1096,
7,
77,
11,
2779,
28,
940,
11,
19561,
28,
16,
11,
4326,
28,
7061,
2599,
198,
220,
220,
220,
705,
7061,
1102,
1851,
257,
12462,
966,
1271,
284,
257,
1692,
12,
... | 2.047068 | 1,296 |
import os
import PIL
import torch
from glob import glob
from torch.utils.data import DataLoader
from torchvision.transforms.functional import pil_to_tensor
| [
11748,
28686,
198,
11748,
350,
4146,
198,
11748,
28034,
198,
198,
6738,
15095,
1330,
15095,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
6738,
28034,
10178,
13,
7645,
23914,
13,
45124,
1330,
5560,
62,
1462,
62,
83,
228... | 3.416667 | 48 |
#!/usr/bin/python
# update languages.py from pycountry
import os
import codecs
import pycountry
basepath = os.path.dirname(os.path.dirname(__file__))
def main():
"""Update language information in dosagelib/languages.py."""
fn =os.path.join(basepath, 'dosagelib', 'languages.py')
encoding = 'utf-8'
with... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
4296,
8950,
13,
9078,
422,
12972,
19315,
198,
11748,
28686,
198,
11748,
40481,
82,
198,
11748,
12972,
19315,
198,
198,
12093,
538,
776,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
... | 2.342246 | 374 |
import tensorflow as tf
x = tf.Variable(0, name='x')
model = tf.global_variables_initializer()
with tf.Session() as session:
for i in range(5):
session.run(model)
x = x + 1
print(session.run(x))
x = tf.Variable(0., name='x')
threshold = tf.constant(5.)
model = tf.glob... | [
11748,
11192,
273,
11125,
355,
48700,
201,
198,
201,
198,
201,
198,
87,
796,
48700,
13,
43015,
7,
15,
11,
1438,
11639,
87,
11537,
201,
198,
201,
198,
19849,
796,
48700,
13,
20541,
62,
25641,
2977,
62,
36733,
7509,
3419,
201,
198,
20... | 2.124 | 250 |
try:
num = 5 / 0
except:
print("An error occured")
raise | [
28311,
25,
198,
197,
22510,
796,
642,
1220,
657,
198,
16341,
25,
198,
197,
4798,
7203,
2025,
4049,
1609,
1522,
4943,
198,
197,
40225
] | 2.458333 | 24 |
"""Berechnet die mndliche Note"""
import csv
with open('bewertung.csv', encoding='utf-8', mode='r') as bewertung:
TABELLE = []
DATA = csv.reader(bewertung, delimiter=',')
for row in DATA:
TABELLE.append([element.strip() for element in row])
OUTPUT = [TABELLE[0] + ["Note"]]
del TABELLE[0]
... | [
37811,
33,
567,
1349,
316,
4656,
285,
358,
677,
258,
5740,
37811,
198,
198,
11748,
269,
21370,
198,
198,
4480,
1280,
10786,
65,
413,
861,
2150,
13,
40664,
3256,
21004,
11639,
40477,
12,
23,
3256,
4235,
11639,
81,
11537,
355,
307,
86,
... | 2.036212 | 359 |
from unittest import TestCase
from leetcodepy.edit_distance import *
solution1 = Solution1()
word11 = "horse"
word12 = "ros"
expected1 = 3
word21 = "intention"
word22 = "execution"
expected2 = 5
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
443,
14784,
375,
538,
88,
13,
19312,
62,
30246,
1330,
1635,
198,
198,
82,
2122,
16,
796,
28186,
16,
3419,
198,
198,
4775,
1157,
796,
366,
30527,
1,
198,
198,
4775,
1065,
796,
... | 2.684211 | 76 |
def index(self, value):
"""
Return index of the first child containing the specified value.
:param str value: text value to look for
:returns: index of the first child containing the specified value
:rtype: int
:raises ValueError: if the value is not found
"""
self.logger.info('getting ... | [
4299,
6376,
7,
944,
11,
1988,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
6376,
286,
262,
717,
1200,
7268,
262,
7368,
1988,
13,
628,
220,
220,
220,
1058,
17143,
965,
1988,
25,
2420,
1988,
284,
804,
329,
198,
220,
22... | 3.120155 | 258 |
#!/usr/bin/python3
import operator
import sys
import json
import os
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "./"))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../"))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../"))
sys.pat... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
10088,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,... | 2.286957 | 230 |
#!/usr/bin/env python
from BeautifulSoup import BeautifulSoup
import json
import urllib
import urllib2
import re
import time
import os.path
names = {}
if os.path.exists("names.txt"):
with open("names.txt") as f:
for line in f.readlines():
tokens = line.split(" ")
names[tokens[0].... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
23762,
50,
10486,
1330,
23762,
50,
10486,
198,
11748,
33918,
198,
11748,
2956,
297,
571,
198,
11748,
2956,
297,
571,
17,
198,
11748,
302,
198,
11748,
640,
198,
11748,
28686,
... | 2.077224 | 1,023 |
from exchangelib.errors import (
ErrorAccessDenied,
ErrorFolderNotFound,
ErrorInvalidOperation,
ErrorItemNotFound,
ErrorNoPublicFolderReplicaAvailable,
)
from exchangelib.properties import EWSElement
from .common import EWSTest
| [
6738,
9933,
8368,
571,
13,
48277,
1330,
357,
198,
220,
220,
220,
13047,
15457,
21306,
798,
11,
198,
220,
220,
220,
13047,
41092,
3673,
21077,
11,
198,
220,
220,
220,
13047,
44651,
32180,
11,
198,
220,
220,
220,
13047,
7449,
3673,
2107... | 3.205128 | 78 |
import os
from datetime import datetime
from pathlib import Path
from pydantic import EmailStr
| [
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
279,
5173,
5109,
1330,
9570,
13290,
198
] | 3.958333 | 24 |
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 9 17:06:09 2018
@author: v-beshi
"""
import pyodbc
import pandas as pd
raw_data=pd.read_sql('select * from dbo.BitcoinTradeHistory',con)
raw_data['USDT_exceed']=raw_data['huobi_USDT']-raw_data['exchange_rate']
pre_price15=[]
for i in range(0,15):
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
19480,
1526,
220,
860,
1596,
25,
3312,
25,
2931,
2864,
198,
198,
31,
9800,
25,
410,
12,
65,
5069,
72,
198,
37811,
198,
198,
11748,
12972,
375,
... | 2.008808 | 1,703 |
import numpy as np
import pandas as pd
import pyomo.environ as pyo
import mpisppy.utils.sputils as sputils
from mpisppy.opt.ef import ExtensiveForm
from pathlib import Path
import os
import sys
path_root = Path(os.path.abspath(__file__)).parents[2]
sys.path.append(str(path_root))
from bloodbank_rl.environments.plat... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
11748,
12972,
17902,
13,
268,
2268,
355,
279,
8226,
198,
11748,
29034,
271,
14097,
13,
26791,
13,
82,
1996,
4487,
355,
599,
26791,
198,
6738,
29034,
271,
1... | 2.972222 | 144 |
import random
import json
if __name__ == '__main__':
tttg = TTTGame()
tttg.combat()
tttg.train(100000)
tttg.dump_state()
| [
11748,
4738,
198,
11748,
33918,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
197,
926,
25297,
796,
309,
15751,
8777,
3419,
198,
197,
926,
25297,
13,
39969,
3419,
198,
197,
926,
25297,
13,
27432,
7,
3064,
83... | 2.415094 | 53 |
str1 = ' Happy Life '
str2= ' Happy Life '
if (str1.strip()== str2.strip()):
print("Same")
else:
print("Not same")
# same | [
2536,
16,
796,
705,
14628,
5155,
705,
201,
198,
2536,
17,
28,
705,
14628,
5155,
220,
220,
220,
220,
220,
705,
201,
198,
361,
357,
2536,
16,
13,
36311,
3419,
855,
965,
17,
13,
36311,
3419,
2599,
201,
198,
220,
220,
3601,
7203,
3055... | 2.169231 | 65 |
# -*- coding: utf-8 -*-
"""Text Analytic (Emotion) - load_only.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ec4JMQZ5zoj-PB_a0mUkJWRKotgQSd9f
"""
"""
Text Analytic (Emotion) with TensorFlow
Copyright 2020 I Made Agus Dwi Suarjaya
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
8206,
16213,
13370,
357,
10161,
9650,
8,
532,
3440,
62,
8807,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
... | 2.802802 | 928 |
# Imports
import socket # Communication
import threading # Communication with multiple users at once
import pickle # Serialising data
import hashlib # Hashing passwords
from Crypto.Cipher import AES # AES encryption algorithms
from Crypto.Random import get_random_bytes # For generating random keys and nonces... | [
2,
1846,
3742,
198,
11748,
17802,
220,
220,
1303,
26117,
198,
11748,
4704,
278,
220,
220,
220,
1303,
26117,
351,
3294,
2985,
379,
1752,
198,
11748,
2298,
293,
220,
220,
1303,
23283,
1710,
1366,
198,
11748,
12234,
8019,
220,
1303,
367,
... | 3.011783 | 1,273 |
# server backend
server = 'cherrypy'
# debug error messages
debug = False
# auto-reload
reloader = False
# database url
db_url = 'sqlite:///devmine/db/devmine.db'
# echo database engine messages
db_echo = False
| [
2,
4382,
30203,
198,
15388,
796,
705,
2044,
563,
9078,
6,
198,
198,
2,
14257,
4049,
6218,
198,
24442,
796,
10352,
198,
198,
2,
8295,
12,
260,
2220,
198,
260,
29356,
796,
10352,
198,
198,
2,
6831,
19016,
198,
9945,
62,
6371,
796,
7... | 2.986111 | 72 |
# generate 500 screens.
import random
objs = []
for i in range(500):
go_to = random.choice([2,3])
for j in range(go_to):
new_obj = {'name': 'non_exist', 'RBs': [], 'set': 'memory', 'analog': i}
width = round(random.random()*20)
hight = round(random.random()*10)
x = round(rando... | [
2,
7716,
5323,
8947,
13,
198,
198,
11748,
4738,
220,
198,
198,
672,
8457,
796,
17635,
198,
1640,
1312,
287,
2837,
7,
4059,
2599,
198,
220,
220,
220,
467,
62,
1462,
796,
4738,
13,
25541,
26933,
17,
11,
18,
12962,
198,
220,
220,
220... | 2.220486 | 576 |
import asyncio
import json
import os
import shutil
import typing
from datetime import datetime, timezone, timedelta
from matplotlib import pyplot as plt
import cv2
import country_converter as coco
import flag
import requests
import discord
from bot.api import APIClient
from bot.log import get_logger
from bot.utils.co... | [
11748,
30351,
952,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
19720,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
11340,
11,
28805,
12514,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
... | 2.072154 | 4,532 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2014, Ocean Systems Laboratory, Heriot-Watt University, UK.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follow... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
10442,
13789,
12729,
357,
21800,
13789,
8,
198,
2,
198,
2,
220,
15069,
357,
66,
8,
1946,
11,
10692,
11998,
... | 2.897764 | 1,565 |
from social_friends_finder.backends import BaseFriendsProvider
from social_friends_finder.utils import setting
if not setting("SOCIAL_FRIENDS_USING_ALLAUTH", False):
from social_auth.backends.contrib.vk import VKOAuth2Backend
USING_ALLAUTH = False
else:
from allauth.socialaccount.models import SocialToken, ... | [
6738,
1919,
62,
36154,
62,
22805,
13,
1891,
2412,
1330,
7308,
36705,
29495,
198,
6738,
1919,
62,
36154,
62,
22805,
13,
26791,
1330,
4634,
198,
361,
407,
4634,
7203,
50,
4503,
12576,
62,
37,
7112,
1677,
5258,
62,
2937,
2751,
62,
7036,
... | 3.055118 | 127 |
default_app_config = 'tests.cms_bundles.apps.AppConfig'
| [
12286,
62,
1324,
62,
11250,
796,
705,
41989,
13,
46406,
62,
65,
917,
829,
13,
18211,
13,
4677,
16934,
6,
198
] | 2.666667 | 21 |
data_simpleJobCreateParams = {
"name": "TestJob",
"repetitionInterval": "HOURLY:03",
"command": "ls",
"enabled": True
}
data_simpleManualJobCreateParams = {
"name": "TestJob",
"repetitionInterval": "",
"command": "ls",
"enabled": False
}
data_simpleJobCreateExpRes = {
"guid": 'IGNORE',
"name": da... | [
198,
198,
7890,
62,
36439,
33308,
16447,
10044,
4105,
796,
1391,
198,
220,
366,
3672,
1298,
366,
14402,
33308,
1600,
198,
220,
366,
260,
6449,
653,
9492,
2100,
1298,
366,
46685,
7836,
56,
25,
3070,
1600,
198,
220,
366,
21812,
1298,
36... | 3.002361 | 847 |
from nltk.translate.bleu_score import corpus_bleu, sentence_bleu, SmoothingFunction
from nltk import word_tokenize
# import language_evaluation
from typing import List
from collections import defaultdict, Counter
import re
import math
import sys
def _calc_cover_rate(cands, golds, ngram):
"""
calc_cover_rate
... | [
6738,
299,
2528,
74,
13,
7645,
17660,
13,
903,
84,
62,
26675,
1330,
35789,
62,
903,
84,
11,
6827,
62,
903,
84,
11,
2439,
1025,
722,
22203,
198,
6738,
299,
2528,
74,
1330,
1573,
62,
30001,
1096,
198,
198,
2,
1330,
3303,
62,
18206,
... | 2.321429 | 616 |
import scapy.all as scapy
from scapy.layers import http
sniff("eth0")
| [
11748,
629,
12826,
13,
439,
355,
629,
12826,
198,
6738,
629,
12826,
13,
75,
6962,
1330,
2638,
628,
628,
628,
198,
16184,
733,
7203,
2788,
15,
4943,
198
] | 2.714286 | 28 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from typing import NoReturn
import cv2 as cv
import numpy as np
from numpy import mat
import xml.etree.ElementTree as ET
import math
camera_angle = 315
camera_intrinsic = {
# #
# matlab
"camera_matrix": [871.086328150675740,0.0, 3... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
11748,
28686,
201,
198,
6738,
19720,
1330,
1400,
13615,
201,
198,
11748,
269,
85,
17,
355,
269,
85,
201... | 1.759672 | 853 |
#!/usr/bin/python
import os
from log import Log
from enum import IntEnum, unique
from grammar import Grammar
from automaton import FiniteAutomaton
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
28686,
198,
6738,
2604,
1330,
5972,
198,
6738,
33829,
1330,
2558,
4834,
388,
11,
3748,
198,
6738,
23491,
1330,
20159,
3876,
198,
6738,
3557,
13951,
1330,
4463,
578,
38062,
13951,
628,
19... | 3.634146 | 41 |
distancia = int(input('Digite a distancia de sua viagem: '))
if distancia <= 200:
preco = distancia * 0.50
print(preco)
else:
preco = distancia * 0.40
print(preco)
| [
17080,
1192,
544,
796,
493,
7,
15414,
10786,
19511,
578,
257,
1233,
1192,
544,
390,
424,
64,
25357,
363,
368,
25,
705,
4008,
198,
361,
1233,
1192,
544,
19841,
939,
25,
198,
220,
220,
220,
662,
1073,
796,
1233,
1192,
544,
1635,
657,
... | 2.222222 | 81 |
import sys
import subprocess
import os
from numpy import asarray
#triangle_path = os.path.join( "C:\\Users\\Mai\\Dropbox\\Research\\Deformation\\src\\py\\triangle", "triangle.exe")
triangle_path = os.path.join( os.path.dirname( __file__ ), "triangle", "triangle" )
if not os.path.exists( triangle_path ):
raise Imp... | [
11748,
25064,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
6738,
299,
32152,
1330,
355,
18747,
198,
198,
2,
28461,
9248,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
366,
34,
25,
6852,
14490,
6852,
44,
1872,
6852,
26932,
3524,
685... | 2.581871 | 3,078 |
from . import SpecValidator
BaremetalSpec = {
'EDB-RA-1': {
'ssh_user': SpecValidator(type='string', default=None),
'pg_data': SpecValidator(type='string', default=None),
'pg_wal': SpecValidator(type='string', default=None),
'postgres_server_1': {
'name': SpecValidator(t... | [
6738,
764,
1330,
18291,
47139,
1352,
198,
198,
33,
533,
28469,
22882,
796,
1391,
198,
220,
220,
220,
705,
1961,
33,
12,
3861,
12,
16,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
45824,
62,
7220,
10354,
18291,
47139,
13... | 2.109671 | 2,161 |
import numpy as np
import time
import argparse
import pandas as pd
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from scipy import special
from tqdm import tqdm
from scipy.optimize import curve_fit
from utils.build_hist import build_hist
if __name__ == "__main__":
start_time = time.time()... | [
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
1822,
29572,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
7203,
46384,
4943,
198,
11748,
2603,
29487,
8019,
13,
9078,
... | 2.437288 | 295 |
# python /usr/bin/env/python
# /// The Exoplanet Pocketknife
# /// Scott D. Hull, The Ohio State University 2015-2017
# /// All usage must include proper citation and a link to the Github repository
# /// https://github.com/ScottHull/Exoplanet-Pocketknife
import os, csv, time, sys, shutil, subprocess
from threading ... | [
2,
21015,
1220,
14629,
14,
8800,
14,
24330,
14,
29412,
198,
198,
2,
34013,
383,
1475,
46853,
316,
27290,
48810,
198,
2,
34013,
4746,
360,
13,
28238,
11,
383,
6835,
1812,
2059,
1853,
12,
5539,
198,
2,
34013,
1439,
8748,
1276,
2291,
1... | 2.017783 | 1,687 |
#!/usr/bin/env python
'''Exctact element of green's function'''
import argparse
import sys
import numpy
import os
import pandas as pd
import json
_script_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(os.path.join(_script_dir, 'analysis'))
import matplotlib.pyplot as plt
# from pauxy.analysis.extract... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
3109,
310,
529,
5002,
286,
4077,
338,
2163,
7061,
6,
198,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
299,
32152,
198,
11748,
28686,
198,
11748,
19798,
292,
355,
2... | 2.169329 | 1,878 |
import glob
import os
import albumentations as A
import kaggle
import numpy as np
import PIL
import pytorch_lightning as pl
import torch
from albumentations.pytorch import ToTensorV2
from torch.utils.data import random_split
from torch.utils.data.dataloader import DataLoader
from utils import show_images
train_tr... | [
11748,
15095,
198,
11748,
28686,
198,
198,
11748,
435,
65,
1713,
602,
355,
317,
198,
11748,
479,
9460,
293,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
350,
4146,
198,
11748,
12972,
13165,
354,
62,
2971,
768,
355,
458,
198,
11748,
... | 2.393777 | 932 |
import sys
input = sys.stdin.readline
from collections import deque
# main
V = int(input())
tree = [[] for _ in range(V+1)]
# 1167
for _ in range(V-1):
a,b,c = map(int,input().split())
tree[a].append((c,b))
tree[b].append((c,a))
ds = bfs(1) #
v = ds.index(max(ds)) #
print(max(bfs(v))) ... | [
11748,
25064,
198,
15414,
796,
25064,
13,
19282,
259,
13,
961,
1370,
198,
6738,
17268,
1330,
390,
4188,
198,
2,
1388,
198,
53,
796,
493,
7,
15414,
28955,
198,
21048,
796,
16410,
60,
329,
4808,
287,
2837,
7,
53,
10,
16,
15437,
198,
... | 2 | 164 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ##### TONTgBotContract Config
# Edit starts here
TgBotAPIKey = 'xxxx:yyyy' # API Keythat you get from @BotFather
tg = 11111 # Your id, you can get it by sending command /id to bot @TONTgIDBot
# Edit ends here
tonoscli = '/opt/tonos-cli/target/release/tonos-cli' # P... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
46424,
309,
35830,
70,
20630,
45845,
17056,
198,
2,
5312,
4940,
994,
198,
51,
70,
20630,
17614,
9218,
796... | 2.609948 | 382 |
#!/usr/bin/env python3
"""
Pandoc filter to change each relative URL to absolute
"""
from panflute import run_filter, Str, Header, Image, Math, Link, RawInline
import sys
import re
base_raw_url = 'https://raw.githubusercontent.com/illinois-cs241/coursebook/master/'
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
47206,
420,
8106,
284,
1487,
1123,
3585,
10289,
284,
4112,
198,
37811,
198,
198,
6738,
3425,
2704,
1133,
1330,
1057,
62,
24455,
11,
4285,
11,
48900,
11,
7412,
11,
... | 2.952381 | 105 |
#
# Copyright (c) 2022, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#
import sys
import glob
sys.path.insert(0, '..')
import numpy as np
import matplotlib
import matp... | [
2,
198,
2,
15069,
357,
66,
8,
33160,
11,
4200,
3174,
13,
785,
11,
753,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
18,
12,
2601,
682,
198,
2,
1114,
1336,
5964,
2420,
11... | 3.90367 | 218 |
# =============================================================================
# Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/
# FileName: 12808.py
# Description: UVa Online Judge - 12808
# =============================================================================
import math... | [
2,
38093,
25609,
198,
2,
220,
6434,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1665,
263,
499,
265,
13364,
81,
2150,
10599,
532,
3740,
1378,
12567,
13,
785,
14,
76,
48796,
81,
2150,
10599,
14,
198,
2,
220,
9220,
5376,
25,
... | 3.298387 | 124 |
import os
import jinja2
import networkx as nx
from ..utils import Logger
from math import ceil, floor
from ..model import Segment
#Add function to Segments that generates unique names for internal nodes
#Function is specific for halide backend, hence it is added here and not in the original definition of Segment
Segm... | [
11748,
28686,
198,
11748,
474,
259,
6592,
17,
198,
11748,
3127,
87,
355,
299,
87,
198,
6738,
11485,
26791,
1330,
5972,
1362,
198,
6738,
10688,
1330,
2906,
346,
11,
4314,
198,
6738,
11485,
19849,
1330,
1001,
5154,
198,
198,
2,
4550,
21... | 3.824176 | 91 |
from plasmapy.utils.pytest_helpers.pytest_helpers import (
assert_can_handle_nparray,
run_test,
run_test_equivalent_calls,
)
| [
6738,
458,
8597,
12826,
13,
26791,
13,
9078,
9288,
62,
16794,
364,
13,
9078,
9288,
62,
16794,
364,
1330,
357,
198,
220,
220,
220,
6818,
62,
5171,
62,
28144,
62,
77,
1845,
2433,
11,
198,
220,
220,
220,
1057,
62,
9288,
11,
198,
220,... | 2.322034 | 59 |
import enum
| [
11748,
33829,
628
] | 4.333333 | 3 |
from utils.error_with_arrows import *
##### ERRORS ########
################################## | [
198,
6738,
3384,
4487,
13,
18224,
62,
4480,
62,
6018,
82,
1330,
1635,
198,
4242,
2,
33854,
50,
46424,
21017,
198,
29113,
2235
] | 4.130435 | 23 |
import asyncio
import asyncpg
VALUES = [
356091260429402122,
"Why are you reading",
9164,
6000000,
14,
0,
0,
0,
463318425901596672,
"https://i.imgur.com/LRV2QCK.png",
15306,
["Paragon", "White Sorcerer"],
0,
0,
647,
"Leader",
None,
0,
"10.0",... | [
11748,
30351,
952,
198,
198,
11748,
30351,
6024,
198,
198,
23428,
35409,
796,
685,
198,
220,
220,
220,
3439,
31751,
1065,
1899,
11785,
32531,
18376,
11,
198,
220,
220,
220,
366,
5195,
389,
345,
3555,
1600,
198,
220,
220,
220,
860,
232... | 1.732523 | 329 |
from nmigen import *
from nmigen.asserts import Assert
from nmigen.cli import main_parser, main_runner
__all__ = ["Counter"]
"""
Simple counter with formal verification
See slides 50-60 in
https://zipcpu.com/tutorial/class-verilog.pdf
"""
if __name__ == "__main__":
parser = main_parser()
args = parser.parse_args()... | [
6738,
28642,
9324,
1330,
1635,
198,
6738,
28642,
9324,
13,
30493,
82,
1330,
2195,
861,
198,
6738,
28642,
9324,
13,
44506,
1330,
1388,
62,
48610,
11,
1388,
62,
16737,
198,
198,
834,
439,
834,
796,
14631,
31694,
8973,
198,
198,
37811,
1... | 3.06993 | 143 |
import json
import requests
from regru_cloudapi.utils import Errors
| [
11748,
33918,
198,
11748,
7007,
198,
6738,
842,
622,
62,
17721,
15042,
13,
26791,
1330,
44225,
628
] | 4.058824 | 17 |
#!/usr/bin/python3
import urllib.request
import os
import gzip
DOWNLOAD_URL='http://yann.lecun.com/exdb/mnist/'
file_list=[ 'train-images-idx3-ubyte', 'train-labels-idx1-ubyte', 't10k-images-idx3-ubyte', 't10k-labels-idx1-ubyte' ]
for name in file_list:
if not os.path.exists( name ):
gz_name= name + '.gz'... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
28686,
198,
11748,
308,
13344,
198,
198,
41925,
35613,
62,
21886,
11639,
4023,
1378,
88,
1236,
13,
293,
66,
403,
13,
785,
14,
1069,
9945,
1... | 1.903646 | 384 |
import random
from common import *
| [
11748,
4738,
198,
6738,
2219,
1330,
1635,
198
] | 4.375 | 8 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 3.112057 | 2,231 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
import sqlalchemy as sa
from flask import jsonify, request
from flask_jwt_extended import jwt_required, get_jwt_identity
import csv
from sqlalchemy.sql.expression import false
from backend import app, db
from backend.models import Label, LabelValue, Project
from .helper_functions import (
check_admin,
check_a... | [
11748,
44161,
282,
26599,
355,
473,
198,
198,
6738,
42903,
1330,
33918,
1958,
11,
2581,
198,
6738,
42903,
62,
73,
46569,
62,
2302,
1631,
1330,
474,
46569,
62,
35827,
11,
651,
62,
73,
46569,
62,
738,
414,
198,
11748,
269,
21370,
198,
... | 3.15748 | 127 |
import os
import sys
sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/.."))
from src.hw2 import csv_reader
| [
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
5305,
6978,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
47762,
1,
14,
492,
48774,
198,
6738,
12351,
13,
36599,
17,
1330,
269,
21370,
... | 2.586957 | 46 |
from telnetlib import Telnet
from threading import Thread
| [
6738,
13632,
3262,
8019,
1330,
12088,
3262,
198,
6738,
4704,
278,
1330,
14122,
198,
220,
220,
220,
220
] | 3.444444 | 18 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import threading
import time
import weakref | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
5964,
13,
198,
198,
11748,
4704,
278,
198,
11748,
640,
198,
11748,
4939,
5420
] | 4.178571 | 28 |
import time
from pushpy_examples.client.ex_push_manager import ExamplePushManager
m = ExamplePushManager()
m.connect()
repl_code_store = m.repl_code_store()
repl_code_store.set("schedule_task", ScheduleTask, sync=True)
dt = m.local_tasks()
dt.stop("schedule_task")
dt.run("daemon", src="schedule_task", name="sched... | [
11748,
640,
198,
198,
6738,
4574,
9078,
62,
1069,
12629,
13,
16366,
13,
1069,
62,
14689,
62,
37153,
1330,
17934,
49222,
13511,
198,
198,
76,
796,
17934,
49222,
13511,
3419,
198,
76,
13,
8443,
3419,
628,
198,
198,
35666,
62,
8189,
62,
... | 2.742647 | 136 |
'''
https://leetcode.com/contest/weekly-contest-154/problems/maximum-number-of-balloons/
''' | [
7061,
6,
198,
5450,
1378,
293,
316,
8189,
13,
785,
14,
3642,
395,
14,
45291,
12,
3642,
395,
12,
21526,
14,
1676,
22143,
14,
47033,
12,
17618,
12,
1659,
12,
1894,
13022,
14,
198,
7061,
6
] | 2.555556 | 36 |
# -*- coding: utf-8 -*-
import logging
import pickle
from abc import ABCMeta, abstractmethod
from app import redis
from app.cache import set_dict_if_key_expire, set_data_if_key_expire, set_redis_dict_with_timeout, \
set_redis_data_with_timeout
from task.asyncTask import refresh_cache
class DictCacheABC(CacheAB... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
11748,
2298,
293,
628,
198,
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
198,
6738,
598,
1330,
2266,
271,
198,
6738,
598,
13,
23870,
1330,
900,... | 2.848 | 125 |
import discord
import sqlite3
import random
import requests
import pymorphy2
from itertools import product
# , - ,
#
class Fraudbot(discord.Client):
def user_status(self, user_id, get_channel=False):
# .
cur = self.con.cursor()
user = cur.execute("Sel... | [
11748,
36446,
201,
198,
11748,
44161,
578,
18,
201,
198,
11748,
4738,
201,
198,
11748,
7007,
201,
198,
11748,
12972,
4491,
6883,
17,
201,
198,
6738,
340,
861,
10141,
1330,
1720,
201,
198,
2,
837,
220,
220,
220,
220,
220,
220,
220,
2... | 2.135714 | 280 |
"""Convert, load or write JSON."""
import json
import logging
import os
import re
import sys
from os import geteuid, path
from subprocess import CalledProcessError, PIPE, Popen, STDOUT, check_call
from iocage.lib.ioc_common import checkoutput, get_nested_key, open_atomic
def _get_pool_and_iocroot():
"""For inter... | [
37811,
3103,
1851,
11,
3440,
393,
3551,
19449,
526,
15931,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
6738,
28686,
1330,
651,
12496,
312,
11,
3108,
198,
6738,
850,
14681,
1330,
34099,... | 2.875 | 168 |
#!usr/bin/env python3
#coding:utf8
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit
from astropy.io import ascii
from uncertainties import ufloat
import uncertainties.unumpy as unp
from modules.table import textable
import scipy.constants as const
import math as math
from modules.... | [
2,
0,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
66,
7656,
25,
40477,
23,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
12133,
... | 1.998458 | 3,243 |
import os
import matplotlib.pyplot as plt
import numpy as np
import cv2
filedir = '/Users/gabrielfior/Dropbox/Hackzurich16/pupils_cutout/'
readbgr = filedir+'left_pupil232.bmp'
frame = plt.imread(readbgr)
white=plt.imread('/Users/gabrielfior/Dropbox/Hackzurich16/pupils_bw/right_pupil61.bmp')
black=plt.imread('/Users/... | [
11748,
28686,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
198,
69,
3902,
343,
796,
31051,
14490,
14,
70,
397,
380,
7046,
1504,
14,
26932,
3524,
14,
... | 1.960035 | 1,151 |
from django.shortcuts import render
from chat.models import *
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
8537,
13,
27530,
1330,
1635,
198,
198,
2,
13610,
534,
5009,
994,
13,
198
] | 3.708333 | 24 |
#-------------------------------------------------------------------------------
# Name: GTFS_Arnold_Stops
#
# Purpose: Associate stops with the route shapes that have already been snapped to ARNOLD
#
# Author: Alex Oberg and Gary Baker
#
# Created: 10/17/2016
#
# Last updated 6/15/2017
#---------------------------... | [
2,
10097,
24305,
198,
2,
6530,
25,
220,
220,
220,
7963,
10652,
62,
3163,
77,
727,
62,
1273,
2840,
198,
2,
198,
2,
32039,
25,
22669,
9911,
351,
262,
6339,
15268,
326,
423,
1541,
587,
20821,
284,
5923,
45,
15173,
198,
2,
198,
2,
6... | 2.671766 | 2,288 |
# Lint as: python3
# Copyright 2019, The TensorFlow Federated 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 ... | [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
15069,
13130,
11,
383,
309,
22854,
37535,
35089,
515,
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,
... | 2.649741 | 5,396 |
import csv
from iterdeciser import models
| [
11748,
269,
21370,
198,
6738,
11629,
12501,
5847,
1330,
4981,
628
] | 3.909091 | 11 |
import torch
from torch import nn
from transformers.modeling_bert import BertIntermediate, BertOutput, BertLayer, BertEncoder, BertModel, BertForSequenceClassification
### Bottleneck Adapter
### BERT
### Parallel Adapter
### XLM-R | [
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
6121,
364,
13,
4666,
10809,
62,
4835,
1330,
22108,
9492,
13857,
11,
22108,
26410,
11,
22108,
49925,
11,
22108,
27195,
12342,
11,
22108,
17633,
11,
22108,
1890,
44015,
594,
9487,
... | 3.098765 | 81 |
""" This module is used for integration testing. """
# pylint: disable=locally-disabled,unused-import
import venv_exclusive
| [
37811,
770,
8265,
318,
973,
329,
11812,
4856,
13,
37227,
198,
198,
2,
279,
2645,
600,
25,
15560,
28,
17946,
453,
12,
47730,
11,
403,
1484,
12,
11748,
198,
11748,
8710,
85,
62,
41195,
198
] | 3.571429 | 35 |
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from .aspp import ASPP
from .decoders import SegmentHead
from .mobilenet_v2 import MobileNetV2
| [
11748,
28686,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
198,
6738,
764,
292,
381,
1330,
34658,
47,
198,
6738,
764,
12501,
375,
364,
1330,
1001,
5154,
13... | 3 | 58 |
"""
Generates a image of the top view of a chunk
Needs a textures folder with a block folder inside
"""
import sys
if len(sys.argv) == 1:
print('You must give a region file')
exit()
else:
region = sys.argv[1]
chx = int(sys.argv[2])
chz = int(sys.argv[3])
import os
from PIL import Image
import _path
... | [
37811,
198,
8645,
689,
257,
2939,
286,
262,
1353,
1570,
286,
257,
16058,
198,
23037,
82,
257,
20028,
9483,
351,
257,
2512,
9483,
2641,
198,
37811,
198,
11748,
25064,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
6624,
352,
25,
198,
220... | 2.050251 | 597 |
"""Celery worker application instantiation."""
import os
from celery import Celery
from django.conf import settings
from django_structlog.celery.steps import DjangoStructLogInitStep
def create_application():
"""Create a Celery application using Django settings."""
os.environ.setdefault(
'DJANGO_SET... | [
37811,
34,
417,
1924,
8383,
3586,
9113,
3920,
526,
15931,
198,
198,
11748,
28686,
198,
198,
6738,
18725,
1924,
1330,
15248,
1924,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
42625,
14208,
62,
7249,
6404,
13,
7015,
88... | 3.120101 | 791 |
file = open("./data.txt" , encoding = 'utf-8')
data = file.readlines()
liste=[]
for string in data:
string=string.replace('','')
string=string.replace('','')
string=string.replace('','')
string=string.replace('','')
string=string.replace('','')
string=string.replace('','')
string=string.replace('... | [
201,
198,
7753,
796,
1280,
7,
1911,
14,
7890,
13,
14116,
1,
837,
21004,
796,
705,
40477,
12,
23,
11537,
201,
198,
7890,
796,
2393,
13,
961,
6615,
3419,
201,
198,
201,
198,
4868,
68,
28,
21737,
201,
198,
201,
198,
1640,
4731,
287,
... | 2.464286 | 336 |
import datetime
import os
from avro_models import avro_schema, AvroModelContainer
EXAMPLE_NAMES = AvroModelContainer(default_namespace="example.avro")
DIRNAME = os.path.dirname(os.path.realpath(__file__))
| [
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
6738,
1196,
305,
62,
27530,
1330,
1196,
305,
62,
15952,
2611,
11,
5184,
305,
17633,
29869,
628,
198,
6369,
2390,
16437,
62,
45,
29559,
796,
5184,
305,
17633,
29869,
7,
12286,
62,
14933,
... | 2.917808 | 73 |
import django
import sys
# Compatibility import
from Bcfg2.Bcfg2Py3k import ConfigParser
# Django settings for bcfg2 reports project.
c = ConfigParser.ConfigParser()
if len(c.read(['/etc/bcfg2.conf', '/etc/bcfg2-web.conf'])) == 0:
raise ImportError("Please check that bcfg2.conf or bcfg2-web.conf exists "
... | [
11748,
42625,
14208,
198,
11748,
25064,
198,
198,
2,
46021,
1330,
198,
6738,
347,
37581,
17,
13,
33,
37581,
17,
20519,
18,
74,
1330,
17056,
46677,
198,
2,
37770,
6460,
329,
275,
37581,
17,
3136,
1628,
13,
198,
66,
796,
17056,
46677,
... | 2.475252 | 2,182 |
from enum import Enum
import arachne.nouns as a
nouns = (
a.Container,
a.Item,
a.Door,
a.Room,
a.Key,
a.Door
)
# this is an arachne object, in the english grammar sense.
# not to be confused with object types.
# encompasses all known in-game vocabulary, unmatched vocab always default to... | [
6738,
33829,
1330,
2039,
388,
198,
11748,
610,
620,
710,
13,
77,
977,
82,
355,
257,
628,
198,
77,
977,
82,
796,
357,
198,
220,
220,
220,
257,
13,
29869,
11,
198,
220,
220,
220,
257,
13,
7449,
11,
198,
220,
220,
220,
257,
13,
3... | 1.96124 | 645 |
from typing import List
from argo_workflows.models import HostAlias as ArgoHostAlias
from pydantic import BaseModel
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
1822,
78,
62,
1818,
44041,
13,
27530,
1330,
14504,
40489,
355,
943,
2188,
17932,
40489,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
628
] | 3.806452 | 31 |
from slpp import slpp as lua
import json
'''
lc=LuaConverter()
lc.write('fluid.lua','fluid_dict.py')
'''
| [
6738,
1017,
381,
1330,
1017,
381,
355,
300,
6413,
198,
11748,
33918,
628,
198,
198,
7061,
6,
628,
198,
44601,
28,
36127,
3103,
332,
353,
3419,
198,
198,
44601,
13,
13564,
10786,
35522,
312,
13,
40211,
41707,
35522,
312,
62,
11600,
13,... | 2.3125 | 48 |
#!/usr/bin/env python
#==============================================================================
#author :Miryam de Lhoneux
#email :miryam.de_lhoneux@lingfil.uu.se
#date :2015/12/30
#version :1.0
#description :collect iso codes in UD directories
#usage :python scripts/collect_iso_codes.py
#Python version ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
23926,
25609,
855,
198,
2,
9800,
197,
197,
197,
25,
44,
9045,
321,
390,
406,
71,
505,
2821,
198,
2,
12888,
197,
197,
197,
25,
76,
9045,
321,
13,
2934,
62,
75,
71,
505,
2821,
... | 2.724026 | 308 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import numpy
import socket
import traceback
from airtest import aircv
from airtest.utils.snippet import reg_cleanup, on_method_ready, ready_method
from airtest.core.ios.constant import ROTATION_MODE, DEFAULT_MJPEG_PORT
from airtest.utils.logger import get_logger
from airte... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
198,
11748,
17802,
198,
11748,
12854,
1891,
198,
6738,
1633,
9288,
1330,
1633,
33967,
198,
6738,
1... | 2.714286 | 266 |
import time
import datetime
import os
import sys
import atexit
import signal
from multiprocessing import Pool
from threading import Thread
| [
11748,
640,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
379,
37023,
198,
11748,
6737,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
6738,
4704,
278,
1330,
14122,
628
] | 4.117647 | 34 |
from .base import * | [
6738,
764,
8692,
1330,
1635
] | 3.8 | 5 |
import cadquery as cq # type: ignore
nd = 0.4 # Nozzle Diameter
length = 50
width = 20
gap = 5
p1 = (
cq.Workplane("XY", origin=(-(width + gap), 0, 0))
.rect(width, length)
.extrude(nd/2)
)
#show_object(p1)
p2 = (
cq.Workplane("XY", origin=(0, 0, 0))
.rect(width, length)
.extrude(nd)
)
#sho... | [
11748,
20603,
22766,
355,
269,
80,
1303,
2099,
25,
8856,
198,
198,
358,
796,
657,
13,
19,
220,
1303,
1400,
26413,
360,
13173,
198,
13664,
796,
2026,
198,
10394,
220,
796,
1160,
198,
43554,
796,
642,
198,
198,
79,
16,
796,
357,
198,
... | 2.292398 | 342 |
import unittest
import logging
from tonalmodel.chromatic_scale import ChromaticScale
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
18931,
198,
198,
6738,
5680,
282,
19849,
13,
28663,
1512,
62,
9888,
1330,
18255,
1512,
29990,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,... | 2.978261 | 46 |
import numpy as np
import math
import polygon_sampler
nan_rgb = np.zeros((3,)) + np.NaN
# sampler session: texture, W_,H_,W,H
'''
Used by `sample_colors_squarepixels()`
Samples a single point.
Using square pixels.
[0, ... ,W-1] (incl.)
By mapping [0,1) -> [0,W) (int)
(mapping u,v)
'''
'''
Simple sampler.
slow.
"Pi... | [
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
7514,
14520,
62,
37687,
20053,
198,
198,
12647,
62,
81,
22296,
796,
45941,
13,
9107,
418,
19510,
18,
11,
4008,
1343,
45941,
13,
26705,
45,
198,
198,
2,
6072,
20053,
6246,
2... | 2.268657 | 670 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'workspace_view.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
5225,
10223,
62,
1177,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
12454,
2438,
17301,
... | 2.850575 | 87 |
"""Custom celery task to capitalize text"""
import task_queuing.celery_app as app
# app.queues.tasks.register(Capitalize)
| [
37811,
15022,
18725,
1924,
4876,
284,
35160,
2420,
37811,
198,
11748,
4876,
62,
4188,
4250,
13,
7015,
88,
62,
1324,
355,
598,
628,
628,
198,
2,
598,
13,
4188,
947,
13,
83,
6791,
13,
30238,
7,
39315,
1096,
8,
198
] | 3.15 | 40 |
"""add topics
Revision ID: d805931e1abd
Revises: 9430b6bc8d1a
Create Date: 2018-09-18 15:11:45.922659
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd805931e1abd'
down_revision = '9430b6bc8d1a'
branch_labels = None
depends_on = None
| [
37811,
2860,
10233,
198,
198,
18009,
1166,
4522,
25,
288,
1795,
3270,
3132,
68,
16,
397,
67,
198,
18009,
2696,
25,
10048,
1270,
65,
21,
15630,
23,
67,
16,
64,
198,
16447,
7536,
25,
2864,
12,
2931,
12,
1507,
1315,
25,
1157,
25,
223... | 2.368 | 125 |
# -*- coding: utf-8 -*-
"""
Editor: Zhao Xinlu
School: BUPT
Date: 2018-03-24
"""
if __name__ == '__main__':
print Solution().nextPermutation([1, 3, 2]) | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
17171,
25,
29436,
25426,
2290,
198,
26130,
25,
347,
8577,
51,
198,
10430,
25,
2864,
12,
3070,
12,
1731,
198,
198,
37811,
198,
198,
361,
11593,
3672,
834,
6... | 2.308824 | 68 |
from h1st.tuner.hyperparameter_tuner import HyperParameterTuner
| [
6738,
289,
16,
301,
13,
28286,
263,
13,
49229,
17143,
2357,
62,
28286,
263,
1330,
15079,
36301,
51,
38886,
198
] | 3.2 | 20 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 5 00:17:06 2018
@author:
Dr. Maximilian N. Gnther
European Space Agency (ESA)
European Space Research and Technology Centre (ESTEC)
Keplerlaan 1, 2201 AZ Noordwijk, The Netherlands
Email: maximilian.guenther@esa.int
GitHub: mnguenther
Twitter: m_n_... | [
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,
19480,
2556,
220,
642,
3571,
25,
1558,
25,
3312,
2864,
198,
198,
31,
9800,
25,
198,
6187,... | 2.898649 | 592 |
#coding: utf-8
import re
import os
from lxml import etree as ET
from bs4 import BeautifulSoup
import csv
| [
2,
66,
7656,
25,
3384,
69,
12,
23,
198,
198,
11748,
302,
198,
11748,
28686,
198,
6738,
300,
19875,
1330,
2123,
631,
355,
12152,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
269,
21370,
198
] | 2.789474 | 38 |
import localmodule
import datetime
import h5py
import math
import music21 as m21
import numpy as np
import os
import scipy
import scipy.linalg
import sys
import time
# Parse arguments
args = sys.argv[1:]
composer_str = args[0]
track_str = args[1]
# Define constants.
J_tm = 8
N = 2**10
n_octaves = 8
midi_octave_off... | [
11748,
1957,
21412,
198,
198,
11748,
4818,
8079,
198,
11748,
289,
20,
9078,
198,
11748,
10688,
198,
11748,
2647,
2481,
355,
285,
2481,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
629,
541,
88,
198,
11748,
629,
541... | 2.404224 | 6,155 |