content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import numpy as np
from coremltools.converters.mil.mil import (
BoolInputType,
DefaultInputs,... | [
2,
220,
15069,
357,
66,
8,
12131,
11,
4196,
3457,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
18,
12,
565,
682,
5964,
326,
460,
307,
198,
2,
220,
1043,
287,
... | 2.412146 | 2,470 |
import pygame
from pygame.locals import *
from random import randint
from gameobjects.vector2 import Vector2
SCREEN_SIZE = (640, 480)
# In pixels per second, per second
GRAVITY = 250.0
# Increase for more bounciness, but don't go over 1!
BOUNCINESS = 0.7
if __name__ == "__main__":
run()
| [
11748,
12972,
6057,
198,
6738,
12972,
6057,
13,
17946,
874,
1330,
1635,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
983,
48205,
13,
31364,
17,
1330,
20650,
17,
198,
198,
6173,
2200,
1677,
62,
33489,
796,
357,
31102,
11,
23487,
8,
19... | 2.830189 | 106 |
import unittest
import bokeh.plotting as plt
from bokeh.objects import Grid, LinearAxis
| [
11748,
555,
715,
395,
198,
198,
11748,
1489,
365,
71,
13,
29487,
889,
355,
458,
83,
198,
6738,
1489,
365,
71,
13,
48205,
1330,
24846,
11,
44800,
31554,
271,
628,
628
] | 2.967742 | 31 |
import os
from celery import Celery
from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Calendar.settings')
app = Celery('Calendar')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
| [
11748,
28686,
198,
198,
6738,
18725,
1924,
1330,
15248,
1924,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
628,
198,
418,
13,
268,
2268,
13,
2617,
12286,
10786,
35028,
1565,
11230,
62,
28480,
51,
20754,
62,
33365,
24212,
3256,
705,
9... | 2.863158 | 95 |
# Copyright 2015 OpenStack Foundation
# Copyright 2015 VMware Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LI... | [
2,
15069,
1853,
4946,
25896,
5693,
198,
2,
15069,
1853,
37754,
3457,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
... | 2.403361 | 1,309 |
import json
import unittest
from pytopojson import quantize
| [
11748,
33918,
198,
11748,
555,
715,
395,
198,
198,
6738,
12972,
4852,
13210,
1559,
1330,
5554,
1096,
628
] | 3.444444 | 18 |
from lark import Lark
from pkgutil import get_data
from itertools import chain
from kestrel.codegen.relations import all_relations
| [
6738,
300,
668,
1330,
406,
668,
198,
6738,
279,
10025,
22602,
1330,
651,
62,
7890,
198,
6738,
340,
861,
10141,
1330,
6333,
198,
198,
6738,
479,
395,
2411,
13,
8189,
5235,
13,
39468,
1330,
477,
62,
39468,
628
] | 3.5 | 38 |
from calendar import c
from distutils.log import error
import pandas as pd
import csv
import asyncio
import os
import shutil
from atividades import *
from tkinter import *
root = Tk()
usuario_logado = ''
user_logado = Usuario('', 0, 0,'','')
if __name__ == '__main__':
#Adici... | [
6738,
11845,
1330,
269,
198,
6738,
1233,
26791,
13,
6404,
1330,
4049,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
269,
21370,
198,
11748,
30351,
952,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
379,
1699,
2367,
1330,
1635... | 2.386076 | 158 |
# Generated by Django 2.0.6 on 2019-10-03 17:36
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
21,
319,
13130,
12,
940,
12,
3070,
1596,
25,
2623,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
import neo4j
import uvicorn
from ariadne.asgi import GraphQL
from neo4j_graphql_py import neo4j_graphql, make_executable_schema
typeDefs = '''
directive @cypher(statement: String!) on FIELD_DEFINITION
directive @relation(name:String!, direction:String!) on FIELD_DEFINITION
type Movie {
_id: ID
title: String
rele... | [
11748,
19102,
19,
73,
198,
11748,
334,
25531,
1211,
198,
6738,
257,
21244,
710,
13,
292,
12397,
1330,
29681,
9711,
198,
6738,
19102,
19,
73,
62,
34960,
13976,
62,
9078,
1330,
19102,
19,
73,
62,
34960,
13976,
11,
787,
62,
18558,
18187,... | 2.671815 | 518 |
#!/usr/bin/env python
# Copyright (c) 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
README = """
Automatically add a specific legacy flag to multiple Skia client repos.
This would only work on Google desktop.
Exam... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
66,
8,
2177,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
... | 2.927869 | 305 |
#!/usr/bin/env python3
# Copyright 2014-present PUNCH Cyber Analytics Group
#
# 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
#
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
220,
220,
15069,
1946,
12,
25579,
350,
47461,
15101,
30437,
4912,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
... | 3.489426 | 331 |
from flask import Flask, render_template
import requests
# posts = requests.get("https://api.npoint.io/43644ec4f0013682fc0d").json()
posts = requests.get('https://api.npoint.io/5083070470e7db605e88').json()
app = Flask(__name__)
@app.route('/')
@app.route("/post/<int:index>")
@app.route("/about")
@app.route("... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
11748,
7007,
198,
198,
2,
6851,
796,
7007,
13,
1136,
7203,
5450,
1378,
15042,
13,
77,
4122,
13,
952,
14,
3559,
29173,
721,
19,
69,
405,
1485,
43950,
16072,
15,
67,
11074,
17752,
34... | 2.519737 | 152 |
from __future__ import annotations
from typing import Dict, Optional, TYPE_CHECKING
from subway import HTTPStatus
from subway.headers import Headers
from subway.streams import StreamReader
from subway.request import HTTPConnection
if TYPE_CHECKING:
from .abc import Hooker
class HTTPResponse(HTTPConnection):
... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
360,
713,
11,
32233,
11,
41876,
62,
50084,
2751,
198,
198,
6738,
19612,
1330,
14626,
19580,
198,
6738,
19612,
13,
50145,
1330,
7123,
364,
198,
6738,
19612,
13,
5532,
82,... | 2.520992 | 524 |
# -*- coding: utf-8 -*-
###
### DO NOT CHANGE THIS FILE
###
### The code is auto generated, your change will be overwritten by
### code generating.
###
from __future__ import absolute_import
from .api.oauth_token_code import OauthTokenCode
from .api.accounts_self import AccountsSelf
from .api.oauth_token import Oau... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
21017,
198,
21017,
8410,
5626,
5870,
27746,
12680,
45811,
198,
21017,
220,
198,
21017,
383,
2438,
318,
8295,
7560,
11,
534,
1487,
481,
307,
6993,
9108,
416,
220,
19... | 2.92217 | 424 |
n1 = int(input('Diga um numero: '))
n2 = int(input('Diga um numero: '))
n3 = int(input('Diga um numero: '))
maior = n1
soma = n2 + n3
if n2 > n1 and n2 > n3:
maior = n2
soma = n1 + n3
elif n3 > n1 and n3 > n2:
maior = n3
soma = n2 + n1
tri = ''
if n1 != n2 != n3 != n1:
tri = 'Escaleno'
elif n1 ==... | [
77,
16,
796,
493,
7,
15414,
10786,
35,
13827,
23781,
997,
3529,
25,
705,
4008,
198,
77,
17,
796,
493,
7,
15414,
10786,
35,
13827,
23781,
997,
3529,
25,
705,
4008,
198,
77,
18,
796,
493,
7,
15414,
10786,
35,
13827,
23781,
997,
3529... | 1.911765 | 306 |
"""
UB_ID : 50291708
Name : Md Moniruzzaman Monir
Character Detection
(Due date: March 8th, 11: 59 P.M.)
The goal of this task is to experiment with template matching techniques. Specifically, the task is to find ALL of
the coordinates where a specific character appears using ... | [
37811,
201,
198,
220,
220,
220,
471,
33,
62,
2389,
1058,
2026,
1959,
1558,
2919,
201,
198,
220,
220,
220,
6530,
220,
1058,
39762,
2892,
343,
4715,
10546,
2892,
343,
201,
198,
220,
220,
220,
220,
201,
198,
220,
220,
220,
15684,
46254... | 2.187713 | 2,344 |
# Imports from python.
import os
import uuid
# Imports from Django.
from django.db import models
from django.utils.html import format_html
# Imports from politico-civic-entity.
from entity.models.base import CivicBaseModel
# from entity.models.base import NaturalKeyMixin
from entity.models.image_tag import ImageTag... | [
2,
1846,
3742,
422,
21015,
13,
198,
11748,
28686,
198,
11748,
334,
27112,
628,
198,
2,
1846,
3742,
422,
37770,
13,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
13,
6494,
1330,
5794,
62,
6494,
628,... | 2.862797 | 379 |
import pandas as pd
import albumentations
import joblib
import numpy as np
import torch
from PIL import Image
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
435,
65,
1713,
602,
198,
11748,
1693,
8019,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
198,
6738,
350,
4146,
1330,
7412,
198
] | 3.363636 | 33 |
# Crie um programa que leia um número inteiro e mostra na tela se ele é par ou ímpar.
num = float(input('Digite um número: '))
resto = num % 2
if resto == 1:
print('O número é ímpar!')
else:
print('O número é par!')
# Resolução da aula
# número = int(input('Me diga um número qualquer: '))
# resultado = nú... | [
2,
327,
5034,
23781,
1430,
64,
8358,
443,
544,
23781,
299,
21356,
647,
78,
493,
68,
7058,
304,
749,
430,
12385,
256,
10304,
384,
9766,
38251,
1582,
267,
84,
6184,
255,
76,
1845,
13,
198,
198,
22510,
796,
12178,
7,
15414,
10786,
1951... | 2.110599 | 217 |
import json
import os
import subprocess
from pathlib import Path
PROJECT_ROOT = Path(__file__).absolute().parent.parent
if __name__ == "__main__":
write_vscode_settings()
delete_myself()
| [
11748,
33918,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
31190,
23680,
62,
13252,
2394,
796,
10644,
7,
834,
7753,
834,
737,
48546,
22446,
8000,
13,
8000,
628,
628,
198,
198,
361,
11593,
3672... | 2.871429 | 70 |
#!/usr/bin/python
from TraefikUpdater import TraefikUpdater
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
6738,
4759,
891,
1134,
4933,
67,
729,
1330,
4759,
891,
1134,
4933,
67,
729,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
... | 2.372093 | 43 |
from django.db import migrations
| [
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 3.777778 | 9 |
import scipy.interpolate
from scipy.special import expit
import scipy.constants as constants
import numpy as np | [
11748,
629,
541,
88,
13,
3849,
16104,
378,
198,
6738,
629,
541,
88,
13,
20887,
1330,
1033,
270,
198,
11748,
629,
541,
88,
13,
9979,
1187,
355,
38491,
198,
11748,
299,
32152,
355,
45941
] | 3.264706 | 34 |
import logging
import os
| [
11748,
18931,
198,
11748,
28686,
198
] | 4.166667 | 6 |
import io
import json
import boto3
import os
from pydub import AudioSegment
| [
11748,
33245,
198,
11748,
33918,
198,
11748,
275,
2069,
18,
198,
11748,
28686,
198,
198,
6738,
279,
5173,
549,
1330,
13491,
41030,
434,
198,
220,
220,
220,
220,
220,
220,
220,
220,
628
] | 2.636364 | 33 |
""" netplan.py generates netplan file for triage.
There are two cases, one for during triage where a machine generates a default netplan yaml file,
and other is for server.
"""
from ..const import const
from ..components.network import NetworkDeviceType, NetworkDevice
import sys, os, json, hashlib
indentspace = ' '... | [
37811,
2010,
11578,
13,
9078,
18616,
2010,
11578,
2393,
329,
1333,
496,
13,
198,
198,
1858,
389,
734,
2663,
11,
530,
329,
1141,
1333,
496,
810,
257,
4572,
18616,
257,
4277,
2010,
11578,
331,
43695,
2393,
11,
198,
392,
584,
318,
329,
... | 2.293931 | 3,773 |
import requests
DCARD_URL = 'https://www.dcard.tw'
DCARD_API = DCARD_URL + '/_api/posts?popular=true'
#https://www.dcard.tw/_api/posts?popular=true&limit=最大幾項&before=最後一篇文章號碼
if __name__ == '__main__':
num_page = 2
posts = list(requests.get(DCARD_API).json())
for i in range(1, num_page):
id_last... | [
11748,
7007,
628,
198,
9697,
9795,
62,
21886,
796,
705,
5450,
1378,
2503,
13,
67,
9517,
13,
4246,
6,
198,
9697,
9795,
62,
17614,
796,
6257,
9795,
62,
21886,
1343,
31051,
62,
15042,
14,
24875,
30,
47568,
28,
7942,
6,
198,
2,
5450,
... | 1.948097 | 289 |
"""
flask_zs.exceptions
~~~~~~~~~~~~
flask-zs exceptions module
:copyright: (c) 2018 by codeif.
:license: MIT, see LICENSE for more details.
"""
| [
37811,
198,
220,
220,
220,
42903,
62,
89,
82,
13,
1069,
11755,
198,
220,
220,
220,
220,
15116,
8728,
628,
220,
220,
220,
42903,
12,
89,
82,
13269,
8265,
628,
220,
220,
220,
1058,
22163,
4766,
25,
357,
66,
8,
2864,
416,
2438,
361,
... | 2.615385 | 65 |
"""
# Problem Statement
Given a list of non-negative numbers and a target integer k, write a function to
check if the array has a continuous subarray of size at least 2 that sums up to
a multiple of k, that is, sums up to n*k where n is also an integer.
## Constraints:
The length of the array won't exceed 10,000.
You... | [
37811,
198,
2,
20647,
21983,
198,
198,
15056,
257,
1351,
286,
1729,
12,
31591,
3146,
290,
257,
2496,
18253,
479,
11,
3551,
257,
2163,
284,
198,
9122,
611,
262,
7177,
468,
257,
12948,
850,
18747,
286,
2546,
379,
1551,
362,
326,
21784,
... | 2.281139 | 843 |
# Generated by Django 2.2.17 on 2021-01-29 22:34
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1558,
319,
33448,
12,
486,
12,
1959,
2534,
25,
2682,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.840909 | 44 |
from django.contrib import admin
from django.contrib.auth import views as auth
from django.urls import path, include
import main.views
import accounts.views
urlpatterns = [
path('',main.views.IndexView, name='index'),
path('login/', accounts.views.SignInView.as_view(), name='login'),
path('logout/', a... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5009,
355,
6284,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
198,
11748,
1388,
13,
33571,
198,
11748,
5504,
... | 2.746006 | 626 |
#!/usr/bin/env python3
# coding: utf-8
import os
from detectron2.data.datasets import register_coco_instances
from detectron2 import model_zoo
from detectron2.config import get_cfg
from detectron2.engine import DefaultTrainer
from torch import cuda
register_coco_instances("person_bag_train", {}, "./datasets/per... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
28686,
198,
220,
220,
220,
220,
198,
6738,
4886,
1313,
17,
13,
7890,
13,
19608,
292,
1039,
1330,
7881,
62,
66,
25634,
62,
8625,... | 2.402141 | 654 |
"""
GTSAM Copyright 2010-2018, Georgia Tech Research Corporation,
Atlanta, Georgia 30332-0415
All Rights Reserved
Authors: Frank Dellaert, et al. (see THANKS for the full author list)
See LICENSE for the license information
Shonan Rotation Averaging CLI reads a *pose* graph, extracts the
rotation constraints, and run... | [
37811,
198,
38,
4694,
2390,
15069,
3050,
12,
7908,
11,
7859,
9634,
4992,
10501,
11,
198,
43482,
11,
7859,
1542,
32148,
12,
3023,
1314,
198,
3237,
6923,
33876,
198,
30515,
669,
25,
5278,
360,
12627,
861,
11,
2123,
435,
13,
357,
3826,
... | 2.415691 | 1,708 |
from fabric.api import run,put,cd,parallel,roles,serial,local,runs_once
from env_setup import *
counter = 0
"""
Used to measure the time taken to simply upload
data into HDFS.
"""
@parallel
@roles('master')
@parallel
@roles('master')
@roles('master')
@roles('master')
@roles('master')
@roles('master')
@roles('... | [
6738,
9664,
13,
15042,
1330,
1057,
11,
1996,
11,
10210,
11,
1845,
29363,
11,
305,
829,
11,
46911,
11,
12001,
11,
48381,
62,
27078,
198,
6738,
17365,
62,
40406,
1330,
1635,
198,
198,
24588,
796,
657,
198,
198,
37811,
198,
38052,
284,
... | 2.624309 | 181 |
from dsgrn_net_gen.makejobs import Job
import sys
paramfile = sys.argv[1]
job = Job(paramfile)
job.run()
| [
6738,
288,
82,
2164,
77,
62,
3262,
62,
5235,
13,
15883,
43863,
1330,
15768,
198,
11748,
25064,
198,
198,
17143,
7753,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
21858,
796,
15768,
7,
17143,
7753,
8,
198,
21858,
13,
5143,
3419,
628
] | 2.488372 | 43 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
MAST Microservices API
======================
This module contains various methods for querying MAST microservice APIs.
"""
import json
import time
import warnings
import numpy as np
from astropy.table import Table, Column, MaskedColumn
from ..que... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
198,
37811,
198,
44,
11262,
4527,
30416,
7824,
198,
4770,
50155,
198,
198,
1212,
8265,
4909,
2972,
5050,
329,
42517,
1112,
337,
11262,... | 2.346676 | 5,446 |
import numpy as np
##
## use in week 2, 4 and 5
##
def get_rss(model, data, y):
"""
get prediction, then calc. rss
"""
preds = model.predict(data) # First get the predictions
diff = y - preds # Then compute the residuals/errors
rss = (diff * diff).sum() # Then square and add... | [
11748,
299,
32152,
355,
45941,
198,
198,
2235,
198,
2235,
779,
287,
1285,
362,
11,
604,
290,
642,
198,
2235,
198,
198,
4299,
651,
62,
42216,
7,
19849,
11,
1366,
11,
331,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
651,
17... | 2.457143 | 140 |
#! /usr/bin/python
import cv2
import sys
import os
import ntpath
f = sys.argv[1]
print('Binarizing ',f)
name = ntpath.basename(f)
dir = os.path.dirname(f)
im_gray = cv2.imread(f, cv2.IMREAD_GRAYSCALE)
#THRESH_BINARY_INV
if(len(sys.argv) > 2):
thresh = 130
im_bw = cv2.threshold(im_gray, thresh, 255, cv2.THRESH... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
198,
11748,
269,
85,
17,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
299,
83,
6978,
198,
198,
69,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
4798,
10786,
33,
22050,
2890,
46083,
69,
8,
... | 1.912 | 250 |
__author__ = 'Williams Mendez'
| [
834,
9800,
834,
796,
705,
27869,
20442,
8471,
6,
198,
220,
220
] | 2.75 | 12 |
# Generating Tables (Latex)
| [
2,
2980,
803,
33220,
357,
26302,
87,
8,
198
] | 3.111111 | 9 |
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction import DictVectorizer
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.naive_bayes import MultinomialNB
features = np.vector... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
2764,
38469,
7509,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
1330,
360,
713,
38469,
7509,
... | 2.616099 | 323 |
# from http.client import OK
# from urllib import request, response
# import frappe
# import requests
# import json
# from erpnext.selling.doctype.sales_order.sales_order import make_sales_invoice
# import os
# @frappe.whitelist(allow_guest=True)
# def webhook(*args,**kwargs):
# from dotenv import load_dotenv
# ... | [
2,
422,
2638,
13,
16366,
1330,
7477,
198,
2,
422,
2956,
297,
571,
1330,
2581,
11,
2882,
198,
2,
1330,
5306,
27768,
198,
2,
1330,
7007,
198,
2,
1330,
33918,
198,
2,
422,
1931,
79,
19545,
13,
16473,
13,
4598,
310,
2981,
13,
82,
20... | 2.113493 | 793 |
# -*- coding: utf-8 -*-
"""Tests for the `Pw2gwCalculation` class."""
from aiida import orm
from aiida.common import datastructures
from aiida_quantumespresso.utils.resources import get_default_options
def test_pw_default(
aiida_profile, fixture_localhost, fixture_sandbox, fixture_code, generate_calc_job, genera... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
3558,
329,
262,
4600,
47,
86,
17,
70,
86,
9771,
14902,
63,
1398,
526,
15931,
198,
6738,
257,
72,
3755,
1330,
393,
76,
198,
6738,
257,
72,
3755,
13,
11321,... | 2.267684 | 721 |
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# 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,
15069,
2177,
47986,
27862,
290,
10766,
18252,
2248,
11,
337,
4061,
51,
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,
... | 2.273148 | 4,968 |
from distutils.core import setup
setup(
name="turkce_isimler",
packages=["turkce_isimler"],
version="2.0",
license="MIT",
description="Bu paket ile rastgele Türkçe kadın ve erkek isimleri üretebilirsiniz.",
author="Yasin Balcancı, Emre Sülün",
author_email="ybalcanci@gmail.com",
url="htt... | [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
36590,
74,
344,
62,
271,
320,
1754,
1600,
198,
220,
220,
220,
10392,
28,
14692,
36590,
74,
344,
62,
271,
320,
1754,
33116,
198,
220,
220,
220,
... | 2.20339 | 236 |
import os
APP_DIRECTORY = os.path.dirname(os.path.abspath(__file__))
default_app_config = 'selia.apps.SeliaConfig'
| [
11748,
28686,
628,
198,
24805,
62,
17931,
23988,
15513,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
198,
12286,
62,
1324,
62,
11250,
796,
705,
741,
544,
13,
18211,
13,
50,
... | 2.489362 | 47 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'tagging.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
#
url(r'^$', include('accounts.urls')),
url(r'^accounts/', ... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
28482,
13,
2306,
375,
29392,
3419,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
22... | 2.382353 | 204 |
import numba
import numpy as np
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba.jit(nopython=True, cache=True)
@numba... | [
11748,
997,
7012,
198,
11748,
299,
32152,
355,
45941,
628,
198,
31,
77,
2178,
64,
13,
45051,
7,
77,
404,
7535,
28,
17821,
11,
12940,
28,
17821,
8,
628,
198,
31,
77,
2178,
64,
13,
45051,
7,
77,
404,
7535,
28,
17821,
11,
12940,
28... | 2.179012 | 162 |
#!/usr/bin/env python3
from Afvaldienst import Afvaldienst
#trash = Afvaldienst('mijnafvalwijzer', '', '5146EG', '2', '', 'false', 'Geen')
#trash = Afvaldienst('mijnafvalwijzer', '6851GJ', '2', '', 'false')
#trash = Afvaldienst('mijnafvalwijzer', '3911CX', '178', '', 'false')
#trash = Afvaldienst('mijnafvalwijzer', '... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
2483,
85,
1940,
2013,
301,
1330,
2483,
85,
1940,
2013,
301,
198,
198,
2,
2213,
1077,
796,
2483,
85,
1940,
2013,
301,
10786,
76,
48848,
1878,
2100,
86,
2926,
9107,
3256... | 2.58552 | 1,105 |
from flask import Flask,request, abort,jsonify
from datetime import datetime
import rfc3339
from apscheduler.schedulers.background import BackgroundScheduler
from flask_cors import CORS, cross_origin
import random
from influxdb import InfluxDBClient
#app init for flask
app = Flask(__name__)
app.config['SECRET_KEY'] =... | [
6738,
42903,
1330,
46947,
11,
25927,
11,
15614,
11,
17752,
1958,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
374,
16072,
2091,
2670,
198,
6738,
257,
862,
1740,
18173,
13,
1416,
704,
377,
364,
13,
25249,
1330,
25353,
50,
1740,
... | 2.320493 | 649 |
from utils import load_yaml_file
inputs = {"Number": Number, "Flag": Flag}
data = load_yaml_file('data.yaml')
#print(data)
for key in data:
print(data[key])
if data[key] in inputs:
data[key] = inputs[key]
print(data) | [
6738,
3384,
4487,
1330,
3440,
62,
88,
43695,
62,
7753,
628,
628,
628,
198,
15414,
82,
796,
19779,
15057,
1298,
7913,
11,
366,
34227,
1298,
19762,
92,
628,
198,
7890,
796,
3440,
62,
88,
43695,
62,
7753,
10786,
7890,
13,
88,
43695,
11... | 2.392157 | 102 |
import sys
from autoprocess.engine.process import DataSet
from autoprocess.utils import log, xdsio
logger = log.get_module_logger('auto.process')
| [
11748,
25064,
198,
6738,
22320,
305,
919,
13,
18392,
13,
14681,
1330,
6060,
7248,
198,
6738,
22320,
305,
919,
13,
26791,
1330,
2604,
11,
2124,
9310,
952,
198,
198,
6404,
1362,
796,
2604,
13,
1136,
62,
21412,
62,
6404,
1362,
10786,
237... | 3.170213 | 47 |
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
from edfi_performance.api.client import EdFiAPIClient... | [
171,
119,
123,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2,
49962,
284,
262,
1717,
12,
10547,
10302,
739,
530,
393,
517,
11704,
13,
198,
2,
383,
1717,
12,
10547,
10302,
16625,
428,
2393,
284,
345,
... | 3.538462 | 91 |
import os
from artificial_bias_experiments.known_prop_scores.dataset_generation_file_naming import \
get_root_dir_experiment_known_propensity_scores, get_root_dir_images_known_prop_scores, get_pca_token
from artificial_bias_experiments.known_prop_scores.sar_two_subject_groups.experiment_info import \
KnownProp... | [
11748,
28686,
198,
198,
6738,
11666,
62,
65,
4448,
62,
23100,
6800,
13,
4002,
62,
22930,
62,
1416,
2850,
13,
19608,
292,
316,
62,
20158,
62,
7753,
62,
77,
3723,
1330,
3467,
198,
220,
220,
220,
651,
62,
15763,
62,
15908,
62,
23100,
... | 2.875 | 120 |
"""
This module implements a :class:`.Group` intended to hold multiple
parameters that are to be gotten and set by the same command. The parameters
should be of type :class:`GroupParameter`
"""
from collections import OrderedDict
from typing import List, Union, Callable, Dict, Any, Optional
from qcodes.instrument.pa... | [
37811,
198,
1212,
8265,
23986,
257,
1058,
4871,
25,
44646,
13247,
63,
5292,
284,
1745,
3294,
198,
17143,
7307,
326,
389,
284,
307,
7891,
290,
900,
416,
262,
976,
3141,
13,
383,
10007,
198,
21754,
307,
286,
2099,
1058,
4871,
25,
63,
... | 2.567505 | 3,022 |
from morsecode_dict import MORSE_CODE_DICT
# This function takes the text message and returns the converted morse code.
# This function takes the morse code cipher and returns the text message.
| [
6738,
2146,
2363,
1098,
62,
11600,
1330,
35208,
5188,
62,
34,
16820,
62,
35,
18379,
198,
198,
2,
770,
2163,
2753,
262,
2420,
3275,
290,
5860,
262,
11513,
2146,
325,
2438,
13,
628,
198,
2,
770,
2163,
2753,
262,
2146,
325,
2438,
38012... | 3.94 | 50 |
# Copyright 2011 Nicholas Bray
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | [
2,
15069,
2813,
20320,
43050,
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... | 4.030172 | 232 |
from typing import Dict, List, Tuple, Union
__all__ = ("JsonValue",)
# +-------------------+---------------+
# | Python | JSON |
# +===================+===============+
# | dict | object |
# +-------------------+---------------+
# | list, tuple | array |
# +------... | [
6738,
19720,
1330,
360,
713,
11,
7343,
11,
309,
29291,
11,
4479,
198,
198,
834,
439,
834,
796,
5855,
41,
1559,
11395,
1600,
8,
198,
198,
2,
1343,
1783,
6329,
10,
24305,
10,
198,
2,
930,
11361,
220,
220,
220,
220,
220,
220,
220,
... | 2.322165 | 388 |
from django.urls import path
from .views import get_ips, get_lists, update_lists
urlpatterns = {
path('ip', get_ips, name="get_ips"),
path('list', get_lists, name="get_lists"),
path('management/update', update_lists, name='update_lists')
} | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
33571,
1330,
651,
62,
2419,
11,
651,
62,
20713,
11,
4296,
62,
20713,
198,
198,
6371,
33279,
82,
796,
1391,
198,
220,
220,
220,
3108,
10786,
541,
3256,
651,
62,
2419,... | 2.811111 | 90 |
import os
import re
import sys
import sysconfig
import platform
import subprocess
import distutils
import glob
import tempfile
import shutil
from distutils.version import LooseVersion
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
from setuptools.command.test i... | [
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
25064,
11250,
198,
11748,
3859,
198,
11748,
850,
14681,
198,
11748,
1233,
26791,
198,
11748,
15095,
198,
11748,
20218,
7753,
198,
11748,
4423,
346,
198,
6738,
1233,
26791,
13,
... | 2.825364 | 481 |
# Best Practices
| [
198,
198,
2,
6705,
42134,
198
] | 3.166667 | 6 |
import numpy as np
import matplotlib.pyplot as plt
import random
from deap import base
from deap import creator
from deap import tools
if __name__ == "__main__":
creator.create("FitnessMax", base.Fitness, weights=(1.0,))
creator.create("Individual", list, fitness=creator.FitnessMax)
img_ans = plt.imr... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
4738,
198,
6738,
390,
499,
1330,
2779,
198,
6738,
390,
499,
1330,
13172,
198,
6738,
390,
499,
1330,
4899,
628,
628,
198,
198... | 2.445135 | 483 |
from datetime import datetime
from callWHODataAPI import WHODataAPI
from s3Upload import S3Uploader
s3_uploader = S3Uploader(WHODataAPI())
all_buckets = s3_uploader.get_all_buckets()
print_list(all_buckets)
response = s3_uploader.apiClient.get_who_dimensions()
myBucket = s3_uploader.get_target_bu... | [
6738,
4818,
8079,
1330,
4818,
8079,
201,
198,
201,
198,
6738,
869,
12418,
3727,
1045,
17614,
1330,
7655,
3727,
1045,
17614,
201,
198,
6738,
264,
18,
41592,
1330,
311,
18,
41592,
263,
201,
198,
201,
198,
201,
198,
201,
198,
82,
18,
6... | 2.465217 | 230 |
# Generated by Django 3.2.3 on 2021-06-03 14:23
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
18,
319,
33448,
12,
3312,
12,
3070,
1478,
25,
1954,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
#!/usr/bin/env python
import logging, bz2, random
from gensim import interfaces, matutils
from gensim.corpora import IndexedCorpus
numDoc1 = 0
numRow1 = 0
numCol1 = 0
numDoc2 = 0
numRow2 = 0
numCol2 = 0
split = []
inpObj = matutils.MmReader(bz2.BZ2File('sparse_wiki_tfidf.mm.bz2'))
prob = 0.5
print "The first pass... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
18931,
11,
275,
89,
17,
11,
4738,
198,
198,
6738,
308,
641,
320,
1330,
20314,
11,
2603,
26791,
198,
6738,
308,
641,
320,
13,
10215,
38851,
1330,
12901,
276,
45680,
385,
198,
1... | 2.281207 | 729 |
from restic.repo import Repo
from restic.snapshot import Snapshot
from restic.core import version, self_update, generate
from restic.config import restic_bin
from restic.test import test_all
| [
6738,
1334,
291,
13,
260,
7501,
1330,
1432,
78,
198,
6738,
1334,
291,
13,
45380,
9442,
1330,
16026,
9442,
198,
6738,
1334,
291,
13,
7295,
1330,
2196,
11,
2116,
62,
19119,
11,
7716,
198,
6738,
1334,
291,
13,
11250,
1330,
1334,
291,
6... | 3.446429 | 56 |
from pd import *
## we need the gromacs module for the gromacs file formats
from gromacs import *
cseed(3)
info()
timer()
## create a water box
ffps = FFParamSet("tip3.ff")
sim = System(ffps)
## create a new molecule (water, TIP3)
mol = NewMolecule(ffps,"TIP3")
boundary = PeriodicBox(18.1500)
## and fill the box w... | [
6738,
279,
67,
1330,
1635,
198,
2235,
356,
761,
262,
308,
398,
16436,
8265,
329,
262,
308,
398,
16436,
2393,
17519,
198,
6738,
308,
398,
16436,
1330,
1635,
198,
198,
66,
28826,
7,
18,
8,
198,
10951,
3419,
198,
45016,
3419,
198,
198,... | 2.685748 | 856 |
"""cameraTest2 controller."""
# You may need to import some classes of the controller module. Ex:
# from controller import Robot, Motor, DistanceSensor
from controller import Robot
import cv2
import numpy as np
from controller import Keyboard
from movement_commands import *
from gesture_commands import *
import math... | [
37811,
25695,
14402,
17,
10444,
526,
15931,
198,
198,
2,
921,
743,
761,
284,
1330,
617,
6097,
286,
262,
10444,
8265,
13,
1475,
25,
198,
2,
220,
422,
10444,
1330,
16071,
11,
12533,
11,
34600,
47864,
198,
6738,
10444,
1330,
16071,
198,
... | 2.151019 | 2,503 |
# %%
import numpy as np
import pandas as pd
import scipy as sp
import math
import matplotlib.animation as animation
from scipy.integrate import odeint
from numpy import arange
from scipy.integrate import odeint
import scipy.optimize
from scipy.optimize import leastsq
from math import exp
from collections import Ordere... | [
2,
43313,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
629,
541,
88,
355,
599,
198,
11748,
10688,
198,
11748,
2603,
29487,
8019,
13,
11227,
341,
355,
11034,
198,
6738,
629,
541,
88,
13,
18908,
... | 2.647131 | 819 |
import pandas as pd
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Dense
from sklearn.preprocessing import LabelEncoder #IMPORTA A BIBLIOTECA DO ENCODER
from keras.utils import np_utils #IMPORTA A BIBLIOTECA PARA COMPLEMENTAR O ENCODER
import numpy as n... | [
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
198,
6738,
1341... | 2.319202 | 802 |
#!/usr/bin/env python3
import cgi, cgitb
import smtplib
import requests
import json
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
customer_name = str(form.getvalue('customer_name'))
customer_email = str(form.getvalue('customer_email'))
customer_message = str(form.getvalue('message')... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
269,
12397,
11,
269,
18300,
65,
198,
11748,
895,
83,
489,
571,
198,
11748,
7007,
198,
11748,
33918,
198,
2,
13610,
4554,
286,
7663,
31425,
198,
687,
796,
269,
12397,
13,
1... | 2.914712 | 469 |
"""Add linelist_deaths schema
Revision ID: c11ac992c04a
Revises: ffec75dfdadd
Create Date: 2021-09-19 07:54:19.691798
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c11ac992c04a'
down_revision = 'ffec75dfdadd'
branch_labels = None
depends_on = None
| [
37811,
4550,
9493,
46331,
62,
22595,
82,
32815,
198,
198,
18009,
1166,
4522,
25,
269,
1157,
330,
41561,
66,
3023,
64,
198,
18009,
2696,
25,
31246,
721,
2425,
7568,
67,
2860,
198,
16447,
7536,
25,
33448,
12,
2931,
12,
1129,
8753,
25,
... | 2.557377 | 122 |
cel = float(input('°C = '))
f = cel * 18
fh = f + 32
print(f'A temperatura convertida de {cel} °C para °F é de {fh} ')
| [
5276,
796,
12178,
7,
15414,
10786,
7200,
34,
796,
705,
4008,
198,
69,
796,
18725,
1635,
1248,
220,
198,
69,
71,
796,
277,
1343,
3933,
198,
4798,
7,
69,
6,
32,
4124,
2541,
64,
10385,
3755,
390,
1391,
5276,
92,
22074,
34,
31215,
220... | 2.222222 | 54 |
"""
fabulous.text
~~~~~~~~~~~~~
I let you print TrueType text to your terminal. The easiest way
to get started with me is by running::
jart@compy:~$ python -m fabulous.text --help
To make things simple, Fabulous comes with my favorite serif,
non-serif, and monospace fonts:
- Ind... | [
37811,
198,
220,
220,
220,
28294,
13,
5239,
198,
220,
220,
220,
220,
15116,
8728,
93,
628,
220,
220,
220,
314,
1309,
345,
3601,
6407,
6030,
2420,
284,
534,
12094,
13,
220,
383,
16638,
835,
198,
220,
220,
220,
284,
651,
2067,
351,
... | 2.463476 | 3,176 |
from functools import reduce
from operator import add
from math import cos, pi
from scipy import signal
import matplotlib.pyplot as plt
from migen import *
from migen.fhdl import verilog
import numpy
sample = 5000 #Number of Samples
Fs = 5000 #Sample Frequency
fc = 800 #Cutoff frequ
w_c = 2... | [
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
10088,
1330,
751,
198,
198,
6738,
10688,
1330,
8615,
11,
31028,
198,
6738,
629,
541,
88,
1330,
6737,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
285,
932... | 2.445828 | 803 |
# Copyright (c) 2018 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | [
2,
15069,
357,
66,
8,
2864,
8180,
10501,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340,
284,
1... | 2.473783 | 2,651 |
""".. _pre_transformation:
Pre-Transformation:
---------------------
Pre-transformation constraints determine if a transformation is valid based on only the original input and the position of the replacement. These constraints are applied before the transformation is even called. For example, these constraints can pr... | [
37811,
492,
4808,
3866,
62,
7645,
1161,
25,
198,
198,
6719,
12,
8291,
1161,
25,
198,
19351,
12,
198,
198,
6719,
12,
7645,
1161,
17778,
5004,
611,
257,
13389,
318,
4938,
1912,
319,
691,
262,
2656,
5128,
290,
262,
2292,
286,
262,
9014... | 4.625767 | 163 |
from PIL import Image
import os
image_file_path = '../dataset/lec'
out = '../dataset/lattice_ec'
for root, dirs_name, files_name in os.walk(image_file_path):
for i in files_name:
if i.split('.')[-1] == 'png':
file_name = os.path.join(root, i)
print(file_name)
... | [
6738,
350,
4146,
1330,
7412,
198,
11748,
28686,
198,
198,
9060,
62,
7753,
62,
6978,
796,
705,
40720,
19608,
292,
316,
14,
293,
66,
6,
198,
448,
796,
705,
40720,
19608,
292,
316,
14,
75,
1078,
501,
62,
721,
6,
198,
198,
1640,
6808,... | 1.887218 | 266 |
#!/usr/bin/python3
import pythonwhois
import csv
import time
with open('bulk_whois_results.csv', 'w+', newline="") as outfile:
w = csv.writer(outfile)
w.writerow(['Domain Name', 'Registrar', 'Expiration Date', 'Nameservers'])
# outfile.close()
result_list = []
with open('domain_list', 'r') as f:
for... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
21015,
8727,
271,
198,
11748,
269,
21370,
198,
11748,
640,
198,
198,
4480,
1280,
10786,
65,
12171,
62,
8727,
271,
62,
43420,
13,
40664,
3256,
705,
86,
10,
3256,
649,
1370,
2... | 2.036508 | 630 |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
6127,
7560,
416,
5413,
357,
49,
8,
11160,
19452,
6127,
35986,
13,
198,
2,
19179,
743,
2728,
11491,
4069,
290,
481,
307,
2626,
611,
262,
2438,
318,
198,
2,
16935,
515,
13,
... | 3.008251 | 606 |
"""Planemo-specific wrappers around galaxy-tool-util tool functionality."""
from __future__ import absolute_import
import os
import sys
import traceback
from galaxy.tool_util import loader_directory
from galaxy.tool_util.fetcher import ToolLocationFetcher
from planemo.io import error, info
is_tool_load_error = load... | [
37811,
20854,
41903,
12,
11423,
7917,
11799,
1088,
16161,
12,
25981,
12,
22602,
2891,
11244,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
198,
67... | 2.752717 | 368 |
from django.contrib import messages
from django.shortcuts import render, redirect
from Jetbrain.blog.models import Post
from . forms.user_forms import SignUp, UpdateUser, UpdateProfile
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
@login_require... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
198,
6738,
19013,
27825,
13,
14036,
13,
27530,
1330,
2947,
198,
6738,
764,
5107,
13,
7220,
62,
23914,
1330,
5865,
4933... | 3.651685 | 89 |
##########################################################################
# NSAp - Copyright (C) CEA, 2017
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########... | [
29113,
29113,
7804,
2235,
198,
2,
10551,
79,
532,
15069,
357,
34,
8,
327,
16412,
11,
2177,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
20101,
34,
8267,
12,
33,
5964,
11,
355,
3199,
416,
198,
2,
262,
327,
16412,
12,
34,
41256,
... | 3.322581 | 279 |
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver import ActionChains
import time
if __name__ == '__main__':
# 驱动地址
# 修改为对应谷歌浏览器版本的驱动
b... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
9019,
1330,
5313,
32103,
21321,
198,
6738,
384,
119... | 2.404762 | 168 |
from matplotlib.finance import quotes_historical_yahoo
from matplotlib.dates import DateFormatter
from matplotlib.dates import DayLocator
from matplotlib.dates import MonthLocator
import sys
from datetime import date
import matplotlib.pyplot as plt
import numpy as np
today = date.today()
start = (today.year - 1, today... | [
6738,
2603,
29487,
8019,
13,
69,
14149,
1330,
13386,
62,
10034,
12409,
62,
40774,
198,
6738,
2603,
29487,
8019,
13,
19581,
1330,
7536,
8479,
1436,
198,
6738,
2603,
29487,
8019,
13,
19581,
1330,
3596,
33711,
1352,
198,
6738,
2603,
29487,
... | 2.608563 | 327 |
"""
/!\ Code not made by me, got from https://github.com/dongjk/faster_rcnn_keras/blob/master/utils.py
"""
import sys
import numpy as np
import keras.backend as K
import xml.etree.ElementTree as ET
from PIL import Image, ImageDraw
def generate_anchors(base_width=16, base_height=16, ratios=[0.5, 1, 2],
... | [
37811,
198,
220,
220,
220,
1220,
0,
59,
6127,
407,
925,
416,
502,
11,
1392,
422,
3740,
1378,
12567,
13,
785,
14,
67,
506,
73,
74,
14,
69,
1603,
62,
6015,
20471,
62,
6122,
292,
14,
2436,
672,
14,
9866,
14,
26791,
13,
9078,
220,
... | 2.045326 | 2,471 |
import logging
import numpy as np
import optimization.de as de
logging.basicConfig(level=logging.INFO, format='%(message)s')
logger = logging.getLogger(__name__)
# define objective function
bounds = np.asarray([(-5.0, 5.0)])
solution = de.differential_evolution(f, bounds, n_iter=1, debug=True)
logger.info(f'F({solut... | [
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
23989,
13,
2934,
355,
390,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
10778,
11,
5794,
11639,
4,
7,
20500,
8,
82,
11537,
198,
6404,
1362,
796,
1... | 2.656489 | 131 |
# -*- coding: utf-8 -*-
import numpy as np
from .base import Resampler
from ..types.numeric import Probability
from ..types.particle import Particle
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
8692,
1330,
1874,
321,
20053,
198,
6738,
11485,
19199,
13,
77,
39223,
1330,
30873,
1799,
198,
6738,
11485,
19199,
13,
... | 3.081633 | 49 |
from astropy.table import Table, unique
import os
import logging
| [
6738,
6468,
28338,
13,
11487,
1330,
8655,
11,
3748,
198,
11748,
28686,
198,
11748,
18931,
628
] | 4.125 | 16 |
# Django settings for nextfeed project.
import os
import djcelery
djcelery.setup_loader()
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
DEBUG = True
TEMPLATE_DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
("Amir Rachum", "amir@rachum.com"),
)
SERVER_EMAIL = 'webmaster@nextfee... | [
2,
37770,
6460,
329,
1306,
12363,
1628,
13,
198,
11748,
28686,
198,
11748,
42625,
7015,
88,
198,
28241,
7015,
88,
13,
40406,
62,
29356,
3419,
198,
198,
31190,
23680,
62,
34219,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
... | 2.624172 | 2,565 |
"""
Run a small task by
* Uploading files
* Creating a pool and a job
* Creating a task and submitting it
* Waiting till end of task
* Retrieving files and checking
"""
import pytest
import datetime
import dmsbatch
from tests.test_blob_client import container_name
@pytest.fixture()
@pytest... | [
37811,
198,
220,
220,
220,
5660,
257,
1402,
4876,
416,
198,
220,
220,
220,
1635,
36803,
278,
3696,
198,
220,
220,
220,
1635,
30481,
257,
5933,
290,
257,
1693,
198,
220,
220,
220,
1635,
30481,
257,
4876,
290,
24353,
340,
198,
220,
22... | 2.929134 | 127 |
# thread1-extra.py to create simple threads with function (using threads list to simplly the code)
import threading
from threading import Thread as Thread
from time import sleep
threads = []
# creating threads
threads.append(Thread(target=print_hello, name="Th 1"))
threads.append(Thread(target=print_hello, name="Th 2... | [
2,
4704,
16,
12,
26086,
13,
9078,
284,
2251,
2829,
14390,
351,
2163,
357,
3500,
14390,
1351,
284,
985,
79,
12810,
262,
2438,
8,
198,
198,
11748,
4704,
278,
198,
6738,
4704,
278,
1330,
14122,
355,
14122,
198,
6738,
640,
1330,
3993,
1... | 3.28481 | 158 |
from anki.hooks import addHook
import re
clozeField = "Meaning"
finalField = "Expression"
addHook("setupEditorButtons", addSentenceFromClozeButton)
| [
6738,
281,
4106,
13,
25480,
82,
1330,
751,
39,
566,
198,
11748,
302,
198,
198,
565,
78,
2736,
15878,
796,
366,
5308,
7574,
1,
198,
20311,
15878,
796,
366,
16870,
2234,
1,
628,
628,
198,
198,
2860,
39,
566,
7203,
40406,
17171,
1537,
... | 2.8 | 55 |
from __future__ import print_function, division
"""
Broken axis example, where the y-axis will have a portion cut out.
"""
import matplotlib.pyplot as plt
import numpy as np
mu1 = 30
sig1 = 1
mu2 = 10
sig2 = 1
pts = np.hstack((np.random.randn(100)*sig1 + mu1, np.random.randn(20)*sig2 + mu2 ))
# # 30 points between [... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
198,
198,
37811,
198,
15783,
3464,
16488,
1672,
11,
810,
262,
331,
12,
22704,
481,
423,
257,
6903,
2005,
503,
13,
198,
37811,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355... | 2.608862 | 1,309 |
#!/usr/bin/env python3
"""
The MIT License (MIT)
Copyright (c) 2021 Amy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
464,
17168,
13789,
357,
36393,
8,
198,
198,
15269,
357,
66,
8,
33448,
14235,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
167... | 3.707395 | 311 |
"""Provides device automations for Nest."""
from __future__ import annotations
import voluptuous as vol
from homeassistant.components.automation import (
AutomationActionType,
AutomationTriggerInfo,
)
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA
from homeassistant.componen... | [
37811,
15946,
1460,
3335,
3557,
602,
329,
21420,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
198,
6738,
1363,
562,
10167,
13,
5589,
3906,
13,
2306,
296,
341,
1330,
357,
198,... | 2.398204 | 1,002 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Connector to MISP."""
from pymisp import ExpandedPyMISP
import config
def get_misp_attributes():
'''Method to pull the attributes (IOCs) from MISP server.'''
misp = ExpandedPyMISP(config.MISP_DOMAIN, config.MISP_KEY, config.MISP_VERIFYCERT)
attributes = mis... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
34525,
284,
50029,
47,
526,
15931,
198,
198,
6738,
279,
4948,
8802,
1330,
5518,
12249,
20519,
44,
1797,
47,
198,... | 2.634731 | 167 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2020 NVIDIA 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 ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
12131,
15127,
23929,
44680,
6234,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
... | 2.252055 | 3,892 |
from tabulate import tabulate
from .structs import STRUCTS
| [
6738,
7400,
5039,
1330,
7400,
5039,
198,
198,
6738,
764,
7249,
82,
1330,
19269,
18415,
50,
628
] | 3.588235 | 17 |