content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import numpy as np
#We define a 3 dimensional vector with random numbers
n = 3
a = np.random.rand(n)
# define a matrix of dimension 3 x 3 and set all elements to random numbers with x \in [0, 1]
R = np.random.rand(n, n)
print(a)
print(R)
b = R @ a.T
print(b)
| [
198,
11748,
299,
32152,
355,
45941,
198,
2,
1135,
8160,
257,
220,
513,
38517,
15879,
351,
4738,
3146,
198,
77,
796,
513,
198,
64,
796,
45941,
13,
25120,
13,
25192,
7,
77,
8,
198,
2,
8160,
257,
17593,
286,
15793,
513,
2124,
513,
29... | 2.71875 | 96 |
"""Parses user defined settings from settings.py in top level dir."""
import logging
import os
import ast
log = logging.getLogger(__name__)
# Parse user defined settings from settings.py in the top level project dir
settings_file = os.getenv('MONITOR_SETTINGS_FILE') or 'settings.py'
settings = {}
try:
execfile(s... | [
37811,
47,
945,
274,
2836,
5447,
6460,
422,
6460,
13,
9078,
287,
1353,
1241,
26672,
526,
15931,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
6468,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,... | 2.671818 | 1,100 |
#
# This file contains the Python code from Program 4.13 of
# "Data Structures and Algorithms
# with Object-Oriented Design Patterns in Python"
# by Bruno R. Preiss.
#
# Copyright (c) 2003 by Bruno R. Preiss, P.Eng. All rights reserved.
#
# http://www.brpreiss.com/books/opus7/programs/pgm04_13.txt
#
# ...
| [
2,
198,
2,
770,
2393,
4909,
262,
11361,
2438,
422,
6118,
604,
13,
1485,
286,
198,
2,
366,
6601,
32112,
942,
290,
978,
7727,
907,
198,
2,
351,
9515,
12,
46,
380,
4714,
8495,
47020,
287,
11361,
1,
198,
2,
416,
31045,
371,
13,
3771... | 2.845455 | 110 |
import pyxel
import random
import pyxelChara as Chara
WIDTH = 128
HEIGHT = 128
App()
| [
11748,
12972,
87,
417,
198,
11748,
4738,
198,
11748,
12972,
87,
417,
1925,
3301,
355,
3178,
64,
198,
198,
54,
2389,
4221,
796,
13108,
198,
13909,
9947,
796,
13108,
198,
4677,
3419,
198
] | 2.606061 | 33 |
from user import User
from adminPrivileges import Admin
director = Admin('Jesus', 'Rabindranath', 39, 'Mexicana')
director.privileges.show_privileges() | [
6738,
2836,
1330,
11787,
198,
6738,
13169,
20184,
576,
3212,
1330,
32053,
198,
198,
35248,
796,
32053,
10786,
28219,
3256,
705,
49,
397,
521,
2596,
776,
3256,
5014,
11,
705,
24670,
291,
2271,
11537,
198,
198,
35248,
13,
13776,
576,
3212... | 3.1875 | 48 |
import numpy as np
import pickle
def load_ddata(path, num):
"""
Load data for defender.
Input:
- path: path to pickled file
- num: number of (source,target) pairs
Return: graph, target nodes, community assignment, source nodes
"""
with open(path, "rb") as f:
data = pic... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
628,
198,
4299,
3440,
62,
1860,
1045,
7,
6978,
11,
997,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8778,
1366,
329,
13191,
13,
198,
220,
220,
220,
23412,
25,
220,
198,
... | 2.33871 | 682 |
XXXXXXXXX BB BBBBBBBBBBBBBBBXXXXXBBBBB
BB BBBBBBBBBBBBBBBBBB BB BBBBBBBBBBXXXXXXX XBBBBB
FFFFX
BB BBBBBBXXXXXXXXFFFFXXXXXXXXXBBBBB
FFFF
XXXXXXXXXXX
| [
24376,
24376,
55,
12597,
12597,
15199,
15199,
15199,
15199,
15199,
15199,
33,
24376,
55,
15199,
15199,
33,
220,
198,
220,
220,
220,
12597,
12597,
15199,
15199,
15199,
15199,
15199,
15199,
15199,
15199,
12597,
12597,
15199,
15199,
15199,
15199... | 2.049383 | 81 |
from typing import Iterable, TypeVar, Generator
from itertools import islice
from ..timeframes import Timeframes
from ..candles_providers import CandlesProvider
from ..candle_properties import CandleProperties
from .property_buffer import PropertyBuffer
from .float_generator import FloatGenerator
| [
6738,
19720,
1330,
40806,
540,
11,
5994,
19852,
11,
35986,
201,
198,
6738,
340,
861,
10141,
1330,
318,
75,
501,
201,
198,
201,
198,
6738,
11485,
2435,
37805,
1330,
3862,
37805,
201,
198,
6738,
11485,
46188,
829,
62,
15234,
4157,
1330,
... | 3.768293 | 82 |
import os
import pytest
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# from selenium.webdriver.common.alert import Alert
if 'DRIVER_IP' in os.environ:
host = os.environ['DRIVER_IP']
else:
host = ''
@pytest.mark.web
@pytest.mark.usefixtures('app... | [
11748,
28686,
198,
198,
11748,
12972,
9288,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
8906,
1202,
62,
11128,
5738,
1330,
2935,
1202,
15610,
5738,
198,
2,
422,
384,
1192... | 2.808696 | 115 |
# -*- coding: utf-8 -*
"""
:py:class:`CustomTokenizer`
"""
from senta.common.register import RegisterSet
from senta.data.tokenizer.tokenizer import Tokenizer
from senta.utils.util_helper import convert_to_unicode
@RegisterSet.tokenizer.register
class CustomTokenizer(Tokenizer):
"""CustomTokenizer:用户自己分好词的明文,该toke... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
198,
37811,
198,
25,
9078,
25,
4871,
25,
63,
15022,
30642,
7509,
63,
198,
37811,
198,
6738,
1908,
64,
13,
11321,
13,
30238,
1330,
17296,
7248,
198,
6738,
1908,
64,
13,
7890,
13... | 1.904153 | 626 |
from bs4 import BeautifulSoup as bs
import csv
import os
import requests
import time
from secret import ACCESS_TOKEN
import re
# NOTE: if this isnt enough data, can also grab all of the solo songs by beatles members
scrape()
| [
6738,
275,
82,
19,
1330,
23762,
50,
10486,
355,
275,
82,
198,
11748,
269,
21370,
198,
11748,
28686,
198,
11748,
7007,
198,
11748,
640,
198,
6738,
3200,
1330,
15859,
7597,
62,
10468,
43959,
198,
11748,
302,
198,
198,
2,
24550,
25,
611,... | 3.432836 | 67 |
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.shortcuts import get_object_or_404
from django.utils import timezone
| [
6738,
42625,
14208,
13,
3642,
822,
13,
11299,
19199,
13,
27530,
1330,
14041,
6030,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
42625,
142... | 3.617021 | 47 |
#!/usr/bin/env python3
"""
Use PowerShell to lint Powershell files
https://github.com/PowerShell/PSScriptAnalyzer
"""
import sys
from megalinter import Linter
# Build the CLI command to call to lint a file with a powershell script
# Build the CLI command to get linter version
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
11041,
33870,
284,
300,
600,
20668,
12758,
3696,
198,
5450,
1378,
12567,
13,
785,
14,
13434,
23248,
14,
3705,
7391,
37702,
9107,
198,
37811,
198,
11748,
25064,
198,
198,
... | 3.4 | 85 |
30 mtime=1639777085.534355983
30 atime=1639777086.397355983
30 ctime=1639777126.233355983
| [
1270,
285,
2435,
28,
1433,
2670,
3324,
2154,
5332,
13,
20,
2682,
2327,
3270,
5999,
198,
1270,
379,
524,
28,
1433,
2670,
3324,
2154,
4521,
13,
33372,
2327,
3270,
5999,
198,
1270,
269,
2435,
28,
1433,
2670,
29331,
19420,
13,
1954,
2091,... | 1.956522 | 46 |
from scipy import special
from scipy.optimize import rosen, rosen_der
import numpy as np
from _derivative_numdiff import derivative as derivative1
from _jacobian_numdiff import gradient as gradient1
import matplotlib.pyplot as plt
err = []
np.random.seed(0)
x = np.random.rand(5)*20 - 15
err.append(max(abs(derivative... | [
6738,
629,
541,
88,
1330,
2041,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
686,
6248,
11,
686,
6248,
62,
1082,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4808,
1082,
452,
876,
62,
22510,
26069,
1330,
27255,
355,
27255,
16,
... | 2.283582 | 871 |
"""study_english URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | [
37811,
44517,
62,
39126,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
2... | 2.814196 | 479 |
#Ebx format is the cornerstone of Frostbite, it's an asset node of sorts used to reference actual game assets
#stored in chunk and res files as well as define scripts and configs for the game.
#Ebx is machine endian.
import os
import copy
from struct import unpack,pack
import shutil
import pickle
from dbo import Guid
i... | [
2,
36,
65,
87,
5794,
318,
262,
39774,
286,
15122,
37018,
11,
340,
338,
281,
11171,
10139,
286,
10524,
973,
284,
4941,
4036,
983,
6798,
198,
2,
301,
1850,
287,
16058,
290,
581,
3696,
355,
880,
355,
8160,
14750,
290,
4566,
82,
329,
... | 3.405405 | 111 |
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, BooleanField, SelectField, SelectMultipleField
from wtforms.validators import DataRequired
| [
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
198,
6738,
266,
83,
23914,
1330,
10903,
15878,
11,
39900,
15878,
11,
41146,
15878,
11,
9683,
15878,
11,
9683,
31217,
15878,
198,
6738,
266,
83,
23914,
13,
12102,
2024,
1330,
6060,
37374,
62... | 4.046512 | 43 |
EXEMPT_REPOSITORIES = [
# non-engineering repo
"australian-chapter",
# non-engineering repo
"cc-cert-core",
# non-engineering repo
"cc-cert-edu",
# non-engineering repo
"cc-cert-gov",
# non-engineering repo
"cc-cert-lib",
# exempted to allow transifex updates
"cc.i18n",
... | [
6369,
3620,
11571,
62,
35316,
2640,
2043,
1581,
11015,
796,
685,
198,
220,
220,
220,
1303,
1729,
12,
40321,
29924,
198,
220,
220,
220,
366,
64,
436,
1373,
666,
12,
43582,
1600,
198,
220,
220,
220,
1303,
1729,
12,
40321,
29924,
198,
... | 2.257649 | 621 |
#!/usr/bin/python
import boto3
from botocore.client import Config
import uuid
import json
botoConfig = Config(connect_timeout=50, read_timeout=70)
swf = boto3.client('swf', config=botoConfig)
DOMAIN = "yourtestdomain"
WORKFLOW = "yourtestworkflow"
VERSION = "0.1"
DECISION_TASKLIST = "decision_tasklist"
ACTIVITY_TASK... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
275,
2069,
18,
198,
6738,
10214,
420,
382,
13,
16366,
1330,
17056,
198,
11748,
334,
27112,
198,
11748,
33918,
198,
198,
65,
2069,
16934,
796,
17056,
7,
8443,
62,
48678,
28,
1120,
... | 2.152717 | 2,724 |
from tkinter import *
from tkinter.ttk import *
import time
window = Tk()
percent = StringVar()
text = StringVar()
bar = Progressbar(window, orient=HORIZONTAL, length=300)
bar.pack(pady=10)
percentLabel = Label(window, textvariable=percent).pack()
taskLabel = Label(window, textvariable=text).pack()
button = Button... | [
6738,
256,
74,
3849,
1330,
1635,
198,
6738,
256,
74,
3849,
13,
926,
74,
1330,
1635,
198,
11748,
640,
198,
198,
17497,
796,
309,
74,
3419,
198,
198,
25067,
796,
10903,
19852,
3419,
198,
5239,
796,
10903,
19852,
3419,
198,
198,
5657,
... | 3.055118 | 127 |
from __future__ import print_function
import argparse, unicodedata, logging, yaml
import sevenbridges as sb
from sevenbridges.errors import SbgError
import math
import pdb
import numpy as np
global config
maxInputsForScatter = 15
task_basename = "Breast_Invasive_Carcinoma_bam2fasta"
try:
fp = open('yaml_test_con... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
1822,
29572,
11,
28000,
9043,
1045,
11,
18931,
11,
331,
43695,
198,
11748,
3598,
10236,
3212,
355,
264,
65,
198,
6738,
3598,
10236,
3212,
13,
48277,
1330,
311,
35904,
12331... | 2.545283 | 530 |
import argparse
import queue
import threading
import signal
from pathlib import Path
import blobconverter
import cv2
import depthai
import numpy as np
from imutils.video import FPS
from math import cos, sin
parser = argparse.ArgumentParser()
parser.add_argument('-nd', '--no-debug', action="store_true", help="Prevent... | [
11748,
1822,
29572,
198,
11748,
16834,
198,
11748,
4704,
278,
198,
11748,
6737,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
44812,
1102,
332,
353,
198,
11748,
269,
85,
17,
198,
11748,
6795,
1872,
198,
11748,
299,
32152,
355,
45... | 3.184275 | 407 |
#!/usr/local/bin/env python
# =============================================================================================
# MODULE DOCSTRING
# =============================================================================================
"""
YANK command-line interface (cli)
"""
# =================================... | [
2,
48443,
14629,
14,
12001,
14,
8800,
14,
24330,
21015,
198,
198,
2,
38093,
4770,
25609,
198,
2,
33893,
37760,
18601,
2751,
198,
2,
38093,
4770,
25609,
198,
198,
37811,
198,
56,
15154,
3141,
12,
1370,
7071,
357,
44506,
8,
198,
198,
... | 3.437376 | 503 |
"""
Configuration file for the Corrected Moments Antenna Coordinates (CMAC2.0).
The values for a number of parameters that change depending on which radar is
being used.
"""
##############################################################################
# Default metadata
#
# The DEFAULT_METADATA dictionary contain... | [
37811,
198,
38149,
2393,
329,
262,
22941,
276,
45209,
3738,
13713,
22819,
17540,
357,
24187,
2246,
17,
13,
15,
737,
198,
198,
464,
3815,
329,
257,
1271,
286,
10007,
326,
1487,
6906,
319,
543,
13428,
318,
198,
11873,
973,
13,
198,
198,... | 1.983091 | 18,215 |
"""Read shader files."""
from os.path import join as pjoin, dirname
SHADERS_DIR = pjoin(dirname(__file__))
__all__ = ['SHADERS_DIR', 'load']
| [
37811,
5569,
33030,
3696,
526,
15931,
198,
198,
6738,
28686,
13,
6978,
1330,
4654,
355,
279,
22179,
11,
26672,
3672,
198,
198,
9693,
2885,
4877,
62,
34720,
796,
279,
22179,
7,
15908,
3672,
7,
834,
7753,
834,
4008,
628,
198,
198,
834,
... | 2.607143 | 56 |
import unittest
import racetools.telemetry.pcars.udp as pcars_udp
import racetools.telemetry.pcars.views as pcars_views
| [
11748,
555,
715,
395,
198,
198,
11748,
3444,
316,
10141,
13,
46813,
41935,
13,
14751,
945,
13,
463,
79,
355,
279,
37993,
62,
463,
79,
198,
11748,
3444,
316,
10141,
13,
46813,
41935,
13,
14751,
945,
13,
33571,
355,
279,
37993,
62,
33... | 2.755556 | 45 |
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
import utool
from vtool import geometry
from six.moves import zip, range
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[TEST_IBS_CONTROL]')
if __name__ == '__m... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
16926,
46,
25,
27841,
27975,
38162,
9947,
37801,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
... | 2.481618 | 272 |
#!/usr/bin/env python3
import argparse
import os
import time
import subprocess
import webbrowser
WATCHDOG_PRESENT = True
try:
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
except:
WATCHDOG_PRESENT = False
SOURCEDIR = 'source'
BUILDDIR = 'build'
DOCUMENTATION_RO... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
850,
14681,
198,
11748,
3992,
40259,
198,
198,
35192,
35,
7730,
62,
48296,
3525,
796,
6407,
198,
28311,
25,
198,
... | 2.735849 | 159 |
import argparse
import sys
import gym
import time
import numpy as np
import wimblepong
import torch
import matplotlib.pyplot as plt
import agent as ag
# Entry point of the script
if __name__ == "__main__":
args = parse_args()
main(args=args)
| [
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
11550,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
266,
34477,
79,
506,
198,
11748,
28034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
... | 2.988372 | 86 |
# coding: utf-8
"""
Metal API
This is the API for Equinix Metal. The API allows you to programmatically interact with all of your Equinix Metal resources, including devices, networks, addresses, organizations, projects, and your user account. The official API docs are hosted at <https://metal.equinix.com/dev... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
12136,
7824,
628,
220,
220,
220,
770,
318,
262,
7824,
329,
7889,
259,
844,
12136,
13,
383,
7824,
3578,
345,
284,
1430,
49454,
9427,
351,
477,
286,
534,
7889,
259... | 1.531957 | 5,523 |
# flake8: NOQA
from time import gmtime, strftime
import datetime
import random
DATA = {
'syslog_error_levels': ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
'syslog_error_levels_lower': ['debug', 'info', 'warning', 'error', 'critical'],
'http_verbs': ['OPTIONS', 'GET', 'HEAD', 'POST', 'PUT', 'DELETE'... | [
2,
781,
539,
23,
25,
8005,
48,
32,
198,
6738,
640,
1330,
308,
76,
2435,
11,
965,
31387,
198,
11748,
4818,
8079,
198,
11748,
4738,
628,
198,
26947,
796,
1391,
198,
220,
220,
220,
705,
17597,
6404,
62,
18224,
62,
46170,
10354,
37250,
... | 2.095238 | 756 |
def nitro_tz(tz_id):
"""Maps McAfee SIEM/Nitro ESM internal timezone IDs to
the tz database at: http://web.cs.ucla.edu/~eggert/tz/tz-link.htm
Args:
tz_id (str/int): McAfee ESM internal timezone ID
Returns:
timezone name (str)
""... | [
201,
198,
4299,
13759,
305,
62,
22877,
7,
22877,
62,
312,
2599,
201,
198,
220,
220,
220,
37227,
47010,
1982,
44314,
25861,
3620,
14,
33772,
305,
412,
12310,
5387,
640,
11340,
32373,
284,
220,
201,
198,
220,
220,
220,
220,
220,
220,
... | 1.494841 | 2,423 |
# Generated by Django 2.2.2 on 2019-06-04 10:24
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
17,
319,
13130,
12,
3312,
12,
3023,
838,
25,
1731,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
'''
A system for retrieving and assigning tasks for the bot as well as updating
their statuses once acted up. This file contains two abstract classes,
Tasker and Task, which define a class to manage tasks and a task class
respectively.
'''
__author__ = 'Alex Bertsch'
__email__ = 'abertsch@dropbox.com'
from abc import ... | [
7061,
6,
198,
32,
1080,
329,
50122,
290,
38875,
8861,
329,
262,
10214,
355,
880,
355,
19698,
198,
24571,
1185,
2664,
1752,
13134,
510,
13,
770,
2393,
4909,
734,
12531,
6097,
11,
198,
25714,
263,
290,
15941,
11,
543,
8160,
257,
1398,
... | 2.663569 | 538 |
# (C) Copyright 2018-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | [
2,
357,
34,
8,
15069,
2864,
12,
1238,
2481,
2039,
28895,
11,
3457,
1539,
9533,
11,
15326,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
3788,
318,
2810,
1231,
18215,
739,
262,
2846,
286,
262,
347,
10305,
198,
2,
5964,
3017,
... | 2.749536 | 539 |
from .controller import Controller
import torch
| [
6738,
764,
36500,
1330,
22741,
198,
11748,
28034,
628
] | 5.444444 | 9 |
from .uniquefilename import UniqueFilename
from .settings import tim_storage
import numbers
import os
class PexoTim(object):
"""
PEXOpy .tim file handler.
The constructor's `tim` argument is either a list/array of floats ot tuples of floats (1-part or 2-part JD[UTC]), or a path to a .tim file.
If it's a ... | [
6738,
764,
403,
1557,
891,
346,
12453,
1330,
30015,
35063,
198,
6738,
764,
33692,
1330,
4628,
62,
35350,
198,
11748,
3146,
198,
11748,
28686,
628,
198,
4871,
350,
1069,
78,
14967,
7,
15252,
2599,
198,
220,
220,
37227,
198,
220,
220,
3... | 3.144509 | 173 |
from __future__ import print_function
import sys, getopt
from datetime import datetime
from datetime import timedelta
import tempfile
from algorithm import Algorithm
class AVG_ERA(Algorithm):
'''
Algorithm that just adds the pitcher's ERA and the batter's AVG (x10) and finds the biggest number
'''
clas... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
25064,
11,
651,
8738,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
11748,
20218,
7753,
198,
6738,
11862,
1330,
978,
42289,
628,
198,
... | 2.643636 | 825 |
import time, hashlib, requests, base64
from collections import OrderedDict
PROTOCOL = "https"
HOST = "www.deribit.com"
| [
11748,
640,
11,
12234,
8019,
11,
7007,
11,
2779,
2414,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
628,
198,
4805,
2394,
4503,
3535,
796,
366,
5450,
1,
198,
39,
10892,
796,
366,
2503,
13,
1082,
571,
270,
13,
785,
1,
628,
628,
62... | 2.822222 | 45 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from numba import f8
from numba import c16
from numba import jit
from numpy import cos
from numpy import sin
from numpy import zeros
__all__ = [
'rotate_x_numba',
'rotate_y_numba',
'rotate_z_num... | [
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
6738,
997,
7012,
1330,
277,
23,
198,
6738,
997,
7012,
1330,
269,
1433,
198,
6... | 2.193535 | 4,950 |
# -*- coding: utf-8 -*-
"""
Created on 21 August 2017
@author: dgrossman
"""
import logging
import threading
import time
from functools import partial
import pika
class Rabbit(object):
'''
Base Class for RabbitMQ
'''
def make_rabbit_connection(self, host, port, exchange, queue_name, keys,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2310,
2932,
2177,
198,
31,
9800,
25,
288,
47181,
805,
198,
37811,
198,
11748,
18931,
198,
11748,
4704,
278,
198,
11748,
640,
198,
6738,
1257,
310... | 1.989641 | 1,448 |
from discord.ext import commands
import discord | [
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
36446
] | 5.222222 | 9 |
"""
Created on Sep 9, 2014
@author: jtaghiyar
"""
import sys
import copy
from helpers import *
from warnings import warn
class Connection(object):
"""
connection between different attributes of different sections.
"""
class IOConnection(object):
"""
io-connection, i.e. directed edge f... | [
37811,
198,
41972,
319,
8621,
860,
11,
1946,
198,
198,
31,
9800,
25,
474,
12985,
5303,
88,
283,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
4866,
198,
6738,
49385,
1330,
1635,
198,
6738,
14601,
1330,
9828,
198,
198,
4871,
26923,
7... | 2.080138 | 6,938 |
"""gestao_escolar URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | [
37811,
3495,
5488,
62,
3798,
6192,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
... | 2.724008 | 1,058 |
# coding: utf-8
import math
from .base import Barcode, MatrixCodeRenderer, DPI
from .util import zf_bin, cap_unescape
AZTEC_CODE_METRICS = [
# frmt mlyr icap ncws bpcw
["rune", 0, 0, 0, 6], # Special metric for rune symbols
["compact", 1, 1, 17, 6],
["full", 1, 1, 21, 6... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
10688,
198,
6738,
764,
8692,
1330,
2409,
8189,
11,
24936,
10669,
49,
437,
11882,
11,
360,
11901,
198,
6738,
764,
22602,
1330,
1976,
69,
62,
8800,
11,
1451,
62,
403,
41915,
628,
198,
22778,... | 1.993052 | 1,727 |
#---------------------------------------------#
# Gauss-Seidel Linear System Numeric Solver #
# 09/05/21 #
#---------------------------------------------#
import numpy as np
#Setup
n = 3
aMat = np.array([[4,-2,-1],[-5,-15,-9],[2,2,-5]])
xMat = np.zeros(n)
xMat_prev = n... | [
2,
3880,
32501,
2,
201,
198,
2,
220,
12822,
1046,
12,
4653,
5943,
44800,
4482,
399,
39223,
4294,
332,
220,
1303,
201,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
7769,
14,
2713,
1... | 2.107843 | 918 |
import demistomock as demisto
from CommonServerPython import *
from JSONFeedApiModule import * # noqa: E402
feed_config = {
'All GCP customer global and regional external IP ranges':
dict(CIDR={
'url': 'https://www.gstatic.com/ipranges/cloud.json',
'extractor': "prefixes[]",
... | [
11748,
1357,
396,
296,
735,
355,
1357,
396,
78,
198,
6738,
8070,
10697,
37906,
1330,
1635,
198,
198,
6738,
19449,
18332,
32,
14415,
26796,
1330,
1635,
220,
1303,
645,
20402,
25,
412,
32531,
198,
198,
12363,
62,
11250,
796,
1391,
198,
... | 2.003322 | 602 |
from typing import Optional
import time
from eventlog.serializers import EventSerializer
from .device import send_config_to_simple
from alert.models import (
AlertCounter,
AlertState,
get_max_alert_value,
get_ingame_states,
get_current
)
from django.core.exceptions import ObjectDoesNotExist
cla... | [
6738,
19720,
1330,
32233,
198,
198,
11748,
640,
198,
198,
6738,
1785,
6404,
13,
46911,
11341,
1330,
8558,
32634,
7509,
198,
6738,
764,
25202,
1330,
3758,
62,
11250,
62,
1462,
62,
36439,
198,
6738,
7995,
13,
27530,
1330,
357,
198,
220,
... | 2.297229 | 397 |
from typing import TYPE_CHECKING, List
from padinfo.common.config import UserConfig
from padinfo.pane_names import IdMenuPaneNames
from padinfo.view_state.base_id import ViewStateBaseId
from padinfo.view_state.common import get_monster_from_ims, get_reaction_list_from_ims
if TYPE_CHECKING:
from dadguide.models.mo... | [
6738,
19720,
1330,
41876,
62,
50084,
2751,
11,
7343,
198,
198,
6738,
14841,
10951,
13,
11321,
13,
11250,
1330,
11787,
16934,
198,
6738,
14841,
10951,
13,
79,
1531,
62,
14933,
1330,
5121,
23381,
47,
1531,
36690,
198,
6738,
14841,
10951,
... | 3.299065 | 107 |
'''
Explciación sencilla sobre la funcionalidad del módulo sys
'''
import sys
# Recibe n arguemntos.
argumentos = sys.argv
| [
7061,
6,
198,
198,
18438,
979,
32009,
18840,
3308,
66,
5049,
523,
4679,
8591,
25439,
1538,
32482,
1619,
285,
10205,
67,
43348,
25064,
198,
198,
7061,
6,
198,
198,
11748,
25064,
628,
198,
2,
3311,
32438,
299,
1822,
84,
368,
429,
418,
... | 2.471698 | 53 |
from kivy.app import App
from kivy.uix.scatter import Scatter
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.textinput import TextInput
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.uix.popup import ... | [
6738,
479,
452,
88,
13,
1324,
1330,
2034,
198,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
1416,
1436,
1330,
1446,
1436,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
18242,
1330,
36052,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
22468... | 2.97546 | 163 |
from Attribute import Attribute
from HyperParameters import HyperParameters
| [
6738,
3460,
4163,
1330,
3460,
4163,
198,
6738,
15079,
48944,
1330,
15079,
48944,
628,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
628,
628,
628,
628,
628,
628,
628,
... | 2.583333 | 48 |
# encoding: utf-8
"""
An application for IPython.
All top-level applications should use the classes in this module for
handling configuration and creating configurables.
The job of an :class:`Application` is to create the master configuration
object and then create the configurable objects, passing the config to them... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
37811,
198,
2025,
3586,
329,
6101,
7535,
13,
198,
198,
3237,
1353,
12,
5715,
5479,
815,
779,
262,
6097,
287,
428,
8265,
329,
198,
4993,
1359,
8398,
290,
4441,
4566,
333,
2977,
13,
198,
198,
464... | 2.910539 | 816 |
@check
| [
201,
198,
31,
9122,
201,
198,
220,
220,
220,
220,
201,
198
] | 1.333333 | 12 |
# -*- coding: utf-8 -*-
"""
Created on Sat May 1 13:25:00 2021
@author: 44743
"""
import random
#Create the wolves
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
1737,
220,
352,
1511,
25,
1495,
25,
405,
33448,
198,
198,
31,
9800,
25,
604,
2857,
3559,
198,
37811,
198,
11748,
4738,
198,
198,
2,
16447... | 2.076923 | 65 |
from citrination_client.models import PredictedValue
def test_can_crud_key():
"""
Tests that full get/set/delete functionality is
available for the key property
"""
original_key = "my_key"
original_value = 2
original_loss = 0.3
pv = PredictedValue(original_key, original_value, loss=ori... | [
6738,
15433,
81,
1883,
62,
16366,
13,
27530,
1330,
14322,
5722,
11395,
198,
198,
4299,
1332,
62,
5171,
62,
6098,
463,
62,
2539,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30307,
326,
1336,
651,
14,
2617,
14,
33678,
11244,
... | 2.55706 | 517 |
import os
import sys
from pathlib import Path
sys.path.insert(0, str( Path().resolve() ))
from modules.root_file.delete_files import delete_root_files_in_folder
from modules.root_file.assemble_root_files import unify_data_files
from modules.graph.graph_waveforms import GraphWaveforms_File
from modules.graph.gra... | [
11748,
28686,
198,
198,
11748,
25064,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
965,
7,
10644,
22446,
411,
6442,
3419,
15306,
628,
198,
6738,
13103,
13,
15763,
62,
7753,
13,
33678,
62,
... | 2.903846 | 728 |
# pylint: disable=C0103
"""
All mass properties are defined in this file. This includes:
* NSM
* PMASS
All mass properties are PointProperty and Property objects.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from pyNastran.bdf.cards.base_card import expand_thru_by, expand_thru, BaseCar... | [
2,
279,
2645,
600,
25,
15560,
28,
34,
486,
3070,
198,
37811,
198,
3237,
2347,
6608,
389,
5447,
287,
428,
2393,
13,
220,
770,
3407,
25,
628,
1635,
10896,
44,
198,
1635,
3122,
10705,
198,
198,
3237,
2347,
6608,
389,
6252,
21746,
290,
... | 2.053848 | 9,174 |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
import math
import numpy as np
if __name__ == "__main__":
#testing stuff
from dataloader import ReverseDataset
from data_utils import pad_collate
from to... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
20471,
13,
26791,
13,
81,
20471,
1330,
2353,
62,
79,
29373,
62,
43167,
11,
14841,
62,
34860,
62,
43167,... | 2.252285 | 547 |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: test_myTLWE.py
# Purpose:
#
# Author: Junichi Sakamoto
#
# Created: 2022 Mar. 24
# Copyright: (c) sakamoto 2022
# Licence: <your licence>
#-----------------------------------------... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10097,
24305,
198,
2,
6530,
25,
220,
220,
220,
220,
220,
220,
220,
1332,
62,
1820,
14990,
8845,
13,
9078,
198,
2,
32039,
25,
220,
220,
220,
220,
220,
198,
2,
19... | 3.005814 | 172 |
"""Image Tiler."""
# Copyright (C) 2020 Intel Corporation
#
# 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... | [
37811,
5159,
309,
5329,
526,
15931,
198,
198,
2,
15069,
357,
34,
8,
12131,
8180,
10501,
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,
28... | 2.340448 | 5,716 |
# -*- coding: UTF-8 -*-
## Global settings and imports
import sys
sys.path.append("../../")
import os
from reco_utils.recommender.deeprec.deeprec_utils import download_deeprec_resources
from reco_utils.recommender.newsrec.newsrec_utils import prepare_hparams
from reco_utils.recommender.newsrec.models.lstur import LSTUR... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
2235,
8060,
6460,
290,
17944,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
40720,
40720,
4943,
198,
11748,
28686,
198,
6738,
664,
78,
62,
26791,
13,
47335,
2194,... | 2.360123 | 1,630 |
name = "personal_portfolio" | [
3672,
796,
366,
22682,
62,
634,
13652,
1
] | 3.375 | 8 |
from dbac_lib import dbac_data, dbac_model, dbac_feature_ext, dbac_primitives, dbac_util, dbac_expression
import logging
import numpy as np
from dbac_lib.dbac_expression import eval_op
from dbac_lib.dbac_model import exp_members
logger = logging.getLogger(__name__)
if __name__ == '__main__':
import argparse
... | [
6738,
20613,
330,
62,
8019,
1330,
20613,
330,
62,
7890,
11,
20613,
330,
62,
19849,
11,
20613,
330,
62,
30053,
62,
2302,
11,
20613,
330,
62,
19795,
20288,
11,
20613,
330,
62,
22602,
11,
20613,
330,
62,
38011,
198,
11748,
18931,
198,
... | 2.756447 | 698 |
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 3 17:22:23 2021
@author: dogancan
"""
#bir dosyadan veri okuyup arayüzde anlamlandırma
#table widget
import sys
import csv
from PyQt5.Qt import *
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
app.exec() | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
2758,
220,
513,
1596,
25,
1828,
25,
1954,
33448,
198,
198,
31,
9800,
25,
466,
1030,
5171,
220,
198,
37811,
628,
198,
2,
65,
343,
23430,
... | 2.420168 | 119 |
#!/usr/bin/env python
# Copyright (C) F5 Networks, Inc. 2015-2016
# Author: Christian Koenning, christian@f5.com
# No part of the software may be reproduced or transmitted in any
# form or by any means, electronic or mechanical, for any purpose,
# without express written permission of F5 Networks, Inc.
import eossdk
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
34,
8,
376,
20,
27862,
11,
3457,
13,
1853,
12,
5304,
198,
2,
6434,
25,
4302,
49178,
768,
11,
33826,
666,
31,
69,
20,
13,
785,
198,
2,
1400,
636,
286,
262,
3788,
... | 2.031066 | 6,277 |
# A sample program to demonstrate unpacking of
# dictionary items using **
# A call with unpacking of dictionary
d = {'a':2, 'b':4, 'c':10}
fun(**d) | [
2,
317,
6291,
1430,
284,
10176,
8593,
5430,
286,
198,
2,
22155,
3709,
1262,
12429,
198,
220,
198,
2,
317,
869,
351,
8593,
5430,
286,
22155,
198,
67,
796,
1391,
6,
64,
10354,
17,
11,
705,
65,
10354,
19,
11,
705,
66,
10354,
940,
9... | 2.941176 | 51 |
from __future__ import division
import numpy as np
import logistic_model_test
from numpy.linalg import norm
import emcee
#import matplotlib.pyplot as pl
import matplotlib.pyplot as plt
# Logistic Regression
| [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2604,
2569,
62,
19849,
62,
9288,
198,
6738,
299,
32152,
13,
75,
1292,
70,
1330,
2593,
198,
11748,
795,
344,
68,
198,
2,
11748,
2603,
29487,
8019,
13,... | 2.648352 | 91 |
import pickle
from algorithms.clustering.column_model import Column
from algorithms.clustering.emd_utils import quantile_emd, intersection_emd
from algorithms.clustering.quantile_histogram.histogram import QuantileHistogram
def compute_cutoff_threshold(C: list, threshold: float):
"""
Algorithm 1 of the pape... | [
11748,
2298,
293,
628,
198,
6738,
16113,
13,
565,
436,
1586,
13,
28665,
62,
19849,
1330,
29201,
198,
6738,
16113,
13,
565,
436,
1586,
13,
368,
67,
62,
26791,
1330,
5554,
576,
62,
368,
67,
11,
16246,
62,
368,
67,
198,
6738,
16113,
... | 2.485577 | 2,288 |
# Uppgift 2
x = "Förlåt, det där har aldrig hänt mig förut!"
# Uppgift 4
seq = list(range(10))
| [
198,
2,
471,
381,
70,
2135,
362,
198,
87,
796,
366,
37,
30570,
75,
29090,
83,
11,
1062,
288,
11033,
81,
3971,
257,
335,
4359,
289,
11033,
429,
37011,
277,
30570,
315,
2474,
628,
198,
2,
471,
381,
70,
2135,
604,
198,
41068,
796,
... | 1.921569 | 51 |
import matplotlib as mpl
import matplotlib.pyplot as plt
from sklearn.metrics import confusion_matrix
import os
import argparse
import pickle
import pandas as pd
import numpy as np
import random
import seaborn as sns
from itertools import chain
from itertools import product
from dataclasses import dataclass
import scip... | [
11748,
2603,
29487,
8019,
355,
285,
489,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
10802,
62,
6759,
8609,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
2298,
2... | 2.39696 | 1,645 |
import hashlib
from django import http
from django.shortcuts import get_object_or_404
from django.views.decorators.http import etag
import commonware.log
import amo
from amo.decorators import allow_cross_site_request
from mkt.constants import MANIFEST_CONTENT_TYPE
from mkt.webapps.decorators import app_view_factory
... | [
11748,
12234,
8019,
198,
198,
6738,
42625,
14208,
1330,
2638,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
4023,
1330,
2123,
363,
198,... | 2.574109 | 533 |
# Before overdriving the signal
# we must preproscess it to remove
# uneccesery noises
# So we can implement a filter chain
import numpy as np
from fft import audio_fft,audio_invfft
from librosa import core
import wave
FILTER_CHAIN = {'enoise':60.0,
'high_noise':6000.0,
'middle_noise':300.0,
'very_... | [
2,
7413,
625,
24255,
262,
6737,
198,
2,
220,
220,
220,
356,
1276,
662,
1676,
82,
919,
340,
284,
4781,
198,
2,
220,
220,
220,
17809,
535,
274,
1924,
26782,
198,
2,
1406,
356,
460,
3494,
257,
8106,
6333,
198,
198,
11748,
299,
32152,... | 2.464286 | 140 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Base class for both BSS Eval algorithms (:ref:`BSSEvalSources` and :ref:`BSSEvalImages`). Contains
most of the logic for these base classes.
"""
import numpy as np
from nussl.evaluation import evaluation_base
class BSSEvalBase(evaluation_base.EvaluationBase):
"... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
14881,
1398,
329,
1111,
347,
5432,
26439,
16113,
357,
25,
5420,
25,
63,
4462,
5188,
2100,
21188,
63,
... | 2.562791 | 2,365 |
#***********************************************************************#
# Copyright (C) 2010-2012 Tomas Tinoco De Rubira #
# #
# This file is part of CVXPY #
# ... | [
2,
17174,
17174,
2466,
8162,
2,
198,
2,
15069,
357,
34,
8,
3050,
12,
6999,
42884,
22894,
25634,
1024,
6256,
8704,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.001914 | 1,045 |
# Original authors from Sckit-Learn:
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
# This code originates from the Scikit-Learn library,
# it was since modified to allow GPU acceleration.
# This code is under BSD 3 clause license.
# Authors mentioned above do not endorse or promote ... | [
2,
13745,
7035,
422,
311,
694,
270,
12,
20238,
25,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
39652,
569,
12022,
421,
14644,
1279,
70,
3010,
13,
7785,
22696,
14644,
31,
27237,
2040,
929,
13,
2398,
29,
198,
2,
13789,
25,
347,
... | 2.253104 | 2,497 |
import os | [
11748,
28686
] | 4.5 | 2 |
#
# PySNMP MIB module PDN-MPE-HEALTH-AND-STATUS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-MPE-HEALTH-AND-STATUS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:39:22 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python ve... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
14340,
45,
12,
7378,
36,
12,
13909,
40818,
12,
6981,
12,
35744,
2937,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
... | 2.935131 | 1,372 |
#!/usr/bin/env python
"""
beachfront-py
https://github.com/venicegeo/beachfront-py
Copyright 2017, RadiantBlue Technologies, 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.o... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
1350,
620,
8534,
12,
9078,
198,
5450,
1378,
12567,
13,
785,
14,
574,
501,
469,
78,
14,
1350,
620,
8534,
12,
9078,
198,
15269,
2177,
11,
34145,
14573,
21852,
11,
3457,
13,... | 2.923538 | 667 |
from sklearn.datasets import load_digits
digits = load_digits()
print(digits.data.shape)
import matplotlib.pyplot as plt
plt.gray()
plt.matshow(digits.images[1])
plt.show()
from sklearn.preprocessing import StandardScaler
X_scale = StandardScaler()
X = X_scale.fit_transform(digits.data)
X[0,:]
Out[3]:
array([... | [
6738,
1341,
35720,
13,
19608,
292,
1039,
1330,
3440,
62,
12894,
896,
198,
198,
12894,
896,
796,
3440,
62,
12894,
896,
3419,
198,
198,
4798,
7,
12894,
896,
13,
7890,
13,
43358,
8,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
... | 1.762108 | 702 |
# folder of Transformers models
| [
2,
9483,
286,
39185,
4981,
628
] | 5.5 | 6 |
import json
import os
import sys
import click
import datetime
import subprocess
import pandas as pd
from flask import Flask, request
from flask import render_template, send_from_directory
from flask_socketio import SocketIO
from argent.generator.generator import generate_experiment
from argent import Configurator, path... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
3904,
198,
11748,
4818,
8079,
198,
11748,
850,
14681,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
42903,
1330,
46947,
11,
2581,
198,
6738,
42903,
1330,
8543,
62,
28243,
... | 3.249042 | 261 |
# coding=utf-8
from service.mahjong.models.hutype.basetype import BaseType
class QingYiSe(BaseType):
"""
清一色
""" | [
2,
19617,
28,
40477,
12,
23,
198,
198,
6738,
2139,
13,
76,
993,
32428,
13,
27530,
13,
71,
315,
2981,
13,
12093,
2963,
431,
1330,
31783,
628,
198,
4871,
28927,
56,
72,
4653,
7,
14881,
6030,
2599,
198,
220,
220,
220,
37227,
198,
220... | 2.189655 | 58 |
""" cut_salt.py -- Cut the salt fit data to match the SNEMO7 quality cuts.
"""
__author__ = "Benjamin Rose"
__email__ = "brose@stsci.edu"
__data__ = "2019-03-14"
__python__ = "^3.6"
from pathlib import Path
import pickle
import warnings
import numpy as np
import toml
NAME_PREFIX = ""
# list of SN names that pass... | [
37811,
2005,
62,
82,
2501,
13,
9078,
1377,
9712,
262,
8268,
4197,
1366,
284,
2872,
262,
11346,
3620,
46,
22,
3081,
6630,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
11696,
13337,
8049,
1,
198,
834,
12888,
834,
796,
366,
7957... | 2.311111 | 270 |
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | [
2,
15069,
357,
66,
8,
1946,
12,
25579,
19193,
9399,
1279,
32057,
31,
24254,
952,
13,
2398,
29,
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,
... | 3.77665 | 197 |
# coding: utf-8
"""
HardwareApi.py
Copyright 2016 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required ... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
49865,
32,
14415,
13,
9078,
198,
15269,
1584,
10880,
36352,
10442,
628,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
220,
2... | 2.092441 | 9,552 |
from collections import defaultdict
from copy import deepcopy
from enum import IntEnum
INFINITY = 2 ** 30
NEIGHBORS = defaultdict(set)
BACKWARDS = set()
DISTANCES = {
0: 4,
1: 3,
2: 3,
3: 3,
4: 2,
5: 2,
6: 2,
7: 1,
8: 1,
9: 1,
10: 0
}
add_edge(0, 1)
add_edge(0, 2)
add_e... | [
6738,
17268,
1330,
4277,
11600,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
33829,
1330,
2558,
4834,
388,
628,
198,
1268,
20032,
9050,
796,
362,
12429,
1542,
628,
198,
12161,
18060,
33,
20673,
796,
4277,
11600,
7,
2617,
8,
198,
31098... | 2.124389 | 2,251 |
from django import template
from guardian.utils import get_anonymous_user
from rest_framework.authtoken.models import Token
register = template.Library()
@register.simple_tag
def auth_token(user):
"""Get the auth token for the user."""
if user and user.pk != get_anonymous_user().pk:
token, _ = Token... | [
6738,
42625,
14208,
1330,
11055,
198,
6738,
21688,
13,
26791,
1330,
651,
62,
272,
6704,
62,
7220,
198,
6738,
1334,
62,
30604,
13,
18439,
30001,
13,
27530,
1330,
29130,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
628,
198,
31,
30238,
... | 2.836879 | 141 |
import os
import re
import libsbml
from lxml import etree
import sympy as sp, numpy as np, ndsplines
import warnings
from simupy import codegen
delimeter_regex = re.compile("\s+|(?<!\d)[.](?!\d)|,")
Clip = sp.Function('clip')
run_check_code_template = """
def run_checks():
for check_input, check_output in check... | [
11748,
28686,
198,
11748,
302,
198,
11748,
9195,
36299,
4029,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
11748,
10558,
88,
355,
599,
11,
299,
32152,
355,
45941,
11,
299,
9310,
489,
1127,
198,
11748,
14601,
198,
6738,
985,
929,
88,
1... | 2.641026 | 195 |
# Copyright 2021 AI Singapore
#
# 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,
33448,
9552,
12551,
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... | 2.654667 | 1,500 |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
from django.conf import settings
from django.contrib.gis import geos
from li... | [
37811,
198,
1212,
2393,
15687,
734,
1180,
12186,
286,
5254,
357,
505,
10412,
395,
290,
530,
198,
403,
715,
395,
737,
2312,
481,
1111,
1208,
618,
345,
1057,
366,
805,
496,
13,
9078,
1332,
1911,
198,
198,
3041,
5372,
777,
351,
517,
50... | 3.568182 | 132 |
from flask import Flask
from flask_debugtoolbar import DebugToolbarExtension
from flask_bcrypt import Bcrypt
from flask_login import LoginManager,login_required,current_user,login_user,logout_user
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
bcrypt = Bcrypt(app)
login_manager = LoginManager(app)
logi... | [
6738,
42903,
1330,
46947,
198,
6738,
42903,
62,
24442,
25981,
5657,
1330,
31687,
25391,
5657,
11627,
3004,
198,
6738,
42903,
62,
15630,
6012,
1330,
347,
29609,
198,
6738,
42903,
62,
38235,
1330,
23093,
13511,
11,
38235,
62,
35827,
11,
144... | 2.96679 | 271 |
from django.forms import ModelForm, DateInput
from .models import Expenses
from django.forms import ValidationError
| [
6738,
42625,
14208,
13,
23914,
1330,
9104,
8479,
11,
7536,
20560,
198,
6738,
764,
27530,
1330,
5518,
4541,
198,
6738,
42625,
14208,
13,
23914,
1330,
3254,
24765,
12331,
628,
628
] | 3.966667 | 30 |
# -*- coding: utf-8 -*-
#
# Copyright 2018 Yubico AB
# Copyright 2021 Nitrokey Developers
#
# Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
# http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
# http://opensource.org/licenses/MIT>, at your option. This file may not be
# copi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
2864,
575,
549,
3713,
9564,
198,
2,
15069,
33448,
24282,
305,
2539,
34152,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
1... | 2.813725 | 408 |
from pathlib import Path
from . import hg
from . import git
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
764,
1330,
289,
70,
198,
6738,
764,
1330,
17606,
198
] | 3.388889 | 18 |
from abc import ABC, abstractproperty
| [
6738,
450,
66,
1330,
9738,
11,
12531,
26745,
628,
628
] | 4.1 | 10 |
# from pathlib import Path
from pathlib import Path
| [
2,
422,
3108,
8019,
1330,
10644,
198,
6738,
3108,
8019,
1330,
10644,
628
] | 4.076923 | 13 |
from __future__ import division
from cctbx import miller
from cctbx.examples.structure_factor_derivatives_3 \
import scatterer_as_list, scatterer_from_list, structure_factors
from cctbx.examples.exp_i_alpha_derivatives import least_squares
from cctbx.array_family import flex
from cctbx.development import random_struc... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
269,
310,
65,
87,
1330,
3939,
263,
198,
6738,
269,
310,
65,
87,
13,
1069,
12629,
13,
301,
5620,
62,
31412,
62,
1082,
452,
2929,
62,
18,
3467,
198,
220,
1330,
629,
1078,
11882,
62,
29... | 2.865979 | 194 |
from offpolicy.algorithms.maddpg.algorithm.actor_critic import MADDPG_Actor, MADDPG_Critic
class MATD3_Actor(MADDPG_Actor):
"""MATD3 Actor is identical to MADDPG Actor, see parent class"""
pass
class MATD3_Critic(MADDPG_Critic):
"""MATD3 Critic class. Identical to MADDPG Critic, but with 2 Q output.s""" | [
6738,
572,
30586,
13,
282,
7727,
907,
13,
76,
2860,
6024,
13,
282,
42289,
13,
11218,
62,
22213,
291,
1330,
45878,
6322,
38,
62,
40277,
11,
45878,
6322,
38,
62,
18559,
291,
198,
198,
4871,
36775,
35,
18,
62,
40277,
7,
44,
2885,
632... | 2.628099 | 121 |