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
from RecoLocalCalo.HGCalRecProducers.hgcalLayerClusters_cfi import hgcalLayerClusters as hgcalLayerClusters_
from RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi import dEdX, HGCalRecHit
from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import HGCalUncalibRecHit
fr... | [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
6738,
3311,
78,
14565,
34,
7335,
13,
39,
38,
9771,
6690,
11547,
7999,
13,
71,
70,
9948,
49925,
2601,
13654,
62,
66,
12463,
1330,
289,
70,
9948,
49925,
2601,
1... | 2.454768 | 409 |
# Copyright (c) 2020 Intel Corporation.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, ... | [
2,
15069,
357,
66,
8,
12131,
8180,
10501,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
2... | 2.996485 | 569 |
import logging
import time
from spaceone.inventory.libs.manager import GoogleCloudManager
from spaceone.inventory.libs.schema.base import ReferenceModel
from spaceone.inventory.connector.bigquery.sql_workspace import SQLWorkspaceConnector
from spaceone.inventory.model.bigquery.sql_workspace.cloud_service import BigQue... | [
11748,
18931,
198,
11748,
640,
198,
198,
6738,
2272,
505,
13,
24807,
13,
8019,
82,
13,
37153,
1330,
3012,
18839,
13511,
198,
6738,
2272,
505,
13,
24807,
13,
8019,
82,
13,
15952,
2611,
13,
8692,
1330,
20984,
17633,
198,
6738,
2272,
505... | 3.515528 | 161 |
for a in range(0,6):
print('Ol!', a)
print('Parei. \n')
for b in range(6, 0, -1):
print('Ol1', b)
print('Parei. \n')
for c in range(0, 6, 2):
print('Ol!', c)
print('Parei. \n')
| [
1640,
257,
287,
2837,
7,
15,
11,
21,
2599,
198,
220,
220,
220,
3601,
10786,
30098,
0,
3256,
257,
8,
198,
4798,
10786,
47,
533,
72,
13,
3467,
77,
11537,
198,
1640,
275,
287,
2837,
7,
21,
11,
657,
11,
532,
16,
2599,
198,
220,
22... | 1.928571 | 98 |
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 26 09:11:06 2016
@author: eikes
"""
import ConfigParser
from components import Component
from result import VariableResult
_config = ConfigParser.ConfigParser()
_config.read('scenario.cfg')
_section = 'MySection'
_results = 'results'
LP_FILE_PATH = _config.get(_sect... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
19480,
3158,
2608,
7769,
25,
1157,
25,
3312,
1584,
198,
198,
31,
9800,
25,
304,
7938,
198,
37811,
198,
11748,
17056,
46677,
198,
198,
6738,
6805,... | 2.761702 | 235 |
ncoders = int(input("enter no. of coders : "))
l=map(int,input().split(" "))
sl=[]
l = sorted(list(l))
top = 1
for rotator in range(1,ncoders):
sl = l[:rotator]
if(top != ncoders):
if(max(sl) < l[top]):
l[l.index(max(sl))] = 0
top = top +1
elif(max(... | [
10782,
375,
364,
796,
493,
7,
15414,
7203,
9255,
645,
13,
286,
14873,
364,
1058,
366,
4008,
198,
75,
28,
8899,
7,
600,
11,
15414,
22446,
35312,
7203,
366,
4008,
198,
6649,
28,
21737,
198,
75,
796,
23243,
7,
4868,
7,
75,
4008,
198,... | 1.676259 | 278 |
######################################################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# ... | [
29113,
29113,
29113,
14468,
4242,
2235,
198,
2,
220,
15069,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 2.058252 | 927 |
import argparse
from typing import List
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
6738,
19720,
1330,
7343,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.928571 | 28 |
import calcWinRate as cwr
k= 10000 # simulate k times
# --- example 0 ---
# --- 1-draw straight vs 4-card flush
player_a = [51,43] #AQ
player_b = [52,48] #AKs
table_cards = [47,40,28] #K,J,8
pp( player_a, player_b, table_cards, k)
# --- straight vs 4-card flush
player_a = [51,43] #AQ
player_b = [52,48] #AKs
t... | [
11748,
42302,
16643,
32184,
355,
269,
18351,
628,
198,
74,
28,
33028,
1303,
29308,
479,
1661,
198,
198,
2,
11420,
1672,
657,
11420,
198,
198,
2,
11420,
352,
12,
19334,
3892,
3691,
604,
12,
9517,
24773,
198,
7829,
62,
64,
796,
685,
4... | 2.151057 | 331 |
import discord
from discord.ext import commands
from Utils.UserClass import UserClass as User
permission_message = ["Guest [Permission Level : 0]", "User [Permission Level : 1]", "Developer [Permission Level : 2]", "Owner [Permission Level : 3]"] | [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
6738,
7273,
4487,
13,
12982,
9487,
1330,
11787,
9487,
355,
11787,
198,
198,
525,
3411,
62,
20500,
796,
14631,
42481,
685,
5990,
3411,
5684,
1058,
657,
60,
1600,
366,
12982,... | 3.594203 | 69 |
import math
test = []
sumPrimes = 2
for i in range(3, 2000000, 2):
if not testPrime(i):
continue
sumPrimes+=i
if (i % 10000 == 1):
print("progress : ", i, sumPrimes)
print (sumPrimes)
| [
11748,
10688,
198,
198,
9288,
796,
17635,
198,
198,
16345,
6836,
999,
796,
362,
198,
1640,
1312,
287,
2837,
7,
18,
11,
939,
2388,
11,
362,
2599,
198,
220,
220,
220,
611,
407,
1332,
26405,
7,
72,
2599,
198,
220,
220,
220,
220,
220,... | 2.239583 | 96 |
import sys
import re
import json
import os.path
import copy
from mako.template import Template
from clang import cindex
configfile = "clangelscript.json"
f = open(configfile)
data = f.read()
data = re.sub(r"//[^n]*n", "\n", data)
config = json.loads(data)
f.close()
if "ObjectTypes" in config:
arr = config["Obje... | [
11748,
25064,
198,
11748,
302,
198,
11748,
33918,
198,
11748,
28686,
13,
6978,
198,
11748,
4866,
198,
6738,
285,
25496,
13,
28243,
1330,
37350,
198,
198,
6738,
537,
648,
1330,
269,
9630,
198,
198,
11250,
7753,
796,
366,
565,
8368,
12048... | 2.35778 | 2,468 |
'''
demo
>> mysql -u root -p < schema.sql
'''
import orm
from models import User, Blog, Comment
import asyncio
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(test(loop))
print('Test finished')
loop.close() | [
7061,
6,
198,
9536,
78,
198,
198,
4211,
48761,
532,
84,
6808,
532,
79,
1279,
32815,
13,
25410,
198,
7061,
6,
628,
198,
11748,
393,
76,
198,
6738,
4981,
1330,
11787,
11,
14001,
11,
18957,
198,
11748,
30351,
952,
628,
198,
361,
11593,... | 2.646465 | 99 |
import avro.schema
import json
import fastavro
SCHEMA = {
"namespace": "avg_obj",
"type": "record",
"name": "Meme",
"fields": [
{"name": "user", "type": {
"type": "record",
"name": "PostUser",
"fields": [
{"name": "user_id", "type": "string"}... | [
11748,
1196,
305,
13,
15952,
2611,
198,
11748,
33918,
198,
198,
11748,
3049,
615,
305,
198,
198,
50,
3398,
27630,
796,
1391,
198,
220,
220,
220,
366,
14933,
10223,
1298,
366,
615,
70,
62,
26801,
1600,
198,
220,
220,
220,
366,
4906,
... | 1.870523 | 726 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Program, ki vas vpraa po imenu, nato pa vas pozdravi. """
# povpraamo po imenu
ime = input("Kako ti je ime? ")
# pozdravimo
print(f"Pozdravljen_a, {ime}!") | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
6118,
11,
47748,
34439,
410,
79,
430,
64,
745,
545,
268,
84,
11,
299,
5549,
14187,
34439,
745,
89,
67,
... | 2.039216 | 102 |
'''
# Linear Regression: understanding loss function in linear regression
#----------------------------------
#
# This function shows how to use Tensorflow to
# solve linear regression.
# y = Ax + b
#
# We will use the iris data, specifically:
# y = Sepal Length
# x = Petal Width
'''
import matplotlib.pyplot as plt
i... | [
7061,
6,
198,
2,
44800,
3310,
2234,
25,
4547,
2994,
2163,
287,
14174,
20683,
198,
2,
3880,
438,
198,
2,
198,
2,
770,
2163,
2523,
703,
284,
779,
309,
22854,
11125,
284,
198,
2,
8494,
14174,
20683,
13,
198,
2,
331,
796,
12176,
1343,... | 2.448573 | 1,507 |
#pysh: shell in python
import sys
cmdlist = ['start','exit','cd','md','ls','pd','cf','cl']
convert = []
waiting = 0
print 'pysh 1.0.5 19.03.11 #6. type start to enter, exit to leave.'
paths = ['pysh/']
direct = 'pysh/'
added = []
entered = raw_input(': ')
if entered == 'start':
while entered != ['exit']:
en... | [
2,
79,
893,
71,
25,
7582,
287,
21015,
198,
11748,
25064,
198,
28758,
4868,
796,
37250,
9688,
41707,
37023,
41707,
10210,
41707,
9132,
41707,
7278,
41707,
30094,
41707,
12993,
41707,
565,
20520,
198,
1102,
1851,
796,
17635,
198,
10247,
178... | 1.507635 | 2,161 |
from idautils import *
from idaapi import *
from idc import *
import urllib2
if __name__ == '__main__':
main()
| [
6738,
4686,
2306,
4487,
1330,
1635,
201,
198,
6738,
220,
3755,
15042,
1330,
1635,
201,
198,
6738,
4686,
66,
1330,
1635,
201,
198,
11748,
2956,
297,
571,
17,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
... | 2.358491 | 53 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
9979,
415,
13,
22973,
34184,
1187,
1330,
163... | 2.446809 | 47 |
import unittest
from code import instance as i
from code import datamapping as dm
from code import greedyfirst as gf
from code import algorithm as a
from code import baseobjects as bo
from code import tabu
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
6738,
2438,
1330,
4554,
355,
1312,
198,
6738,
2438,
1330,
4818,
321,
5912,
355,
288,
76,
198,
6738,
2438,
1330,
31828,
11085,
355,
308,
69,
198,
6738,
2438,
1330,
11862,
355,
257,
198,
6738,
2438,
1330,... | 3.363636 | 77 |
"""
examples on scikit-image :
call :
from skimage.feature import blob_dog, blob_log, blob_doh
structure :
skimage
feature
__init__.py (from .blob import blob_dog, blob_log, blob_doh)
blob.py (contains blob_dog, blob_log, blob_doh)
conclusion :
module imported because it was defin... | [
37811,
201,
198,
1069,
12629,
319,
629,
1134,
270,
12,
9060,
1058,
220,
201,
198,
201,
198,
13345,
1058,
220,
201,
198,
6738,
1341,
9060,
13,
30053,
1330,
44812,
62,
9703,
11,
44812,
62,
6404,
11,
44812,
62,
67,
1219,
201,
198,
201,... | 2.426752 | 157 |
import numpy as np
from com.sparksamples.util import get_records
from com.sparksamples.util import get_mapping
from com.sparksamples.util import extract_features
from com.sparksamples.util import extract_label
from com.sparksamples.util import extract_features_dt
#from pyspark.mllib.tree import DecisionTree
from pysp... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
401,
13,
82,
1845,
591,
12629,
13,
22602,
1330,
651,
62,
8344,
3669,
198,
6738,
401,
13,
82,
1845,
591,
12629,
13,
22602,
1330,
651,
62,
76,
5912,
198,
6738,
401,
13,
82,
1845,
591,
1... | 3.0875 | 160 |
import random
import yaml
wallMaker = Grammar({
'wallMat': [ 'stone', 'rock', 'wood', 'paper', 'earth', 'crystal', 'leafy vagueness', 'sand', 'skin', 'bark', 'foliage', 'needles', 'delicate tiles', 'agate', 'quartz', 'glass', 'iron', 'copper' ],
'wallCond': [ 'dark', 'heavy', 'slick', 'moss-clung', 'twisted... | [
198,
11748,
4738,
198,
198,
11748,
331,
43695,
198,
198,
11930,
48890,
796,
20159,
3876,
15090,
198,
220,
220,
220,
705,
11930,
19044,
10354,
685,
705,
6440,
3256,
705,
10823,
3256,
705,
3822,
3256,
705,
20189,
3256,
705,
16442,
3256,
7... | 2.277419 | 1,395 |
from rest_framework import viewsets
from kratos.apps.trigger import models, serializers
| [
6738,
1334,
62,
30604,
1330,
5009,
1039,
198,
6738,
479,
10366,
418,
13,
18211,
13,
46284,
1330,
4981,
11,
11389,
11341,
198
] | 4 | 22 |
from FileLoader import FileLoader
tests = [
"non_existing_file.csv",
"empty_file.csv",
"../data/athlete_events.csv",
]
if __name__=="__main__":
for test in tests:
print(f"==> TESTING {test}")
fl = FileLoader()
print(f"\n=> Loading file")
df = fl.load(test)
pri... | [
6738,
9220,
17401,
1330,
9220,
17401,
198,
198,
41989,
796,
685,
198,
220,
220,
220,
366,
13159,
62,
25687,
62,
7753,
13,
40664,
1600,
198,
220,
220,
220,
366,
28920,
62,
7753,
13,
40664,
1600,
198,
220,
220,
220,
366,
40720,
7890,
... | 2.078261 | 230 |
# REF: https://labs.ig.com/rest-trading-api-reference
| [
2,
4526,
37,
25,
3740,
1378,
75,
8937,
13,
328,
13,
785,
14,
2118,
12,
2213,
4980,
12,
15042,
12,
35790,
628
] | 2.5 | 22 |
#!/usr/bin/env python
# coding: utf-8
#AL - the above code is new for the griffin paper version
#modified print commands for python3
# Analyze all possible things from BAM-file
import sys
import argparse
from subprocess import call
import numpy
import scipy
import scipy.stats
import os.path
import os
import glob
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
1847,
532,
262,
2029,
2438,
318,
649,
329,
262,
1036,
42022,
3348,
2196,
198,
2,
41771,
3601,
9729,
329,
21015,
18,
198,
198,
2,
16213,... | 2.996166 | 1,826 |
import sys
main() | [
11748,
25064,
198,
198,
12417,
3419
] | 3 | 6 |
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
# this repo overrides ferenda.sources.legal.se.Regeringen to work
# against old downloaded
import re
import codecs
# from urllib.parse import urljoin
from rdflib ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
357,
48546,
62,
11748,
11,
7297,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 2.755814 | 258 |
import reverse_geocode
reverse_geocode.search([(35.6963860567411,139.686436661882)])
reverse_geocode.search([(-33.8236171057086,151.021885871887)])
reverse_geocode.search([(47.3111740195794,8.52681624913163)])
| [
11748,
9575,
62,
469,
420,
1098,
198,
198,
50188,
62,
469,
420,
1098,
13,
12947,
26933,
7,
2327,
13,
38205,
2548,
32417,
3134,
42224,
11,
20219,
13,
3104,
2414,
2623,
2791,
1507,
6469,
8,
12962,
198,
50188,
62,
469,
420,
1098,
13,
1... | 2.268817 | 93 |
from mesa.datacollection import DataCollector
### datacollection functions
def density(model):
"""Density: number of cars per unit length of road."""
return len(model.schedule.agents) / model.space.length
def flow(model):
"""Flow: number of cars passing a reference point per unit of time."""
# get... | [
6738,
18842,
64,
13,
19608,
330,
349,
1564,
1330,
6060,
31337,
273,
198,
198,
21017,
4818,
330,
349,
1564,
5499,
628,
198,
4299,
12109,
7,
19849,
2599,
198,
220,
220,
220,
37227,
35,
6377,
25,
1271,
286,
5006,
583,
4326,
4129,
286,
... | 3.006098 | 164 |
import pymysql
import logging
from lambda_assistant.handlers.event_handler import EventHandler
from lambda_assistant.errors import *
logger = logging.getLogger()
logger.setLevel(logging.INFO)
| [
11748,
279,
4948,
893,
13976,
201,
198,
11748,
18931,
201,
198,
201,
198,
6738,
37456,
62,
562,
10167,
13,
4993,
8116,
13,
15596,
62,
30281,
1330,
8558,
25060,
201,
198,
6738,
37456,
62,
562,
10167,
13,
48277,
1330,
1635,
201,
198,
20... | 3.014925 | 67 |
from django.contrib.auth import get_user_model
from django.db import models
# Create your models here.
User = get_user_model()
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13,
198,
12982,
796,
651,
62,
7220,
62,
19849,
3419,
628,
628
] | 3.195122 | 41 |
'''OpenGL extension AMD.blend_minmax_factor
This module customises the behaviour of the
OpenGL.raw.GL.AMD.blend_minmax_factor to provide a more
Python-friendly API
Overview (from the spec)
The EXT_blend_minmax extension extended the GL's blending functionality
to allow the blending equation to be specified by t... | [
7061,
6,
11505,
8763,
7552,
10324,
13,
2436,
437,
62,
1084,
9806,
62,
31412,
198,
198,
1212,
8265,
2183,
2696,
262,
9172,
286,
262,
220,
198,
11505,
8763,
13,
1831,
13,
8763,
13,
28075,
13,
2436,
437,
62,
1084,
9806,
62,
31412,
284,... | 3.760599 | 401 |
"""This example demonstrates the basics on building complete forms using campos.
It creates several fields, marking some of them as required and adding some
custom validation.
Finally fields are added to a CreationForm which have several buttons and a
custom callback connected to one of them. After added, some relate... | [
37811,
1212,
1672,
15687,
262,
19165,
319,
2615,
1844,
5107,
1262,
1413,
418,
13,
198,
198,
1026,
8075,
1811,
7032,
11,
18730,
617,
286,
606,
355,
2672,
290,
4375,
617,
198,
23144,
21201,
13,
198,
198,
11158,
7032,
389,
2087,
284,
257... | 3.258824 | 255 |
from flask import Flask, request
from structs import *
import json
import numpy as np
import sys
import random, time
app = Flask(__name__)
dx=0
dy=0
def deserialize_map(serialized_map):
"""
Fonction utilitaire pour comprendre la map
"""
serialized_map = serialized_map[1:]
rows = serialized_map.spli... | [
6738,
42903,
1330,
46947,
11,
2581,
198,
6738,
2878,
82,
1330,
1635,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
11748,
4738,
11,
640,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
34350,
28,
15,... | 2.090961 | 1,759 |
from InstaFriend import InstaFriend
friend = InstaFriend('bonesaw')
friend.say_something() | [
6738,
2262,
64,
23331,
1330,
2262,
64,
23331,
628,
198,
6726,
796,
2262,
64,
23331,
10786,
35095,
707,
11537,
198,
6726,
13,
16706,
62,
18927,
3419
] | 3.538462 | 26 |
import datetime as dt
import os
import attr
| [
11748,
4818,
8079,
355,
288,
83,
198,
11748,
28686,
198,
198,
11748,
708,
81,
628,
628,
198
] | 2.882353 | 17 |
"""Tests for the mqtt_json component."""
| [
37811,
51,
3558,
329,
262,
285,
80,
926,
62,
17752,
7515,
526,
15931,
198
] | 2.928571 | 14 |
from .console import embed, shell_entry
from .misc import decode_webwx_emoji, enhance_connection, ensure_list, get_raw_dict, get_receiver, \
get_text_without_at_bot, get_username, match_attributes, match_name, match_text, new_local_msg_id, repr_message, \
smart_map, start_new_thread
from .puid_map import PuidMa... | [
6738,
764,
41947,
1330,
11525,
11,
7582,
62,
13000,
198,
6738,
764,
44374,
1330,
36899,
62,
12384,
49345,
62,
368,
31370,
11,
9494,
62,
38659,
11,
4155,
62,
4868,
11,
651,
62,
1831,
62,
11600,
11,
651,
62,
260,
39729,
11,
3467,
198,... | 3 | 138 |
# Plugin made by Dark cobra
# For Dark cobra
# Made by Shivam Patel(Team Cobra)
# Kang with credits..
import random
from userbot import CMD_HELP
from userbot.events import register
from userbot.utils import admin_cmd
from telethon import events, types, functions, utils
import asyncio
choser('hpdiwali', 'a929138153... | [
2,
42636,
925,
416,
3801,
22843,
430,
198,
2,
1114,
3801,
22843,
430,
220,
198,
2,
14446,
416,
43305,
321,
33110,
7,
15592,
44305,
8,
198,
2,
27504,
351,
10824,
492,
198,
11748,
4738,
198,
6738,
2836,
13645,
1330,
327,
12740,
62,
39... | 3.035088 | 114 |
#!/usr/bin/env python
import sys
maximum = 0.0
selected = 0.0
results = []
for line in sys.stdin.readlines()[5:]:
line = line.strip()
if len(line) == 0:
continue
(inst, actual, predicted, error) = line.split()
results.append([inst, actual, predicted, error])
predicted = float(predicted... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
198,
47033,
796,
657,
13,
15,
198,
34213,
796,
657,
13,
15,
198,
198,
43420,
796,
17635,
198,
198,
1640,
1627,
287,
25064,
13,
19282,
259,
13,
961,
6615,
3419... | 2.295964 | 446 |
'''Logging module for symtuner library
Logging module for symtuner library. All loggings in symtuner library use this module.
'''
import logging as _logging
_LOGGER = None
def get_logger():
'''Get a logger.
Get a singleton `Logger`. If `Logger` not defined make one and return. If `get_logger` called
... | [
7061,
6,
11187,
2667,
8265,
329,
5659,
28286,
263,
5888,
198,
198,
11187,
2667,
8265,
329,
5659,
28286,
263,
5888,
13,
1439,
2604,
70,
654,
287,
5659,
28286,
263,
5888,
779,
428,
8265,
13,
198,
7061,
6,
198,
198,
11748,
18931,
355,
... | 2.20892 | 426 |
import os
import sys
import cv2
import argparse
import numpy as np
import torch
from torch import nn
from torch.nn import MSELoss
from torch.optim import Adam
from torch.optim.lr_scheduler import MultiStepLR
from torch.autograd import Variable
from torch.utils.data import DataLoader
from tensorboardX import SummaryWri... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
269,
85,
17,
198,
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
20471,
1330,
6579,
3698,
793,
198,
673... | 2.911197 | 259 |
# Online mode selection for FastEMRIWaveforms Packages
# Copyright (C) 2020 Michael L. Katz, Alvin J.K. Chua, Niels Warburton, Scott A. Hughes
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ... | [
2,
7467,
4235,
6356,
329,
12549,
3620,
7112,
39709,
23914,
6400,
1095,
198,
198,
2,
15069,
357,
34,
8,
12131,
3899,
406,
13,
36290,
11,
49939,
449,
13,
42,
13,
609,
6413,
11,
11556,
1424,
1810,
6236,
1122,
11,
4746,
317,
13,
19712,
... | 3.563433 | 268 |
from .city import City
from .company import Company
from .country import Country
| [
6738,
764,
19205,
1330,
2254,
198,
6738,
764,
39722,
1330,
5834,
198,
6738,
764,
19315,
1330,
12946,
198
] | 4.5 | 18 |
"""
opentrons_shared_data.deck.dev_types: types for deck defs
This should only be imported if typing.TYPE_CHECKING is True
"""
from typing import Any, Dict, List, NewType, Union
from typing_extensions import Literal, TypedDict
from ..module.dev_types import ModuleType
DeckSchemaVersion3 = Literal[3]
DeckSchemaVers... | [
37811,
198,
404,
298,
12212,
62,
28710,
62,
7890,
13,
35875,
13,
7959,
62,
19199,
25,
3858,
329,
6203,
825,
82,
198,
198,
1212,
815,
691,
307,
17392,
611,
19720,
13,
25216,
62,
50084,
2751,
318,
6407,
198,
37811,
198,
198,
6738,
197... | 2.968182 | 220 |
import math
import torch
import torch.nn as nn
from torch.autograd import Variable
from torchvision import models
defaultcfg = {
11 : [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
13 : [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
16 : [64, 64, 'M', 128, 128, 'M', 256... | [
11748,
10688,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
6738,
28034,
10178,
1330,
4981,
198,
198,
12286,
37581,
796,
1391,
198,
220,
220,
220,
1367,
1058,
685... | 2.34466 | 206 |
"""
Preprocessing script for Stanford Sentiment Treebank data.
"""
import os
import glob
#
# Trees and tree loading
#
def load_trees(dirpath):
const_trees, dep_trees, toks = [], [], []
with open(os.path.join(dirpath, 'parents.txt')) as parentsfile, \
open(os.path.join(dirpath, 'dparents.txt')) as d... | [
37811,
198,
6719,
36948,
4226,
329,
13863,
11352,
3681,
12200,
17796,
1366,
13,
198,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
15095,
198,
198,
2,
198,
2,
34925,
290,
5509,
11046,
198,
2,
198,
198,
4299,
3440,
62,
83,
6037,
7,
... | 1.913152 | 2,395 |
import warnings
from collections import namedtuple
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
import torch.utils.model_zoo as model_zoo
from typing import Optional, Tuple, List, Callable, Any
from modules.layers import *
__all__ = ['GoogLeNet', 'googlenet', "GoogLeNetO... | [
11748,
14601,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
1330,
309,
22854,
198,
11748,
28034,
13,
26791,
1... | 2.506593 | 910 |
q = int(raw_input().strip())
for a0 in xrange(q):
s=raw_input().strip()
# if s.startswith('0'):
# print "No"
# print s.find('1')
# print s.rfind(s,a0,a0-1)
# posof1 = s.find('1')
digits = [str(x) for x in str(s)]
print digits
for digit in len(digits):
if digits[digit]-dig... | [
80,
796,
493,
7,
1831,
62,
15414,
22446,
36311,
28955,
198,
1640,
257,
15,
287,
2124,
9521,
7,
80,
2599,
198,
220,
220,
220,
264,
28,
1831,
62,
15414,
22446,
36311,
3419,
198,
220,
220,
220,
1303,
611,
264,
13,
9688,
2032,
342,
10... | 1.913265 | 196 |
import requests
from ..exceptions import ClientError
| [
11748,
7007,
198,
6738,
11485,
1069,
11755,
1330,
20985,
12331,
628
] | 4.909091 | 11 |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
from matplotlib import rcParams
import matplotlib.patches as patches
rcParams['font.family'] = 'Times New Roman'
rcParams['font.size'] = 20
rcParams['axes.edgecolor'] = (0.0, 0.0, ... | [
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
13,
11227,
341,
1330,
11138,
66,
39520,
198,
11748,
2603,
29487,
8019,
13,
11227,
341,
355,
11034,
198,
6738... | 2.717489 | 223 |
# Copyright (C) 2015-2021 Virgil Security, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# (1) Redistributions of source code must retain the above copyright
# notice, this li... | [
2,
15069,
357,
34,
8,
1853,
12,
1238,
2481,
16310,
37718,
4765,
11,
3457,
13,
198,
2,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
... | 3.198708 | 619 |
# coding: utf-8
"""
Thingsboard REST API
For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.
OpenAPI spec version: 2.0
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-co... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
11597,
3526,
30617,
7824,
628,
220,
220,
220,
1114,
7729,
703,
284,
29145,
7007,
3387,
3187,
1279,
64,
13291,
11639,
4023,
1378,
27971,
3526,
13,
952,
14,
31628,
1... | 3.272152 | 158 |
import os
import subprocess
from pathlib import Path
from PIL import Image
import errno
import time
from re import search
CONVERT_PNG_TO_JPG = False
TOTAL_ORIGINAL = 0
TOTAL_COMPRESSED = 0
TOTAL_GAIN = 0
TOTAL_FILES = 0
QUALITY = 85
if __name__ == '__main__':
start_path = os.path.dirname(os.path.abspath(__file_... | [
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
11454,
3919,
198,
11748,
640,
198,
6738,
302,
1330,
2989,
198,
198,
10943,
15858,
62,
47,
10503,
62,
10468,
62,
41,
... | 2.689055 | 402 |
import os
import typing
from typing import Any, Callable, List, Tuple, Union
import numpy as np
from ..data_processor.readers import preprocess_image, read_image, restore_image
from ..data_processor.visualizer import show_important_parts, visualize_image, save_image
from ..common.paddle_utils import init_checkpoint, t... | [
11748,
28686,
198,
11748,
19720,
198,
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
7343,
11,
309,
29291,
11,
4479,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
11485,
7890,
62,
41341,
13,
961,
364,
1330,
662,
14681,
62,
9060,
11... | 3.495726 | 117 |
from opendc.models.portfolio import Portfolio
from opendc.models.scenario import Scenario
from opendc.models.topology import Topology
from opendc.util.rest import Response
def POST(request):
"""Add a new Scenario for this Portfolio."""
request.check_required_parameters(path={'portfolioId': 'string'},
... | [
6738,
1034,
437,
66,
13,
27530,
13,
634,
13652,
1330,
4347,
13652,
198,
6738,
1034,
437,
66,
13,
27530,
13,
1416,
39055,
1330,
1446,
39055,
198,
6738,
1034,
437,
66,
13,
27530,
13,
4852,
1435,
1330,
5849,
1435,
198,
6738,
1034,
437,
... | 1.717781 | 1,226 |
# Copyright 2020 Rastko Sknepnek, University of Dundee, r.skepnek@dundee.ac.uk
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights ... | [
2,
15069,
12131,
371,
459,
7204,
3661,
77,
538,
710,
74,
11,
2059,
286,
37921,
1453,
11,
374,
13,
82,
365,
79,
710,
74,
31,
646,
358,
1453,
13,
330,
13,
2724,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
... | 3.75641 | 312 |
# -*- coding: utf-8 -*-
# vim:se fenc=utf8 noet:
from __future__ import (unicode_literals, division, absolute_import, print_function)
try:
import vim
except ImportError:
vim = {}
from powerline.bindings.vim import (vim_get_func, buffer_name)
from powerline.theme import requires_segment_info
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
325,
277,
12685,
28,
40477,
23,
645,
316,
25,
198,
6738,
11593,
37443,
834,
1330,
357,
46903,
1098,
62,
17201,
874,
11,
7297,
11,
4112,
62,
11748,
11,
... | 2.873786 | 103 |
from fastapi.security import OAuth2PasswordRequestForm
from fastapi import APIRouter, Depends, HTTPException, status
from datetime import timedelta
from starlette.responses import JSONResponse
from db.crud.users import blacklist_token
from db.session import get_db
from core import security
from core.auth import authe... | [
6738,
3049,
15042,
13,
12961,
1330,
440,
30515,
17,
35215,
18453,
8479,
198,
6738,
3049,
15042,
1330,
3486,
4663,
39605,
11,
2129,
2412,
11,
14626,
16922,
11,
3722,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
3491,
21348,
13,
... | 3.596491 | 114 |
import os
import enum
from aqt.qt import QDialog, QGraphicsScene, QGraphicsRectItem, QGraphicsEllipseItem, QApplication
from aqt.qt import Qt, QPen, QGraphicsItem, QPixmap, QRectF, QPainter
from aqt.qt import QPointF, QBrush, QColor, QPainterPath, QIcon, QSize, QPalette
from aqt.utils import showInfo
from ..sr_occlu... | [
11748,
28686,
198,
11748,
33829,
198,
198,
6738,
257,
39568,
13,
39568,
1330,
1195,
44204,
11,
1195,
18172,
36542,
11,
1195,
18172,
45474,
7449,
11,
1195,
18172,
30639,
541,
325,
7449,
11,
1195,
23416,
198,
6738,
257,
39568,
13,
39568,
... | 2.817647 | 170 |
"""
Configuration class for handling configs with a given default.
If you need custom functionality or need to apply post_processing to parsed config,
simply extend this class.
Example:
```
class FenceConfig(Config):
def __init__(self, *args, **kwargs):
super(FenceConfig, self).__init__(*args, **kwargs)
... | [
37811,
198,
38149,
1398,
329,
9041,
4566,
82,
351,
257,
1813,
4277,
13,
198,
198,
1532,
345,
761,
2183,
11244,
393,
761,
284,
4174,
1281,
62,
36948,
284,
44267,
4566,
11,
198,
14323,
2145,
9117,
428,
1398,
13,
198,
198,
16281,
25,
1... | 2.599866 | 2,989 |
# coding:utf-8
# Type: Public
import numpy as np
import common.Math as cMath
import math
| [
2,
19617,
25,
40477,
12,
23,
198,
2,
5994,
25,
5094,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2219,
13,
37372,
355,
220,
269,
37372,
198,
11748,
10688,
628
] | 2.967742 | 31 |
import torch.nn as nn
import torch.nn.functional as F
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198
] | 3.176471 | 17 |
from stable_baselines3.bear.policies import BearPolicy
from stable_baselines3.bear.bear import BEAR | [
6738,
8245,
62,
12093,
20655,
18,
13,
33227,
13,
79,
4160,
444,
1330,
14732,
36727,
198,
6738,
8245,
62,
12093,
20655,
18,
13,
33227,
13,
33227,
1330,
9348,
1503
] | 3.413793 | 29 |
#!/usr/bin/python
"""
This is written by Zhiyang Ong to modify text (non-binary) files.
Synopsis:
Script to modify text (non-binary) files.
Revision History:
1) November 11, 2014. Initial working version.
The MIT License (MIT)
Copyright (c) <2014> <Zhiyang Ong>
Permission is hereby granted, f... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
37811,
198,
197,
1212,
318,
3194,
416,
1168,
5303,
17859,
48041,
284,
13096,
2420,
357,
13159,
12,
39491,
8,
3696,
13,
198,
220,
198,
197,
49771,
25,
198,
197,
7391,
284,
13096,
2420,
... | 3.174817 | 1,636 |
import pydicom
from tqdm import tqdm
import pandas as pd
import os
import time
import glob
import numpy as np
from pydicom import _dicom_dict as dc
from constants import *
import string
def dcmtag2df(folder: str, list_of_tags: list):
"""
# Create a Pandas DataFrame with the <list_of_tags> DICOM tags
# from... | [
11748,
279,
5173,
291,
296,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
15095,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
279,
5173,
291,
2... | 1.835045 | 3,407 |
# -*- coding: utf-8 -*-
"""
eve-swagger
~~~~~~~~~~~
swagger.io extension for Eve-powered REST APIs.
:copyright: (c) 2015 by Nicola Iarocci.
:license: BSD, see LICENSE for more details.
"""
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict # no... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
28001,
12,
2032,
7928,
198,
220,
220,
220,
220,
15116,
4907,
93,
198,
220,
220,
220,
1509,
7928,
13,
952,
7552,
329,
12882,
12,
12293,
30617... | 2.621951 | 164 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
_
/ | | __ _ __ _
/ | / |_||_|| ||
/ | / | |\ | ||_
/____ |__/\ . | | \|_|\_|
__________________________ .
... | [
220,
220,
220,
1303,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
220,
220,
220,
4808,
220,
198,
220,
220,
220,
220,
220,
1220,
220,
... | 2.152495 | 3,928 |
print("Lukas Ho, pronouns: he/him") | [
4798,
7203,
43,
2724,
292,
9544,
11,
43947,
25,
339,
14,
38400,
4943
] | 2.692308 | 13 |
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server.models.preferences import Preferences # noqa: F401,E501
from swagger_server import util
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
220... | 3.204082 | 98 |
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import time
import logging
from sklearn.metrics import roc_auc_score
from sklearn.cluster import KMeans
from sklearn.manifold import TSNE
from src.models.optim.Loss_Functions import DMSADLoss
from src.utils.utils import print_progessbar
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
18931,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
686,
66,
62,
14272... | 3.2 | 100 |
from __future__ import print_function, unicode_literals
from escher import __schema_version__
import escher.server
from escher import Builder, get_cache_dir, clear_cache
from escher.plots import (_load_resource, local_index, server_index,
model_json_for_name, map_json_for_name)
from escher.u... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
1658,
2044,
1330,
11593,
15952,
2611,
62,
9641,
834,
198,
11748,
1658,
2044,
13,
15388,
198,
6738,
1658,
2044,
1330,
35869,
11,
651,
62,
2... | 2.463972 | 569 |
from setuptools import find_packages, setup
setup(
name="casualty",
version="0.1.9",
packages=find_packages(exclude=["tests"]),
install_requires=[
"structlog==18.2.0",
"wrapt==1.10.11",
"pre-commit-hooks==1.4.0",
"mock==2.0.0",
"pytest==3.8.2",
"pytest-m... | [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
34004,
723,
774,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
16,
13,
24,
1600,
198,
220,
220,
220,
10392,
28,
19796,
6... | 2.08254 | 315 |
import time
from ..utils.log import log, INFO, ERROR, PASS
from ..utils.isaac import submit_login_form, assert_logged_in
from ..utils.i_selenium import assert_tab, image_div
from ..utils.i_selenium import wait_for_xpath_element, wait_for_invisible_xpath
from ..tests import TestWithDependency
from selenium.common.except... | [
11748,
640,
198,
6738,
11485,
26791,
13,
6404,
1330,
2604,
11,
24890,
11,
33854,
11,
41752,
198,
6738,
11485,
26791,
13,
9160,
330,
1330,
9199,
62,
38235,
62,
687,
11,
6818,
62,
6404,
2004,
62,
259,
198,
6738,
11485,
26791,
13,
72,
... | 3.246269 | 134 |
import re
import sqlite3
conn = sqlite3.connect('loc.db')
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS location(loc text PRIMARY KEY, code text)')
conn.commit()
f = open('loc_code.txt')
for d in f.readlines():
data = re.sub(r'\s{2}', '|', d.strip()).split('|')
print data[1].strip(), data[0]
c.... | [
11748,
302,
198,
11748,
44161,
578,
18,
198,
198,
37043,
796,
44161,
578,
18,
13,
8443,
10786,
17946,
13,
9945,
11537,
198,
66,
796,
48260,
13,
66,
21471,
3419,
198,
66,
13,
41049,
10786,
43387,
6158,
43679,
16876,
5626,
7788,
1797,
4... | 2.445087 | 173 |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
_valkka_nv ... | [
2,
770,
2393,
373,
6338,
7560,
416,
12672,
3528,
357,
4023,
1378,
2503,
13,
2032,
328,
13,
2398,
737,
198,
2,
10628,
513,
13,
15,
13,
1065,
198,
2,
198,
2,
2141,
407,
787,
2458,
284,
428,
2393,
4556,
345,
760,
644,
345,
389,
180... | 3.02552 | 1,489 |
import connexion
import six
import flask
import copy
import os
import base64
import time
from mcenter_server_api.models.inline_response200 import InlineResponse200 # noqa: E501
from mcenter_server_api.models.inline_response2001 import InlineResponse2001 # noqa: E501
from mcenter_server_api.models.user import User #... | [
11748,
369,
12413,
295,
198,
11748,
2237,
198,
11748,
42903,
198,
11748,
4866,
198,
11748,
28686,
198,
11748,
2779,
2414,
198,
11748,
640,
198,
198,
6738,
285,
16159,
62,
15388,
62,
15042,
13,
27530,
13,
45145,
62,
26209,
2167,
1330,
55... | 2.446241 | 1,237 |
from .DashReactJsonSchemaForm import DashReactJsonSchemaForm
__all__ = [
"DashReactJsonSchemaForm"
] | [
6738,
764,
43041,
3041,
529,
41,
1559,
27054,
2611,
8479,
1330,
16189,
3041,
529,
41,
1559,
27054,
2611,
8479,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
366,
43041,
3041,
529,
41,
1559,
27054,
2611,
8479,
1,
198,
60
] | 2.5 | 42 |
from functools import reduce
import numpy as np
from sparse import SparseTensor
def directional_derivative(self, c, order=1):
"""
+----------+-----------------+---------------------------+
| item | data type | shape |
+----------+-----------------+--... | [
6738,
1257,
310,
10141,
1330,
4646,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
29877,
1330,
1338,
17208,
51,
22854,
628,
628,
198,
220,
220,
220,
825,
47424,
62,
1082,
452,
876,
7,
944,
11,
269,
11,
1502,
28,
16,
2599,
198,
220,... | 2.01261 | 4,679 |
"""The poll management text."""
from .poll import get_poll_text
def get_poll_management_text(session, poll, show_warning=False):
"""Create the management interface for a poll."""
poll_text = get_poll_text(session, poll, show_warning)
return poll_text
| [
37811,
464,
3278,
4542,
2420,
526,
15931,
198,
6738,
764,
30393,
1330,
651,
62,
30393,
62,
5239,
628,
198,
4299,
651,
62,
30393,
62,
27604,
62,
5239,
7,
29891,
11,
3278,
11,
905,
62,
43917,
28,
25101,
2599,
198,
220,
220,
220,
37227... | 3.204819 | 83 |
# Generated by Django 2.2.3 on 2020-04-16 12:13
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
18,
319,
12131,
12,
3023,
12,
1433,
1105,
25,
1485,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
import csv
a = [[1,2,3], [4,5,6]]
with open('test.csv', 'w', newline='') as testfile:
csvwriter = csv.writer(testfile)
for row in a:
csvwriter.writerow(row)
with open('test.csv', 'r') as testfile:
csvreader = csv.reader(testfile)
for row in csvreader:
print(row) | [
11748,
269,
21370,
198,
198,
64,
796,
16410,
16,
11,
17,
11,
18,
4357,
685,
19,
11,
20,
11,
21,
11907,
198,
198,
4480,
1280,
10786,
9288,
13,
40664,
3256,
705,
86,
3256,
649,
1370,
28,
7061,
8,
355,
1332,
7753,
25,
198,
197,
406... | 2.313559 | 118 |
'''
Faa um programa que leia o nome completo de uma pessoa, mostrando em seguida o primeiro e o ltimo
nome separadamente.
Ex.: Ana Maria de Souza
primeiro = Ana
ltimo = Souza
'''
n = str(input('Digite seu nome completo: ')).strip()
nome = n.split() # split particiona e cria uma lista comeando no indice 0
print... | [
7061,
6,
201,
198,
37,
7252,
23781,
1430,
64,
8358,
443,
544,
267,
299,
462,
1224,
1462,
390,
334,
2611,
279,
408,
12162,
11,
749,
25192,
78,
795,
384,
5162,
3755,
267,
6994,
7058,
304,
267,
300,
16514,
78,
201,
198,
77,
462,
2880... | 2.40991 | 222 |
from django import forms
from django.contrib.auth.forms import (
UserCreationForm,
SetPasswordForm,
)
from hknweb.models import User, Profile
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
357,
198,
220,
220,
220,
11787,
12443,
341,
8479,
11,
198,
220,
220,
220,
5345,
35215,
8479,
11,
198,
8,
198,
198,
6738,
289,
15418,
... | 3 | 52 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Postfix mail log parser and filter.
This script filters and parses Postfix logs based on provided filter parameters.
Example:
To use this script type 'python pfstats.py -h'. Below is an example
that filteres postfix log file (even gziped) based on date,
se... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
6307,
13049,
6920,
2604,
30751,
290,
8106,
13,
198,
198,
1212,
4226,
16628,
290,
13544,
274,
2947,
13049,
17259,
... | 2.414553 | 7,531 |
__author__ = 'lichengwu'
if __name__ == "__main__":
config = """atw7b010100054060.et2\t10.100.54.60
atw8b010100054070.et2\t10.100.54.70
atw5b010100054057.et2\t10.100.54.57
atw6b010100054058.et2\t10.100.54.58
atw5b010179212040.s.et2\t10.179.212.40
atw6b010179213116.s.et2\t10.179.213.116
atw7b010179213117.s.et2\t... | [
834,
9800,
834,
796,
705,
677,
31753,
43812,
6,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
4566,
796,
37227,
265,
86,
22,
65,
486,
486,
830,
35005,
1899,
13,
316,
17,
59,
83,
940,
... | 1.955769 | 520 |
from typing import List
BoolList = List[bool]
DictList = List[dict]
FloatList = List[float]
IntList = List[int]
StrList = List[str]
| [
6738,
19720,
1330,
7343,
198,
198,
33,
970,
8053,
796,
7343,
58,
30388,
60,
198,
35,
713,
8053,
796,
7343,
58,
11600,
60,
198,
43879,
8053,
796,
7343,
58,
22468,
60,
198,
5317,
8053,
796,
7343,
58,
600,
60,
198,
13290,
8053,
796,
... | 2.770833 | 48 |
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
3050,
3517,
32250,
10501,
290,
509,
1689,
25418,
25767,
669,
7,
16,
8,
198,
2,
198,
2,
357,
16,
8,
509,
1689,
25418,
25767,
669,
389,
5610,
287,
262,
... | 3.446281 | 242 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020 UWATC. All rights reserved.
#
# Use of this source code is governed by an MIT license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/MIT
from .AgentTemplate import AgentTemplate | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
220,
12131,
33436,
1404,
34,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
5765,
286,
428,
2723,
243... | 3.206897 | 87 |
# Program that downloads all episodes of a podcast
# Features
# -- Functions: add, remove, update
# - Run the file to update without having to use python interpreter
# - Download all episodes of a podcast, put into the correct folder
# - Tag each file with metadata from the feed and the stored config
import os
... | [
2,
6118,
326,
21333,
477,
8640,
286,
257,
9905,
201,
198,
2,
17571,
201,
198,
2,
1377,
40480,
25,
751,
11,
4781,
11,
4296,
201,
198,
2,
532,
5660,
262,
2393,
284,
4296,
1231,
1719,
284,
779,
21015,
28846,
201,
198,
2,
532,
10472,
... | 2.128675 | 3,707 |
import time
import numpy as np
import cv2
from mss import mss
from threading_ext.GameRecorder import GameRecorder
from threading_ext.PausableThread import PausableThread
| [
11748,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
269,
85,
17,
198,
6738,
285,
824,
1330,
285,
824,
198,
198,
6738,
4704,
278,
62,
2302,
13,
8777,
6690,
2875,
1330,
3776,
6690,
2875,
198,
6738,
4704,
278,
62,
230... | 3.222222 | 54 |
#! /usr/bin/python3
import threading
import socket
from test import create_upd_clients
from client import multicast_receive
if __name__ == '__main__':
try:
test_multicast_receive()
except Exception as e:
print(e)
finally:
input('Press [ENTER]...') | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
4704,
278,
198,
11748,
17802,
198,
6738,
1332,
1330,
2251,
62,
929,
67,
62,
565,
2334,
198,
6738,
5456,
1330,
47368,
459,
62,
260,
15164,
628,
198,
361,
11593,
3672,
834,
... | 2.465517 | 116 |
from tools import *
from model import *
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as F
from torch.utils.data import Dataset, DataLoader
name_dataset = NamesDataset('data/names/names_train_new.csv')
dataloader = DataLoader(name_dataset, batch_size=32, shuffle=Tr... | [
6738,
4899,
1330,
1635,
198,
6738,
2746,
1330,
1635,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
198,
6738,
... | 2.691304 | 230 |
# Generated by Django 3.1 on 2021-05-04 03:47
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
319,
33448,
12,
2713,
12,
3023,
7643,
25,
2857,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.966667 | 30 |
# -*- coding: utf-8 -*-
# Copyright 2013 Sebastian Ramacher <sebastian+dev@ramacher.at>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
2211,
26190,
7431,
3493,
1279,
325,
65,
459,
666,
10,
7959,
31,
859,
3493,
13,
265,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 3.715152 | 330 |
# -*- coding: utf-8 -*-
"""Top-level package for Alexa Skill Boilerplate."""
__author__ = """James Lin"""
__email__ = 'james@lin.net.nz'
__version__ = '0.1.0'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
9126,
12,
5715,
5301,
329,
34630,
16023,
3248,
5329,
6816,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
14731,
5164,
37811,
198,
834,
12888,
834,
796,
7... | 2.439394 | 66 |
#Author: Wallace He
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import glob
import keras
from keras.models import Sequential
from keras.models import model_from_json
from keras.models import load_model
import partition
import train_CNN
def train_teach... | [
2,
13838,
25,
17161,
679,
220,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
15095,
198,
11748,
41927,
292,
198,
6738,... | 2.671875 | 704 |
import requests
import shutil
import pandas as pd
from typing import Dict, List
def fetch_descartes_human_tissue(out_file: str, verbose: bool = True) -> None:
"""Function to fetch Loom Single-Cell tissue data from
Descartes human database.
Args:
out_file: Output file that is going to store .loom... | [
11748,
7007,
198,
11748,
4423,
346,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
628,
198,
4299,
21207,
62,
20147,
433,
274,
62,
10734,
62,
83,
21949,
7,
448,
62,
7753,
25,
965,
11,
15942,
... | 2.239877 | 1,630 |