content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
"""
@author: Federica Gugole
__license__= "LGPL"
"""
import numpy as np
import easyvvuq as uq
import os
import pandas as pd
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter, NullFormatter
plt.rcParams.update({'font.size': 20})
plt.rcParams['figure.f... | [
37811,
198,
31,
9800,
25,
35089,
3970,
402,
1018,
2305,
198,
198,
834,
43085,
834,
28,
366,
41257,
6489,
1,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2562,
25093,
84,
80,
355,
334,
80,
198,
11748,
28686,
198,
... | 2.02293 | 5,931 |
import torch.nn as nn
from IPython import embed | [
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
6101,
7535,
1330,
11525
] | 3.615385 | 13 |
# -*- coding: utf-8 -*-
"""
75. Sort Colors
Given an array with n objects colored red, white or blue,
sort them so that objects of the same color are adjacent,
with the colors in the order red, white and blue.
Here, we will use the integers 0, 1, and 2
to represent the color red, white, and blue respectively.
Note:
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
2425,
13,
33947,
29792,
198,
198,
15056,
281,
7177,
351,
299,
5563,
16396,
2266,
11,
2330,
393,
4171,
11,
198,
30619,
606,
523,
326,
5563,
286,
262,
976,
3... | 3.368627 | 255 |
#!/usr/bin/env python3
"""
LINCS REST API client
New (2019) iLINCS:
http://www.ilincs.org/ilincs/APIinfo
http://www.ilincs.org/ilincs/APIdocumentation
(http://lincsportal.ccs.miami.edu/dcic/api/ DEPRECATED?)
"""
###
import sys,os,argparse,re,time,json,logging
#
from .. import lincs
#
##################################... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
34509,
7902,
30617,
7824,
5456,
198,
3791,
357,
23344,
8,
1312,
34509,
7902,
25,
220,
198,
4023,
1378,
2503,
13,
346,
1939,
82,
13,
2398,
14,
346,
1939,
82,
14,
17614... | 2.507513 | 1,198 |
import os
| [
11748,
28686,
628
] | 3.666667 | 3 |
from __future__ import absolute_import, unicode_literals
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
28000,
1098,
62,
17201,
874,
628
] | 3.866667 | 15 |
"""Data transformation utils."""
import datetime
import logging
import HTMLParser
from decimal import Decimal
import dateutil.parser
from gi.repository import Gtk
from datagrid_gtk3.utils import imageutils
from datagrid_gtk3.utils import dateutils
from datagrid_gtk3.utils import stringutils
logger = logging.getLog... | [
37811,
6601,
13389,
3384,
4487,
526,
15931,
198,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
11748,
11532,
46677,
198,
198,
6738,
32465,
1330,
4280,
4402,
198,
198,
11748,
3128,
22602,
13,
48610,
198,
6738,
308,
72,
13,
260,
1930,
3... | 3.275728 | 515 |
import argparse
import logging
import pandas as pd
import numpy as np
from tslearn.clustering import TimeSeriesKMeans
from tqdm import tqdm
logging.basicConfig(format="%(asctime)s - %(message)s", level=logging.INFO)
SEEDS = [27, 28, 29]
MODELS = ['dbert', 'dbidaf', 'droberta', 'squad']
DEV_DATA_SIZES = {
'dber... | [
11748,
1822,
29572,
198,
11748,
18931,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
26738,
1501,
13,
565,
436,
1586,
1330,
3862,
27996,
42,
5308,
504,
198,
6738,
256,
80,
36020,
1330,
... | 2.336905 | 840 |
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 22 18:21:32 2020
@author: Siro Moreno
"""
import numpy as np
l = 0.2096
L = 0.2096
L_2 = (L + l) / (2 ** 0.5)
l_2 = 0.0
r = 0.0667
m = 15.75
I_w = 0.00266
I_z = 0.461
phi_dot_max = 2 * np.pi * 7000 / (49 * 60)
psi_dot_max = phi_dot_max * 0.0667 / (2 ** 0.5 * 0.29642)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
26223,
2556,
2534,
1248,
25,
2481,
25,
2624,
12131,
198,
198,
31,
9800,
25,
311,
7058,
43269,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941... | 1.893491 | 169 |
import os
import re
import logging
import pandas as pd
from bs4 import BeautifulSoup
from os.path import join, exists, dirname
from prettytable import PrettyTable
logger = logging.getLogger(__name__)
ALL_TA2S = {'NYU-TA2', 'CMU-TA2', 'UCB-TA2', 'Uncharted-TA2', 'SRI-TA2', 'Texas A&M-TA2', 'D3M ENSEMBLE-TA2', 'NEW-NYU... | [
11748,
28686,
198,
11748,
302,
198,
11748,
18931,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
7160,
11,
26672,
3672,
198,
6738,
2495,
11487,
1330,
2... | 2.64 | 325 |
entrada = input()
datos = []
for i in range(int(entrada)):
entrada2 = input()
datos.append(entrada2)
for n in datos:
resul1, resul2 = proceso(int(n))
if resul1 == resul2:
print("Armstrong")
elif resul1 != resul2:
print("Not Armstrong")
| [
201,
198,
201,
198,
298,
81,
4763,
796,
5128,
3419,
201,
198,
19608,
418,
796,
17635,
201,
198,
201,
198,
1640,
1312,
287,
2837,
7,
600,
7,
298,
81,
4763,
8,
2599,
201,
198,
220,
24481,
4763,
17,
796,
5128,
3419,
201,
198,
220,
... | 2.036232 | 138 |
from django.conf.urls import url
from django.views.generic import TemplateView
from core import views
from core.feeds import rss_feed, atom_feed
app_name = 'core'
urlpatterns = [
url(r'^$', views.blog, name='home'),
url(r'^blog/$', views.blog, name='blog'),
url(r'^blog/(?P<slug>.*)/$', views.entry, name=... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
198,
198,
6738,
4755,
1330,
5009,
198,
6738,
4755,
13,
12363,
82,
1330,
374,
824,
62,
12363,
11,
22037,
62,
12... | 2.511029 | 272 |
import command
import sys
count = 0
newEnvVarName = []
newEnvVarValue = []
for I in command.env_var_name:
newEnvVarName.append(I.replace("\n",""))
for I in command.env_var_value:
newEnvVarValue.append(I.replace("\n",""))
endPrint = False
for I in command.env_var_name:
if(command.new_arg_parser("-0") or command.... | [
11748,
3141,
198,
11748,
25064,
198,
9127,
796,
657,
198,
3605,
4834,
85,
19852,
5376,
796,
17635,
198,
3605,
4834,
85,
19852,
11395,
796,
17635,
198,
1640,
314,
287,
3141,
13,
24330,
62,
7785,
62,
3672,
25,
198,
220,
649,
4834,
85,
... | 2.09434 | 530 |
import datetime
from scripts.ilapfuncs import timeline, open_sqlite_db_readonly
from scripts.plugin_base import ArtefactPlugin
from scripts.ilapfuncs import logfunc, tsv
from scripts import artifact_report
| [
11748,
4818,
8079,
198,
198,
6738,
14750,
13,
346,
499,
12543,
6359,
1330,
15264,
11,
1280,
62,
25410,
578,
62,
9945,
62,
961,
8807,
198,
6738,
14750,
13,
33803,
62,
8692,
1330,
943,
660,
22584,
37233,
198,
6738,
14750,
13,
346,
499,
... | 3.586207 | 58 |
from django.apps import apps
from django import forms
from django.contrib.auth import get_user_model
from .models import Follow
# Follow = apps.get_model('Users', 'Follow')
| [
6738,
42625,
14208,
13,
18211,
1330,
6725,
198,
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
764,
27530,
1330,
7281,
628,
198,
2,
7281,
796,
6725,
13,
11... | 3.403846 | 52 |
import launch
from launch.substitutions import Command, LaunchConfiguration
from launch_ros.substitutions import FindPackageShare
from launch_ros.actions import Node
import os
| [
11748,
4219,
198,
6738,
4219,
13,
7266,
301,
270,
3508,
1330,
9455,
11,
21225,
38149,
198,
6738,
4219,
62,
4951,
13,
7266,
301,
270,
3508,
1330,
9938,
27813,
11649,
198,
6738,
4219,
62,
4951,
13,
4658,
1330,
19081,
198,
11748,
28686,
... | 4.190476 | 42 |
from .gl import GL20, GL21, GL30, GL31, GL32, GL33, GL40, GL41, GL42, GL43, GL44, GL45, GL_ANY
from .enum import *
from .constant import * | [
6738,
764,
4743,
1330,
10188,
1238,
11,
10188,
2481,
11,
10188,
1270,
11,
10188,
3132,
11,
10188,
2624,
11,
10188,
2091,
11,
10188,
1821,
11,
10188,
3901,
11,
10188,
3682,
11,
10188,
3559,
11,
10188,
2598,
11,
10188,
2231,
11,
10188,
... | 2.464286 | 56 |
from .object import *
from .ns import *
from .io import *
from .time import *
| [
6738,
764,
15252,
1330,
1635,
198,
6738,
764,
5907,
1330,
1635,
198,
6738,
764,
952,
1330,
1635,
198,
6738,
764,
2435,
1330,
1635,
198
] | 3.25 | 24 |
import pandas as pd
import hashlib
import json
import traceback
from pymysql import IntegrityError
from datetime import datetime, timedelta
from db_adapter.logger import logger
from db_adapter.exceptions import DatabaseAdapterError, DuplicateEntryError
from db_adapter.curw_obs.station import StationEnum
from db_adapte... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
12854,
1891,
198,
6738,
279,
4948,
893,
13976,
1330,
39348,
12331,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
20613,
... | 3.5 | 104 |
"""Sales app URLs."""
# Django
from django.urls import path, include
# Views
from .views import customers as customers_views
from .views import sales as sales_views
urlpatterns = [
path('customers/', customers_views.CustomerFilterListViev.as_view(), name='customers'),
path('customers/create/', ... | [
37811,
44490,
598,
32336,
526,
15931,
201,
198,
201,
198,
2,
37770,
201,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
201,
198,
201,
198,
2,
29978,
201,
198,
6738,
764,
33571,
1330,
4297,
355,
4297,
62,
33571,
201,
1... | 2.688525 | 427 |
############### for ###################
nums = [1, 2, 3, 4, 5]
# simple loop
for num in nums:
print(num)
# break keyword
for num in nums:
if num == 3:
print("found")
break
print(num)
# continue keyword
for num in nums:
if num == 3:
print("found")
continue
print(num... | [
7804,
4242,
21017,
329,
1303,
14468,
2235,
198,
77,
5700,
796,
685,
16,
11,
362,
11,
513,
11,
604,
11,
642,
60,
198,
198,
2,
2829,
9052,
198,
1640,
997,
287,
997,
82,
25,
198,
220,
220,
220,
3601,
7,
22510,
8,
198,
198,
2,
227... | 2.207237 | 304 |
# Method I:
# Accepted while the time complexity equals to O(nlogn) due to the sort function.
# 66.68%; 144ms.
# Method II:
# Accepted while the time complexity equals to O(n) due to while circulation.
# 86.20%; 124ms.
# Method III:
# Target time complexity: O(logn)
# To be continued...
| [
2,
11789,
314,
25,
198,
2,
21699,
276,
981,
262,
640,
13357,
21767,
284,
440,
7,
21283,
2360,
8,
2233,
284,
262,
3297,
2163,
13,
198,
2,
7930,
13,
3104,
26525,
20224,
907,
13,
198,
2,
11789,
2873,
25,
198,
2,
21699,
276,
981,
26... | 3.186813 | 91 |
# pylint: disable = C0111, C0103, C0411, C0301, W0102, C0330, W0603
"""This module is used to extract the key_holds times and digraph
up_down times from the raw events of the subjects."""
import read_write
import numpy as np
import operator
import time
import general_purpose
import sys
import py_node_communication a... | [
2,
279,
2645,
600,
25,
15560,
796,
327,
486,
1157,
11,
327,
486,
3070,
11,
327,
3023,
1157,
11,
327,
3070,
486,
11,
370,
486,
2999,
11,
327,
3070,
1270,
11,
370,
15,
35642,
198,
37811,
1212,
8265,
318,
973,
284,
7925,
262,
1994,
... | 2.137009 | 3,664 |
import errno
import os
import shutil
import struct
from binascii import unhexlify
from collections import defaultdict
from configparser import ConfigParser
from datetime import datetime
from functools import partial
from itertools import islice
from zlib import crc32
import msgpack
import logging
logger = logging.get... | [
11748,
11454,
3919,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
2878,
198,
6738,
9874,
292,
979,
72,
1330,
555,
33095,
75,
1958,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
4566,
48610,
1330,
17056,
46677,
198,
6738,
4818,
... | 3.258303 | 271 |
from django.db.models import F
from rest_framework import serializers
from care.facility.models.uccbedrequest import UCCBedRequest
from care.users.api.serializers.user import UserBaseMinimumSerializer
from config.serializers import ChoiceField
from care.facility.api.serializers import TIMESTAMP_FIELDS
| [
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
376,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
628,
198,
6738,
1337,
13,
38942,
879,
13,
27530,
13,
18863,
3077,
25927,
1330,
471,
4093,
45896,
18453,
198,
198,
6738,
1337,
13,
18417,... | 3.698795 | 83 |
#!/usr/bin/env python
"""
Attempt to create a "manor" akin to::
###############################################
#.........#......#........#...........#.......#
#.........#......#........#...........#.......#
#.........#......#........#...........#.......#
#.........#......#........#...........#.......#
###... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
37177,
284,
2251,
257,
366,
805,
273,
1,
22107,
284,
3712,
628,
220,
1303,
29113,
7804,
4242,
2235,
198,
220,
1303,
34617,
2,
16317,
2,
2109,
2,
2109,
986,
2,
25780,
2,
... | 2.382149 | 10,386 |
from torchvision import datasets, transforms
from core.data.data_loaders.base import BaseDataLoader
| [
6738,
28034,
10178,
1330,
40522,
11,
31408,
198,
6738,
4755,
13,
7890,
13,
7890,
62,
2220,
364,
13,
8692,
1330,
7308,
6601,
17401,
628
] | 4.208333 | 24 |
# RT Util - Content Data
from typing import TypedDict, Any
from textwrap import shorten
from discord import Embed
from orjson import loads
from .utils import is_json
__all__ = (
"ContentData", "disable_content_json", "enable_content_json",
"convert_content_json", "to_text"
)
_acj_check_embeds = lambda... | [
2,
11923,
7273,
346,
532,
14041,
6060,
198,
198,
6738,
19720,
1330,
17134,
276,
35,
713,
11,
4377,
198,
198,
6738,
2420,
37150,
1330,
45381,
198,
198,
6738,
36446,
1330,
13302,
276,
198,
198,
6738,
393,
17752,
1330,
15989,
198,
198,
6... | 2.66041 | 586 |
import simpy
DEF_LINK_CAPACITY = 5
DEF_LINK_DELAY = 5
| [
11748,
985,
9078,
198,
198,
32988,
62,
43,
17248,
62,
33177,
2246,
9050,
796,
642,
198,
32988,
62,
43,
17248,
62,
35,
3698,
4792,
796,
642,
628
] | 2.074074 | 27 |
#!/usr/bin/env python
#
# lingui.zeng@huawei.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
"""
Test 'parser' module
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
20280,
72,
13,
89,
1516,
31,
13415,
38247,
13,
785,
198,
2,
1439,
2489,
10395,
13,
770,
1430,
290,
262,
19249,
5696,
198,
2,
389,
925,
1695,
739,
262,
2846,
286,
262,
... | 3.23494 | 166 |
from rest_framework import serializers
from .models import * # Student, StarInfo, SexInfo, GeoInfo, AnhuiGeoInfo, ProvinceInfo
#
#
#
#
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
201,
198,
201,
198,
6738,
764,
27530,
1330,
1635,
220,
1303,
13613,
11,
2907,
12360,
11,
14419,
12360,
11,
32960,
12360,
11,
1052,
71,
9019,
10082,
78,
12360,
11,
22783,
12360,
201,
198,
201,
... | 2.179487 | 78 |
from pymongo import MongoClient
client = MongoClient()
db = client['yelp']
movie_collection = db.movies
ratings_collection = db.ratings
tags_collection = db.tags
links_collection = db.links
# print ratings_collection.find({"userId": 295}).count()
# for rating in ratings_collection.find():
# print rating["movieI... | [
6738,
279,
4948,
25162,
1330,
42591,
11792,
198,
198,
16366,
796,
42591,
11792,
3419,
198,
198,
9945,
796,
5456,
17816,
88,
417,
79,
20520,
198,
41364,
62,
43681,
796,
20613,
13,
76,
20526,
198,
10366,
654,
62,
43681,
796,
20613,
13,
... | 3.176471 | 102 |
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
# X = input("Enter first string: ").lower()
# Y = input("Enter second string: ").lower()
# X ="I love horror movies"
# Y ="Lights out is a horror movie"
| [
6738,
299,
2528,
74,
13,
10215,
79,
385,
1330,
2245,
10879,
201,
198,
6738,
299,
2528,
74,
13,
30001,
1096,
1330,
1573,
62,
30001,
1096,
201,
198,
220,
220,
201,
198,
2,
1395,
796,
5128,
7203,
17469,
717,
4731,
25,
366,
737,
21037,
... | 2.776471 | 85 |
#!/usr/bin/env python
iosxe_hostname = "ios-xe-mgmt.cisco.com"
iosxe_netconf_port = 10000
iosxe_username = "developer"
iosxe_password = "C1sco12345"
from ncclient import manager
import xmltodict
import xml.dom.minidom
# Create an XML filter for targeted NETCONF queries
netconf_filter = """
<filter>
<interfaces xm... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
4267,
27705,
62,
4774,
3672,
796,
366,
4267,
12,
27705,
12,
11296,
16762,
13,
66,
4861,
13,
785,
1,
198,
4267,
27705,
62,
3262,
10414,
62,
634,
796,
33028,
198,
4267,
27705,
62,... | 2.539961 | 513 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
from crawl_movies.models.mongo import MovieDetail, WorkerDetail
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
2896,
500,
534,
2378,
31108,
994,
198,
2,
198,
2,
2094,
470,
6044,
284,
751,
534,
11523,
284,
262,
7283,
3620,
62,
47,
4061,
3698,
1268,
1546,
4634,
198,
2,
... | 2.795699 | 93 |
from typing import List
if __name__ == "__main__":
s = Solution()
result = s.findLucky([1, 2, 2, 3, 3, 3])
print(result)
| [
6738,
19720,
1330,
7343,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
264,
796,
28186,
3419,
198,
220,
220,
220,
1255,
796,
264,
13,
19796,
43,
5309,
26933,
16,
11,
362,
11,
362,
11,
... | 2.344828 | 58 |
import json
import os
import cauldron
from cauldron.test import support
from cauldron.test.support.flask_scaffolds import FlaskResultsTest
EXAMPLE_PROJECTS_DIRECTORY = os.path.realpath(os.path.join(
os.path.dirname(os.path.realpath(cauldron.__file__)),
'resources',
'examples'
))
| [
11748,
33918,
198,
11748,
28686,
198,
198,
11748,
269,
45637,
198,
6738,
269,
45637,
13,
9288,
1330,
1104,
198,
6738,
269,
45637,
13,
9288,
13,
11284,
13,
2704,
2093,
62,
1416,
2001,
10119,
1330,
46947,
25468,
14402,
198,
198,
6369,
239... | 2.731481 | 108 |
"""
@author: Junguang Jiang
@contact: JiangJunguang1123@outlook.com
"""
import torch.nn as nn
def lenet(pretrained=False, **kwargs):
"""LeNet model from
`"Gradient-based learning applied to document recognition" <http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf>`_
Args:
num_classes (int): nu... | [
37811,
198,
31,
9800,
25,
27134,
84,
648,
32294,
198,
31,
32057,
25,
32294,
41,
2150,
84,
648,
16,
10163,
31,
448,
5460,
13,
785,
198,
37811,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
628,
198,
198,
4299,
18896,
316,
7,
531... | 2.466667 | 270 |
import itertools | [
11748,
340,
861,
10141
] | 4 | 4 |
#!/usr/bin/env python
import argparse
from yattag import Doc
import matplotlib.pyplot as plt, mpld3
import collections
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description='generates html reports from your results')
# parser.add_argument('-a', dest='analysis', nargs=1, metavar='an... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
6738,
331,
1078,
363,
1330,
14432,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
11,
29034,
335,
18,
198,
11748,
17268,
628,
198,
198,
361,
115... | 2.8 | 230 |
"""
Interfaceing with the Student Web Service,
for notice resource
"""
import copy
import logging
from restclients.models.sws import Notice, NoticeAttribute
from restclients.sws import get_resource
from dateutil import parser
import pytz
notice_res_url_prefix = "/student/v5/notice/"
logger = logging.getLogger(__name... | [
37811,
198,
39317,
278,
351,
262,
13613,
5313,
4809,
11,
198,
329,
4003,
8271,
198,
37811,
198,
11748,
4866,
198,
11748,
18931,
198,
6738,
1334,
565,
2334,
13,
27530,
13,
2032,
82,
1330,
17641,
11,
17641,
33682,
198,
6738,
1334,
565,
... | 2.517564 | 427 |
# -*- coding: utf-8 -*-
import asyncio
import logging
import math
import platform
import time
import urllib
import uuid as _uuid
from datetime import datetime
import aiohttp
import requests
APP_NAME = "DzienniczekPlus 2.0"
APP_VERSION = "1.4.2"
APP_OS = "Android"
APP_USER_AGENT = "Dart/2.10 (dart:io)"
log = logging... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
30351,
952,
198,
11748,
18931,
198,
11748,
10688,
198,
11748,
3859,
198,
11748,
640,
198,
11748,
2956,
297,
571,
198,
11748,
334,
27112,
355,
4808,
12303,
312,... | 2.200524 | 763 |
#!/usr/bin/python3.6
import sys,etcdget,subprocess,time
with open('Data/chkuser2','w') as f:
f.write(str(sys.argv))
y=[]
z=[]
x=etcdget.etcdget('updlogged/'+sys.argv[1])
z.append(sys.argv[2])
y.append(x[0])
cmdline=['./pump.sh','UnixChkUser2']+sys.argv[1:]
result=subprocess.run(cmdline,stdout=subprocess.PIPE)
while f... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
13,
21,
198,
11748,
25064,
11,
316,
10210,
1136,
11,
7266,
14681,
11,
2435,
198,
198,
4480,
1280,
10786,
6601,
14,
354,
74,
7220,
17,
41707,
86,
11537,
355,
277,
25,
198,
277,
13,
13564,
7... | 1.977099 | 262 |
# Generated by Django 3.1.5 on 2021-02-04 19:45
from django.db import migrations, models
import django.db.models.manager
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
20,
319,
33448,
12,
2999,
12,
3023,
678,
25,
2231,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
37153,
628
] | 2.928571 | 42 |
import numpy as np
from scipy.optimize import fmin_cg
from utils.optimize import gradient_desc, computeNumericalGradient
from utils.utility import sigmoid, sigmoid_grad, ravel, unravel
import sys
np.set_printoptions(threshold=sys.maxsize)
np.seterr(divide = 'ignore')
| [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
277,
1084,
62,
66,
70,
198,
6738,
3384,
4487,
13,
40085,
1096,
1330,
31312,
62,
20147,
11,
24061,
45,
6975,
605,
42731,
1153,
198,
6738,
3384,
4487,
13,
... | 2.87234 | 94 |
from dpsutil.attrdict import DefaultDict, AttrDict
from dpsutil.attrdict.decorator import _get_vars_cls
from os import environ
def env_decorator(_cls):
"""
Decorator create EnvDict base on attribute of class.
@environment.env_decorator
class CustomEnv:
KAFKA_HOST = 'localhost'
KAFKA_... | [
6738,
288,
862,
22602,
13,
1078,
4372,
713,
1330,
15161,
35,
713,
11,
3460,
81,
35,
713,
198,
6738,
288,
862,
22602,
13,
1078,
4372,
713,
13,
12501,
273,
1352,
1330,
4808,
1136,
62,
85,
945,
62,
565,
82,
198,
6738,
28686,
1330,
55... | 2.201493 | 268 |
#!/usr/bin/env python3
import requests
import sys
import datetime
from dateutil.parser import parse
import argparse
def read_all(dummy):
return True
def getGithubData(url, token, add_criteria = read_all):
ret = []
headers = {'Authorization': 'token {}'.format(token)}
while True:
resp = requ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
7007,
198,
11748,
25064,
198,
11748,
4818,
8079,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
198,
11748,
1822,
29572,
198,
198,
4299,
1100,
62,
439,
7,
67,
13513,
2... | 2.436893 | 824 |
"""
Objective
In this challenge, we go further with normal distributions.
Task
The final grades for a Physics exam taken by a large group of students have a mean of mu=70 and
a standard deviation of sigma=10. If we can approximate the distribution of these grades by a normal distribution,
what percentage of the stu... | [
37811,
198,
10267,
425,
198,
818,
428,
4427,
11,
356,
467,
2252,
351,
3487,
24570,
13,
220,
198,
198,
25714,
198,
464,
2457,
19051,
329,
257,
23123,
2814,
2077,
416,
257,
1588,
1448,
286,
2444,
423,
257,
1612,
286,
38779,
28,
2154,
... | 3.068966 | 348 |
import numpy as np
from astropy import units as u
def C3toDV(C3, muE, rOrbit, outputUnits=None):
"""
Assumes all units are SI base if not stated
:param C3:
:param muE:
:param rOrbit:
:param outputUnits:
:return:
"""
# print(C3, muE, rOrbit)
DV = np.sqrt(C3 + (2*muE/rOrbit)) - n... | [
11748,
299,
32152,
355,
45941,
198,
6738,
6468,
28338,
1330,
4991,
355,
334,
628,
198,
4299,
327,
18,
1462,
35,
53,
7,
34,
18,
11,
38779,
36,
11,
374,
5574,
2545,
11,
5072,
3118,
896,
28,
14202,
2599,
198,
220,
220,
220,
37227,
19... | 2.121827 | 197 |
from setuptools import setup, find_packages
requirements = [
"tqdm",
]
setup(
name='vmz_interface',
version='0.1.0',
packages=find_packages(exclude=['tests']),
url='https://github.com/fksato/vmz_interface',
author='Fukushi Sato',
author_email='f.kazuo.sato@gmail.com',
description='Facebook VMZ interface',
in... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
8897,
18883,
796,
685,
198,
197,
1,
83,
80,
36020,
1600,
198,
60,
198,
198,
40406,
7,
198,
197,
3672,
11639,
14761,
89,
62,
39994,
3256,
198,
197,
9641,
11639,
15,
... | 2.505747 | 261 |
from flask import Blueprint, request, jsonify, make_response
from api.v2.models.parties import PartiesModelDb
from flask_jwt_extended import jwt_required
from . import check_user, id_conversion, resource_handler
parties_api_v2 = Blueprint('parties_v2', __name__, url_prefix="/api/v2")
| [
6738,
42903,
1330,
39932,
11,
2581,
11,
33918,
1958,
11,
787,
62,
26209,
198,
6738,
40391,
13,
85,
17,
13,
27530,
13,
3911,
444,
1330,
32024,
17633,
43832,
198,
6738,
42903,
62,
73,
46569,
62,
2302,
1631,
1330,
474,
46569,
62,
35827,
... | 3.163043 | 92 |
from pathlib import Path
import re
import time
from capture import getClipboardImage, NoImageData
PATHNAME_REGEX = re.compile(r'(\w+\.*)*\w')
main() | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
302,
198,
11748,
640,
198,
198,
6738,
8006,
1330,
651,
2601,
541,
3526,
5159,
11,
1400,
5159,
6601,
198,
198,
34219,
20608,
62,
31553,
6369,
796,
302,
13,
5589,
576,
7,
81,
6,
38016,
86,
10... | 2.781818 | 55 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__all__ = ["results"]
import os
import triangle
import numpy as np
import cPickle as pickle
import matplotlib.pyplot as pl
if __name__ == "__main__":
import sys
results(sys.argv[1])
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
3601,
62,
8818,
198,
198,
834,
439,
834,
796,
14631,
43420,
8973,
198,
... | 2.71028 | 107 |
import torch
import torch.nn as nn
import numpy as np
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
299,
32152,
355,
45941,
628,
628,
198
] | 3.052632 | 19 |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 3.813665 | 161 |
# -*- coding: utf-8 -*-
"""
This example demonstrates fitting a model to a (simulated) dataset using
numpyext.chi2_fit, which wraps Minuit.
"""
import numpy as np
from matplotlib import pyplot
from pyik.fit import ChiSquareFunction
from pyik.mplext import cornertext
np.random.seed(1)
def model(x, pars):
"""A sli... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
1212,
1672,
15687,
15830,
257,
2746,
284,
257,
357,
14323,
4817,
8,
27039,
1262,
198,
77,
32152,
2302,
13,
11072,
17,
62,
11147,
11,
543,
27521,
1855,
... | 2.340789 | 760 |
#############################################################
## ##
## Copyright (c) 2003-2017 by The University of Queensland ##
## Centre for Geoscience Computing ##
## http://earth.uq.edu.au/centre-geoscience-computing ##
## ... | [
29113,
14468,
7804,
4242,
2,
198,
2235,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 3.266465 | 1,655 |
import numpy as np
import sympy as sp
import bmcs_utils.api as bu
from bmcs_cross_section.pullout import MATS1D5BondSlipD
s_x, s_y = sp.symbols('s_x, s_y')
kappa_ = sp.sqrt( s_x**2 + s_y**2 )
get_kappa = sp.lambdify( (s_x, s_y), kappa_, 'numpy' )
def get_tau_s(s_x_n1, s_y_n1, Eps_n, bs, **kw):
'''Get the stress ... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10558,
88,
355,
599,
198,
11748,
275,
76,
6359,
62,
26791,
13,
15042,
355,
809,
198,
6738,
275,
76,
6359,
62,
19692,
62,
5458,
13,
31216,
448,
1330,
337,
33586,
16,
35,
20,
33,
623,
... | 1.816667 | 480 |
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
_post_schema = validate.Schema({
'hentai_video': validate.Schema({
'name': validate.text,
'is_visible': bool
}),
'videos_... | [
11748,
302,
198,
198,
6738,
4269,
8726,
13,
33803,
1330,
42636,
11,
13877,
6759,
2044,
198,
6738,
4269,
8726,
13,
33803,
13,
15042,
1330,
26571,
198,
6738,
4269,
8726,
13,
5532,
1330,
367,
6561,
12124,
198,
198,
62,
7353,
62,
15952,
2... | 1.974843 | 318 |
from ansiblelint import AnsibleLintRule
import os
| [
6738,
9093,
856,
75,
600,
1330,
28038,
856,
43,
600,
31929,
198,
198,
11748,
28686,
198
] | 3.1875 | 16 |
# -*- coding: utf-8 -*-
"""
(c) 2017 - Copyright Red Hat Inc
Authors:
Pierre-Yves Chibon <pingou@pingoured.fr>
"""
from __future__ import unicode_literals, absolute_import
import datetime
import unittest
import shutil
import sys
import os
import six
import json
import pygit2
from mock import patch, MagicMock... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
357,
66,
8,
2177,
532,
15069,
2297,
10983,
3457,
628,
46665,
25,
198,
220,
220,
21204,
12,
56,
1158,
609,
571,
261,
1279,
13886,
280,
31,
13886,
8167,... | 2.642487 | 193 |
'''
***************************************************************************************
2019 Arizona Board of Regents on behalf of the University of Arizona with rights
granted for USDOT OSADP distribution with the Apache 2.0 open source license.
**********************************************************... | [
7061,
6,
198,
17174,
17174,
8412,
2466,
8162,
628,
220,
13130,
7943,
5926,
286,
3310,
658,
319,
8378,
286,
262,
2059,
286,
7943,
351,
2489,
198,
220,
220,
220,
220,
220,
220,
7520,
329,
11403,
2394,
7294,
2885,
47,
6082,
351,
262,
2... | 2.707155 | 1,202 |
import wx
from cgui import SimplePanel
from gui.pref.prefcontrols import mark_pref,get_pref
| [
11748,
266,
87,
198,
6738,
269,
48317,
1330,
17427,
26639,
198,
6738,
11774,
13,
3866,
69,
13,
3866,
69,
13716,
82,
1330,
1317,
62,
3866,
69,
11,
1136,
62,
3866,
69,
198
] | 2.875 | 32 |
# Running!
if __name__ == '__main__':
selection_7()
| [
198,
2,
18162,
0,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
6356,
62,
22,
3419,
198
] | 2.375 | 24 |
'''
Crie uma classe Agenda que pode armazenar 10 pessoas e seja capaz de realizar as
seguintes operaes:
* void armazenaPessoa(String nome, int idade, float altura);
* void removePessoa(String nome);
* int buscaPessoa(String nome); // informa em que posio da agenda est a pessoa
* void imprimeAgenda(); /... | [
7061,
6,
198,
34,
5034,
334,
2611,
537,
21612,
37029,
8358,
279,
1098,
3211,
1031,
268,
283,
838,
279,
408,
78,
292,
304,
384,
6592,
1451,
1031,
390,
1103,
528,
283,
355,
198,
325,
5162,
600,
274,
27296,
274,
25,
628,
220,
220,
22... | 2.424074 | 540 |
import getopt, sys, os
import csv
import pandas as pd
import locale
from locale import atof
locale.setlocale(locale.LC_NUMERIC, '')
def get_feature_data(filepath, encode=None, **argv):
"""
input:
filepath
encode
argv:
Code,Date,CB,Open,High,Low,Close,Volumn
... | [
11748,
651,
8738,
11,
25064,
11,
28686,
198,
11748,
269,
21370,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
36693,
198,
6738,
36693,
1330,
379,
1659,
628,
198,
17946,
1000,
13,
2617,
17946,
1000,
7,
17946,
1000,
13,
5639,
62,
41... | 1.944584 | 1,191 |
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as tkr
import os
import openmm.unit as unit
output_dir = "/home/mbowley/ANI-Peptides/outputs/equilibration_aaa_capped_amber_121250_310322"
STATE_DATA_FN = "equilibration_state_data.csv"
# Make some graphs
report = pd.re... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13,
83,
15799,
355,
256,
38584,
198,
11748,
28686,
198,
11748,
12... | 2.406528 | 337 |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2017 Sebastian Golasch (plugin.video.netflix)
Copyright (C) 2018 Caphm (original implementation module)
Methods to execute requests to Netflix API
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more information.
"""
from __future__ import absolute_imp... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
15069,
357,
34,
8,
2177,
26190,
402,
12456,
354,
357,
33803,
13,
15588,
13,
36977,
8,
198,
220,
220,
220,
15069,
357,
34,
8,
2864,
4476,
2... | 2.416129 | 2,790 |
# Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from cybox.common import ExtractedFeatures
from cybox.test import EntityTestCase
# Need to do this so the binding class is registered.
import cybox.bindings.cybox_common
from cybox.bindings.address... | [
2,
15069,
357,
66,
8,
1946,
11,
383,
17168,
2200,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
4091,
38559,
24290,
13,
14116,
329,
1844,
2846,
13,
198,
198,
11748,
555,
715,
395,
198,
198,
6738,
3075,
3524,
13,
11321,
1330,
5683,
20216... | 3.373239 | 142 |
from django.core.validators import MinValueValidator
from openslides.core.config import ConfigVariable
from openslides.poll.models import PERCENT_BASE_CHOICES
from .models import Workflow
def get_workflow_choices():
"""
Returns a list of all workflows to be used as choices for the config variable
'motio... | [
6738,
42625,
14208,
13,
7295,
13,
12102,
2024,
1330,
1855,
11395,
47139,
1352,
198,
198,
6738,
9808,
75,
1460,
13,
7295,
13,
11250,
1330,
17056,
43015,
198,
6738,
9808,
75,
1460,
13,
30393,
13,
27530,
1330,
19878,
43960,
62,
33,
11159,
... | 3.107784 | 167 |
from mpyc.runtime import mpc
from src.dataset import ObliviousDataset, Sample
from src.output import output
from src.secint import secint as s
from src.forest import train_forest
spect_samples = ObliviousDataset.create(
sample([1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], 0),
sample([1... | [
6738,
285,
9078,
66,
13,
43282,
1330,
285,
14751,
198,
198,
6738,
12351,
13,
19608,
292,
316,
1330,
1835,
35260,
27354,
292,
316,
11,
27565,
198,
6738,
12351,
13,
22915,
1330,
5072,
198,
6738,
12351,
13,
2363,
600,
1330,
792,
600,
355... | 1.604979 | 13,979 |
import argparse
import os
import numpy as np
import math
import sys
import matplotlib.pyplot as plt
import torchvision.transforms as transforms
from torchvision.utils import save_image
import random
from math import *
from torch.utils.data import DataLoader
from torchvision import datasets
from torch.autograd import Va... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
25064,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
31408,
198,
673... | 2.317024 | 2,003 |
# -*- coding: utf-8 -*-
__author__ = 'gzp'
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
from utils import Tree
if __name__ == '__main__':
s = Solution()
root = Tree([1, 0, 2])
pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
834,
9800,
834,
796,
705,
34586,
79,
6,
198,
198,
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
7,
15252,
2599,
198,
2,
220,
220,
220,
220,... | 2.124481 | 241 |
# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from ..utils import extract_CN_from_content
from ..items import ScrapySpiderItem
import re
from scrapy_splash import SplashRequest
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
15881,
88,
198,
6738,
15881,
88,
13,
2815,
365,
742,
974,
669,
1330,
7502,
11627,
40450,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
327,
13132,
41294,
11,
14330,... | 3.246914 | 81 |
__all__ = ['GUM_Dispenser_Main', 'GUM_setup_parser', 'GUM_Describe_Source', 'GUM_Generate_NOMNOML', 'GUM_Exceptions']
| [
834,
439,
834,
796,
37250,
38,
5883,
62,
7279,
79,
45268,
62,
13383,
3256,
705,
38,
5883,
62,
40406,
62,
48610,
3256,
705,
38,
5883,
62,
24564,
4892,
62,
7416,
3256,
705,
38,
5883,
62,
8645,
378,
62,
45,
2662,
45,
2662,
43,
3256,
... | 2.269231 | 52 |
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2017 Dan Persons (dpersonsdev@gmail.com)
#
# 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 limi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
17168,
13789,
198,
2,
220,
198,
2,
15069,
357,
66,
8,
2177,
6035,
32884,
357,
67,
19276,
684,
7959,
31,
14816,
13,
785,
8,
198,
2,
220,
198,
2,
2448,
3411,
318,
29376,
75... | 2.931271 | 873 |
# coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2015-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
11900,
29113,
29113,
7804,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
1853,
12,
7908,
3427,
16065,
354,
10599,
1313,
47532,
29118,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 3.881797 | 423 |
import json
import time
import websocket
| [
11748,
33918,
198,
11748,
640,
198,
11748,
2639,
5459,
628,
198
] | 3.909091 | 11 |
import dataiku
import glob
import pandas as pd
import os
| [
11748,
1366,
28643,
198,
11748,
15095,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198
] | 3.352941 | 17 |
#!/usr/bin/env python3
#
# Author: Vishwas K Singh
# Email: vishwasks32@gmail.com
#
# Script to convert Celcius Temperature to Farenheit
def temp_conv(temp_type, temp_val):
''' Function to convert Temperature from Celcius to farenheit
and vice versa'''
if(temp_type == 'f'):
temp_faren = ((9/5)*t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
6434,
25,
36900,
9776,
509,
14403,
198,
2,
9570,
25,
410,
680,
86,
6791,
2624,
31,
14816,
13,
785,
198,
2,
198,
2,
12327,
284,
10385,
15248,
28599,
34467,
284,
376,
... | 2.392233 | 515 |
import os
import sys
puzzle_input_path = os.path.join(os.path.dirname(__file__), "input_1.txt")
with open(puzzle_input_path) as puzzle_input_file:
puzzle_input_raw = puzzle_input_file.read()
preamble = 25
numbers = [int(x) for x in puzzle_input_raw.splitlines()]
number = next(
n
for i, n
in enumera... | [
11748,
28686,
198,
11748,
25064,
198,
198,
79,
9625,
62,
15414,
62,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
15414,
62,
16,
13,
14116,
4943,
198,
198,
4480,
1280,
7,
79... | 2.383562 | 292 |
"""Base architecture and Siamese Network.
"""
import tensorflow as tf
import dualing.utils.exception as e
def step(self, x, y):
"""Method that performs a single batch optimization step.
Note that you need to implement this method directly on its child. Essentially,
each type of Siamese... | [
37811,
14881,
10959,
290,
15638,
1047,
68,
7311,
13,
198,
37811,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
11748,
10668,
278,
13,
26791,
13,
1069,
4516,
355,
304,
628,
628,
220,
220,
220,
825,
2239,
7,
944,
11,
2124,
... | 2.58534 | 955 |
#**
# * The Decentralized App (DApp):
# * This is where the App developer writes the decentralized app.
# * Make sure the code is written within the specified space region.
# *
# * IMPORTANT:
# * 1. Developer DApp CODE MUST BE WRITTEN WITHIN SPECIFIED SPACE REGION.
# * 2. DApp MUST return values through the 'results'... | [
2,
1174,
198,
2,
1635,
383,
4280,
298,
1373,
1143,
2034,
357,
35,
4677,
2599,
198,
2,
1635,
770,
318,
810,
262,
2034,
8517,
6797,
262,
26512,
598,
13,
198,
2,
1635,
6889,
1654,
262,
2438,
318,
3194,
1626,
262,
7368,
2272,
3814,
13... | 3.340076 | 791 |
# Configure different hypothesis profiles
import os
from hypothesis import HealthCheck, Phase, settings
FAST_PROFILE = "fast"
CI_PROFILE = "ci"
# 'fast' profile for local development
settings.register_profile(
FAST_PROFILE,
# Set to true for test reproducibility
# https://hypothesis.readthedocs.io/en/la... | [
2,
17056,
495,
1180,
14078,
16545,
198,
11748,
28686,
198,
198,
6738,
14078,
1330,
3893,
9787,
11,
18983,
11,
6460,
198,
198,
37,
11262,
62,
31190,
25664,
796,
366,
7217,
1,
198,
25690,
62,
31190,
25664,
796,
366,
979,
1,
628,
198,
... | 2.812808 | 406 |
# coding: utf-8
from flask import render_template, redirect, request, url_for, flash, current_app
from flask_login import login_user, logout_user, login_required, UserMixin
from . import user
from .forms import LoginForm
from .. import login_manager
from config import Config
import time
users = Config.USER_LIST
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
6738,
42903,
1330,
8543,
62,
28243,
11,
18941,
11,
2581,
11,
19016,
62,
1640,
11,
7644,
11,
1459,
62,
1324,
198,
6738,
42903,
62,
38235,
1330,
17594,
62,
7220,
11,
2604,
448,
62,
7220,
11,
1759... | 3.58427 | 89 |
"""
Laboratory Experiment 3 - Script
- Rootlocus project
@author Rafael Lima
"""
from sympy import *
def simplifyFraction(G,s):
"""
Expand numerator and denominator from given fraction
"""
num,den = fraction(G.expand().simplify())
num = Poly(num,s)
den = Poly(den,s)
return (num/den)... | [
37811,
198,
42230,
2870,
29544,
513,
532,
12327,
198,
532,
20410,
75,
10901,
1628,
198,
2488,
9800,
31918,
41578,
198,
37811,
198,
198,
6738,
10558,
88,
1330,
1635,
198,
198,
4299,
30276,
37,
7861,
7,
38,
11,
82,
2599,
198,
220,
220,
... | 2.12642 | 1,408 |
import os
import unittest
from chase import Profile, Order, Reversal
merchant_id = os.environ.get('TEST_ORBITAL_MERCHANT_ID')
username = os.environ.get('TEST_ORBITAL_USERNAME')
password = os.environ.get('TEST_ORBITAL_PASSWORD')
if __name__ == '__main__':
unittest.main()
| [
11748,
28686,
198,
11748,
555,
715,
395,
198,
6738,
15505,
1330,
13118,
11,
8284,
11,
797,
690,
282,
198,
198,
647,
8907,
62,
312,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
51,
6465,
62,
1581,
26094,
1847,
62,
29296,
3398,
8643,
6... | 2.545455 | 110 |
import torch as t
import torch.nn as nn
import torch.nn.functional as F
| [
11748,
28034,
355,
256,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628
] | 3.318182 | 22 |
from cc3d import CompuCellSetup
from CircleSteppables import CircleSteppable
CompuCellSetup.register_steppable(steppable=CircleSteppable(frequency=1))
CompuCellSetup.run()
| [
198,
6738,
36624,
18,
67,
1330,
3082,
84,
28780,
40786,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
198,
6738,
16291,
7447,
381,
2977,
1330,
16291,
7447,
381,
540,
198,
198,
7293,
84,
28780,
40786,
13,
30238,
62,
4169,
381,
54... | 2.735294 | 68 |
"""
Models for analytics application. Models used to store and operate all data received from the edx platform.
"""
from __future__ import division
from datetime import date, timedelta
import operator
import pycountry
from django.contrib.postgres.fields import JSONField
from django.db import models
from django.db.m... | [
37811,
198,
5841,
1424,
329,
23696,
3586,
13,
32329,
973,
284,
3650,
290,
8076,
477,
1366,
2722,
422,
262,
1225,
87,
3859,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
6738,
4818,
8079,
1330,
3128,
11,
2880... | 2.942363 | 347 |
# Copyright 2015, 2017 IBM Corp.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | [
2,
15069,
1853,
11,
2177,
19764,
11421,
13,
198,
2,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
2... | 2.153413 | 1,421 |
from dispatch.plugins.bases import ParticipantGroupPlugin
| [
6738,
27965,
13,
37390,
13,
65,
1386,
1330,
29880,
13247,
37233,
628
] | 4.916667 | 12 |
#!/usr/bin/python
from string import Formatter
_STATS_TEMPLATE = '''#ifndef {INCLUDE_GUARD}
#define {INCLUDE_GUARD}
// clang-format off
#ifdef {MACRO_PREFIX}ON
{INCLUDES}
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
// comment out any stats you don't want, and thing... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
6738,
4731,
1330,
5178,
1436,
198,
198,
62,
2257,
33586,
62,
51,
3620,
6489,
6158,
796,
705,
7061,
2,
361,
358,
891,
1391,
1268,
5097,
52,
7206,
62,
38022,
9795,
92,
198,
2,
13086,
1... | 1.836623 | 2,381 |
from . import ingest_tester
from whyis_test_case import WhyisTestCase
| [
6738,
764,
1330,
26151,
62,
4879,
353,
198,
6738,
1521,
271,
62,
9288,
62,
7442,
1330,
4162,
271,
14402,
20448,
628
] | 3.380952 | 21 |
import copy
import ConfigParser
import conf_keys
from loggingex import LOG_WARNING
if __name__ == "__main__":
a = mysql_conf_parser()
print a.parse("../../conf/mysql_manager.conf")
pass
| [
11748,
4866,
198,
11748,
17056,
46677,
198,
11748,
1013,
62,
13083,
198,
6738,
18931,
1069,
1330,
41605,
62,
31502,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
257,
796,
48761,
62,
10414,
62,
... | 2.884058 | 69 |
import torch.nn as nn
from n3 import ExternNode
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
6738,
299,
18,
1330,
1475,
759,
19667,
628
] | 2.941176 | 17 |
#!/usr/bin/env python3
"""
Copyright [2009-present] EMBL-European Bioinformatics Institute
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 requ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
15269,
685,
10531,
12,
25579,
60,
17228,
9148,
12,
22030,
16024,
259,
18982,
873,
5136,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
116... | 2.66559 | 619 |
import unittest
import textwrap
import jtbl.cli
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
11748,
2420,
37150,
198,
11748,
474,
83,
2436,
13,
44506,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.512821 | 39 |
"""
Autonomous Car Locator
This is a program that helps autonomous cars to find out the location and direction
of other autonomous cars. It is all based on what is provided by the car and from what the car detects.
By David Gameiro
"""
import random
locator()
| [
37811,
198,
16541,
38175,
1879,
15181,
1352,
198,
198,
1212,
318,
257,
1430,
326,
5419,
18284,
5006,
284,
1064,
503,
262,
4067,
290,
4571,
198,
1659,
584,
18284,
5006,
13,
632,
318,
477,
1912,
319,
644,
318,
2810,
416,
262,
1097,
290,... | 3.618421 | 76 |
from jenkinsdashboard.ci.jenkins import Jenkins
from jenkinsdashboard.ui.dashboard import Dashboard
import time
if __name__ == '__main__':
# jenkins = Jenkins('http://10.0.0.102:18081', 'jfm', 'c3po4all')
jenkins = Jenkins(
'http://jenkins.onboarding.liquid.int.tdk.dk', 'admin', '0nboarding')
das... | [
6738,
474,
268,
5331,
42460,
3526,
13,
979,
13,
48796,
5331,
1330,
21835,
198,
6738,
474,
268,
5331,
42460,
3526,
13,
9019,
13,
42460,
3526,
1330,
16189,
3526,
198,
11748,
640,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
8... | 2.408377 | 191 |