content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Borrowed from https://keras.io/examples/timeseries/timeseries_anomaly_detection/
# Expanded to include KFP by M Tanenbaum, D2iQ - Github: @tbaums
import numpy as np
import pandas as pd
from tensorflow import keras
from tensorflow.keras import layers
from typing import NamedTuple
import kfp.components as components
... | [
2,
347,
6254,
276,
422,
3740,
1378,
6122,
292,
13,
952,
14,
1069,
12629,
14,
22355,
10640,
14,
22355,
10640,
62,
272,
24335,
62,
15255,
3213,
14,
198,
2,
5518,
12249,
284,
2291,
509,
5837,
416,
337,
11818,
268,
24738,
11,
360,
17,
... | 2.908654 | 208 |
import numpy as np
from numpy_functions import numpy_chi2_v3
MAG_ZEROPOINT = 18.
file_1 = "test_1000.txt"
data_1 = np.loadtxt(file_1, unpack=True)
time = data_1[0]
obs_flux = np.power(10., -0.4 * (data_1[1] - MAG_ZEROPOINT))
obs_flux_err = data_1[2] * obs_flux * 0.4 * np.log(10.)
t_0 = 2456900.
u_0 = 0.01
t_E = 20.... | [
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
62,
12543,
2733,
1330,
299,
32152,
62,
11072,
17,
62,
85,
18,
628,
198,
45820,
62,
57,
1137,
3185,
46,
12394,
796,
1248,
13,
198,
198,
7753,
62,
16,
796,
366,
9288,
62,
12825,
... | 1.969325 | 163 |
__all__ = ['order']
import collections
def order(keys, *args, **kwargs):
"""return OrderedDict ordered by keys"""
inputdict = collections.OrderedDict(*args, **kwargs)
result = _order(keys, inputdict)
for key in inputdict.keys():
result[key] = inputdict[key]
return result
| [
834,
439,
834,
796,
37250,
2875,
20520,
628,
198,
11748,
17268,
628,
198,
198,
4299,
1502,
7,
13083,
11,
1635,
22046,
11,
12429,
46265,
22046,
2599,
198,
220,
220,
220,
37227,
7783,
14230,
1068,
35,
713,
6149,
416,
8251,
37811,
198,
2... | 2.747748 | 111 |
import pyvirtualcam
import cv2
import numpy as np
print('Starting')
capture = cv2.VideoCapture(1+cv2.CAP_DSHOW)
with pyvirtualcam.Camera(width=640, height=480, fps=30) as cam:
print('WebCam initiated')
while True:
return_value, frame = capture.read()
frame = cv2.cvtColor(frame, cv2.... | [
11748,
12972,
32844,
20991,
201,
198,
11748,
269,
85,
17,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
4798,
10786,
22851,
11537,
201,
198,
27144,
495,
796,
269,
85,
17,
13,
10798,
49630,
7,
16,
10,
33967,
17,
13,
33... | 1.875226 | 553 |
from __future__ import unicode_literals
import frappe
from frappe.model.db_query import DatabaseQuery
@frappe.whitelist()
def get_data(rfm=None, rfp=None, por=None,
start=0, sort_by='', sort_order='desc'):
'''Return data to render the item dashboard'''
filters_rfm = []
if rfm:
filters_rfm.append(['name', '=', r... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
5306,
27768,
198,
6738,
5306,
27768,
13,
19849,
13,
9945,
62,
22766,
1330,
24047,
20746,
198,
198,
31,
69,
430,
27768,
13,
1929,
270,
46331,
3419,
198,
4299,
... | 2.306728 | 1,516 |
"""Type definitions."""
from __future__ import annotations
from typing import Optional
from typing_extensions import TypedDict
class AwsLambdaHookDeployResponseTypedDict(TypedDict):
"""Dict output of awslambda.models.response.AwsLambdaHookDeployResponse using aliases."""
CodeSha256: str
Runtime: str
... | [
37811,
6030,
17336,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
19720,
62,
2302,
5736,
1330,
17134,
276,
35,
713,
628,
198,
4871,
5851,
82,
43,
4131,
6814,
39,
566,
49322,
... | 2.924242 | 132 |
#!/usr/bin/env python
"""
MetaWIBELE: interproscan_protein module
Extact functioanl annotation for each peptide from InterProScan results
Copyright (c) 2019 Harvard School of Public Health
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
48526,
54,
9865,
36,
2538,
25,
987,
1676,
35836,
62,
48693,
8265,
198,
11627,
529,
1257,
310,
952,
272,
75,
23025,
329,
1123,
34337,
485,
422,
4225,
2964,
33351,
2482,... | 4.222656 | 512 |
# -*-coding:utf-8-*-
from importlib import import_module, reload
import os
import sys
import time
import shutil
import re
import yaml
from flask_babel import gettext
from apps.app import mdb_sys, cache
from apps.configs.sys_config import PLUG_IN_FOLDER, PLUG_IN_FOLDER_NAME, PLUG_IN_REQUIRED_CONF
__author__ = "Alle... | [
2,
532,
9,
12,
66,
7656,
25,
40477,
12,
23,
12,
9,
12,
198,
6738,
1330,
8019,
1330,
1330,
62,
21412,
11,
18126,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
640,
198,
198,
11748,
4423,
346,
198,
198,
11748,
302,
198,
117... | 1.527144 | 5,213 |
from six.moves.urllib.parse import unquote
from wptserve.utils import isomorphic_decode, isomorphic_encode
| [
6738,
2237,
13,
76,
5241,
13,
333,
297,
571,
13,
29572,
1330,
555,
22708,
198,
198,
6738,
266,
457,
2655,
303,
13,
26791,
1330,
318,
46374,
62,
12501,
1098,
11,
318,
46374,
62,
268,
8189,
198
] | 3 | 36 |
import os
import cv2
import pytesseract
import numpy as np
from PIL import ImageGrab
from .utils import *
# Loading Pytesseract
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files\\Tesseract-OCR\\tesseract.exe' | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
12972,
83,
408,
263,
529,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
48400,
198,
6738,
764,
26791,
1330,
1635,
198,
198,
2,
12320,
9485,
83,
408,
263,
529,
... | 2.595238 | 84 |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
33160,
383,
3012,
4992,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
... | 2.245525 | 11,005 |
"""Top-level package for scholarpy."""
__author__ = """Qiusheng Wu"""
__email__ = "giswqs@gmail.com"
__version__ = "0.1.0"
from .scholarpy import *
from .scholar import *
| [
37811,
9126,
12,
5715,
5301,
329,
5513,
349,
5117,
88,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
48,
3754,
31753,
18027,
37811,
198,
834,
12888,
834,
796,
366,
70,
271,
86,
48382,
31,
14816,
13,
785,
1,
198,
834,
9641,
834,
... | 2.521739 | 69 |
from .BundleTypes.BasicResourceBundle import BasicResourceBundle as ResourceBundle, get_bundle
from .BundleTypes.ListResourceBundle import ListResourceBundle, get_bundle as get_list_bundle
from .util import Locale
__version__ = "1.0.4"
__author__ = "Felix Zenk"
__email__ = "felix.zenk@web.de"
| [
6738,
764,
33,
31249,
31431,
13,
26416,
26198,
33,
31249,
1330,
14392,
26198,
33,
31249,
355,
20857,
33,
31249,
11,
651,
62,
65,
31249,
198,
6738,
764,
33,
31249,
31431,
13,
8053,
26198,
33,
31249,
1330,
7343,
26198,
33,
31249,
11,
65... | 2.920792 | 101 |
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | [
2,
220,
220,
220,
220,
15069,
1584,
11,
17356,
9075,
268,
11,
6920,
1462,
25,
5568,
13,
71,
323,
268,
31,
14816,
13,
785,
198,
2,
198,
2,
220,
220,
220,
220,
2142,
286,
366,
45,
5013,
4914,
1600,
281,
45780,
11361,
17050,
326,
3... | 3.455072 | 345 |
# verze 14.x2
from tkinter import *
import random
# vlastnosti
# konstruktor
# metody
O = Okno()
| [
171,
119,
123,
2,
3326,
2736,
1478,
13,
87,
17,
201,
198,
6738,
256,
74,
3849,
1330,
1635,
201,
198,
11748,
4738,
201,
198,
220,
220,
220,
1303,
410,
12957,
77,
455,
72,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201,
198... | 1.375839 | 149 |
import os
from flask import Flask, request, redirect, url_for, send_file, send_from_directory
from flask_cors import CORS, cross_origin
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = './uploads'
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
app = Flask(__name__)
cors = CORS(app)
... | [
11748,
28686,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
18941,
11,
19016,
62,
1640,
11,
3758,
62,
7753,
11,
3758,
62,
6738,
62,
34945,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
11,
3272,
62,
47103,
198,
6738,
266,
9587,
27... | 2.592784 | 194 |
# -*- coding: utf-8 -*-
from __future__ import print_function, with_statement
from collections import OrderedDict
from contextlib import closing
import datetime
from distutils.version import LooseVersion
from ftplib import FTP, FTP_TLS
from ftplib import all_errors as FTP_ALL_ERRORS
import logging
import os.path
impo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
351,
62,
26090,
198,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
4732,
8019,
1330,
9605,
198,
11748,... | 2.696279 | 1,317 |
"""Scraper for http://whoscored.com."""
import io
import itertools
import json
import random
import re
import time
from datetime import datetime, timedelta
from pathlib import Path
from typing import IO, Dict, Iterable, List, Optional, Tuple, Union
import pandas as pd
from lxml import html
try:
import undetected_... | [
37811,
3351,
38545,
329,
2638,
1378,
1929,
17500,
1850,
13,
785,
526,
15931,
198,
11748,
33245,
198,
11748,
340,
861,
10141,
198,
11748,
33918,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
... | 2.004275 | 10,059 |
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
import io
import unittest as t
from py3tftp.netascii import Netascii
| [
2,
43907,
25,
7400,
11338,
28,
19,
4292,
8658,
6482,
10394,
28,
19,
2705,
8658,
11338,
28,
19,
198,
198,
11748,
33245,
198,
11748,
555,
715,
395,
355,
256,
198,
198,
6738,
12972,
18,
83,
701,
79,
13,
3262,
292,
979,
72,
1330,
3433... | 2.625 | 48 |
#!/usr/bin/env python
# Copyright 2017 The Promenade Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
2177,
383,
10335,
268,
671,
46665,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
77... | 2.962382 | 319 |
import matplotlib
matplotlib.use('Agg')
import mytools
from pylab import *
from neuron import h
import pickle
from os.path import exists
import numpy
import scipy.io
import time
Nmc = 150
rates = [1.0]
seeds = range(1,1000)
cols = ['#666666','#012345','#aa00aa','#bbaa00','#ee6600','#ff0000', '#00aaaa','#772277','#00cc... | [
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
11748,
616,
31391,
198,
6738,
279,
2645,
397,
1330,
1635,
198,
6738,
43164,
1330,
289,
198,
11748,
2298,
293,
198,
6738,
28686,
13,
6978,
1330,
7160,
... | 1.944589 | 2,689 |
from airflow import settings
from airflow.models import Connection
aws_credentials = Connection(
conn_id='aws_credentials',
conn_type='Amazon Web Services',
host='',
login='',
password=''
)
redshift = Connection(
conn_id='redshift',
conn_type='Postgres',
h... | [
6738,
45771,
1330,
6460,
198,
6738,
45771,
13,
27530,
1330,
26923,
198,
8356,
62,
66,
445,
14817,
796,
26923,
7,
198,
220,
220,
220,
220,
220,
220,
220,
48260,
62,
312,
11639,
8356,
62,
66,
445,
14817,
3256,
198,
220,
220,
220,
220,... | 2.304 | 250 |
#
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
#__END__
#__LUW_EXPECTED__
# 1 1982-01-01 1983-02-01
# 2 1982-01-01 1983-02-01
# 3 1982-01-01 1983-02-01
# 4 1982-01-01 1983-02-01
# 5 ... | [
2,
220,
198,
2,
220,
49962,
24310,
532,
14161,
286,
19764,
198,
2,
198,
2,
220,
357,
66,
8,
15069,
19764,
11421,
13,
4343,
12,
11528,
198,
2,
198,
198,
11748,
555,
715,
395,
11,
25064,
198,
11748,
24283,
76,
62,
9945,
198,
11748,
... | 2.055085 | 1,180 |
from paramiko import SSHClient
from paramiko.client import AutoAddPolicy
# Fill in IP, username info, and command to execute
if __name__ == '__main__':
main()
| [
6738,
5772,
12125,
1330,
33825,
11792,
198,
6738,
5772,
12125,
13,
16366,
1330,
11160,
4550,
36727,
628,
198,
2,
27845,
287,
6101,
11,
20579,
7508,
11,
290,
3141,
284,
12260,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
... | 3.408163 | 49 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time, os, json, importlib, tempfile
from importlib import machinery
import wx
import mygraph
import numpy as np
import datetime as dtm
import ilis_noiv
#import ilis_dummy as ilis
from wx.lib.pubsub import pub
import types
# from pympler import muppy
# from pympler... | [
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,
640,
11,
28686,
11,
33918,
11,
1330,
8019,
11,
20218,
7753,
198,
6738,
1330,
8019,
1330,
20230,
198,
11748,... | 2.23157 | 1,153 |
from ..models import *
import datetime
from django.contrib.auth.models import User
| [
6738,
11485,
27530,
1330,
1635,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
628,
198
] | 3.541667 | 24 |
#!/usr/bin/env python
#!/usr/local/bin/python
"""Utilities for downloading and providing data from openslr.org, libriSpeech, Pannous, Gutenberg, WMT, tokenizing, vocabularies."""
# TODO! see https://github.com/pannous/caffe-speech-recognition for some data sources
import os
import re
import sys
import wave
import math... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
48443,
14629,
14,
12001,
14,
8800,
14,
29412,
198,
37811,
18274,
2410,
329,
22023,
290,
4955,
1366,
422,
9808,
14050,
13,
2398,
11,
9195,
380,
5248,
3055,
11,
350,
1236,
516,
11,
... | 2.827613 | 1,282 |
import pdb,sys,os
__all__=['File','KF2','scdiff2','viz2','prerun']
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(dir_path)
for i in __all__:
__import__(i)
| [
11748,
279,
9945,
11,
17597,
11,
418,
198,
198,
834,
439,
834,
28,
17816,
8979,
41707,
42,
37,
17,
41707,
1416,
26069,
17,
41707,
85,
528,
17,
41707,
3866,
5143,
20520,
198,
15908,
62,
6978,
796,
28686,
13,
6978,
13,
15908,
3672,
7,... | 2.204819 | 83 |
'''
Derived network class "MK3" for the neural entropy closure.
Author: Steffen Schotthöfer
Version: 0.0
Date 29.10.2020
'''
from .neuralBase import neuralBase
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow import Tensor
import csv
'''
import pandas as pd
import sphericalquadpy... | [
7061,
6,
198,
28532,
1572,
3127,
1398,
366,
33907,
18,
1,
329,
262,
17019,
40709,
16512,
13,
198,
13838,
25,
2441,
46985,
3059,
313,
400,
9101,
2232,
198,
14815,
25,
657,
13,
15,
198,
10430,
2808,
13,
940,
13,
42334,
198,
7061,
6,
... | 3.089947 | 189 |
from requests import Session
from uuid import uuid4
from json import load
import sys
if len(sys.argv) < 2:
print('uso: python add_team_members.py <configs_json>')
exit(-1)
config_json = load(open(sys.argv[1], 'r', encoding='utf8'))
if 'members' not in config_json or 'bots' not in config_json:
... | [
6738,
7007,
1330,
23575,
201,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
201,
198,
6738,
33918,
1330,
3440,
201,
198,
11748,
25064,
201,
198,
201,
198,
201,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1279,
362,
25,
201,
198,
220,
... | 1.911392 | 1,817 |
# encoding: utf-8
from GlyphsApp import *
from GlyphsApp.plugins import *
from Foundation import NSString
import math
import traceback
from AppKit import NSColor, NSBezierPath
COLOR = 0, 0, 0.9, 0.75
# def background(self, layer):
# try:
# try:
# selection = layer.selection
# except:
# selection = l... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
6738,
27949,
746,
82,
4677,
1330,
1635,
198,
6738,
27949,
746,
82,
4677,
13,
37390,
1330,
1635,
198,
6738,
5693,
1330,
10896,
10100,
198,
11748,
10688,
198,
11748,
12854,
1891,
198,
6738,
2034... | 2.464455 | 422 |
__all__ = ["create_response", "error_response"]
from quart import Response, jsonify
from ..exceptions import GrobberException
| [
834,
439,
834,
796,
14631,
17953,
62,
26209,
1600,
366,
18224,
62,
26209,
8973,
198,
198,
6738,
28176,
1330,
18261,
11,
33918,
1958,
198,
198,
6738,
11485,
1069,
11755,
1330,
10299,
65,
527,
16922,
628,
198
] | 3.611111 | 36 |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TransactionTestCase
from ionyweb.website.models import WebSite
from django.contrib.sites.models import Site
fro... | [
37811,
198,
1212,
2393,
15687,
3597,
5254,
1262,
262,
555,
715,
395,
8265,
13,
2312,
481,
1208,
198,
12518,
345,
1057,
366,
805,
496,
13,
9078,
1332,
1911,
198,
198,
3041,
5372,
428,
351,
517,
5035,
5254,
329,
534,
3586,
13,
198,
37... | 3.767241 | 116 |
##############################################################
# Fixing missmatches in parsing of doccano output
# The script also does not claim to be a reusable solution,
# instead it merely adapts the doccano output files to correspond
# to the entity split style of LitBank.
# Input: pandas dataframe, filename
# Ou... | [
29113,
14468,
7804,
4242,
2235,
198,
2,
13268,
278,
2051,
6759,
2052,
287,
32096,
286,
2205,
35490,
5072,
198,
2,
383,
4226,
635,
857,
407,
1624,
284,
307,
257,
42339,
4610,
11,
198,
2,
2427,
340,
6974,
6068,
82,
262,
2205,
35490,
5... | 1.871254 | 8,676 |
# Generated by Django 3.2.7 on 2021-11-02 10:21
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
22,
319,
33448,
12,
1157,
12,
2999,
838,
25,
2481,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
''' Functions
Summary:
This file contains
Example:
Usage of
Todo:
*
'''
''' Imports '''
# processing for sinton lifetime data
from .sinton_lifetime import process_sinton_lifetime
# processing for sinton lifetime data
from .sinton_suns_voc import process_sinton_suns_voc
# processing for current-vol... | [
198,
7061,
6,
40480,
198,
198,
22093,
25,
198,
220,
220,
220,
770,
2393,
4909,
198,
198,
16281,
25,
198,
220,
220,
220,
29566,
286,
198,
198,
51,
24313,
25,
198,
220,
220,
220,
1635,
198,
7061,
6,
628,
198,
198,
7061,
6,
1846,
3... | 3.217692 | 1,300 |
print(maxProduct([2, -10, -2, -4, 3]))
| [
198,
198,
4798,
7,
9806,
15667,
26933,
17,
11,
532,
940,
11,
532,
17,
11,
532,
19,
11,
513,
60,
4008,
198
] | 1.863636 | 22 |
"""
Contains useful constants.
"""
kmd_auth_header = "X-KMD-API-Token"
"""str: header key for kmd requests"""
algod_auth_header = "X-Algo-API-Token"
"""str: header key for algod requests"""
indexer_auth_header = "X-Indexer-API-Token"
"""str: header key for indexer requests"""
unversioned_paths = ["/health", "/versions... | [
37811,
198,
4264,
1299,
4465,
38491,
13,
198,
37811,
198,
198,
74,
9132,
62,
18439,
62,
25677,
796,
366,
55,
12,
42,
12740,
12,
17614,
12,
30642,
1,
198,
37811,
2536,
25,
13639,
1994,
329,
479,
9132,
7007,
37811,
198,
14016,
375,
62... | 3.260483 | 787 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 3.750865 | 289 |
import requests
import uuid
if __name__ == '__main__' :
tw = tw_api()
tw.cancel_transfer('112912208')
| [
11748,
7007,
198,
11748,
334,
27112,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
6,
1058,
198,
220,
220,
220,
665,
796,
665,
62,
15042,
3419,
198,
220,
220,
220,
665,
13,
66,
21130,
62,
39437,
10786,
14686,
24,
1065... | 2.413043 | 46 |
#See LICENSE.md and ThirdPartyNotices.md for licensing information
import os
import json
import requests
from pathlib import Path
from transformers import AutoModel, AutoTokenizer
from transformers.onnx.config import OnnxConfig
from transformers.utils import logging
repository_dir = Path(str(os.path.abspath(os.path.j... | [
2,
6214,
38559,
24290,
13,
9132,
290,
10467,
33553,
3673,
1063,
13,
9132,
329,
15665,
1321,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
7007,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
6121,
364,
1330,
11160,
17633,
11,
1... | 3.371429 | 105 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 2.578135 | 1,555 |
from rest_framework import generics, authentication, permissions
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from rest_framework.utils.field_mapping import get_relation_kwargs
from user.serializers import UserSerializer, AuthTokenSerialzer
class CreateUs... | [
6738,
1334,
62,
30604,
1330,
1152,
873,
11,
18239,
11,
21627,
198,
6738,
1334,
62,
30604,
13,
18439,
30001,
13,
33571,
1330,
1835,
3153,
30515,
30642,
198,
6738,
1334,
62,
30604,
13,
33692,
1330,
40391,
62,
33692,
198,
6738,
1334,
62,
... | 3.326599 | 297 |
import os, sys, os.path as op
import numpy as np
import cv2
from lxml import etree as ET
import collections
import logging
from glob import glob
import shutil
import sqlite3
from progressbar import progressbar
from pprint import pformat
import re
from lib.backend import backendMedia
from lib.utils import util
from lib... | [
11748,
28686,
11,
25064,
11,
28686,
13,
6978,
355,
1034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
6738,
300,
19875,
1330,
2123,
631,
355,
12152,
198,
11748,
17268,
198,
11748,
18931,
198,
6738,
15095,
1330,
1509... | 3.652632 | 95 |
# RATEIOS OFFLINE
from tir import Webapp
import unittest
if __name__ == '__main__':
unittest.main()
| [
2,
371,
6158,
40,
2640,
3963,
3697,
8881,
198,
6738,
48965,
1330,
5313,
1324,
198,
11748,
555,
715,
395,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.5 | 42 |
import subprocess
import re
import os
if os.path.exists('/n/groups/marks/software/aws-cli/bin/aws'):
AWS_BIN = '/n/groups/marks/software/aws-cli/bin/aws'
else:
AWS_BIN = 'aws'
| [
11748,
850,
14681,
198,
11748,
302,
198,
11748,
28686,
198,
198,
361,
28686,
13,
6978,
13,
1069,
1023,
10786,
14,
77,
14,
24432,
14,
14306,
14,
43776,
14,
8356,
12,
44506,
14,
8800,
14,
8356,
6,
2599,
198,
220,
220,
220,
30865,
62,
... | 2.35443 | 79 |
def matrix_modulus(N, p=2, sigma=None):
"""
Computes the modulus of a family given its N matrix.
Parameters
----------
N : numpy array OR scipy sparse matrix
The N matrix for the family.
p : float or np.inf
The modulus energy exponent.
sigma : numpy array
... | [
4299,
17593,
62,
4666,
23515,
7,
45,
11,
279,
28,
17,
11,
264,
13495,
28,
14202,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3082,
1769,
262,
953,
23515,
286,
257,
1641,
1813,
663,
399,
17593,
13,
198,
220,
220,
220,
220,... | 2.241667 | 3,120 |
from pathlib import Path
from tdw.controller import Controller
from tdw.tdw_utils import TDWUtils
from tdw.librarian import ModelLibrarian
from tdw.output_data import OutputData, Bounds, Images
"""
1. Add a table and place an object on the table.
2. Add a camera and receive an image.
"""
lib = ModelLibrari... | [
6738,
3108,
8019,
1330,
10644,
201,
198,
6738,
41560,
86,
13,
36500,
1330,
22741,
201,
198,
6738,
41560,
86,
13,
8671,
86,
62,
26791,
1330,
13320,
54,
18274,
4487,
201,
198,
6738,
41560,
86,
13,
75,
35808,
1330,
9104,
43,
35808,
201,
... | 1.880182 | 1,761 |
# Generated by Django 3.2.4 on 2021-10-12 18:58
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
19,
319,
33448,
12,
940,
12,
1065,
1248,
25,
3365,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import requests
import time
import tweepy
import config
import random
from datetime import datetime
import pytz
# DEBUG ONLY
debug = True # Set Debug [DEFAULT: False]
set_online = False # if set to true will set URL to BobRoss instead of Nick's stream!
# SETUP TIMEZONE
if set_online == True:
URL = "https://ap... | [
11748,
7007,
198,
11748,
640,
198,
11748,
4184,
538,
88,
198,
11748,
4566,
198,
11748,
4738,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
12972,
22877,
198,
198,
2,
16959,
22224,
198,
24442,
796,
6407,
1303,
5345,
31687,
685,
72... | 2.769531 | 256 |
from passlib.hash import sha256_crypt
from models.db.user import DbUser
| [
6738,
1208,
8019,
13,
17831,
1330,
427,
64,
11645,
62,
29609,
198,
198,
6738,
4981,
13,
9945,
13,
7220,
1330,
360,
65,
12982,
198
] | 3.041667 | 24 |
# python imports
from datetime import datetime
from datetime import timedelta
# django imports
from django.db.models import Q
from django.contrib.auth.decorators import permission_required
from django.core.paginator import EmptyPage
from django.core.paginator import Paginator
from django.http import HttpResponse
from ... | [
2,
21015,
17944,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
2,
42625,
14208,
17944,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
6738,
42625,
14208,
13,
3642,
822,
13,... | 2.641167 | 4,523 |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 6 15:11:35 2021
@author: buriona
"""
import sys
from pathlib import Path
import json
from calendar import month_name
DEFAULT_DT_FRMT = "%m-%d-%Y %H:%M:%S"
this_dir = Path().absolute()
for config in this_dir.glob("*.config"):
if "models.config" in config.name or "... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
2758,
220,
718,
1315,
25,
1157,
25,
2327,
33448,
198,
198,
31,
9800,
25,
4356,
32792,
198,
37811,
198,
198,
11748,
25064,
198,
6738,
3108,... | 2.177616 | 411 |
from typing import Tuple
RangeType = Tuple[float, float]
| [
6738,
19720,
1330,
309,
29291,
198,
198,
17257,
6030,
796,
309,
29291,
58,
22468,
11,
12178,
60,
198
] | 3.222222 | 18 |
from setuptools import setup
setup(
name='alre_experiments',
version='0.2',
packages=[
'util',
'experiments',
'experiments.mixtures_parameterized',
'experiments.mixtures_active_learning',
'experiments.mixtures_active_learning.mal_analysis'
],
url='github.com/... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
282,
260,
62,
23100,
6800,
3256,
198,
220,
220,
220,
2196,
11639,
15,
13,
17,
3256,
198,
220,
220,
220,
10392,
41888,
198,
220,
220,
220,
220,... | 2.274306 | 288 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from selenium import webdriver # controla o navegador
from selenium.webdriver.common.keys import Keys # usar o teclado
from selenium.webdriver.common.by import By # localizar os itens no navegador
import pandas as pd
# criar o navegador
navegador = webdriver.Chrome()
pegar_dolar()
pegar_euro()
pegar_ouro()
# f... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
1303,
1630,
64,
267,
299,
1015,
70,
7079,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
13083,
1330,
26363,
1303,
514,
283,
267,
573,
565,
4533,
198,
6738,
384,
11925,
1505,
1... | 2.322222 | 360 |
import re
import socket
# custom exceptions
# rsp connection class
#--------------------------------------------------------------------------
# GDB RSP FUNCTIONS (HIGHER LEVEL)
#--------------------------------------------------------------------------
# https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.h... | [
11748,
302,
198,
11748,
17802,
198,
198,
2,
2183,
13269,
198,
198,
2,
374,
2777,
4637,
1398,
198,
198,
2,
10097,
35937,
198,
2,
402,
11012,
371,
4303,
29397,
4177,
11053,
357,
39,
3528,
16879,
49277,
8,
198,
2,
10097,
35937,
198,
19... | 4.626506 | 83 |
from __future__ import absolute_import, division, print_function
from cctbx import xray
from cctbx import miller
from cctbx import crystal
from cctbx import maptbx
from cctbx.adptbx import u_as_b
from cctbx.array_family import flex
from scitbx import matrix
from libtbx.math_utils import ifloor
from libtbx.test_utils im... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
6738,
269,
310,
65,
87,
1330,
2124,
2433,
198,
6738,
269,
310,
65,
87,
1330,
3939,
263,
198,
6738,
269,
310,
65,
87,
1330,
15121,
198,
6738,
269,
3... | 2.374016 | 254 |
# coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
12131,
383,
12905,
2667,
32388,
16092,
292,
1039,
46665,
290,
262,
1459,
27039,
4226,
18920,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
3415... | 3.732782 | 363 |
import os
import six
# Centrally add the mock move
# noinspection PyUnresolvedReferences
# - These are known attributes of the `six` module.
six.add_move(six.MovedModule('mock', 'mock', 'unittest.mock'))
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
| [
11748,
28686,
198,
198,
11748,
2237,
628,
198,
2,
1979,
81,
453,
751,
262,
15290,
1445,
198,
2,
645,
1040,
14978,
9485,
3118,
411,
5634,
19927,
198,
2,
532,
2312,
389,
1900,
12608,
286,
262,
4600,
19412,
63,
8265,
13,
198,
19412,
13... | 2.757576 | 99 |
# loops through all fields in a shp/dbf and outputs moran's I, z-score, and p-value of each to a csv table
import os
import pysal
import csv
import time
import numpy as np
from osgeo import ogr
begin_time = time.clock()
#open shp
shp = "PATH.shp"
#gdal layer reader
driver = ogr.GetDriverByName('ESRI Shapefile')
dat... | [
2,
23607,
832,
477,
7032,
287,
257,
427,
79,
14,
9945,
69,
290,
23862,
2146,
272,
338,
314,
11,
1976,
12,
26675,
11,
290,
279,
12,
8367,
286,
1123,
284,
257,
269,
21370,
3084,
198,
198,
11748,
28686,
198,
11748,
279,
893,
282,
198... | 2.490323 | 620 |
# Generated by Django 3.2.10 on 2021-12-10 21:11
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
940,
319,
33448,
12,
1065,
12,
940,
2310,
25,
1157,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
"""The sqlalchemy model for a poll."""
import random
from datetime import datetime, timedelta
from sqlalchemy import (
Date,
Column,
func,
ForeignKey,
text,
)
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.types import (
BigInteger,
Boolean,
DateTime,
Integer,
St... | [
37811,
464,
44161,
282,
26599,
2746,
329,
257,
3278,
526,
15931,
198,
11748,
4738,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
44161,
282,
26599,
1330,
357,
198,
220,
220,
220,
7536,
11,
198,
220,
220,
220,
2... | 2.462975 | 3,106 |
from .adsclient import AdsClient
from .adsconnection import AdsConnection
from .adstypeconvert import AdsTypeConvert
from .adsexception import PyadsException
from .adsexception import AdsException
from .adsexception import PyadsTypeError
from .adsstate import AdsState
from .amspacket import AmsPacket
from .binaryparser... | [
6738,
764,
5643,
16366,
1330,
47442,
11792,
198,
6738,
764,
5643,
38659,
1330,
47442,
32048,
198,
6738,
764,
324,
301,
2981,
1102,
1851,
1330,
47442,
6030,
3103,
1851,
198,
6738,
764,
324,
8044,
4516,
1330,
9485,
5643,
16922,
198,
6738,
... | 2.856574 | 251 |
from .table import PyTable
| [
6738,
764,
11487,
1330,
9485,
10962,
198
] | 3.857143 | 7 |
# vim:fileencoding=utf8
#
# Project: Implementation of the Lemke-Howson algorithm for finding MNE
# Author: Petr Zemek <s3rvac@gmail.com>, 2009
#
"""This module provides a class Rational as a representation
of rational numbers with common operations over them.
"""
import re
class InvalidRationalReprError(Exceptio... | [
2,
43907,
25,
7753,
12685,
7656,
28,
40477,
23,
198,
2,
198,
2,
4935,
25,
46333,
286,
262,
20607,
365,
12,
2437,
1559,
11862,
329,
4917,
337,
12161,
198,
2,
6434,
25,
220,
47377,
1168,
368,
988,
1279,
82,
18,
81,
85,
330,
31,
14... | 2.336147 | 3,317 |
import csv
import datetime as dt
import io
import json
from itertools import chain
from operator import attrgetter
from api.renderers import stream_csv
from api.views import (ProjectSerializer, TimecardList, UserDataSerializer,
get_timecardobjects)
from django.conf import settings
from django.co... | [
11748,
269,
21370,
198,
11748,
4818,
8079,
355,
288,
83,
198,
11748,
33245,
198,
11748,
33918,
198,
6738,
340,
861,
10141,
1330,
6333,
198,
6738,
10088,
1330,
708,
81,
1136,
353,
198,
198,
6738,
40391,
13,
10920,
19288,
1330,
4269,
62,
... | 2.72281 | 2,078 |
import click
import boto3
@click.command()
@click.argument("project")
@click.option("-v", "--verbose", help="Output additional information.", is_flag=True)
if __name__ == "__main__":
main()
| [
11748,
3904,
198,
11748,
275,
2069,
18,
628,
198,
31,
12976,
13,
21812,
3419,
198,
31,
12976,
13,
49140,
7203,
16302,
4943,
198,
31,
12976,
13,
18076,
7203,
12,
85,
1600,
366,
438,
19011,
577,
1600,
1037,
2625,
26410,
3224,
1321,
3328... | 2.940299 | 67 |
# -*- coding:utf-8 -*-
#
# Copyright (C) 2012, Maximilian Köhl <linuxmaxi@googlemail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
34,
8,
2321,
11,
5436,
26641,
666,
509,
9101,
18519,
1279,
23289,
9806,
72,
31,
13297,
4529,
13,
785,
29,
198,
2,
198,
2,
770,
1430,
318,
1479,
... | 2.50477 | 1,153 |
#!/usr/bin/env python
# Builds gap figure for the PRL paper
#
# With correct seed:
#
# ./both_figures.py --gap data/random_modular_random_modular_graph_2000_12_2_q_0.45.p_seed_1_method_optimal_iter_size_200_backend_IntelQS_pyomo_timelimit_* --subprob {final_prl_more_itersizes_correct_seed_random_modular_graph_2000_12_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
10934,
82,
7625,
3785,
329,
262,
4810,
43,
3348,
198,
2,
198,
2,
2080,
3376,
9403,
25,
198,
2,
198,
2,
24457,
16885,
62,
5647,
942,
13,
9078,
1377,
43554,
1366,
14,
25120,
... | 2.093995 | 2,298 |
from .base_strategy import Strategy
from .simple_strategies import StayBack, RandomStrategy, LongestLineStrategy, PushForward, \
TowardEnemyCenter
ALL_STRATEGIES = [RandomStrategy,
# StayBack,
# PushForward,
LongestLineStrategy,
TowardEnemyCen... | [
6738,
764,
8692,
62,
2536,
4338,
1330,
20561,
198,
6738,
764,
36439,
62,
2536,
2397,
444,
1330,
16160,
7282,
11,
14534,
13290,
4338,
11,
5882,
395,
13949,
13290,
4338,
11,
23691,
39746,
11,
3467,
198,
220,
220,
220,
24324,
446,
4834,
... | 2.166667 | 150 |
pot2=1
soma=0
for y in range(64):
soma=soma+pot2
pot2=pot2*2
print(soma)
| [
13059,
17,
28,
16,
198,
82,
6086,
28,
15,
198,
1640,
331,
287,
2837,
7,
2414,
2599,
198,
220,
220,
220,
3870,
64,
28,
82,
6086,
10,
13059,
17,
198,
220,
220,
220,
1787,
17,
28,
13059,
17,
9,
17,
198,
4798,
7,
82,
6086,
8,
19... | 1.723404 | 47 |
import sys, os, argparse, logging
from bing import Bing
res = [0] * 5
res[0] = float(input("Please input first latitude(e.g. -87.624325):"))
res[1] = float(input("Please input first longitude(e.g. 41.884358):"))
res[2] = float(input("Please input second latitude(e.g. -87.620691):"))
res[3] = float(input("Please input ... | [
11748,
25064,
11,
28686,
11,
1822,
29572,
11,
18931,
198,
6738,
275,
278,
1330,
21631,
198,
198,
411,
796,
685,
15,
60,
1635,
642,
198,
411,
58,
15,
60,
796,
12178,
7,
15414,
7203,
5492,
5128,
717,
32477,
7,
68,
13,
70,
13,
532,
... | 2.636816 | 201 |
import unittest
from unittest import skip
from django.db import connection
from django.test.testcases import TransactionTestCase
from django.test.utils import override_settings
from wagtail.search.query import Not, PlainText
from wagtail.search.tests.test_backends import BackendTests
from wagtail.tests.search import... | [
11748,
555,
715,
395,
198,
198,
6738,
555,
715,
395,
1330,
14267,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4637,
198,
6738,
42625,
14208,
13,
9288,
13,
9288,
33964,
1330,
45389,
14402,
20448,
198,
6738,
42625,
14208,
13,
9288,
13,
... | 3.049451 | 182 |
#!/usr/bin/python
import requests
import base64
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
7007,
198,
11748,
2779,
2414,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
12417,
3419,
198
] | 2.709677 | 31 |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
220,
220,
220,
4946,
1137,
47,
11,
4946,
8090,
8549,
28186,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
5472,
12,
10333... | 3.528701 | 331 |
#!/usr/bin/python
import os, sys
config = sys.argv[1]
if not os.path.exists( config ):
print "config does not exists"
sys.exit(1)
genomes = {}
notinsource = []
notindestiny = []
dosymetrical = True
doreciprocal = True
create_make_file = True
html2pdf = None
pdf2img =... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
28686,
11,
25064,
198,
198,
11250,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
361,
407,
28686,
13,
6978,
13,
1069,
1023,
7,
4566,
15179,
198,
220,
220,
220,
3601,
366,
11250,
857,
4... | 2.03504 | 371 |
print(pizza(4)) | [
198,
4798,
7,
79,
9990,
7,
19,
4008
] | 2 | 8 |
# coding: utf-8
__all__ = ("model_selection", "search_setting", "utils") | [
2,
19617,
25,
3384,
69,
12,
23,
198,
834,
439,
834,
796,
5855,
19849,
62,
49283,
1600,
366,
12947,
62,
33990,
1600,
366,
26791,
4943
] | 2.88 | 25 |
import os
config_options = {
'development':DevConfig,
'production':ProdConfig
} | [
11748,
28686,
198,
198,
11250,
62,
25811,
796,
1391,
198,
220,
220,
220,
705,
31267,
10354,
13603,
16934,
11,
198,
220,
220,
220,
705,
25493,
10354,
2964,
67,
16934,
198,
92,
220
] | 2.78125 | 32 |
"""
Generate a GQL Schema string from Pydantic types defined in bindables.
"""
import inspect
import logging
from typing import List
from typing import Set
from typing import Tuple
from typing import Type # TYP001
from pydantic import BaseModel
from pydantic import Field
from utils import to_camel_case
from utils i... | [
37811,
198,
8645,
378,
257,
402,
9711,
10011,
2611,
4731,
422,
350,
5173,
5109,
3858,
5447,
287,
11007,
2977,
13,
198,
37811,
198,
11748,
10104,
198,
11748,
18931,
198,
6738,
19720,
1330,
7343,
198,
6738,
19720,
1330,
5345,
198,
6738,
1... | 3.316176 | 136 |
import os
from glob import glob
from setuptools import setup, find_packages
dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(dir, 'README.md')) as f:
long_description = f.read()
setup(name='cerebellum_value_map',
version='0.1.0',
author='Shuo Han',
description='Show colors... | [
11748,
28686,
198,
6738,
15095,
1330,
15095,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
15908,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
... | 2.440415 | 386 |
from syft.tensor import TensorBase
import numpy as np
| [
6738,
827,
701,
13,
83,
22854,
1330,
309,
22854,
14881,
198,
198,
11748,
299,
32152,
355,
45941,
628
] | 3.111111 | 18 |
#!flask/bin/python
from flask import Flask, abort, request, jsonify
import json
import ledcontrol
import os
app = Flask(__name__)
led = "green"
@app.route('/', methods=['GET','POST','PUT'])
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5011, debug=False)
| [
2,
0,
2704,
2093,
14,
8800,
14,
29412,
198,
6738,
42903,
1330,
46947,
11,
15614,
11,
2581,
11,
33918,
1958,
198,
11748,
33918,
198,
11748,
2957,
13716,
198,
11748,
28686,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
9... | 2.575472 | 106 |
"""Functions for identifying clipping."""
import pandas as pd
import numpy as np
from pvanalytics import util
def _detect_levels(x, count=3, num_bins=100):
"""Identify plateau levels in data.
Parameters
----------
x : Series
Data in which to find plateaus.
count : int
Number of pl... | [
37811,
24629,
2733,
329,
13720,
45013,
526,
15931,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
279,
10438,
3400,
14094,
1330,
7736,
628,
198,
4299,
4808,
15255,
478,
62,
46170,
7,
87,
11,
954,
... | 2.733712 | 4,758 |
import numpy as np
from PIL import Image
import sys
import math
import glob
import scipy.misc
import pytesseract
import subprocess
import matplotlib.pyplot as plt
import random
from requests import Session
import os
os.system("rm -r /tmp/chall")
os.system("mkdir /tmp/chall")
s = Session()
s.get("http://shreddi... | [
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
25064,
198,
11748,
10688,
198,
11748,
15095,
198,
11748,
629,
541,
88,
13,
44374,
198,
11748,
12972,
83,
408,
263,
529,
198,
198,
11748,
850,
14681,
198,
11748... | 2.397059 | 340 |
from django.urls import re_path
from .views import (
index, add_grade, get_teacher_lectures,
get_student_lectures
)
urlpatterns = [
re_path(r'^$', index),
re_path(r'^teacher/add-grade$', add_grade),
re_path(r'^teacher/get-lectures$', get_teacher_lectures),
re_path(r'^student/get-lectures$... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
302,
62,
6978,
198,
198,
6738,
764,
33571,
1330,
357,
198,
220,
220,
220,
6376,
11,
751,
62,
9526,
11,
651,
62,
660,
3493,
62,
801,
942,
11,
220,
198,
220,
220,
220,
651,
62,
50139,
62,
80... | 2.282895 | 152 |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
220,
220,
220,
15069,
2211,
7381,
20836,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
... | 3.279743 | 311 |
from re import match
from tempfile import NamedTemporaryFile
from typing import List, Optional
from os import unlink
from os.path import expanduser, join, splitext
from shutil import copyfile
from ruamel.yaml import YAML
from ruamel.yaml.error import CommentMark
from ruamel.yaml.tokens import CommentToken
from .vim im... | [
6738,
302,
1330,
2872,
198,
6738,
20218,
7753,
1330,
34441,
12966,
5551,
8979,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
6738,
28686,
1330,
555,
8726,
198,
6738,
28686,
13,
6978,
1330,
4292,
7220,
11,
4654,
11,
4328,
578,
742,
198,
... | 3.310559 | 161 |
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel, Field
from src.storage.store import StoreType
| [
6738,
33829,
1330,
2039,
388,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
7663,
198,
198,
6738,
12351,
13,
35350,
13,
8095,
1330,
9363,
6030,
628,
628,
628,
198
] | 3.736842 | 38 |
import typing
import sys
import numpy as np
import numba as nb
@nb.njit((nb.i8[:], nb.i8[:]), cache=True)
main() | [
11748,
19720,
220,
198,
11748,
25064,
220,
198,
11748,
299,
32152,
355,
45941,
220,
198,
11748,
997,
7012,
355,
299,
65,
628,
198,
198,
31,
46803,
13,
77,
45051,
19510,
46803,
13,
72,
23,
58,
25,
4357,
299,
65,
13,
72,
23,
58,
25,... | 2.240741 | 54 |
import functools
import numpy as np
import pandas as pd
import python_voc_parser as voc
import random as rnd
import tensorflow as tf
import typing as typ
from imgaug import augmenters, augmentables
from pathlib import Path
from tensorflow.keras.preprocessing import image
from tensorflow.keras.applications.imagenet_util... | [
11748,
1257,
310,
10141,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
21015,
62,
18893,
62,
48610,
355,
12776,
198,
11748,
4738,
355,
374,
358,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
117... | 3.574074 | 108 |
from django.urls import path
from . import views
from rest_framework.authtoken.views import obtain_auth_token
app_name = 'user'
urlpatterns = [
path('register/',views.register,name='register'),
path('login/',obtain_auth_token,name='login'),
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
6738,
1334,
62,
30604,
13,
18439,
30001,
13,
33571,
1330,
7330,
62,
18439,
62,
30001,
198,
198,
1324,
62,
3672,
796,
705,
7220,
6,
198,
198,
6371,
33279,
... | 3.04878 | 82 |
import os
import torch
import numpy as np
import argparse
from engine.utils import read_data, create_vocs, create_labels_voc, build_vocab_GCN, get_indexes
from evaluation import evaluate
from itertools import chain
from engine.srl import SRLer
from engine.modules import CRF
from pytorch_transformers import RobertaToken... | [
11748,
28686,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
6738,
3113,
13,
26791,
1330,
1100,
62,
7890,
11,
2251,
62,
18893,
82,
11,
2251,
62,
23912,
1424,
62,
18893,
11,
1382,
62,
18893,
397,
6... | 2.124805 | 2,564 |
from gflags import (DEFINE_list, DEFINE_bool, DEFINE_integer, FLAGS,
DuplicateFlagError, DEFINE_enum)
from itertools import chain
import logging
import numpy as np
import os
from causeway import (IAAEvaluator, PairwiseAndNonIAAEvaluator,
RELATIVE_POSITIONS)
from nlpypline.pipe... | [
6738,
308,
33152,
1330,
357,
7206,
29940,
62,
4868,
11,
23449,
8881,
62,
30388,
11,
23449,
8881,
62,
41433,
11,
9977,
4760,
50,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 2.401961 | 1,734 |
#!./venv/bin/python
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
# http://plugins.krajee.com/file-input
@app.route('/upload', methods=['GET'])
@app.route('/upload', methods=['POST'])
if __name__ == '__main__':
app.run(debug=True)
| [
2,
0,
19571,
574,
85,
14,
8800,
14,
29412,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
628,
198,
31,
1324,
13,
38629,
10786,
14,
11537,
628,
198,
2,
2638,
1378,
37390,
13,
... | 2.541284 | 109 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-17 14:23
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
22,
319,
2177,
12,
1157,
12,
1558,
1478,
25,
1954,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
from unittest import TestCase
from servicelayer.cache import get_fakeredis
from servicelayer.jobs import Job
from servicelayer.worker import Worker
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
37756,
417,
2794,
13,
23870,
1330,
651,
62,
30706,
445,
271,
198,
6738,
37756,
417,
2794,
13,
43863,
1330,
15768,
198,
6738,
37756,
417,
2794,
13,
28816,
1330,
35412,
628,
198
] | 3.682927 | 41 |
import subprocess
import sys
# check exists package
try:
import pygame
import pygame_menu
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "pygame==2.0.2"])
subprocess.check_call([sys.executable, "-m", "pip", "install", "pygame-menu==4.1.4"])
import pygame
impo... | [
11748,
850,
14681,
198,
11748,
25064,
198,
198,
2,
2198,
7160,
5301,
198,
28311,
25,
198,
220,
220,
220,
1330,
12972,
6057,
198,
220,
220,
220,
1330,
12972,
6057,
62,
26272,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
850,
14681... | 2.5 | 322 |