content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
class DataPlane:
"""Helper Class for interacting with the dataplane"""
def create_asset(self, s3bucket, s3key):
"""
Method to create an asset in the dataplane
:param s3bucket: S3 Bucket of the asset
:param s3key: S3 Key of the asset
:return: Dataplane response
... | [
4871,
6060,
3646,
1531,
25,
198,
220,
220,
220,
37227,
47429,
5016,
329,
24986,
351,
262,
1366,
14382,
37811,
628,
220,
220,
220,
825,
2251,
62,
562,
316,
7,
944,
11,
264,
18,
27041,
316,
11,
264,
18,
2539,
2599,
198,
220,
220,
22... | 2.478332 | 1,223 |
# Copyright 2021 Beijing DP Technology Co., Ltd.
#
# 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 a... | [
2,
15069,
33448,
11618,
27704,
8987,
1766,
1539,
12052,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
1378... | 2.605505 | 1,090 |
# form
from django import forms
# choices
from cooggerapp.choices import *
# models
from cooggerapp.models import (
Content,
UserFollow,
OtherInformationOfUsers,
ReportModel)
from django.db import models
from django.contrib.auth.models import User
| [
2,
1296,
198,
6738,
42625,
14208,
1330,
5107,
198,
198,
2,
7747,
198,
6738,
763,
519,
1362,
1324,
13,
6679,
1063,
1330,
1635,
198,
198,
2,
4981,
198,
6738,
763,
519,
1362,
1324,
13,
27530,
1330,
357,
198,
220,
220,
220,
14041,
11,
... | 2.98913 | 92 |
"""
@author StellaVerkijk
This script gathers predictions of the From Scratch Language Model for a data set of sentences where names are masked.
Filepaths are hardcoded since the data used could not be released to the public because of privacy issues
"""
import transformers
from transformers import pipeline, RobertaTo... | [
37811,
198,
31,
9800,
45856,
53,
9587,
45961,
198,
1212,
4226,
43609,
16277,
286,
262,
3574,
1446,
36722,
15417,
9104,
329,
257,
1366,
900,
286,
13439,
810,
3891,
389,
29229,
13,
198,
8979,
6978,
82,
389,
1327,
40976,
1201,
262,
1366,
... | 2.886855 | 601 |
'''Base sequence classes.'''
import collections
import coral
from coral.sequence._sequence import Sequence
from coral.constants.molecular_bio import COMPLEMENTS
class NucleicAcid(Sequence):
'''Abstract sequence container for a single nucleic acid sequence
molecule.'''
def __init__(self, sequence, materia... | [
7061,
6,
14881,
8379,
6097,
2637,
7061,
198,
11748,
17268,
198,
11748,
29537,
198,
6738,
29537,
13,
43167,
13557,
43167,
1330,
45835,
198,
6738,
29537,
13,
9979,
1187,
13,
76,
2305,
10440,
62,
65,
952,
1330,
49269,
28957,
628,
198,
4871... | 2.227905 | 2,444 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from base import BaseObject
from nlusvc import ExecuteSparqlQuery
class CertificationHierarchyGenerator(BaseObject):
""" Generate a mapping file for parent-child Certification relationships """
def __init__(self,
is_debug: bool = True):
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
628,
198,
6738,
2779,
1330,
7308,
10267,
198,
6738,
299,
41790,
28435,
1330,
8393,
1133,
50,
1845,
13976,
20746,
628,
198,
4871,
... | 2.196481 | 341 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent 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:
# * Redistributions of source code must retain the above copyright
# no... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
1853,
11,
43757,
25791,
12,
25596,
1087,
3457,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
2... | 2.313518 | 6,695 |
import pybullet as p
import math
import pybullet_data
import time
import random
import numpy as np
import serial
# t in ms; the closer t is to 0, more accuracy but less smooth motion
# start of main program
MAX_MOTIONS_IN_SEQUENCE = 4
NUM_OF_LEGS = 6
NUM_OF_JOINTS_PER_LEG = 3
NUM_OF_SERVOS = NUM_OF... | [
11748,
12972,
15065,
1616,
355,
279,
198,
11748,
10688,
198,
11748,
12972,
15065,
1616,
62,
7890,
198,
11748,
640,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11389,
628,
198,
198,
2,
256,
287,
13845,
26,
262,
5699... | 2.430293 | 581 |
from django.shortcuts import render_to_response
from django.views.generic import RedirectView, TemplateView
from blog.models import BlogPost, BlogPostForm
from datetime import datetime
from django.http import HttpResponseRedirect
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
@csrf_exe... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
62,
1462,
62,
26209,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
2297,
1060,
7680,
11,
37350,
7680,
198,
6738,
4130,
13,
27530,
1330,
14001,
6307,
11,
14001,
6307,
8479,
198,
67... | 3.536364 | 110 |
import argparse
import gym
from kuka.env import KukaPoseEnv
import numpy as np
from pybullet_envs.bullet import KukaGymEnv
from util import write_video, ensure_folder
from PIL import Image
import multiprocessing
REWARD_CUTOFF = 1.0
if __name__ == '__main__':
path = "./tmp/video/"
main(get_cli_args()) | [
11748,
1822,
29572,
198,
11748,
11550,
198,
6738,
479,
14852,
13,
24330,
1330,
509,
14852,
47,
577,
4834,
85,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
15065,
1616,
62,
268,
14259,
13,
15065,
1616,
1330,
509,
14852,
38,
4948... | 2.736842 | 114 |
# -*- coding:utf-8 -*-
'''
有一组数,对于其中任意两个数组,若前面一个大于后面一个数字,则这两个数字组成一个逆序对。
请设计一个高效的算法,计算给定数组中的逆序对个数。
给定一个int数组A和它的大小n,请返回A中的逆序对个数。保证n小于等于5000。
'''
# testcase
A = [1,2,3,4,5,6,7,0]
n = len(A)
res = 7
print(AntiOrder().count(A, n) == res) | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
201,
198,
7061,
6,
201,
198,
17312,
231,
31660,
163,
119,
226,
46763,
108,
171,
120,
234,
43380,
117,
12859,
236,
17739,
114,
40792,
20015,
119,
35707,
237,
10310,
97,
10310,
10... | 0.84589 | 292 |
from typing import Optional
from fastapi import HTTPException, Request, status
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
from google.auth.transport import requests
from google.oauth2 import id_token
| [
6738,
19720,
1330,
32233,
198,
198,
6738,
3049,
15042,
1330,
14626,
16922,
11,
19390,
11,
3722,
198,
6738,
3049,
15042,
13,
12961,
1330,
7154,
51,
4537,
1457,
1634,
34,
445,
14817,
11,
14626,
3856,
11258,
198,
6738,
23645,
13,
18439,
13... | 4.017544 | 57 |
from string import ascii_lowercase, punctuation
| [
6738,
4731,
1330,
355,
979,
72,
62,
21037,
7442,
11,
21025,
2288,
628,
198
] | 3.571429 | 14 |
from abc import ABC, abstractmethod
class BaseOutputter(ABC):
"""An abstract base class to establish outputter methods"""
@abstractmethod
def display_location_name(self, location_name):
"""Display the name of the player's current location"""
raise NotImplementedError()
@abstractmetho... | [
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
628,
198,
4871,
7308,
26410,
353,
7,
24694,
2599,
198,
220,
220,
220,
37227,
2025,
12531,
2779,
1398,
284,
4474,
5072,
353,
5050,
37811,
628,
220,
220,
220,
2488,
397,
8709,
24396,
198,
220... | 2.980676 | 207 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 22 14:40:14 2020
@author: ghiggi
"""
import os
import sys
sys.path.append('../')
from modules.my_remap import remap_grib_files
### Define folder paths
proj_dir = "/ltenas3/DeepSphere/"
data_dir = "/ltenas3/DeepSphere/data/raw"
CDO_grids_dir = os.p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
4280,
2534,
1478,
25,
1821,
25,
1415,
12131,
198,
198,
31,
9800,
25,
24997,
6950,
... | 2.087485 | 823 |
import io
import sys
from threading import RLock
from segno.envelopes import ChecksumEnvelope
from segno.messaging import send, receive
#
# DEBUG: Test Functionality
_lock = RLock()
in_stream = sys.stdin.buffer # type: io.FileIO
out_stream = sys.stdout.buffer # type: io.FileIO
buffer = io.BytesIO()
send(buffe... | [
11748,
33245,
198,
11748,
25064,
198,
6738,
4704,
278,
1330,
371,
25392,
198,
198,
6738,
384,
70,
3919,
13,
268,
1091,
274,
1330,
47719,
388,
4834,
1091,
68,
198,
6738,
384,
70,
3919,
13,
37348,
3039,
1330,
3758,
11,
3328,
198,
198,
... | 2.718447 | 206 |
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 31 10:17:09 2015
@author: mje
"""
import mne
from mne.minimum_norm import (apply_inverse_epochs, read_inverse_operator)
from mne.time_frequency import cwt_morlet
import numpy as np
from my_settings import *
# Using the same inverse operator when inspecting single trials... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2447,
3261,
838,
25,
1558,
25,
2931,
1853,
198,
198,
31,
9800,
25,
285,
18015,
198,
37811,
198,
11748,
285,
710,
198,
6738,
285,
710,
13,... | 1.884592 | 1,655 |
import argparse
import json
from pathlib import Path
import pandas as pd
from processing.utils_for_data_writing import perform_processing
if __name__ == '__main__':
main()
| [
11748,
1822,
29572,
198,
11748,
33918,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
7587,
13,
26791,
62,
1640,
62,
7890,
62,
16502,
1330,
1620,
62,
36948,
628,
198,
198,
361,
11593,
36... | 3.232143 | 56 |
#!/usr/bin/env python3
"""
This tool can be used to generate and remove artificial datasets for use during
development.
"""
import logging
import random
import subprocess
import sys
import uuid
from datetime import datetime
# load database connection variables from the environment file
ENV = {}
for line in open('../.... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
1212,
2891,
460,
307,
973,
284,
7716,
290,
4781,
11666,
40522,
329,
779,
1141,
198,
31267,
13,
198,
37811,
198,
198,
11748,
18931,
198,
11748,
4738,
198,
11748,
850,
14... | 1.957851 | 7,687 |
import requests
import os
import linecache
| [
11748,
7007,
198,
11748,
28686,
198,
11748,
1627,
23870,
628,
628
] | 4.181818 | 11 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-01-18 16:42
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1433,
319,
13130,
12,
486,
12,
1507,
1467,
25,
3682,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,... | 2.696429 | 56 |
from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtCore import pyqtSignal
from gui.running_item_widget import Ui_Form
from wizard.vars import defaults
from wizard.tools import log
from wizard.tools import utility as utils
from wizard.prefs.main import prefs
logger = log.pipe_log(__name__)
prefs = prefs()
| [
6738,
9485,
48,
83,
20,
1330,
33734,
54,
312,
11407,
11,
33734,
14055,
11,
33734,
8205,
72,
198,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
12972,
39568,
11712,
282,
198,
198,
6738,
11774,
13,
20270,
62,
9186,
62,
42655,
... | 2.916667 | 108 |
# The MIT License (MIT)
#
# Copyright (c) 2016 Maeve Kennedy
#
# 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, m... | [
198,
198,
2,
383,
17168,
13789,
357,
36393,
8,
198,
2,
198,
2,
15069,
357,
66,
8,
1584,
34673,
303,
10401,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428... | 3.694864 | 331 |
from django import forms
from .models import RestaurantLocation
from .validator import validate_category
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
764,
27530,
1330,
26078,
14749,
198,
6738,
764,
12102,
1352,
1330,
26571,
62,
22872,
628,
198
] | 4.652174 | 23 |
class TypeDescriptionProviderAttribute(Attribute, _Attribute):
"""
Specifies the custom type description provider for a class. This class cannot be inherited.
TypeDescriptionProviderAttribute(typeName: str)
TypeDescriptionProviderAttribute(type: Type)
"""
def __init__(self, *args):
... | [
4871,
5994,
11828,
29495,
33682,
7,
33682,
11,
4808,
33682,
2599,
201,
198,
220,
220,
220,
37227,
201,
198,
18291,
6945,
262,
2183,
2099,
6764,
10131,
329,
257,
1398,
13,
770,
1398,
2314,
307,
19552,
13,
201,
198,
201,
198,
220,
201,
... | 2.748538 | 342 |
# Copyright 2017,2018 IBM Corp.
#
# 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 agr... | [
2,
15069,
2177,
11,
7908,
19764,
11421,
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,
220,
407,
779,
428,
2393,
2845,
287,
11846... | 3.266055 | 218 |
# This program counts from 0 to 9
counter = 0
while counter < 10:
print(counter)
counter = counter + 1
print("All done!") | [
2,
770,
1430,
9853,
422,
657,
284,
860,
198,
198,
24588,
796,
657,
198,
4514,
3753,
1279,
838,
25,
198,
220,
220,
220,
3601,
7,
24588,
8,
198,
220,
220,
220,
3753,
796,
3753,
1343,
352,
198,
4798,
7203,
3237,
1760,
2474,
8
] | 3.023256 | 43 |
# -*- coding: utf-8 -*-
"""Test error handling."""
import frost.error
import flask
import werkzeug.exceptions
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
14402,
4049,
9041,
526,
15931,
198,
198,
11748,
21682,
13,
18224,
198,
11748,
42903,
198,
11748,
266,
9587,
2736,
1018,
13,
1069,
11755,
628,
628,
198
] | 2.804878 | 41 |
# coding: utf-8
# # Programm for generating fragmentation diagrams in mass spectrometry
# ## Function filtering data from .csv file - returns plottable pandas documents
# In[1]:
# ## Function plotting the final pandas documents and saving copies
# In[2]:
# ### main imports
# In[3]:
import os
import time
... | [
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
1303,
6118,
76,
329,
15453,
42965,
37067,
287,
2347,
5444,
398,
11973,
198,
198,
2,
22492,
15553,
25431,
1366,
422,
764,
40664,
2393,
532,
5860,
458,
1252,
540,
19798,
292,
4963,
198... | 2.943844 | 463 |
import glob
import os
import shutil
import configuration
if __name__ == "__main__":
print("start")
MAHNOB_HCI()
print("end")
| [
11748,
15095,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
11748,
8398,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
3601,
7203,
9688,
4943,
628,
220,
220,
220,
8779,
39,
45,
9864,... | 2.636364 | 55 |
import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
| [
11748,
28686,
201,
198,
11748,
25064,
201,
198,
201,
198,
17597,
13,
6978,
13,
28463,
7,
16,
11,
28686,
13,
6978,
13,
22179,
7,
17597,
13,
6978,
58,
15,
4357,
705,
492,
6,
4008,
201,
198,
201
] | 2.135135 | 37 |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
2,
15069,
12131,
3012,
11419,
198,
2,
220,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743... | 3.777143 | 175 |
import sys
import re
lines = open(sys.argv[1], 'r')
for line in lines:
line = line.replace('\n', '').replace('\r', '')
if len(line) > 0:
print(len([m.start() for m in re.finditer('(?=<--<<|>>-->)', line)]))
lines.close()
| [
11748,
25064,
201,
198,
11748,
302,
201,
198,
6615,
796,
1280,
7,
17597,
13,
853,
85,
58,
16,
4357,
705,
81,
11537,
201,
198,
1640,
1627,
287,
3951,
25,
201,
198,
220,
220,
220,
1627,
796,
1627,
13,
33491,
10786,
59,
77,
3256,
101... | 2.166667 | 114 |
import cloudscraper
import requests
import os
import csv
from bs4 import BeautifulSoup
# https://www.geeksforgeeks.org/implementing-web-scraping-python-beautiful-soup/
# create a cloudscraper instance
scraper = cloudscraper.create_scraper()
base_url = 'https://www.fanfiction.net/'
# urls = ['https://www.fanfiction.... | [
11748,
6279,
1416,
38545,
198,
11748,
7007,
198,
11748,
28686,
198,
11748,
269,
21370,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
2,
3740,
1378,
2503,
13,
469,
2573,
30293,
2573,
13,
2398,
14,
320,
26908,
278,
12,
12384... | 2.03569 | 1,457 |
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
2,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
... | 2.917293 | 798 |
#!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
import glob
import os
import shutil
from os import path
from setuptools import find_packages, setup
from typing import List
import torch
from torch.utils.cpp_extension import CUDA_HOME, CppExtension, CUDAExtension
torch_ver = [int(x) for x in to... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
28686,
1330,
3108,
198,
6738,
900,
37623,
... | 2.430808 | 1,980 |
SLICES_RES=[[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [0], [0], [0], [0], [0], [], [], [], [], [], [0, 1], [0], [0], [0], [0, 1], [], [], [], [], [], [0, 1, 2], [0, 2], [0], [0], [0,... | [
8634,
34444,
62,
19535,
28,
30109,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
4357,
685,
... | 1.766407 | 6,674 |
from .plane_wave import PlaneWave
from .anisotropic_scattering import AnisotropicScattering
from .isotropic_scattering import IsotropicScattering
from .util import save_field, errornorm, norm
| [
6738,
764,
14382,
62,
19204,
1330,
36829,
39709,
198,
6738,
764,
272,
271,
46084,
62,
1416,
16475,
1330,
1052,
271,
46084,
3351,
16475,
198,
6738,
764,
271,
46084,
62,
1416,
16475,
1330,
1148,
46084,
3351,
16475,
198,
6738,
764,
22602,
... | 3.764706 | 51 |
import json
import logging
import boto3
from typing import Dict, Any, Optional, Tuple
logger = logging.getLogger(__name__)
| [
11748,
33918,
198,
11748,
18931,
198,
11748,
275,
2069,
18,
198,
6738,
19720,
1330,
360,
713,
11,
4377,
11,
32233,
11,
309,
29291,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628
] | 3.205128 | 39 |
#!/usr/bin/env python3
import amino
import os
import getpass
os.system('clear')
print("\033[1;32m ______ __ __ ")
print("\033[1;32m| \ | \ | \ ")
print("\033[1;32m \$$$$$$ _______ __ __ \$$ _| $$_ ______ ")
print("\033[1;32m | $$ ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
23206,
198,
11748,
28686,
198,
11748,
651,
6603,
198,
418,
13,
10057,
10786,
20063,
11537,
198,
4798,
7203,
59,
44427,
58,
16,
26,
2624,
76,
44435,
220,
220,
220,
220,
220,
... | 1.665766 | 3,701 |
"""Functions used repeatedly to improve the convenience and readability of source code are described here."""
from colors import color
from typing import Any
from typing import AnyStr
from typing import List
from typing import NoReturn
def colored_print(msg: Any, colorname: str, end='\n') -> NoReturn:
"""
Ap... | [
37811,
24629,
2733,
973,
7830,
284,
2987,
262,
15607,
290,
1100,
1799,
286,
2723,
2438,
389,
3417,
994,
526,
15931,
198,
198,
6738,
7577,
1330,
3124,
198,
6738,
19720,
1330,
4377,
198,
6738,
19720,
1330,
4377,
13290,
198,
6738,
19720,
1... | 2.406977 | 1,032 |
from model import *
from data import *
#os.environ["CUDA_VISIBLE_DEVICES"] = "0"
from PIL import Image
from resizeimage import resizeimage
from skimage import color
from skimage import io
import cv2
from matplotlib import pyplot as plt
import numpy as np
import glob
from array import array
import statistics
from split... | [
6738,
2746,
1330,
1635,
198,
6738,
1366,
1330,
1635,
198,
198,
2,
418,
13,
268,
2268,
14692,
43633,
5631,
62,
29817,
34563,
62,
39345,
34444,
8973,
796,
366,
15,
1,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
47558,
9060,
1330,
47558... | 2.216249 | 1,637 |
__all__ = ['PythonModulesPanel']
from kivy.factory import Factory as F
from kivy.properties import StringProperty, ObjectProperty
from kivy.clock import Clock
from kivy.lang import Builder
from ncis_inspector.controller import ctl
from functools import partial
Builder.load_string('''
<PythonModuleEntry@ButtonBehavio... | [
834,
439,
834,
796,
37250,
37906,
5841,
5028,
26639,
20520,
198,
198,
6738,
479,
452,
88,
13,
69,
9548,
1330,
19239,
355,
376,
198,
6738,
479,
452,
88,
13,
48310,
1330,
10903,
21746,
11,
9515,
21746,
198,
6738,
479,
452,
88,
13,
157... | 2.043564 | 505 |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
13130,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 3.704225 | 213 |
# coding=utf-8
"""
create by pymu
on 2020/12/31
at 9:37
使用EQ开发示例:
"""
from sherry.view.activity.activity_welcome import WelcomeActivity
| [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
220,
220,
220,
2251,
416,
279,
4948,
84,
198,
220,
220,
220,
319,
12131,
14,
1065,
14,
3132,
198,
220,
220,
220,
379,
860,
25,
2718,
198,
220,
220,
220,
220,
45635,
18796,
101,
36,
4... | 1.974359 | 78 |
import numpy as np
from numba import njit
from mchap.assemble.prior import log_genotype_prior
from mchap.jitutils import random_choice, normalise_log_probs
from .utils import allelic_dosage, count_allele
from .likelihood import log_likelihood_alleles, log_likelihood_alleles_cached
from .prior import log_genotype_alle... | [
11748,
299,
32152,
355,
45941,
198,
6738,
997,
7012,
1330,
299,
45051,
198,
198,
6738,
285,
354,
499,
13,
292,
15140,
13,
3448,
273,
1330,
2604,
62,
5235,
8690,
62,
3448,
273,
198,
6738,
285,
354,
499,
13,
45051,
26791,
1330,
4738,
... | 2.222241 | 6,016 |
from .draw import new_drawer
from .format import new_formatter
from .meta import DESCRIPTION as __doc__, VERSION as __version__
__all__ = ["new_drawer", "new_formatter"]
| [
6738,
764,
19334,
1330,
649,
62,
19334,
263,
198,
6738,
764,
18982,
1330,
649,
62,
687,
1436,
198,
6738,
764,
28961,
1330,
22196,
40165,
355,
11593,
15390,
834,
11,
44156,
2849,
355,
11593,
9641,
834,
198,
198,
834,
439,
834,
796,
146... | 3.166667 | 54 |
from numbers import Number
import numpy as onp
from numpy.testing import assert_allclose
import pytest
import scipy.special as osp_special
import scipy.stats as osp_stats
from jax import grad, jacobian, jit, lax, random, vmap
import jax.numpy as np
from jax.scipy.special import expit
from jax.util import partial
fro... | [
6738,
3146,
1330,
7913,
198,
198,
11748,
299,
32152,
355,
319,
79,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
439,
19836,
198,
11748,
12972,
9288,
198,
11748,
629,
541,
88,
13,
20887,
355,
267,
2777,
62,
20887,
198,
11748,
629,... | 1.929563 | 1,945 |
from setuptools import setup
with open('README.md', 'r') as f:
readme = f.read()
setup(
name='s3_uri_to_url',
description='s3_uri_to_url - Convert S3 URI to URL',
long_description=readme,
long_description_content_type='text/markdown',
version='0.1.2',
author='Daniel Ron',
author_email=... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
3256,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
1100,
1326,
796,
277,
13,
961,
3419,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
116... | 2.179487 | 312 |
#
# compile_usx_test_py.py [version 1.0]
#
# This is script which compiles Python interface to
# test of usleep calls (usx_test_py.cpp).
#
# read more on: www.orange-engineer.com
#
# (c) Jacek Pierzchlewski, 2017 jacek@pierzchlewski.com
# license: BSD-2-Clause.
#
from distutils.core import setup, Extension
usx_test =... | [
2,
198,
2,
17632,
62,
385,
87,
62,
9288,
62,
9078,
13,
9078,
685,
9641,
352,
13,
15,
60,
198,
2,
198,
2,
770,
318,
4226,
543,
552,
2915,
11361,
7071,
284,
198,
2,
1332,
286,
514,
8892,
3848,
357,
385,
87,
62,
9288,
62,
9078,
... | 2.546392 | 194 |
# Copyright (C) 2017-2020 Trent Houliston <trent@houliston.me>
#
# 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, mod... | [
2,
15069,
357,
34,
8,
2177,
12,
42334,
24269,
367,
2852,
36363,
1279,
83,
1156,
31,
71,
2852,
36363,
13,
1326,
29,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
286,
428,
... | 3.699717 | 353 |
# Generated by Django 3.1.4 on 2020-12-14 17:44
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
19,
319,
12131,
12,
1065,
12,
1415,
1596,
25,
2598,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
"""
Initialization file for search library module.
Note that searches are on the local DB. To call the Twitter Search API,
see lib/twitter/search.py script.
"""
| [
37811,
198,
24243,
1634,
2393,
329,
2989,
5888,
8265,
13,
198,
198,
6425,
326,
15455,
389,
319,
262,
1957,
20137,
13,
1675,
869,
262,
3009,
11140,
7824,
11,
198,
3826,
9195,
14,
6956,
14,
12947,
13,
9078,
4226,
13,
198,
37811,
198
] | 3.857143 | 42 |
import os
import subprocess
from termcolor import cprint as print
from ...tools.hooksmanager import hooksManager
from ...tools.configuration import ConfigurationTool
from ...tools.spinner import Spinner
from .ideploymentaction import IDeploymentAction
from ...enums import EnvironmentType, HookTypes
class ZappaDeplo... | [
11748,
28686,
198,
11748,
850,
14681,
198,
198,
6738,
3381,
8043,
1330,
269,
4798,
355,
3601,
198,
198,
6738,
2644,
31391,
13,
25480,
82,
37153,
1330,
26569,
13511,
198,
6738,
2644,
31391,
13,
11250,
3924,
1330,
28373,
25391,
198,
6738,
... | 2.829553 | 1,455 |
# -*- coding: utf-8 -*-
from setuptools import setup
from io import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="migrate-anything",
entry_points={"console_scripts": ["migrate-a... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
33245,
1330,
1280,
198,
6738,
28686,
1330,
3108,
198,
198,
1456,
796,
3108,
13,
397,
2777,
776,
7,
6978,
13,
15908,
3672,... | 2.587891 | 512 |
from MinkowskiEngine import SparseTensor
import numpy as np
import torch
from configs.common import DEBUG_CFG, DIM_PARSE
#OBJ_REP = DIM_PARSE.OBJ_REP
from tools.debug_utils import _show_3d_points_bboxes_ls, _show_lines_ls_points_ls
from tools.visual_utils import _show_3d_points_objs_ls, _show_objs_ls_points_ls
def ... | [
6738,
337,
676,
12079,
13798,
1330,
1338,
17208,
51,
22854,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
198,
6738,
4566,
82,
13,
11321,
1330,
16959,
62,
22495,
38,
11,
360,
3955,
62,
27082,
5188,
198,
2,
9864,
41,
62,
... | 2.061096 | 1,113 |
import sqlite3
conn = sqlite3.connect('databasesql.db')
cursor = conn.cursor()
| [
11748,
44161,
578,
18,
198,
198,
37043,
796,
44161,
578,
18,
13,
8443,
10786,
19608,
18826,
13976,
13,
9945,
11537,
198,
66,
21471,
796,
48260,
13,
66,
21471,
3419,
628
] | 2.7 | 30 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import cv_bridge
from jsk_topic_tools import ConnectionBasedTransport
import rospy
from sensor_msgs.msg import Image
if __name__ == '__main__':
rospy.init_node('image_to_label')
img2label = ImageToLabel()
rospy.spin()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
269,
85,
62,
9458,
198,
6738,
474,
8135,
62,
26652,
62,
31391,
1... | 2.542373 | 118 |
'''
lec 6
'''
for letter in ['a', 'b', 'c']:
print(letter)
demo_str = 'this is my string'
for c in demo_str:
print(c)
for word in demo_str.split():
print(word)
for i in range(5):
print(i)
for i in range(1,5):
print(i)
for i in range(1,5,2):
print(i)
... | [
7061,
6,
198,
293,
66,
718,
198,
7061,
6,
198,
198,
1640,
3850,
287,
37250,
64,
3256,
705,
65,
3256,
705,
66,
6,
5974,
198,
220,
220,
220,
198,
220,
220,
220,
3601,
7,
9291,
8,
198,
220,
220,
220,
220,
198,
9536,
78,
62,
2536,... | 1.814961 | 254 |
from hdbscan import HDBSCAN
import sklearn.datasets as datasets
from plot import bokeh_plot_2d, plot_parallel_coordinates
digits = datasets.load_digits()
data = digits.data
hdb = HDBSCAN(min_cluster_size=15).fit(data)
bokeh_plot_2d(data, labels=hdb.labels_, probabilities=hdb.probabilities_, algorithm='pca')
#plot_pa... | [
6738,
289,
9945,
35836,
1330,
5572,
4462,
44565,
198,
11748,
1341,
35720,
13,
19608,
292,
1039,
355,
40522,
198,
198,
6738,
7110,
1330,
1489,
365,
71,
62,
29487,
62,
17,
67,
11,
7110,
62,
1845,
29363,
62,
37652,
17540,
198,
198,
12894... | 2.652778 | 144 |
from submission import Submission | [
6738,
14498,
1330,
42641
] | 8.25 | 4 |
execfile('izhiGUI.py')
| [
18558,
7753,
10786,
528,
5303,
40156,
13,
9078,
11537,
198
] | 2.3 | 10 |
from flask import Flask, request
from werkzeug import Response
from examples import logsetup
from flaat.flask import Flaat
from flaat.requirements import HasAARCEntitlement, HasGroup, ValidLogin
logger = logsetup.setup_logging()
##########
## Basic config
# FLASK
app = Flask(__name__)
# FLAAT
flaat = Flaat()
flaat... | [
6738,
42903,
1330,
46947,
11,
2581,
198,
6738,
266,
9587,
2736,
1018,
1330,
18261,
198,
198,
6738,
6096,
1330,
2604,
40406,
198,
6738,
781,
64,
265,
13,
2704,
2093,
1330,
22026,
265,
198,
6738,
781,
64,
265,
13,
8897,
18883,
1330,
787... | 2.074495 | 1,584 |
import argparse
from cefevent import CEFSender, CEFEvent
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='CEF builder and replayer')
parser.add_argument('files', metavar='DEFINITION_FILE', type=str,
nargs='+', help='an file containing event definitions')
pars... | [
11748,
1822,
29572,
198,
6738,
269,
891,
15596,
1330,
18671,
10652,
2194,
11,
18671,
37,
9237,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
... | 2.603226 | 310 |
# Copyright (c) 2019, Moritz E. Beber.
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
2,
15069,
357,
66,
8,
13130,
11,
3461,
4224,
412,
13,
1355,
527,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
3... | 2.581912 | 2,521 |
"""Check if Stieltjes method, both analytical and discretized works as expected."""
import numpy
import numpoly
import chaospy
def test_analytical_stieltjes(analytical_distribution):
"""Assert that Analytical Stieltjes produces orthogonality."""
coeffs, [orth], norms = chaospy.analytical_stieltjes(
or... | [
37811,
9787,
611,
520,
72,
2120,
73,
274,
2446,
11,
1111,
30063,
290,
1221,
1186,
1143,
2499,
355,
2938,
526,
15931,
198,
11748,
299,
32152,
198,
11748,
299,
931,
3366,
198,
11748,
17792,
2117,
88,
628,
198,
4299,
1332,
62,
38200,
228... | 2.599581 | 477 |
import numpy as np
import prob as pr
import bhvs as bv
import analysis as alys
# P = bv.ThreePDstrb()
P = bv.FourPDstrb()
P = pr.marginal(P, 3)
print('Initial distr:')
pr.PrintThreePDstrb(P)
print() # new line
# compute `iter` steps towards the uniform distribution
iter = 100
uniform = bv.ThreePNoise2_()
alys.testIn... | [
11748,
299,
32152,
355,
45941,
198,
11748,
1861,
355,
778,
198,
11748,
275,
71,
14259,
355,
275,
85,
198,
11748,
3781,
355,
257,
27385,
198,
198,
2,
350,
796,
275,
85,
13,
12510,
5760,
2536,
65,
3419,
198,
47,
796,
275,
85,
13,
15... | 2.681818 | 132 |
import tensorflow as tf
from active_learning_ts.query_selection.query_sampler import QuerySampler
| [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
4075,
62,
40684,
62,
912,
13,
22766,
62,
49283,
13,
22766,
62,
37687,
20053,
1330,
43301,
16305,
20053,
628
] | 3.571429 | 28 |
#!/usr/bin/env python
"""
<Program Name>
test_util.py
<Author>
Konstantin Andrianov.
<Started>
February 1, 2013.
<Copyright>
See LICENSE for licensing information.
<Purpose>
Unit test for 'util.py'
"""
# Help with Python 3 compatibility, where the print statement is a function, an
# implicit relative im... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
27,
15167,
6530,
29,
198,
220,
1332,
62,
22602,
13,
9078,
198,
198,
27,
13838,
29,
198,
220,
17431,
18797,
259,
843,
4484,
709,
13,
198,
198,
27,
10434,
276,
29,
1... | 3.157718 | 298 |
# ------------------------------------------------------------------------------
# test_database.py - Database modul tests
#
# November 2015, Phil Connell
# ------------------------------------------------------------------------------
"""Database tests."""
__all__ = ()
import unittest
from .. import database
cl... | [
2,
16529,
26171,
198,
2,
1332,
62,
48806,
13,
9078,
532,
24047,
953,
377,
5254,
198,
2,
198,
2,
3389,
1853,
11,
4543,
1482,
10076,
198,
2,
16529,
26171,
198,
198,
37811,
38105,
5254,
526,
15931,
198,
198,
834,
439,
834,
796,
7499,
... | 2.419285 | 1,846 |
"""Classes for writing ISC configuration files."""
def _write_indent(fh, indent):
"""Write whitespace to file.
Args:
fh: (file) file object
indent: (int) number of tabs ('\t') to be written
"""
for i in range(0, indent):
fh.write('\t')
class _Conf(object):
"""Base class ... | [
37811,
9487,
274,
329,
3597,
3180,
34,
8398,
3696,
526,
15931,
198,
198,
4299,
4808,
13564,
62,
521,
298,
7,
69,
71,
11,
33793,
2599,
198,
220,
220,
220,
37227,
16594,
13216,
10223,
284,
2393,
13,
628,
220,
220,
220,
943,
14542,
25,... | 2.266514 | 2,619 |
data = (
'Di ', # 0x00
'Zhuang ', # 0x01
'Le ', # 0x02
'Lang ', # 0x03
'Chen ', # 0x04
'Cong ', # 0x05
'Li ', # 0x06
'Xiu ', # 0x07
'Qing ', # 0x08
'Shuang ', # 0x09
'Fan ', # 0x0a
'Tong ', # 0x0b
'Guan ', # 0x0c
'Ji ', # 0x0d
'Suo ', # 0x0e
'Lei ', # 0x0f
'Lu ', # 0x1... | [
7890,
796,
357,
198,
6,
18683,
46083,
220,
220,
220,
1303,
657,
87,
405,
198,
6,
57,
13415,
648,
46083,
220,
220,
220,
1303,
657,
87,
486,
198,
6,
3123,
46083,
220,
220,
220,
1303,
657,
87,
2999,
198,
6,
43,
648,
46083,
220,
220... | 1.519012 | 3,077 |
#!/usr/bin/python
# pylint: disable-msg=E1101
# a script that receives xmpp messages for an app engine app
# and forwards them to the app, which must have a route
# exposed at /_ah/xmpp/message/chat/ to receive them
# usage is ./xmpp_receiver.py appname login_ip app-password
# General-purpose Python libraries
impor... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
279,
2645,
600,
25,
15560,
12,
19662,
28,
36,
1157,
486,
198,
198,
2,
257,
4226,
326,
11583,
2124,
76,
381,
6218,
329,
281,
598,
3113,
598,
198,
2,
290,
22052,
606,
284,
262,
598,
11... | 2.714408 | 2,332 |
#__all__ = ['py_smalloc']
| [
2,
834,
439,
834,
796,
37250,
9078,
62,
17470,
420,
20520,
198
] | 2.166667 | 12 |
# Influenced majorly by Codewouter and CI Boutique Ado Tutorial#
from django.shortcuts import render, get_object_or_404, redirect
from menu.models import Menu
from .models import Feedback
from .forms import FeedbackForm
# Create your views here.
def view_feedback(request, menu_id):
""""
Gets specific menu a... | [
2,
46631,
5864,
1688,
306,
416,
18720,
413,
39605,
290,
14514,
40808,
2350,
1215,
78,
36361,
2,
198,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
6859,
13,
27530,... | 2.948357 | 213 |
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# 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... | [
2,
15069,
13130,
4946,
8090,
47061,
5693,
11,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.509294 | 269 |
# Import standard library
import random
from math import sqrt
from typing import Tuple
# Import modules
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib as mpl
import numpy as np
import seagull as sg
import seagull.lifeforms as lf
import streamlit as st
from loguru import logger
from scipy.... | [
2,
17267,
3210,
5888,
198,
11748,
4738,
198,
6738,
10688,
1330,
19862,
17034,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
2,
17267,
13103,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13... | 2.117724 | 2,285 |
from urllib import urlencode
from urllib2 import urlopen
from geopy import util
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
from django.utils import simplejson as json
from geopy.geocoders.base import Geocoder
| [
6738,
2956,
297,
571,
1330,
2956,
11925,
8189,
198,
6738,
2956,
297,
571,
17,
1330,
19016,
9654,
198,
6738,
4903,
11081,
1330,
7736,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
33918,
198,
16341,
17267,
12331,
25,
198,
220,
220,
22... | 2.84 | 100 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Produce shapefile for block groups that are contained in urban areas.
Data can be downloaded here:
https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2015&layergroup=Block+Groups
"""
# Import modules
import geopandas as gpd
import os
import glob
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
198,
11547,
344,
5485,
7753,
329,
2512,
2628,
326,
389,
7763,
287,
7876,
3006,
13,
198,
198,
6601,
46... | 2.229189 | 925 |
#!/usr/bin/env pyhton
'''Script that runs EBV in parallel using STAN.'''
import sys,os,string
from numpy import *
import pickle
import time
import priors
import pystan
import config
#import LMCMCMC
import EBV
import make_stan_model
import bspline2
from scipy.interpolate import splrep,splev
if len(sys.argv) < 2:
p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
12972,
71,
1122,
198,
198,
7061,
6,
7391,
326,
4539,
43374,
53,
287,
10730,
1262,
3563,
1565,
2637,
7061,
198,
198,
11748,
25064,
11,
418,
11,
8841,
198,
6738,
299,
32152,
1330,
1635,
198,
11748,
... | 1.958136 | 2,317 |
escreva('Bruno')
| [
198,
3798,
260,
6862,
10786,
33,
5143,
78,
11537,
198
] | 1.8 | 10 |
import binaryninja as bn
from .CryptoScan import CryptoScan
| [
11748,
13934,
35073,
6592,
355,
275,
77,
198,
6738,
764,
23919,
78,
33351,
1330,
36579,
33351,
628
] | 3.588235 | 17 |
#!/usr/bin/env python
# Filename: plot_accuracies
"""
introduction: plot accuracies of the results, including Receiver Operating Characteristic (ROC),
and Precision-Recall
authors: Huang Lingcao
email:huanglingcao@gmail.com
add time: 31 Dec, 2018
"""
import os, sys
from optparse import OptionParser
impo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
7066,
12453,
25,
7110,
62,
4134,
333,
13433,
198,
37811,
198,
27427,
596,
25,
7110,
4431,
13433,
286,
262,
2482,
11,
1390,
39106,
24850,
15684,
2569,
357,
49,
4503,
828,
198,
220,
... | 2.259332 | 5,117 |
from flask import Blueprint, redirect, render_template
mod_hello = Blueprint("mod_hello", __name__, template_folder="templates")
@mod_hello.route("/")
| [
6738,
42903,
1330,
39932,
11,
18941,
11,
8543,
62,
28243,
198,
198,
4666,
62,
31373,
796,
39932,
7203,
4666,
62,
31373,
1600,
11593,
3672,
834,
11,
11055,
62,
43551,
2625,
11498,
17041,
4943,
628,
198,
31,
4666,
62,
31373,
13,
38629,
... | 3.422222 | 45 |
#!/usr/bin/env python
import unittest
import os
from osdf import OSDF
if __name__ == "__main__":
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
555,
715,
395,
198,
11748,
28686,
198,
6738,
28686,
7568,
1330,
7294,
8068,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,... | 2.553191 | 47 |
# -*- coding: utf-8 -*-
import tensorflow as tf
from tensorflow import keras
if __name__ == "__main__":
save_model("/home/liuyekuan/workspace/mine/AlphaZero-Renju/cpp/py/1")
# load_model("/home/liuyekuan/workspace/mine/AlphaZero-Renju/cpp/py/1")
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
1330,
41927,
292,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
2... | 2.354545 | 110 |
#!/usr/bin/python3
import csv
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
201,
198,
201,
198,
11748,
269,
21370,
201,
198
] | 2 | 17 |
import socket
import os
from nmeaserver import formatter
import time
from datetime import datetime, date
import threading
import logging
import signal
logger = logging.getLogger(__name__)
signal.signal(signal.SIGINT, signal.SIG_DFL)
# global buoy object 'buoy' holds light buoy state | [
11748,
17802,
198,
11748,
28686,
198,
6738,
299,
1326,
6005,
332,
1330,
1296,
1436,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
3128,
198,
11748,
4704,
278,
198,
11748,
18931,
198,
11748,
6737,
198,
198,
6404,
1362,
79... | 3.275862 | 87 |
import numpy as np | [
11748,
299,
32152,
355,
45941
] | 3.6 | 5 |
from lark import Lark, UnexpectedToken
from opus.lang.parser import parser
import pytest
from pathlib import Path
| [
6738,
300,
668,
1330,
406,
668,
11,
471,
42072,
30642,
198,
6738,
1034,
385,
13,
17204,
13,
48610,
1330,
30751,
198,
11748,
12972,
9288,
198,
6738,
3108,
8019,
1330,
10644,
628,
628,
628,
198
] | 3.529412 | 34 |
#
# locality.py
#
# This source file is part of the FoundationDB open source project
#
# Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of t... | [
2,
198,
2,
48036,
13,
9078,
198,
2,
198,
2,
770,
2723,
2393,
318,
636,
286,
262,
5693,
11012,
1280,
2723,
1628,
198,
2,
198,
2,
15069,
2211,
12,
7908,
4196,
3457,
13,
290,
262,
5693,
11012,
1628,
7035,
198,
2,
198,
2,
49962,
739... | 3.706612 | 242 |
node1 = Node('A')
node2 = Node('B')
node3 = Node('C')
node4 = Node('D')
node5 = Node('E')
node6 = Node('F')
node7 = Node('G')
edge1 = Edge(5, node1, node2)
edge2 = Edge(9, node1, node5)
edge3 = Edge(4, node2, node5)
edge4 = Edge(12, node2, node3)
edge5 = Edge(7, node2, node4)
edge6 = Edge(3, node3, node4)
edge7 = ... | [
628,
198,
198,
17440,
16,
796,
19081,
10786,
32,
11537,
198,
17440,
17,
796,
19081,
10786,
33,
11537,
198,
17440,
18,
796,
19081,
10786,
34,
11537,
198,
17440,
19,
796,
19081,
10786,
35,
11537,
198,
17440,
20,
796,
19081,
10786,
36,
1... | 2.283302 | 533 |
#
# This file is part of LiteX-Boards.
#
# Copyright (c) 2019-2020 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform, VivadoProgrammer
# IOs -----------------------------------------------------... | [
2,
198,
2,
770,
2393,
318,
636,
286,
27395,
55,
12,
16635,
1371,
13,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
12,
42334,
23347,
429,
17337,
3876,
8344,
1279,
2704,
382,
429,
31,
268,
2633,
12,
34725,
13,
8310,
29,
198,
2,
30628... | 2.037193 | 1,667 |
from unittest.mock import patch
from django.core.management import call_command
from django.db.utils import OperationalError
from django.test import TestCase
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
869,
62,
21812,
198,
6738,
42625,
14208,
13,
9945,
13,
26791,
1330,
6564,
864,
12331,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208... | 3.636364 | 44 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from mock import Mock
from regparser.notice.amdparser import Amendment
from regparser.notice.amendments import fetch, section, subpart
from regparser.test_utils.xml_builder import XMLBuilder
from regparser.tree.xml_parser.preprocessors impo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
12972,
9288,
198,
6738,
15290,
1330,
44123,
198,
198,
6738,
842,
48610,
13,
42138,
13,
321,
... | 2.419549 | 665 |
import cv
import sys
import math
import curses
import signal
stdscr = curses.initscr()
signal.signal(signal.SIGINT, signal_handler)
width = int(sys.argv[1]) if len(sys.argv) > 1 else 50
# cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(0)
# Initialize colors and palette
palette = [' ', '.', '.', '/', 'c', '... | [
11748,
269,
85,
198,
11748,
25064,
198,
11748,
10688,
198,
11748,
43878,
198,
11748,
6737,
198,
198,
19282,
1416,
81,
796,
43878,
13,
259,
896,
6098,
3419,
198,
198,
12683,
282,
13,
12683,
282,
7,
12683,
282,
13,
50,
3528,
12394,
11,
... | 1.951249 | 841 |
import os
configs = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'production': ProductionConfig
}
| [
11748,
28686,
628,
628,
628,
198,
11250,
82,
796,
1391,
198,
220,
220,
220,
705,
31267,
10354,
7712,
16934,
11,
198,
220,
220,
220,
705,
33407,
10354,
23983,
16934,
11,
198,
220,
220,
220,
705,
25493,
10354,
19174,
16934,
198,
92,
198... | 3.166667 | 42 |
from gi.repository import Gtk
import BuilderObject, PillData, PillEdit
| [
6738,
308,
72,
13,
260,
1930,
37765,
1330,
402,
30488,
198,
11748,
35869,
10267,
11,
19770,
6601,
11,
19770,
18378,
198
] | 3.380952 | 21 |
import requests
import typing as t
from datetime import datetime
from .auth import auth, refresh
class StravaAuth(requests.auth.AuthBase):
"""AuthBase class adding the `access_token` Bearer Auth to a request."""
| [
11748,
7007,
198,
11748,
19720,
355,
256,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
764,
18439,
1330,
6284,
11,
14976,
628,
198,
4871,
520,
4108,
64,
30515,
7,
8897,
3558,
13,
18439,
13,
30515,
14881,
2599,
198,
22... | 3.453125 | 64 |
# -*- coding: utf-8 -*-
"""AutoML_AutoSklearn.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ykYX4EDuWeMKS91YVIxHNmBfGUYRclDa
# Auto Sklearn
## Installing
- NOTE: -
WINDOWS
- auto-sklearn relies heavily on the Python module resource. resourc... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
27722,
5805,
62,
27722,
15739,
35720,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
... | 2.754356 | 1,779 |