content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from idact.detail.jupyter_app.app_allocation_parameters import \
AppAllocationParameters
def format_allocation_parameters(parameters: AppAllocationParameters):
"""Formats allocation parameters for the user.
:param parameters: Parameters to print.
"""
result = "Allocation parameters:\n"
r... | [
6738,
4686,
529,
13,
49170,
13,
73,
929,
88,
353,
62,
1324,
13,
1324,
62,
439,
5040,
62,
17143,
7307,
1330,
3467,
198,
220,
220,
220,
2034,
3237,
5040,
48944,
628,
198,
4299,
5794,
62,
439,
5040,
62,
17143,
7307,
7,
17143,
7307,
2... | 2.358447 | 438 |
#!/usr/bin/env python3
import os, sys
service = "[Unit]\n"\
"Description={description}\n"\
"After=network.target\n"\
"StartLimitIntervalSec=0\n"\
"\n"\
"[Service]\n"\
"Type=simple\n"\
"Restart=always\n"\
"RestartSec=1\n"\
"User=root\n"\
"ExecStart={exec}\n"\
"\n"\
"[Install]\n"\
"WantedBy=multi-user.target"
name = Fa... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
11,
25064,
198,
198,
15271,
796,
12878,
26453,
60,
59,
77,
1,
59,
198,
1,
11828,
34758,
11213,
32239,
77,
1,
59,
198,
1,
3260,
28,
27349,
13,
16793,
59,
77,
1,
... | 2.398601 | 572 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
#!/usr/bin/python
import string
import random
import array
from copy import copy, deepcopy
import time
import numpy as np
import flatbuffers
import eas.FloatContentType as FloatContentType
import eas.ContentType as ContentType
import eas.ShapeType as ShapeType
import eas.Int64ContentType as Int64ContentType
import eas... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
4731,
198,
11748,
4738,
198,
11748,
7177,
198,
6738,
4866,
1330,
4866,
11,
2769,
30073,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
6228,
36873,
364,
198,
11748... | 3.602564 | 156 |
import requests
from .chunked_utils import chunked_bytes_from_object, chunked_object_from_bytes
| [
11748,
7007,
198,
6738,
764,
354,
2954,
276,
62,
26791,
1330,
16058,
276,
62,
33661,
62,
6738,
62,
15252,
11,
16058,
276,
62,
15252,
62,
6738,
62,
33661,
628
] | 3.344828 | 29 |
import torch
import torch.nn as nn
from utils import tools
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
220,
220,
3384,
4487,
1330,
4899,
628
] | 3.263158 | 19 |
from typing import Optional
from uuid import UUID
from pydantic import BaseModel
from laa_court_data_api_app.models.hearing_events.hearing_event.result.hearing_event import HearingEvent
| [
6738,
19720,
1330,
32233,
198,
6738,
334,
27112,
1330,
471,
27586,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
198,
6738,
300,
7252,
62,
22230,
62,
7890,
62,
15042,
62,
1324,
13,
27530,
13,
258,
1723,
62,
31534,
13,
258,
... | 3.375 | 56 |
from hestia.signal_decorators import ignore_raw, ignore_updates, ignore_updates_pre
from django.db.models.signals import post_save, pre_save
from django.dispatch import receiver
from constants.backends import NATIVE_BACKEND
from db.models.experiment_groups import ExperimentGroup, GroupTypes
from libs.repos.utils impo... | [
6738,
339,
301,
544,
13,
12683,
282,
62,
12501,
273,
2024,
1330,
8856,
62,
1831,
11,
8856,
62,
929,
19581,
11,
8856,
62,
929,
19581,
62,
3866,
198,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,... | 3.383065 | 248 |
#! /usr/bin/env python2.7
from numpy import random
import time
# change the seed
random.seed(int(time.time()))
class MCMC(object):
'''
MCMC implements Markov-Chain-Monte-Carlo algorithms.
'''
def __init__(self, Density, Proposal, Drawing_func, initial):
'''
Initialize an MCMC algorit... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
198,
6738,
299,
32152,
1330,
4738,
198,
11748,
640,
198,
198,
2,
1487,
262,
9403,
198,
25120,
13,
28826,
7,
600,
7,
2435,
13,
2435,
3419,
4008,
198,
198,
4871,
13122,... | 1.951163 | 1,720 |
# -*- coding: utf-8 -*-
'''
WikiLinkPlus Extension for Python-Markdown
===========================================
Converts [[WikiLinks]] to relative links.
See <https://github.com/neurobin/mdx_wikilink_plus> for documentation.
Copyright Md. Jahidul Hamid <jahidulhamid@yahoo.com>
License: [BSD](http://www.opensourc... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
32603,
11280,
17860,
27995,
329,
11361,
12,
9704,
2902,
198,
10052,
2559,
18604,
198,
198,
3103,
24040,
16410,
32603,
31815,
11907,
284,
3585,
6117,
13,
198,... | 2.201083 | 1,293 |
"""
self.all_things = {
"room_1": {
"room": {
"look": (
"You can see a bed and a desk with a phone resting on top. "
"There's nothing else."
),
"pickup": "Don't be ridiculous.",
"approach": "You're already in the room, man. No... | [
198,
198,
37811,
198,
944,
13,
439,
62,
27971,
796,
1391,
198,
220,
220,
220,
366,
3823,
62,
16,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3823,
1298,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 1.868145 | 4,869 |
# -*- coding: utf-8 -*-
"""Defines the output module for the MySQL database used by 4n6time."""
from __future__ import unicode_literals
try:
import MySQLdb
except ImportError:
MySQLdb = None
from plaso.output import logger
from plaso.output import manager
from plaso.output import shared_4n6time
class MySQL4n6T... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
7469,
1127,
262,
5072,
8265,
329,
262,
33476,
6831,
973,
416,
604,
77,
21,
2435,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,... | 2.452553 | 4,015 |
#!/usr/bin/env python
# Author: David Kovar [dkovar <at> gmail [dot] com]
# Name: analyzeMFT.py
#
# Copyright (c) 2010 David Kovar. All rights reserved.
# This software is distributed under the Common Public License 1.0
#
# Date: May 2013
#
import sys
import os
import struct
import mbr_parser
from analyzemft import ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
6434,
25,
3271,
43326,
283,
685,
67,
21862,
283,
1279,
265,
29,
308,
4529,
685,
26518,
60,
401,
60,
198,
2,
6530,
25,
16602,
44,
9792,
13,
9078,
198,
2,
198,
2,
15069,
35... | 2.858025 | 162 |
# Databricks notebook source
# MAGIC %md
# MAGIC **PROBLEM STATEMENT**
# MAGIC <br/>Predict the Active Covid cases of 2021 depending on 2020 statewise data in India.
# MAGIC <br/>Get Sample data from Source- https://www.kaggle.com/aritranandi23/covid-19-analysis-and-prediction/data
# MAGIC <br/>
# MAGIC <br/>**COLUMN ... | [
2,
16092,
397,
23706,
20922,
2723,
198,
2,
28263,
2149,
4064,
9132,
198,
2,
28263,
2149,
12429,
4805,
9864,
2538,
44,
15486,
12529,
1174,
198,
2,
28263,
2149,
1279,
1671,
15913,
47,
17407,
262,
14199,
39751,
312,
2663,
286,
33448,
6906,... | 2.714369 | 6,883 |
from django.contrib.auth.base_user import BaseUserManager
from django.utils.translation import ugettext_lazy as _
from django.db import models
from website.utils import log
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
8692,
62,
7220,
1330,
7308,
12982,
13511,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
... | 3.55102 | 49 |
# @Author: riener
# @Date: 2018-12-19T17:30:53+01:00
# @Filename: gp_plus.py
# @Last modified by: riener
# @Last modified time: 2019-04-08T10:20:37+02:00
import itertools
import sys
import numpy as np
import lmfit
from lmfit import minimize as lmfit_minimize
from lmfit import Parameters
from gausspyplus.utils.de... | [
2,
2488,
13838,
25,
374,
72,
877,
198,
2,
2488,
10430,
25,
220,
220,
2864,
12,
1065,
12,
1129,
51,
1558,
25,
1270,
25,
4310,
10,
486,
25,
405,
198,
2,
2488,
35063,
25,
27809,
62,
9541,
13,
9078,
198,
2,
2488,
5956,
9518,
416,
... | 2.4881 | 23,782 |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from abc import abst... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
1853,
41689,
1628,
20420,
357,
3826,
27342,
9865,
3843,
20673,
13,
9132,
737,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
737,
198,
198,
6738,
1... | 3.19086 | 1,860 |
import json
import requests
import webbrowser
| [
11748,
33918,
198,
11748,
7007,
198,
11748,
3992,
40259,
628
] | 4.7 | 10 |
import os
from pathlib import Path
import imageio
import numpy as np
import SimpleITK as sitk
import h5py
from pytorch3dunet.augment import transforms
from pytorch3dunet.datasets.utils import ConfigDataset, calculate_stats
from pytorch3dunet.unet3d.utils import get_logger, expand_as_one_hot
from pytorch3dunet.dataset... | [
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
2939,
952,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
17427,
2043,
42,
355,
1650,
74,
198,
11748,
289,
20,
9078,
198,
6738,
12972,
13165,
354,
18,
67,
403,
316,
1... | 2.693467 | 199 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
26144,
35986,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760,
644,
345,
389,
1804,
0,
17202,
... | 3.596774 | 124 |
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from itertools import izip
from flask import render_template
from flask.ext.babel import gettext
from sqlalchemy import Text
from sqlalchemy.dialects.postgresql import ARRAY
from sqlalchemy.sql.expression import and_, cast, desc
from pokr.models.candi... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
340,
861,
10141,
1330,
220,
528,
541,
198,
198,
6738,
42903,
1330,
8543,
62,
28243,
198,
6738... | 3.212121 | 132 |
from game import Game
import sys
if __name__ == '__main__':
game = Game(sys.argv[1])
game.start()
| [
6738,
983,
1330,
3776,
198,
11748,
25064,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
983,
796,
3776,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
220,
220,
220,
983,
13,
9688,
3419,
198
] | 2.488372 | 43 |
#!/usr/bin/python
# Author: Jon Trulson <jtrulson@ics.com>
# Copyright (c) 2015 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 l... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
6434,
25,
5966,
833,
377,
1559,
1279,
73,
2213,
377,
1559,
31,
873,
13,
785,
29,
198,
2,
15069,
357,
66,
8,
1853,
8180,
10501,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
... | 3.382212 | 416 |
import datetime, json
from lys import L
VIEW_SOURCE_URL = "/source/crxviewer.html?crx="
| [
11748,
4818,
8079,
11,
33918,
198,
198,
6738,
300,
893,
1330,
406,
198,
198,
28206,
62,
47690,
62,
21886,
796,
12813,
10459,
14,
6098,
87,
1177,
263,
13,
6494,
30,
6098,
87,
2625,
628,
628,
628,
628
] | 2.621622 | 37 |
"""
A module for processing experiment references in a human readable way
Three pieces of information are required to uniquely identify an experimental session: subject
nickname, the date, and the sequence number (whether the session was the first, second,
etc. on that date).
Alyx and ONE use uuids (a.k.a. eids) to u... | [
37811,
198,
32,
8265,
329,
7587,
6306,
10288,
287,
257,
1692,
31744,
835,
198,
198,
12510,
5207,
286,
1321,
389,
2672,
284,
24139,
5911,
281,
11992,
6246,
25,
2426,
198,
17172,
3672,
11,
262,
3128,
11,
290,
262,
8379,
1271,
357,
25356... | 2.436946 | 4,742 |
import pwndbg.auxv
import pwndbg.commands
import pwndbg.commands.telescope
import pwndbg.memory
import pwndbg.regs
import pwndbg.search
from pwndbg.color import message
@pwndbg.commands.ArgparsedCommand('Print out the current stack canary.')
@pwndbg.commands.OnlyWhenRunning
| [
11748,
279,
86,
358,
35904,
13,
14644,
85,
198,
11748,
279,
86,
358,
35904,
13,
9503,
1746,
198,
11748,
279,
86,
358,
35904,
13,
9503,
1746,
13,
37524,
3798,
3008,
198,
11748,
279,
86,
358,
35904,
13,
31673,
198,
11748,
279,
86,
358... | 2.622642 | 106 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
from candphy.logs import log
#creating the def for plotting the signals wave | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
2658,
6883,
13,
6404,
82,
1330,
2604,
19... | 2.803571 | 56 |
'''-------------------------------------------------------------------------------
Tool Name: CreateWeightTableFromECMWFRunoff
Source Name: CreateWeightTableFromECMWFRunoff.py
Version: ArcGIS 10.2
License: Apache 2.0
Author: Environmental Systems Research Institute Inc.
Updated by: Environmental S... | [
7061,
6,
10097,
24305,
198,
16984,
6530,
25,
220,
220,
13610,
25844,
10962,
4863,
2943,
14326,
10913,
403,
2364,
198,
8090,
6530,
25,
13610,
25844,
10962,
4863,
2943,
14326,
10913,
403,
2364,
13,
9078,
198,
10628,
25,
220,
220,
220,
220... | 3.215259 | 367 |
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path('api-auth/',include('rest_framework.urls')),
path('api/rest-auth/',include('rest_auth.urls')),
path('api/rest-auth/registration/',include('rest_auth.registration.urls')),
p... | [
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
17256,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
28482,
14,
3256,
13169,
13,
15654,
13,
6371,
82,
... | 2.538462 | 143 |
# Copyright 2016 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.
"""Runs a daemon to update git credentials from the GCE metadata server.
Only works inside a GCE with proper service accounts tagged.
Example invocation:
./... | [
2,
15069,
1584,
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,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
37811,
109... | 3.26009 | 223 |
# Copyright 2016 Google 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/LICENSE-2.0
#
# unless required by applicable law or a... | [
2,
15069,
1584,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.720339 | 236 |
include("common.py")
streckerDegradationDicarbonyl = [a for a in streckerDegradationDicarbonylGen()] | [
17256,
7203,
11321,
13,
9078,
4943,
198,
301,
11402,
263,
35,
1533,
6335,
341,
35,
291,
38039,
1647,
75,
796,
685,
64,
329,
257,
287,
1937,
15280,
35,
1533,
6335,
341,
35,
291,
38039,
1647,
75,
13746,
3419,
60
] | 2.564103 | 39 |
"""
SQLAlchemyIO (saio): Module hack for autoloading table definitions
## Usage
After
```python
import saio
saio.register_schema("model_draft", engine)
````
one can import table declarations easily using
```python
from saio.model_draft import lis_charging_poi as LisChargingPoi
```
Note that `ipython... | [
37811,
198,
17861,
2348,
26599,
9399,
357,
11400,
952,
2599,
19937,
8156,
329,
1960,
349,
1170,
278,
3084,
17336,
198,
198,
2235,
29566,
198,
198,
3260,
628,
220,
7559,
63,
29412,
198,
220,
1330,
473,
952,
198,
220,
473,
952,
13,
3023... | 2.553105 | 1,723 |
# Librerias Django
from django.contrib.auth import authenticate
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import User
from django.shortcuts import redirect, render
from django.urls import reverse, reverse_lazy
from... | [
2,
44384,
380,
292,
37770,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
8323,
5344,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
3642,
822,
1... | 3 | 234 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import copy
from collections import defaultdict
from fractions import gcd
from .neurovis import NeuroVis
from .. import utils
from ..config import DEFAULT_PO... | [
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,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
... | 2.052474 | 6,022 |
import threading
import random
import time
import datetime
import pickle, os
| [
11748,
4704,
278,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
4818,
8079,
198,
11748,
2298,
293,
11,
28686,
198
] | 3.85 | 20 |
from typing import List, Generator
from itertools import combinations
#################################
# String manipulation functions #
#################################
def make_ngrams(text: str, n: int) -> List[str]:
"""Turn a term string into a list of ngrams of size n
:param text: a text string
:t... | [
6738,
19720,
1330,
7343,
11,
35986,
198,
6738,
340,
861,
10141,
1330,
17790,
628,
198,
29113,
2,
198,
2,
10903,
17512,
5499,
1303,
198,
29113,
2,
198,
198,
4299,
787,
62,
782,
9474,
7,
5239,
25,
965,
11,
299,
25,
493,
8,
4613,
734... | 2.501558 | 3,210 |
from application import db
from datetime import datetime
from sqlalchemy import text
# Kilpailu-taulun luominen | [
6738,
3586,
1330,
20613,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
44161,
282,
26599,
1330,
2420,
198,
198,
2,
19902,
79,
603,
84,
12,
83,
2518,
403,
300,
84,
6351,
268
] | 3.393939 | 33 |
import bpy
import arm.material.mat_utils
import arm.write_data
import arm.assets
import arm.make_renderpath
import arm.make_state
import arm.utils
| [
11748,
275,
9078,
198,
11748,
3211,
13,
33665,
13,
6759,
62,
26791,
198,
11748,
3211,
13,
13564,
62,
7890,
198,
11748,
3211,
13,
19668,
198,
11748,
3211,
13,
15883,
62,
13287,
6978,
198,
11748,
3211,
13,
15883,
62,
5219,
198,
11748,
3... | 3.266667 | 45 |
import cv2
import sys
from filter import *
from mix import *
TEST = []
TEST_out = []
SIZE_I = 16
TEST, TEST_out, PATH = create_test_tab_one_filter_rand_train()
# TEST, TEST_out = create_test_tab_filter()
TESTV, TESTV_out, PATHV = create_test_tab_one_filter_rand_valid()
#TESTV, TESTV_out = create_valid_tab_filter... | [
11748,
269,
85,
17,
198,
11748,
25064,
198,
6738,
8106,
1330,
1635,
198,
6738,
5022,
1330,
1635,
198,
198,
51,
6465,
796,
17635,
198,
51,
6465,
62,
448,
796,
17635,
198,
33489,
62,
40,
796,
1467,
198,
197,
628,
197,
198,
198,
51,
... | 2.334951 | 206 |
import time
st = time.time()
fraction = "0."
places_of_digits = [1,10,100,1000,10000,100000,1000000]
pod = 0
d_index = places_of_digits[pod]
result = 1
present_num = 0
lenfp = 0
done = 0
while(lenfp <= places_of_digits[-1]):
present_num = present_num + 1
fraction = fraction + str(present_num)
lenpn = len(str(prese... | [
11748,
640,
198,
301,
796,
640,
13,
2435,
3419,
198,
69,
7861,
796,
366,
15,
526,
198,
23625,
62,
1659,
62,
12894,
896,
796,
685,
16,
11,
940,
11,
3064,
11,
12825,
11,
49388,
11,
3064,
830,
11,
16,
10535,
60,
198,
33320,
796,
65... | 2.326531 | 294 |
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CppExtension
from glob import glob
import os
sanitizers = [
#'-fsanitize=undefined', '-fsanitize-undefined-trap-on-error'
#'-fsanitize=address,undefined'
]
extra_compile_args = [
'-I' + os.path.realpath('.'),
'-m... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
28034,
13,
26791,
13,
20322,
62,
2302,
3004,
1330,
10934,
11627,
3004,
11,
327,
381,
11627,
3004,
198,
6738,
15095,
1330,
15095,
198,
11748,
28686,
198,
198,
12807,
30... | 2.502551 | 392 |
"""Test decorator of torch.nn.Module subclasses."""
from torch import Tensor
from torch.nn import Linear
from bpexts.decorator import decorate
# decorated linear layer
DecoratedAffine = decorate(Linear)
def test_decorated_linear_properties():
"""Test name and docstring of decorated torch.nn.Linear."""
asse... | [
37811,
14402,
11705,
1352,
286,
28034,
13,
20471,
13,
26796,
850,
37724,
526,
15931,
198,
198,
6738,
28034,
1330,
309,
22854,
198,
6738,
28034,
13,
20471,
1330,
44800,
198,
198,
6738,
275,
431,
742,
82,
13,
12501,
273,
1352,
1330,
11705... | 2.692839 | 1,592 |
from typing import Any, Callable, Dict
import pytest
from pydantic.fields import FieldInfo
from starlite import (
Body,
HTTPRouteHandler,
ImproperlyConfiguredException,
Parameter,
Provide,
RequestEncodingType,
Starlite,
get,
post,
websocket,
)
from starlite.constants import RES... | [
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
360,
713,
198,
198,
11748,
12972,
9288,
198,
6738,
279,
5173,
5109,
13,
25747,
1330,
7663,
12360,
198,
198,
6738,
3491,
36890,
1330,
357,
198,
220,
220,
220,
12290,
11,
198,
220,
220,
220,
... | 2.528474 | 878 |
"""
Tests Account API
"""
import json
import datetime
from django.test import TransactionTestCase
# Default user model may get swapped out of the system and hence.
from django.contrib.auth.models import User
from rest_framework.test import APIClient
from rest_framework import status
from seven23.models.accounts.... | [
37811,
198,
220,
220,
220,
30307,
10781,
7824,
198,
37811,
198,
11748,
33918,
198,
11748,
4818,
8079,
198,
198,
6738,
42625,
14208,
13,
9288,
1330,
45389,
14402,
20448,
198,
2,
15161,
2836,
2746,
743,
651,
37245,
503,
286,
262,
1080,
29... | 2.247793 | 1,586 |
# -*- coding: utf-8 -*-
import scoutnet
from dataimport import UserPrefs, ndb, Person, logging, TroopPerson, ScoutGroup
from flask import Blueprint, render_template, abort, redirect, request
persons = Blueprint('persons_page', __name__, template_folder='templates')
@persons.route('/')
@persons.route('/<sgroup_url>')... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
24490,
3262,
198,
6738,
1366,
11748,
1330,
11787,
36698,
82,
11,
299,
9945,
11,
7755,
11,
18931,
11,
8498,
404,
15439,
11,
22529,
13247,
198,
198,
6738,
42903,
13... | 2.654255 | 188 |
from instabot import Bot
COOKIE_FNAME = 'cookie.txt'
bot = Bot()
bot.login(username="wirexia66@gmail.com", password="reNcDjEgWp4X7Gt", use_cookie = False)
user_id = bot.get_user_id_from_username("lego")
user_info = bot.get_user_info(user_id)
print(user_info['biography']) | [
6738,
916,
397,
313,
1330,
18579,
198,
198,
34,
15308,
10008,
62,
37,
20608,
796,
705,
44453,
13,
14116,
6,
198,
198,
13645,
796,
18579,
3419,
198,
13645,
13,
38235,
7,
29460,
2625,
21809,
36072,
2791,
31,
14816,
13,
785,
1600,
9206,
... | 2.4375 | 112 |
from .sdk import MesoorRecommendation
from . import models
| [
6738,
764,
21282,
74,
1330,
14937,
2675,
41248,
341,
198,
6738,
764,
1330,
4981,
198
] | 3.933333 | 15 |
from java import dynamic_proxy
from java.lang import Runnable
import os
import youtube_dl as yt
from com.arthenica.mobileffmpeg import FFmpeg | [
6738,
20129,
1330,
8925,
62,
36436,
198,
6738,
20129,
13,
17204,
1330,
5660,
77,
540,
198,
11748,
28686,
198,
11748,
35116,
62,
25404,
355,
331,
83,
198,
6738,
401,
13,
433,
831,
3970,
13,
24896,
487,
43913,
1330,
18402,
43913
] | 3.525 | 40 |
from .edge import *
from .vertex import *
from .graph import *
from .generators import * | [
6738,
764,
14907,
1330,
1635,
198,
6738,
764,
332,
16886,
1330,
1635,
198,
6738,
764,
34960,
1330,
1635,
198,
6738,
764,
8612,
2024,
1330,
1635
] | 3.52 | 25 |
num = (int(input('\033[0;34mDigite um numero: \033[m')))
print('\033[0;32mO numero digitado foi {},'.format(num))
print('seu sucessor é {}, e seu antecessor é {}.\033[m'.format(num + 1, num- 1))
| [
22510,
796,
357,
600,
7,
15414,
10786,
59,
44427,
58,
15,
26,
2682,
76,
19511,
578,
23781,
997,
3529,
25,
3467,
44427,
58,
76,
6,
22305,
198,
4798,
10786,
59,
44427,
58,
15,
26,
2624,
76,
46,
997,
3529,
16839,
4533,
11511,
72,
238... | 2.267442 | 86 |
class Predicate():
"""
This class should predicate most usefull floor to send elevator in idle state
The purpose to minimize wait time om next call. And just for fun
Predication may be performed by external tools, based on statistics table
For now it do nothing.
"""
predict = Predicate(... | [
628,
198,
4871,
14322,
5344,
33529,
198,
220,
220,
220,
37227,
220,
198,
220,
220,
220,
770,
1398,
815,
44010,
749,
779,
12853,
4314,
284,
3758,
20932,
287,
21696,
1181,
198,
220,
220,
220,
383,
4007,
284,
17775,
4043,
640,
39030,
130... | 3.566667 | 90 |
# nsgaii.py
# Program to run NSGA-II on benchmark problems
# Author: Kristina Spencer
# Date: March 10, 2016
# i - bin index
# j - item index
# k - algorithm index
# m - solution index
# t - generation ind#x
from __future__ import print_function
import binpacking as bp
import datetime
import ga... | [
2,
36545,
70,
42648,
13,
9078,
198,
2,
220,
220,
220,
6118,
284,
1057,
10896,
9273,
12,
3978,
319,
18335,
2761,
198,
2,
220,
220,
220,
6434,
25,
14912,
1437,
15971,
198,
2,
220,
220,
220,
7536,
25,
2805,
838,
11,
1584,
198,
2,
2... | 2.936047 | 172 |
import numpy as np
from actor_base import Actor
class SimulatedPathFollowingHuman(Actor):
"""
A simulated human object that only follows a given path
"""
class SimulatedReactiveHuman(Actor):
"""
A reactive human object that follows a path but reacts
to robot's movement
"""
| [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
8674,
62,
8692,
1330,
27274,
628,
198,
4871,
3184,
4817,
15235,
14291,
20490,
7,
40277,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
317,
28590,
1692,
2134,
326,
691,
5679,
257,
1... | 3.336957 | 92 |
"""Module with functions for 'deploy' subpackage."""
from __future__ import annotations
import os
import shutil
import mylogging
from mypythontools.paths import validate_path, PathLike
from mypythontools.misc import delete_files
from mypythontools.system import check_script_is_available, terminal_do_command, PYTHON
... | [
37811,
26796,
351,
5499,
329,
705,
2934,
1420,
6,
850,
26495,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
11748,
616,
6404,
2667,
198,
198,
6738,
616,
79,
5272,
756,
... | 2.633902 | 997 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="dj-sellsy",
version="0.1",
author="Mathieu Richardoz",
author_email="mathieu.richardoz@bureauxlocaux.com",
description="A package to facilitate Django-Sellsy integration",
long_descrip... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
... | 2.519573 | 281 |
"""
Faça um programa que mostre na tela todos os números pares entre 1 e 50
"""
for i in range(1, 51):
if i % 2 == 0:
print(i, end=' ')
print('FIM')
| [
37811,
198,
50110,
50041,
23781,
1430,
64,
8358,
749,
260,
12385,
256,
10304,
284,
37427,
28686,
299,
21356,
647,
418,
279,
3565,
920,
260,
352,
304,
2026,
198,
37811,
198,
1640,
1312,
287,
2837,
7,
16,
11,
6885,
2599,
198,
220,
220,
... | 2.205479 | 73 |
from PIL import Image
import random
| [
6738,
350,
4146,
1330,
7412,
198,
11748,
4738,
628
] | 4.111111 | 9 |
#!/usr/bin/env python
'''
Oryol texture export functions
'''
import sys
import os
import platform
import subprocess
import tempfile
ProjectDirectory = os.path.dirname(os.path.abspath(__file__)) + '/..'
TexSrcDirectory = ProjectDirectory + '/data'
TexDstDirectory = ProjectDirectory + '/build/webpage'
# NOTE: PVRTexToo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
198,
46,
563,
349,
11743,
10784,
5499,
198,
7061,
6,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
850,
14681,
198,
11748,
20218,
7753,
198,
198,
16775,
... | 2.771008 | 2,380 |
from sanic.views import HTTPMethodView
from .errors import NotFound
| [
6738,
5336,
291,
13,
33571,
1330,
7154,
51,
5868,
316,
2065,
7680,
198,
198,
6738,
764,
48277,
1330,
1892,
21077,
628
] | 3.333333 | 21 |
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import os
import imageio
from timeit import timeit
from mpl_toolkits import mplot3d
from PIL import Image
#import png
import svd_tools_copy as svdt
import image_tools_copy as it
#import ../../../david/watermark as watermarktools
#sunset = it.load_im... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
2939,
952,
198,
6738,
640,
270,
1330,
640,
270,
198,
6738,
285,
489,
62,
25981,
... | 2.15566 | 424 |
# -----------------------------------------------------------------------------
#
# Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.com>
#
# 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... | [
2,
16529,
32501,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
2,
15069,
2211,
12,
23344,
300,
27148,
13,
3262,
532,
39430,
6755,
259,
44456,
1279,
16370,
259,
44456,
31,
14816,
13,
785,
29,
198,
2,... | 2.456746 | 2,809 |
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import time
import math
from sklearn.model_selection import train_test_split
from sklearn.impute import SimpleImputer
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import LabelEncoder, OneHotEncoder, StandardScaler
from ... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
10688,
198,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
... | 2.427075 | 4,772 |
#
# Collective Knowledge (environment)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
cfg={} # Will be updated by CK (meta description of this module)
work={} # Will be updated by CK (temporal dat... | [
2,
198,
2,
29128,
20414,
357,
38986,
8,
198,
2,
198,
2,
4091,
45233,
38559,
24290,
13,
14116,
329,
15665,
3307,
198,
2,
4091,
45233,
27975,
38162,
9947,
13,
14116,
329,
6634,
3307,
198,
2,
198,
2,
23836,
25,
1902,
328,
10145,
376,
... | 1.863237 | 52,061 |
# Generated by Django 3.2 on 2021-05-10 16:23
import django.contrib.postgres.fields
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
319,
33448,
12,
2713,
12,
940,
1467,
25,
1954,
198,
198,
11748,
42625,
14208,
13,
3642,
822,
13,
7353,
34239,
13,
25747,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 3.02381 | 42 |
import torch
import logging
import numpy as np
from data_management.vocabulary import Vocabulary
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
| [
11748,
28034,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
1366,
62,
27604,
13,
18893,
22528,
1330,
47208,
22528,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
10778,
8,
198,
6404,
1362,
... | 3.296296 | 54 |
from IPython.display import Image as Image_py
from src.data.google_vision_ocr_parsing import extract_full_text_annotation
from src.data.sroie import load_full_ocr, load_labels
from torch.utils.data import Dataset, ConcatDataset
from transformers import T5Tokenizer
from typing import List, Dict, Union
import gin
class... | [
6738,
6101,
7535,
13,
13812,
1330,
7412,
355,
7412,
62,
9078,
198,
6738,
12351,
13,
7890,
13,
13297,
62,
10178,
62,
1696,
62,
79,
945,
278,
1330,
7925,
62,
12853,
62,
5239,
62,
1236,
14221,
198,
6738,
12351,
13,
7890,
13,
82,
305,
... | 2.36024 | 1,499 |
from django.shortcuts import render
from django.http import HttpResponse
from inventory.models import Product
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
13184,
13,
27530,
1330,
8721,
198,
220,
220,
220,
220
] | 3.8 | 30 |
import curio
from curio import socket
from ... import gvars
| [
11748,
1090,
952,
198,
6738,
1090,
952,
1330,
17802,
198,
198,
6738,
2644,
1330,
308,
85,
945,
628
] | 3.444444 | 18 |
import pytest
from kafka import KafkaConsumer
from kafka.errors import KafkaConfigurationError
| [
11748,
12972,
9288,
198,
198,
6738,
479,
1878,
4914,
1330,
46906,
49106,
198,
6738,
479,
1878,
4914,
13,
48277,
1330,
46906,
38149,
12331,
628
] | 4.041667 | 24 |
# -*- coding: utf-8 -*-
###
# © 2018... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 1.940114 | 1,052 |
#py_persistent_2.py
"""pickle your stuff for a long winter's nap"""
import pickle
from py_persistent_3 import THIS_YEAR
print("imported THIS_YEAR, which is {}".format(THIS_YEAR))
pickle_file='this_year.pkl'
with open(pickle_file, 'wb') as f:
pickle.dump(THIS_YEAR, f)
| [
2,
9078,
62,
19276,
7609,
62,
17,
13,
9078,
198,
37811,
27729,
293,
534,
3404,
329,
257,
890,
7374,
338,
25422,
37811,
198,
11748,
2298,
293,
198,
6738,
12972,
62,
19276,
7609,
62,
18,
1330,
12680,
62,
56,
17133,
198,
198,
4798,
720... | 2.555556 | 108 |
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2012 The Chromium OS Authors.
#
"""See README for more information"""
import doctest
import multiprocessing
import os
import re
import sys
import unittest
# Bring in the patman libraries
our_path = os.path.dirname(os.path.realpath(__file__)... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
38644,
12,
17,
13,
15,
10,
198,
2,
198,
2,
15069,
357,
66,
8,
2321,
383,
18255,
1505,
7294,
46665,
13,
198,
2,
198,
198,
37811,
... | 3.11745 | 298 |
from LAC import LAC
"""
本文件测试LAC的分词,词性标注及重要性功能
"""
os.environ['PYTHONIOENCODING'] = 'UTF-8'
| [
6738,
406,
2246,
1330,
406,
2246,
198,
37811,
198,
17312,
105,
23877,
229,
20015,
35050,
113,
233,
46237,
243,
43,
2246,
21410,
26344,
228,
46237,
235,
11,
46237,
235,
45250,
100,
43718,
229,
37345,
101,
20998,
232,
34932,
235,
17358,
2... | 1.305556 | 72 |
import time
import requests
import os
import json
from datetime import datetime
from dotenv import load_dotenv
from tinydb import TinyDB, where
from scrapers.domvast import Domvast
from scrapers.beumerutrecht import BeumerUtrecht
from scrapers.rvl import RVL
from scrapers.molenbeek import Molenbeek
from scrapers.mak... | [
198,
11748,
640,
198,
11748,
7007,
198,
11748,
28686,
198,
11748,
33918,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
6738,
7009,
9945,
1330,
20443,
11012,
11,
810,
198,
198,
... | 2.911765 | 306 |
#!/usr/bin/env python3
#
# --- Copyright 2021 Modern Electron
# --- Monte-Carlo Collision script to reproduce the benchmark tests from
# --- Turner et al. (2013) - https://doi.org/10.1063/1.4775084
import argparse
import sys
import numpy as np
from pywarpx import callbacks, fields, picmi
from scipy.sparse import csc_... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
11420,
15069,
33448,
12495,
5903,
1313,
198,
2,
11420,
22489,
12,
9914,
5439,
7778,
1166,
4226,
284,
22919,
262,
18335,
5254,
422,
198,
2,
11420,
15406,
2123,
435,
13,
... | 2.101176 | 6,039 |
import torch
import torchvision
from tqdm import notebook
import torch.nn.functional as F
from time import time
| [
11748,
28034,
198,
11748,
28034,
10178,
198,
6738,
256,
80,
36020,
1330,
20922,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
640,
1330,
640,
628,
628,
220,
220,
220,
220,
220,
220,
220,
220,
628,
198
] | 3.230769 | 39 |
#!/usr/bin/env python3
# encoding: utf-8
import sys
from itertools import combinations
from random import randint
##############################################################################
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: {} words.txt".format(sys.argv[0]))
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
11748,
25064,
198,
6738,
340,
861,
10141,
1330,
17790,
198,
6738,
4738,
1330,
43720,
600,
628,
628,
628,
628,
198,
198,
29113,
29113,
78... | 2.801527 | 131 |
""" This module contains functions for reading CSV files containing pressure
and volume data.
"""
import numpy
def read_csv(input_file, delimiter=",", x="p", sigma_x="sigma_p",
y="v", sigma_y="sigma_v"):
"""
Reads a CSV file with x and y data and standard deviation columns.
Parameters
... | [
37811,
770,
8265,
4909,
5499,
329,
3555,
44189,
3696,
7268,
3833,
198,
392,
6115,
1366,
13,
198,
37811,
198,
198,
11748,
299,
32152,
198,
198,
4299,
1100,
62,
40664,
7,
15414,
62,
7753,
11,
46728,
2676,
28,
2430,
11,
2124,
2625,
79,
... | 2.412371 | 291 |
import fastai.torch_core as tc
import fastai.data.load as load
import torch
import PIL as pil
import pathlib as path
import dill
from numpy import prod
import utils
################################################################################
TARGET_FOLDER = 'data'
DATA_PATH = utils.download_dataset('cifar10', T... | [
11748,
3049,
1872,
13,
13165,
354,
62,
7295,
355,
37096,
198,
11748,
3049,
1872,
13,
7890,
13,
2220,
355,
3440,
198,
11748,
28034,
198,
11748,
350,
4146,
355,
5560,
198,
11748,
3108,
8019,
355,
3108,
198,
11748,
288,
359,
198,
198,
67... | 3.598726 | 157 |
# =======================================================================================
# =======================================================================================
# =======================================================================================
if __name__ == '__main__':
solve() | [
198,
2,
38093,
4770,
50155,
198,
198,
2,
38093,
4770,
50155,
628,
198,
2,
38093,
4770,
50155,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
8494,
3419
] | 9.176471 | 34 |
import logging
import tensorflow as tf
import d4.dsm.extensible_dsm as edsm
import d4.interpreter as si
from d4.dsm.loss import L2Loss
logging.basicConfig(level=logging.DEBUG)
if __name__ == "__main__":
test_learn_to_add_digits()
| [
11748,
18931,
198,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
11748,
288,
19,
13,
67,
5796,
13,
2302,
27339,
62,
67,
5796,
355,
1225,
5796,
198,
11748,
288,
19,
13,
3849,
3866,
353,
355,
33721,
198,
6738,
288,
19,
13,
67,
... | 2.542553 | 94 |
from datetime import datetime
from datetime import timedelta
import jwt
from jwt import PyJWTError
from passlib.context import CryptContext
from fastapi import Depends
from fastapi import HTTPException
from fastapi.security import HTTPBearer
from starlette.status import HTTP_401_UNAUTHORIZED
from app.models.auth im... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
198,
11748,
474,
46569,
198,
6738,
474,
46569,
1330,
9485,
41,
39386,
12331,
198,
6738,
1208,
8019,
13,
22866,
1330,
15126,
21947,
198,
198,
6738,
3049,
... | 2.88835 | 206 |
from __future__ import division, absolute_import, print_function
__copyright__ = "Copyright (C) 2016 Matt Wala"
__license__ = """
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 restricti... | [
6738,
11593,
37443,
834,
1330,
7297,
11,
4112,
62,
11748,
11,
3601,
62,
8818,
198,
198,
834,
22163,
4766,
834,
796,
366,
15269,
357,
34,
8,
1584,
4705,
370,
6081,
1,
198,
198,
834,
43085,
834,
796,
37227,
198,
5990,
3411,
318,
29376... | 3.394009 | 434 |
from collections import OrderedDict
from django.db import models
from django.utils.translation import ugettext_lazy as _
from modelutils import *
sheet_models = OrderedDict([
('Print', NewspaperSheet),
('Radio', RadioSheet),
('Television', TelevisionSheet),
('Internet', InternetNewsSheet),
('Twit... | [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
2746,
26791,
1330,
1635,
628,
198,
... | 2.97973 | 592 |
from graphene_django import DjangoObjectType
from graphql_jwt.decorators import login_required
import graphene
from .models import *
class ShopType(DjangoObjectType):
"""
Create ModelType for Shop model
"""
class Meta:
"""
Metadata class
"""
model = Shop
cla... | [
6738,
42463,
62,
28241,
14208,
1330,
37770,
10267,
6030,
198,
6738,
4823,
13976,
62,
73,
46569,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
11748,
42463,
198,
6738,
764,
27530,
1330,
1635,
628,
198,
4871,
13705,
6030,
7,
35,
73,
... | 2.292079 | 1,212 |
from django.contrib import admin
from users import models
# Register your models here.
admin.site.register(models.Profile, ProfileAdmin) | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
2985,
1330,
4981,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
198,
28482,
13,
15654,
13,
30238,
7,
27530,
13,
37046,
11,
13118,
46787,
8
] | 3.833333 | 36 |
import tensorflow as tf
| [
11748,
11192,
273,
11125,
355,
48700,
628,
198
] | 3.25 | 8 |
"""
war
War card game written for fun while following the 'Complete Python Developer Certification Course' by Imtiaz Ahmad, on Udemy.
"""
# Add imports here
# from card_class import Card
# from .deck_class import Deck
# from .table_class import Table
# from .functions import get_players
# Handle versioneer
from ._ve... | [
37811,
198,
5767,
198,
13195,
2657,
983,
3194,
329,
1257,
981,
1708,
262,
705,
20988,
11361,
23836,
40609,
20537,
6,
416,
1846,
83,
17890,
24152,
11,
319,
35774,
3065,
13,
198,
37811,
198,
198,
2,
3060,
17944,
994,
198,
2,
422,
2657,
... | 3.75 | 128 |
import json
import logging
import asyncio
from aiohttp import web
import voluptuous as vol
from concurrent import futures
from ledfxcontroller.api import RestEndpoint
_LOGGER = logging.getLogger(__name__)
MAX_PENDING_MESSAGES = 256
BASE_MESSAGE_SCHEMA = vol.Schema({
vol.Required('id'): vol.Coerce(int),
vol.Re... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
30351,
952,
198,
6738,
257,
952,
4023,
1330,
3992,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
6738,
24580,
1330,
25650,
198,
6738,
2957,
21373,
36500,
13,
15042,
1330,
8324,
12915,
4122,
19... | 3.227907 | 215 |
# step 1 - capture first frame
# step 2 - capture other frame
# step 3 - calculate the difference in frisr and other frame
# step 4 - define threshold
# step 5 - define boarders
import cv2
from sendMail import send_mail
from datetime import datetime
first_frame = None
video = cv2.VideoCapture(0)
count ... | [
2,
2239,
352,
532,
8006,
717,
5739,
201,
198,
2,
2239,
362,
532,
8006,
584,
5739,
201,
198,
2,
2239,
513,
532,
15284,
262,
3580,
287,
1216,
271,
81,
290,
584,
5739,
201,
198,
2,
220,
2239,
604,
532,
8160,
11387,
201,
198,
2,
223... | 2.127368 | 950 |
from django.urls import path
from django.views.generic.base import TemplateView
from microsoft_student_partners.msp.views import MspView
app_name = "msp"
urlpatterns = [
path("", view=MspView.as_view(), name="home"),
path(
"services/",
TemplateView.as_view(template_name="services.html"),
... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
37350,
7680,
198,
198,
6738,
4580,
4215,
62,
50139,
62,
3911,
2741,
13,
907,
79,
13,
33571,
1330,
337,
2777,
7680,
198,
198,
... | 2.594203 | 207 |
from collections import namedtuple
from datetime import datetime
from subprocess import call
GitFileData = namedtuple("GitFileData", ["permissions", "type", "hash", "path"])
repos = dict()
def load_file(repo, file:GitFileData):
"""git checkout HEAD -- {path}"""
try:
get_repo(repo).checkout("master", ... | [
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
850,
14681,
1330,
869,
198,
198,
38,
270,
8979,
6601,
796,
3706,
83,
29291,
7203,
38,
270,
8979,
6601,
1600,
14631,
525,
8481,
1600,
366,
4906,
16... | 2.432 | 500 |
import pandas as pd
import numpy as np
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from password import pw
import json
from flask import Flask, jsonify, render_template
path = 'postgresql://postgres:' + pw + '@localhost:5432/rpi_comp'
engine = create_engine(path)
conn ... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
44161,
282,
26599,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
23575,
198,
6738,
9206,
1330,
279,
86,... | 3.292343 | 431 |
# -*- coding: utf-8 -*-
from hijack.tests.test_hijack import BaseHijackTests
from hijack_admin import settings as hijack_admin_settings
from hijack_admin.tests.test_app.models import RelatedModel
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
16836,
441,
13,
41989,
13,
9288,
62,
71,
2926,
441,
1330,
7308,
39,
2926,
441,
51,
3558,
198,
198,
6738,
16836,
441,
62,
28482,
1330,
6460,
355,
16836,
441,
62,
... | 3 | 66 |
"""JTAGICE3 protocol mappings"""
from logging import getLogger
from .avrcmsisdap import AvrCommand
from ..util import binary
from ..util import print_helpers
from ..pyedbglib_errors import PyedbglibError
class Jtagice3Command(AvrCommand):
"""
Sends a "JTAGICE3" command frame, and received a response
... | [
37811,
41,
42197,
8476,
18,
8435,
285,
39242,
37811,
198,
198,
6738,
18931,
1330,
651,
11187,
1362,
198,
198,
6738,
764,
615,
6015,
907,
9409,
499,
1330,
5184,
81,
21575,
198,
6738,
11485,
22602,
1330,
13934,
198,
6738,
11485,
22602,
13... | 2.198695 | 4,751 |
from decimal import Decimal
from enerdata.profiles.profile import *
from expects import *
with description('A dragger object'):
with it('must return the integer of the number'):
d = Dragger()
aprox = d.drag(32.453)
expect(aprox).to(be(32))
with it('must keep the decimal part'):
... | [
6738,
32465,
1330,
4280,
4402,
198,
198,
6738,
2400,
7890,
13,
5577,
2915,
13,
13317,
1330,
1635,
198,
6738,
13423,
1330,
1635,
198,
198,
4480,
6764,
10786,
32,
6715,
1362,
2134,
6,
2599,
198,
220,
220,
220,
351,
340,
10786,
27238,
14... | 1.881765 | 1,201 |
'''OpenGL extension NV.blend_square
This module customises the behaviour of the
OpenGL.raw.GL.NV.blend_square to provide a more
Python-friendly API
Overview (from the spec)
It is useful to be able to multiply a number by itself in the blending
stages -- for example, in certain types of specular lightin... | [
7061,
6,
11505,
8763,
7552,
23973,
13,
2436,
437,
62,
23415,
201,
198,
201,
198,
1212,
8265,
2183,
2696,
262,
9172,
286,
262,
220,
201,
198,
11505,
8763,
13,
1831,
13,
8763,
13,
27159,
13,
2436,
437,
62,
23415,
284,
2148,
257,
517,
... | 3.292079 | 404 |
from chainer.training.triggers import interval
from chainer.training.triggers import minmax_value_trigger
IntervalTrigger = interval.IntervalTrigger
MaxValueTrigger = minmax_value_trigger.MaxValueTrigger
MinValueTrigger = minmax_value_trigger.MinValueTrigger
| [
6738,
6333,
263,
13,
34409,
13,
2213,
328,
5355,
1330,
16654,
198,
6738,
6333,
263,
13,
34409,
13,
2213,
328,
5355,
1330,
949,
9806,
62,
8367,
62,
46284,
628,
198,
9492,
2100,
48344,
796,
16654,
13,
9492,
2100,
48344,
198,
11518,
1139... | 3.728571 | 70 |
import urllib.request
wiki = "https://en.wikipedia.org/wiki/List_of_countries_by_the_number_of_billionaires"
page = urllib.request.urlopen(wiki)
from bs4 import BeautifulSoup
soup = BeautifulSoup(page)
print (soup.prettify())
soup.title.text
soup.a
soup.find_all("a")
right_table = soup.find('table',class_ = 'wiki... | [
11748,
2956,
297,
571,
13,
25927,
198,
15466,
796,
366,
5450,
1378,
268,
13,
31266,
13,
2398,
14,
15466,
14,
8053,
62,
1659,
62,
9127,
1678,
62,
1525,
62,
1169,
62,
17618,
62,
1659,
62,
24540,
17693,
1,
198,
7700,
796,
2956,
297,
... | 2.279176 | 437 |