content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright: This module has been placed in the public domain.
import sys
import os
import os.path
import stat
import imp
import getopt
import textwrap
import time
import threading
import subprocess
import tempfile
import platform
import json
import pp.preprocessor as... | [
171,
119,
123,
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
15069,
25,
770,
8265,
468,
587,
4624,
287,
262,
1171,
7386,
13,
198,
198,
11748,
25064,
198,
... | 2.864307 | 339 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-08 06:02
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
18,
319,
1584,
12,
1157,
12,
2919,
9130,
25,
2999,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.690909 | 55 |
# Generated by Django 2.1 on 2019-01-19 12:02
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
319,
13130,
12,
486,
12,
1129,
1105,
25,
2999,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.966667 | 30 |
'''Parse data from data.gov.in dataset'''
import json
import osgeo.ogr
def get_columns(fields, data_labels, date_label='YEAR',
subdivision=False, state_label='SUBDIVISION'):
'''Get index of date_label, data_labels
and optionally subdivision's name'''
def to_col(col_id):
'''json id ... | [
7061,
6,
10044,
325,
1366,
422,
1366,
13,
9567,
13,
259,
27039,
7061,
6,
198,
198,
11748,
33918,
198,
11748,
28686,
469,
78,
13,
519,
81,
198,
198,
4299,
651,
62,
28665,
82,
7,
25747,
11,
1366,
62,
23912,
1424,
11,
3128,
62,
18242... | 2.144154 | 2,754 |
# Vendor
import pygraphviz as pgv
| [
2,
39896,
198,
11748,
12972,
34960,
85,
528,
355,
23241,
85,
198
] | 2.833333 | 12 |
p = Pessoa('samuel')
print(p.nome)
p = Pessoa.outro_contrutor('saulo', 'nunes')
print(p.sobrenome)
| [
198,
198,
79,
796,
350,
408,
12162,
10786,
37687,
2731,
11537,
198,
4798,
7,
79,
13,
77,
462,
8,
198,
79,
796,
350,
408,
12162,
13,
448,
305,
62,
3642,
81,
38409,
10786,
82,
2518,
78,
3256,
705,
77,
4015,
11537,
198,
4798,
7,
79... | 1.961538 | 52 |
# coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
357,
66,
8,
1584,
11,
33448,
11,
18650,
290,
14,
273,
663,
29116,
13,
220,
1439,
2489,
10395,
13,
198,
2,
770,
3788,
318,
10668,
12,
36612,
284,
345,
739,
262,
14499,
2448,
33532,
1... | 2.515952 | 3,103 |
# -------------------------------------------------------------------------
# Copyright (c) 2015-2017 AT&T Intellectual Property
#
# 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
... | [
2,
16529,
45537,
201,
198,
2,
220,
220,
15069,
357,
66,
8,
1853,
12,
5539,
5161,
5,
51,
42443,
14161,
201,
198,
2,
201,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
... | 2.601317 | 1,367 |
"""Builds the common network.
Summary of available functions:
# Compute the total loss of the prediction with respect to the labels.
loss = loss(predictions, labels)
# Create a graph to run one step of training with respect to the loss.
train_op = train(loss, global_step)
"""
# pylint: disable=missing-docstring
f... | [
37811,
15580,
82,
262,
2219,
3127,
13,
198,
198,
22093,
286,
1695,
5499,
25,
198,
1303,
3082,
1133,
262,
2472,
2994,
286,
262,
17724,
351,
2461,
284,
262,
14722,
13,
198,
2994,
796,
2994,
7,
28764,
9278,
11,
14722,
8,
628,
1303,
136... | 2.866747 | 1,666 |
#! /usr/bin/python3
# import re
import mechanicalsoup
# Connect to starken
browser = mechanicalsoup.StatefulBrowser()
browser.open("http://www.starken.cl/cotiza-tu-envio/")
browser.select_form('form[action="/cotiza-tu-envio"]')
browser["ciudadOrigen"] = 104
browser["ciudadDestino"] = 1
browser["alto"] = 10
browser["a... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
198,
2,
1330,
302,
198,
11748,
12370,
82,
10486,
198,
198,
2,
8113,
284,
19278,
268,
198,
40259,
796,
12370,
82,
10486,
13,
9012,
913,
46532,
3419,
198,
40259,
13,
9654,
7203,
4023,
... | 2.482759 | 580 |
import netflix_controls as nc
import screen_maker as sm
import sys
import time
begin_offset = 0 #seconds
name = ""
try:
name = sys.argv[1]
except:
print("no movie name given!")
if name is not "":
print("starting taking screenshots for movie: "+name)
print("leave stopped movie on fulscreen at 0:0")
... | [
11748,
2010,
10046,
62,
13716,
82,
355,
299,
66,
198,
11748,
3159,
62,
10297,
355,
895,
198,
11748,
25064,
198,
11748,
640,
198,
198,
27471,
62,
28968,
796,
657,
1303,
43012,
198,
198,
3672,
796,
13538,
198,
28311,
25,
198,
220,
220,
... | 2.153846 | 325 |
# encoding utf-8
import torch
from torch import nn
from itertools import repeat
if __name__ == "__main__":
spatial_dropout = SpatialDropout(0.2)
batch_tensor = torch.randn(size=(3, 4, 5))
out_tensor = spatial_dropout(batch_tensor)
print(out_tensor)
print(out_tensor.shape)
| [
2,
21004,
3384,
69,
12,
23,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
340,
861,
10141,
1330,
9585,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
21739,
62,
14781,
44... | 2.487395 | 119 |
from datetime import timedelta, datetime, timezone
import locale
import time
| [
6738,
4818,
8079,
1330,
28805,
12514,
11,
4818,
8079,
11,
640,
11340,
198,
11748,
36693,
198,
11748,
640,
198
] | 4.052632 | 19 |
#Crie um programa que mostre na tela todos os numeros pares de 1 a 50
for count in range(0, 50+2, 2):
print(count, end=' ')
print('ACABOU A CONTAGEM!') | [
2,
34,
5034,
23781,
1430,
64,
8358,
749,
260,
12385,
256,
10304,
284,
37427,
28686,
5470,
418,
279,
3565,
390,
352,
257,
2026,
201,
198,
201,
198,
1640,
954,
287,
2837,
7,
15,
11,
2026,
10,
17,
11,
362,
2599,
201,
198,
220,
220,
... | 2.376812 | 69 |
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.db.models import Q
from rest_framework import views, status, generics, permissions
from rest_framework.response import Response
from rest_framework.pagination import PageNumberPagination
from api.utils import uc_response
from certifi... | [
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
11,
7873,
3673,
2025,
46541,
11,
33523,
9876,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
198,
6738,
1334,
62,
30604,
1330,
5009,
11,
3722,
11,
1... | 4.263158 | 228 |
""" Custom implementation of encryption
"""
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
from Crypto.Hash import SHA256
from Crypto.Random import get_random_bytes
def encrypt(key: str, data: str):
"""Encrypts the data string using a key
The key will be used by PBKDF2 to derive a new ... | [
37811,
8562,
7822,
286,
15835,
198,
37811,
198,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
198,
6738,
36579,
13,
19703,
4668,
13,
42,
8068,
1330,
30524,
42,
8068,
17,
198,
6738,
36579,
13,
26257,
1330,
25630,
11645,
198,
6738,
36579,... | 2.632089 | 723 |
from typing import Optional | [
6738,
19720,
1330,
32233
] | 6.75 | 4 |
"""
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao
File: breakout.py
Name: Ian Kuo
-------------------------
The objective of this program is to create a breakout game. In this game, a layer of bricks lines the top third of the
screen and the ... | [
37811,
198,
14192,
10669,
12243,
448,
4935,
198,
48003,
276,
422,
7651,
10918,
338,
12243,
448,
416,
198,
31056,
6592,
5030,
12,
40728,
11,
39859,
494,
449,
518,
11,
8047,
38774,
11,
198,
392,
13075,
406,
13481,
198,
198,
8979,
25,
31... | 3.801587 | 252 |
import os
import numpy as np
from montepython.likelihood_class import Likelihood
# initialization routine
# compute likelihood
| [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
40689,
538,
7535,
13,
2339,
11935,
62,
4871,
1330,
4525,
11935,
628,
198,
220,
220,
220,
1303,
37588,
8027,
628,
220,
220,
220,
1303,
24061,
14955,
198
] | 3.72973 | 37 |
"""
AzCam tests - not yet implemented
"""
| [
37811,
198,
26903,
21701,
5254,
532,
407,
1865,
9177,
198,
37811,
198
] | 3.5 | 12 |
from fontTools.ttLib import TTFont, newTable
from fontTools.ttLib.tables import otTables
from fontbakery.checkrunner import WARN
from fontbakery.codetesting import (assert_PASS,
assert_SKIP,
assert_results_contain,
... | [
6738,
10369,
33637,
13,
926,
25835,
1330,
309,
10234,
756,
11,
649,
10962,
198,
6738,
10369,
33637,
13,
926,
25835,
13,
83,
2977,
1330,
30972,
51,
2977,
198,
198,
6738,
10369,
65,
33684,
13,
9122,
16737,
1330,
42660,
198,
6738,
10369,
... | 2.040685 | 1,401 |
# Sets DP (Top Voted), O(n^4) time, O(n^3) space
# Optimised (Top Voted), O(target * n^2) time, O(target) space
# Optimised (Revisited), O(target * n^2) time, O(target) space
| [
220,
220,
220,
1303,
21394,
27704,
357,
9126,
569,
5191,
828,
440,
7,
77,
61,
19,
8,
640,
11,
440,
7,
77,
61,
18,
8,
2272,
628,
220,
220,
220,
1303,
30011,
1417,
357,
9126,
569,
5191,
828,
440,
7,
16793,
1635,
299,
61,
17,
8,
... | 2.333333 | 81 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import decimal
from django.contrib.auth.models import User
from django.db import models
class Car(BaseModel):
"""Car"""
user = models.ForeignKey(User, on_delete=models.CASCADE)
label = models.CharField(max_length=200)
number_plate = m... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
32465,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
... | 2.755882 | 680 |
from socket import error as SocketError
from bs4 import BeautifulSoup
from difflib import SequenceMatcher
import urllib
from joblib import Parallel, delayed
import multiprocessing
import re
import pymysql
import requests
import errno
##отладочный метод, его изначально не было
if __name__ == '__main__':
... | [
6738,
17802,
1330,
4049,
355,
47068,
12331,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
814,
8019,
1330,
45835,
19044,
2044,
198,
11748,
2956,
297,
571,
198,
6738,
1693,
8019,
1330,
42945,
11,
11038,
198,
11748,
18540,
30... | 1.800327 | 611 |
from GKeepToCalc.KeepPruner.main import *
| [
6738,
402,
15597,
2514,
9771,
66,
13,
15597,
47,
5143,
263,
13,
12417,
1330,
1635,
628,
198
] | 2.588235 | 17 |
"""
Afterware runs after the formatter and operates on the saved file
"""
__all__ = ['Pipeline', 'Register', 'Apply']
import Logger
import tempfile
import os
from shutil import copyfile
from .afterware_registrar import AfterwareRegistrar
import Config
registrar = AfterwareRegistrar()
cfg = Config.Get()
def Regis... | [
37811,
198,
3260,
1574,
4539,
706,
262,
1296,
1436,
290,
14051,
319,
262,
7448,
2393,
198,
37811,
198,
834,
439,
834,
796,
37250,
47,
541,
4470,
3256,
705,
38804,
3256,
705,
44836,
20520,
198,
198,
11748,
5972,
1362,
198,
198,
11748,
... | 3.122661 | 481 |
#!/usr/bin/env python
import json
import os
import subprocess
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
201,
198,
201,
198,
11748,
33918,
201,
198,
11748,
28686,
201,
198,
11748,
850,
14681,
201,
198,
201,
198
] | 2.592593 | 27 |
# Copyright (c) 2021, Sangchun Ha. 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 la... | [
2,
15069,
357,
66,
8,
33448,
11,
30043,
354,
403,
9398,
13,
1439,
2489,
10395,
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,
... | 3.819905 | 211 |
import plotly.graph_objects as go
import pandas as pd
import plotly.express as px
import plotly.figure_factory as ff
| [
11748,
7110,
306,
13,
34960,
62,
48205,
355,
467,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
7110,
306,
13,
42712,
355,
279,
87,
198,
11748,
7110,
306,
13,
26875,
62,
69,
9548,
355,
31246,
628,
628,
628
] | 3.128205 | 39 |
from flask import Flask, Blueprint,render_template, redirect,request,url_for,session,flash,jsonify,json,make_response
from flasgger import swag_from
from functools import wraps
import datetime
import uuid
from werkzeug.security import generate_password_hash, check_password_hash
from functools import wraps
from flask_jw... | [
6738,
42903,
1330,
46947,
11,
39932,
11,
13287,
62,
28243,
11,
18941,
11,
25927,
11,
6371,
62,
1640,
11,
29891,
11,
34167,
11,
17752,
1958,
11,
17752,
11,
15883,
62,
26209,
198,
6738,
781,
292,
26679,
1330,
1509,
363,
62,
6738,
198,
... | 2.849498 | 299 |
# -*- coding: utf-8 -*-
"""AI_models.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Uz-CAo71_eqktLGNkEHHMdHOeCy76gft
# Imports and downloads
"""
!pip install NRCLex
!pip install torch
!pip install stanza
import stanza
stanza.download('en')
im... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
20185,
62,
27530,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
220,
220,
3740,
13... | 2.526784 | 5,283 |
#!/usr/bin/python
import os
import json
from optparse import OptionParser
homepath = os.getenv("INSIGHTAGENTDIR")
usage = "Usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-r", "--reporting_interval",
action="store", dest="reporting_interval", help="Reporting interval in minute")
(opt... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
28686,
198,
11748,
33918,
198,
6738,
2172,
29572,
1330,
16018,
46677,
198,
198,
11195,
6978,
796,
28686,
13,
1136,
24330,
7203,
20913,
9947,
4760,
3525,
34720,
4943,
198,
26060,
796,
... | 2.988142 | 253 |
from ..base import GnuRecipe
| [
6738,
11485,
8692,
1330,
18509,
84,
37523,
628
] | 3.75 | 8 |
import os
import numpy as np
# if new types are added - add to the end in order not to break previously created files!
supportedDtypes= np.array( [np.dtype(x) for x in ['uint8', 'uint16', 'uint32', 'uint64', 'float32', 'float64']] )
dtypeByteSizes= [1,2,4,8,4,8]
pntsHeaderSize= 4 + 1
# functions fo... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
2,
611,
649,
3858,
389,
2087,
532,
751,
284,
262,
886,
287,
1502,
407,
284,
2270,
4271,
2727,
3696,
0,
198,
15999,
35,
19199,
28,
45941,
13,
18747,
7,
685,
37659,
13,
... | 2.449675 | 616 |
#! /usr/bin/env python
import math
import pandas as pd
import networkx as nx
from bokeh.plotting import figure
from bokeh.models import Circle, Text, Row, Column, ColumnDataSource, TapTool, CustomJS, MultiLine
from bokeh.models.graphs import from_networkx
from bokeh.palettes import viridis
from bokeh.transform import ... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
10688,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
3127,
87,
355,
299,
87,
198,
198,
6738,
1489,
365,
71,
13,
29487,
889,
1330,
3785,
198,
6738,
1489,
365,
71,
13,
2... | 2.84984 | 313 |
from django.forms import Form, Textarea
from django import forms
| [
6738,
42625,
14208,
13,
23914,
1330,
5178,
11,
8255,
20337,
198,
6738,
42625,
14208,
1330,
5107,
628,
198
] | 3.722222 | 18 |
"""
File: shrink.py
Name: Che-Hsien, Chiu
-------------------------------
Create a new "out" image half the width and height of the original.
Set pixels at x=0 1 2 3 in out , from x=0 2 4 6 in original,
and likewise in the y direction.
"""
from simpleimage import SimpleImage
def shrink(filename):
""... | [
37811,
201,
198,
8979,
25,
22085,
13,
9078,
201,
198,
5376,
25,
2580,
12,
39,
82,
2013,
11,
609,
16115,
201,
198,
1783,
24305,
201,
198,
16447,
257,
649,
366,
448,
1,
2939,
2063,
262,
9647,
290,
6001,
286,
262,
2656,
13,
201,
198,... | 2.321041 | 461 |
import unittest
from cartpole.rl import policy
if __name__ == '__main__':
unittest.main() | [
11748,
555,
715,
395,
198,
6738,
6383,
36869,
13,
45895,
1330,
2450,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419
] | 2.742857 | 35 |
import socket
from contextlib import closing
from typing import List, Optional
from vektonn.dtos import Vector, Attribute, AttributeValue, InputDataPoint, FoundDataPoint
vektonn_api_host = 'localhost'
vektonn_api_port = 8081
vektonn_api_base_url = f'http://{vektonn_api_host}:{vektonn_api_port}'
data_source_name = 'Q... | [
11748,
17802,
198,
6738,
4732,
8019,
1330,
9605,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
198,
6738,
1569,
74,
1122,
77,
13,
28664,
418,
1330,
20650,
11,
3460,
4163,
11,
3460,
4163,
11395,
11,
23412,
6601,
12727,
11,
4062,
6601,
... | 2.625 | 200 |
# -*- coding: utf-8 -*-
"""
Script for randomly separate all the auditory stim of this protocol into
4 sets of 72 stimuli, with 12 of each category per set
author: Juan Jesus Torre Tresols
e-mail: juan-jesus.torre-tresols@inria.fr
"""
import os
from random import shuffle
import shutil
# %% PARAMETERS
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
7391,
329,
15456,
4553,
477,
262,
38949,
7132,
286,
428,
8435,
656,
198,
19,
5621,
286,
7724,
25973,
11,
351,
1105,
286,
1123,
6536,
583,
900,
198,
198,
98... | 2.226981 | 934 |
import os
import sys
import fcntl
import datetime
import json
import re
import time
import zipfile
import threading
import hashlib
import shutil
import subprocess
import pprint
import random
from invoke import task
import boto3
import botocore.exceptions
import multiprocessing
import io
import ai2thor.build
import logg... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
277,
66,
429,
75,
198,
11748,
4818,
8079,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
640,
198,
11748,
19974,
7753,
198,
11748,
4704,
278,
198,
11748,
12234,
8019,
198,
11748,
4423,
346,
... | 2.210269 | 6,349 |
class Solution:
"""
@param s: an expression includes numbers, letters and brackets
@return: a string
"""
| [
4871,
28186,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
2488,
17143,
264,
25,
281,
5408,
3407,
3146,
11,
7475,
290,
28103,
198,
220,
220,
220,
2488,
7783,
25,
257,
4731,
198,
220,
220,
220,
37227,
198
] | 3.102564 | 39 |
"""
Demo for the sdfrw.py module.
Add property to molecules in an sdf file according to values stored in a text file
example: python updater.py Name flavonoid_names.txt < flavonoids.sdf > flavonoids_updated.sdf
result: Molecule property "Name", with values from file flavonoid_names.txt,
is set or reset for molecules i... | [
37811,
198,
11522,
78,
329,
262,
264,
7568,
31653,
13,
9078,
8265,
13,
198,
4550,
3119,
284,
17745,
287,
281,
264,
7568,
2393,
1864,
284,
3815,
8574,
287,
257,
2420,
2393,
198,
198,
20688,
25,
21015,
2325,
729,
13,
9078,
6530,
10525,
... | 3.122271 | 458 |
from can_tools.scrapers.official.federal.CDC.cdc_coviddatatracker import (
CDCCovidDataTracker,
)
from can_tools.scrapers.official.federal.CDC.cdc_state_vaccines import CDCStateVaccine
| [
6738,
460,
62,
31391,
13,
1416,
2416,
364,
13,
16841,
13,
69,
2110,
13,
47667,
13,
10210,
66,
62,
66,
709,
1638,
265,
265,
81,
10735,
1330,
357,
198,
220,
220,
220,
6458,
4093,
709,
312,
6601,
35694,
11,
198,
8,
198,
6738,
460,
... | 2.625 | 72 |
import os
import shutil
from unittest import mock
import pytest
from click.testing import CliRunner
from great_expectations import DataContext
from great_expectations.cli import cli
from great_expectations.data_context.templates import CONFIG_VARIABLES_TEMPLATE
from great_expectations.data_context.util import file_re... | [
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
11748,
12972,
9288,
198,
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
198,
198,
6738,
1049,
62,
1069,
806,
602,
1330,
6060,
21947,
198,
6738,
1049,
... | 2.515431 | 2,171 |
import threadpool
import math
import random
import igraph
import time
def computL(i,j,cmty,c):
'''
compute r_i,j,c
:param flag:
:param cmty_i:
:param cmty_j:
:return:
'''
if c in cmty[i] and c in cmty[j]:
if ',' in cmty[i]:
cmty_i_list = cmty[i].split... | [
11748,
4704,
7742,
201,
198,
11748,
10688,
201,
198,
11748,
4738,
201,
198,
11748,
45329,
1470,
201,
198,
11748,
640,
201,
198,
4299,
2653,
43,
7,
72,
11,
73,
11,
11215,
774,
11,
66,
2599,
201,
198,
220,
220,
220,
705,
7061,
201,
... | 1.739205 | 4,678 |
from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^list/$', 'notifications.views.notifications_list', name="notification-list"),
)
| [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
4868,
32624,
3256,
705,
1662,
6637,
13,
33571,
13,
1662,
6637,
62,
... | 2.890909 | 55 |
# myTeam.py
# ---------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# At... | [
2,
616,
15592,
13,
9078,
198,
2,
45337,
198,
2,
10483,
26426,
6188,
25,
220,
921,
389,
1479,
284,
779,
393,
9117,
777,
4493,
329,
198,
2,
9856,
4959,
2810,
326,
357,
16,
8,
345,
466,
407,
14983,
393,
7715,
198,
2,
8136,
11,
357,... | 3.344859 | 2,169 |
# Generated by Django 2.1.2 on 2018-10-18 02:57
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
17,
319,
2864,
12,
940,
12,
1507,
7816,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
6... | 2.818182 | 44 |
#!/usr/bin/python
from __future__ import division
import sys
import dpkt
import struct
import socket
import string
import binascii
pkt_num = 1
offset = 0
dst_received = 0
#time
sendinit = 0
dstnor = 0
flag_src_stop = 0
if __name__ == '__main__':
flow = list()
if len(sys.argv) < 5:
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
201,
198,
6738,
11593,
37443,
834,
1330,
7297,
201,
198,
11748,
25064,
201,
198,
11748,
288,
79,
21841,
201,
198,
11748,
2878,
201,
198,
11748,
17802,
201,
198,
11748,
4731,
201,
198,
11... | 1.871239 | 831 |
"""Contains various utility-related nox sessions."""
import nox
from constants_nox import COMPOSE_FILE, INTEGRATION_COMPOSE_FILE
COMPOSE_DOWN = (
"docker-compose",
"-f",
COMPOSE_FILE,
"-f",
INTEGRATION_COMPOSE_FILE,
"down",
"--remove-orphans",
)
@nox.session()
def clean(session: nox.Sessi... | [
37811,
4264,
1299,
2972,
10361,
12,
5363,
645,
87,
10991,
526,
15931,
198,
11748,
645,
87,
198,
6738,
38491,
62,
35420,
1330,
24301,
14058,
62,
25664,
11,
17828,
7156,
49,
6234,
62,
9858,
48933,
62,
25664,
198,
198,
9858,
48933,
62,
4... | 2.734824 | 313 |
from tqdm import tqdm
import numpy as np
import torch
from dataset import AuxTables
from .featurizer import Featurizer
from collections import OrderedDict
import string
import pandas as pd
from itertools import product
def build_norm_model():
"""
build a normalized language model
:return: a key value dic... | [
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
27039,
1330,
47105,
51,
2977,
198,
6738,
764,
5036,
2541,
7509,
1330,
5452,
2541,
7509,
198,
6738,
17268,
1330,
14230,
1068,
3... | 3 | 169 |
"""HTML scraper for The Stem & Stein"""
import datetime
from urllib.parse import parse_qsl
from html import unescape
from decimal import Decimal
import logging
import os
from bs4 import BeautifulSoup
import requests
import configurations
import pytz
from dateutil.parser import parse
from django.db.models import Q
from... | [
37811,
28656,
19320,
525,
329,
383,
520,
368,
1222,
15215,
37811,
198,
11748,
4818,
8079,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
21136,
62,
80,
6649,
198,
6738,
27711,
1330,
555,
41915,
198,
6738,
32465,
1330,
4280,
4402,
198,
1174... | 2.066795 | 2,605 |
# -*- coding:utf-8 -*-
from django.conf.urls import url, include
from apps.query.views import *
from rest_framework import routers
router = routers.DefaultRouter()
router.register(r'querysqllog', QuerySqlLogViewSet, basename="querysqllog")
urlpatterns = [
#
url(r'^', include(router.urls)),
url(r'querysql... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
2291,
198,
6738,
6725,
13,
22766,
13,
33571,
1330,
1635,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
47... | 2.470588 | 187 |
'''
titre : blockchain.py
description : Implementation d'une blockchain
auteur : Koffi Michel
utuilisation : python blockchain_client.py
python blockchain_client.py -p 8080
python blockchain_client.py --port 8080
version python : 3
References :... | [
7061,
6,
201,
198,
83,
270,
260,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
11779,
13,
9078,
201,
198,
11213,
220,
220,
220,
220,
1058,
46333,
288,
6,
1726,
11779,
201,
198,
64,
1133,
333,
220,
220,
220,
220,
220,
2... | 2.412331 | 519 |
# PyAlgoTrade
#
# Copyright 2011-2015 Gabriel Martin Becedillas Ruiz
#
# 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 ap... | [
2,
9485,
2348,
2188,
35965,
198,
2,
198,
2,
15069,
2813,
12,
4626,
17371,
5780,
15780,
276,
25314,
11667,
528,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
... | 3.686364 | 220 |
from django import forms
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm
from .models import CustomUser, Chamado | [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
23914,
1330,
9104,
8479,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
11787,
12443,
341,
8479,
198,
6738,
764,
27530,
1330,
8562,
12982,
11,
37790,
4533
] | 3.85 | 40 |
## Sequences
from Bio.Seq import Seq
from Bio.Seq import MutableSeq
seqobj = Bio.Seq.Seq("ATCGTG")
print(str(seqobj))
mutable = MutableSeq(seqobj)
seqobj[0] = "T"
| [
2235,
24604,
3007,
198,
198,
6738,
16024,
13,
4653,
80,
1330,
1001,
80,
198,
6738,
16024,
13,
4653,
80,
1330,
13859,
540,
4653,
80,
198,
198,
41068,
26801,
796,
16024,
13,
4653,
80,
13,
4653,
80,
7203,
1404,
34,
19555,
38,
4943,
198... | 2.243243 | 74 |
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 13 23:16:58 2022
@author: marco
"""
import pandas as pd
import numpy as np
import os
from scipy.linalg import pinv as pinv
from scipy.linalg import inv as inv
from scipy.stats import f
from scipy.stats import chi2
os.chdir('C://Users//marco//Desktop//Projec... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3825,
1526,
1511,
2242,
25,
1433,
25,
3365,
33160,
201,
198,
201,
198,
31,
9800,
25,
1667,
1073,
201,
198,
37811,
201,
198,
11748,
19... | 2.119534 | 343 |
from __future__ import print_function
import time
import argparse
import Queue
import RPi.GPIO as GPIO
import bisect
DESCRIPTION = """A simple tool to count events on a GPIO
PIN-Numbering is in BROADCOM!
"""
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
GPIO.cleanup()
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
640,
198,
11748,
1822,
29572,
198,
11748,
4670,
518,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
47457,
478,
198,
198,
30910,
40165,
796,
37227,
32,
2829,
28... | 2.828829 | 111 |
"""
I/O, attributes, and processing for different datasets.
"""
from .semantickitti import SemanticKITTI
from .s3dis import S3DIS
from .parislille3d import ParisLille3D
from .toronto3d import Toronto3D
from .customdataset import Custom3D
from .semantic3d import Semantic3D
from . import utils
__all__ = [
'SemanticK... | [
37811,
198,
40,
14,
46,
11,
12608,
11,
290,
7587,
329,
1180,
40522,
13,
198,
37811,
198,
198,
6738,
764,
43616,
415,
624,
715,
72,
1330,
12449,
5109,
42,
22470,
40,
198,
6738,
764,
82,
18,
6381,
1330,
311,
18,
26288,
198,
6738,
76... | 2.7 | 150 |
from python_ddd.domain.Entity import Entity
| [
6738,
21015,
62,
1860,
67,
13,
27830,
13,
32398,
1330,
20885,
628
] | 3.75 | 12 |
import mido
import random
from ClearLaunchpad import RemoveNotes, ClearScreen
from FirstMido import FillNotes
ClearScreen()
| [
11748,
3095,
78,
198,
11748,
4738,
198,
6738,
11459,
38296,
15636,
1330,
17220,
16130,
11,
11459,
23901,
198,
6738,
3274,
44,
17305,
1330,
27845,
16130,
628,
628,
198,
19856,
23901,
3419,
198
] | 4 | 32 |
#!/usr/bin/env python
"""Module for storing custom exceptions for cmc-py modules."""
class InvalidPageURL(Exception):
"""Raised when the webpage is not found on CoinMarketCap website."""
def __init__(self, url: str) -> None:
"""
Args:
url (str): Link of the webpage.
"""
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
26796,
329,
23069,
2183,
13269,
329,
12067,
66,
12,
9078,
13103,
526,
15931,
628,
198,
4871,
17665,
9876,
21886,
7,
16922,
2599,
198,
220,
220,
220,
37227,
21762,
1417,
618,
... | 2.684701 | 536 |
import dash_html_components as html
import dash_core_components as dcc
from datetime import datetime
markdown_text = '''
### Explanation
This dashboard extracts data from various data sources and presents the daily lifestyle of the individual.
1. __Select__ a date ranging from 5th April 2019 to 5th May 2019.
2. __... | [
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
4102,
2902,
62,
5239,
796,
705,
7061,
198,
21017,
50125,
341,
198,
198,
1212... | 2.13219 | 991 |
from .command import main
main()
| [
6738,
764,
21812,
1330,
1388,
198,
198,
12417,
3419,
198
] | 3.4 | 10 |
from sys import path, version_info
from os.path import sep
path.insert(1, path[0]+sep+'codec'+sep+'ber')
import ber.suite
path.insert(1, path[0]+sep+'codec'+sep+'cer')
import cer.suite
path.insert(1, path[0]+sep+'codec'+sep+'der')
import der.suite
from pyasn1.error import PyAsn1Error
if version_info[0:2] < (2, 7) or \
... | [
6738,
25064,
1330,
3108,
11,
2196,
62,
10951,
198,
6738,
28686,
13,
6978,
1330,
41767,
198,
6978,
13,
28463,
7,
16,
11,
3108,
58,
15,
48688,
325,
79,
10,
6,
19815,
721,
6,
10,
325,
79,
10,
6,
527,
11537,
198,
11748,
18157,
13,
2... | 2.158416 | 303 |
import datetime
import logging
import operator
import sys
import time
from collections import defaultdict, namedtuple
from time import sleep
from OpenSSL import SSL
import facebook
from db_functions import db_interface_context
from slack_notifier import notify_slack
import config_utils
SearchRunnerParams = namedtup... | [
11748,
4818,
8079,
198,
11748,
18931,
198,
11748,
10088,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
17268,
1330,
4277,
11600,
11,
3706,
83,
29291,
198,
6738,
640,
1330,
3993,
628,
198,
6738,
4946,
31127,
1330,
25952,
198,
11748,
23960... | 2.419458 | 627 |
#!python3
#encoding:utf-8
import os.path
import subprocess
import getpass
import Data
import command.miscellaneous.Licenses
if __name__ == "__main__":
github_user_name = 'ytyaru'
os_user_name = getpass.getuser()
device_name = 'some_device'
path_db_base = 'db/GitHub'
path_db_account = '/media/{0}/{1}/{2}/GitHub.A... | [
2,
0,
29412,
18,
198,
2,
12685,
7656,
25,
40477,
12,
23,
198,
11748,
28686,
13,
6978,
198,
11748,
850,
14681,
198,
11748,
651,
6603,
198,
11748,
6060,
198,
11748,
3141,
13,
25413,
25673,
13,
26656,
4541,
628,
198,
361,
11593,
3672,
... | 2.366013 | 306 |
from flask import Flask, jsonify
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy() | [
6738,
42903,
1330,
46947,
11,
33918,
1958,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
198,
9945,
796,
16363,
2348,
26599,
3419
] | 3.5 | 26 |
import time
import copy
from pprint import pprint
from .cltools import HAVE_PYOPENCL
from .cluster import HAVE_ISOSPLIT5
try:
import numba
HAVE_NUMBA = True
except ImportError:
HAVE_NUMBA = False
# nb of channel to become sparse
limit_dense_sparse = 4
_default_catalogue_params = {
'duration': 300.... | [
11748,
640,
198,
11748,
4866,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
6738,
764,
565,
31391,
1330,
21515,
62,
47,
56,
3185,
1677,
5097,
198,
6738,
764,
565,
5819,
1330,
21515,
62,
1797,
2640,
6489,
2043,
20,
198,
198,
28311,
... | 2.016312 | 3,433 |
from xml.dom.minidom import DOMImplementation
from xml.dom.minidom import getDOMImplementation
| [
6738,
35555,
13,
3438,
13,
1084,
312,
296,
1330,
24121,
3546,
32851,
201,
198,
6738,
35555,
13,
3438,
13,
1084,
312,
296,
1330,
651,
39170,
3546,
32851,
201,
198,
201,
198,
201,
198,
201,
198
] | 2.942857 | 35 |
from .Sprites import Monster, Bullet, Man
| [
6738,
764,
4561,
23156,
1330,
220,
12635,
11,
18003,
11,
1869,
198
] | 3.583333 | 12 |
from abc import abstractmethod, ABC
from typing import (
Any,
Dict,
List,
)
from .disk import Disk
from .pool import Pool
from .virtualmachine import VirtualMachine
| [
6738,
450,
66,
1330,
12531,
24396,
11,
9738,
198,
6738,
19720,
1330,
357,
198,
220,
220,
220,
4377,
11,
198,
220,
220,
220,
360,
713,
11,
198,
220,
220,
220,
7343,
11,
198,
8,
198,
6738,
764,
39531,
1330,
31664,
198,
6738,
764,
77... | 3.236364 | 55 |
from __future__ import division
import numpy as np
import scipy
import scipy.stats
import scipy.fftpack
import scipy.optimize
import logging
import stingray.lightcurve as lightcurve
import stingray.utils as utils
from stingray.gti import bin_intervals_from_gtis, check_gtis
from stingray.utils import simon
from stingra... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
198,
11748,
629,
541,
88,
13,
34242,
198,
11748,
629,
541,
88,
13,
487,
83,
8002,
198,
11748,
629,
541,
88,
13,
40085,
1096,
198,
117... | 2.488541 | 9,512 |
# Generated by Django 3.1.4 on 2021-06-23 15:38
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
19,
319,
33448,
12,
3312,
12,
1954,
1315,
25,
2548,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import requests
import json
from .helper import Helper
| [
11748,
7007,
198,
11748,
33918,
198,
198,
6738,
764,
2978,
525,
1330,
5053,
525,
198
] | 3.733333 | 15 |
ano_nasc = int(input("Informe o ano que você nasceu com 4 dígitos: "))
if ano_nasc >= 2006:
print("Você não poderá votar esse ano!")
else:
print("Você poderá votar esse ano!")
| [
5733,
62,
77,
3372,
796,
493,
7,
15414,
7203,
818,
687,
68,
267,
281,
78,
8358,
12776,
25792,
25221,
344,
84,
401,
604,
288,
8836,
18300,
418,
25,
366,
4008,
198,
361,
281,
78,
62,
77,
3372,
18189,
4793,
25,
198,
220,
220,
220,
... | 2.139535 | 86 |
from __future__ import print_function
import unittest
import wrapt
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
555,
715,
395,
198,
198,
11748,
7917,
457,
198
] | 3.45 | 20 |
# detects letters on a sheet
import cv2
import os
import numpy as np
import scipy.io as sio
os.chdir('character_recognition')
from oct2py import octave
os.chdir('..')
os.chdir('character_detection')
from arrange import arrange
from matplotlib import pyplot as plt
mat0 = sio.loadmat('weights/tr0.mat')
mat1 = sio.loadma... | [
198,
2,
39382,
7475,
319,
257,
9629,
198,
11748,
269,
85,
17,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
952,
355,
264,
952,
198,
418,
13,
354,
15908,
10786,
22769,
62,
26243,
653,
11537,
19... | 1.803347 | 5,258 |
from geo.calc import Calc
from geo.calc import Distance
from geo.geosp import Wt
from geo.geosp import Gh
from geo.files.csv_file import check | [
6738,
40087,
13,
9948,
66,
1330,
2199,
66,
198,
6738,
40087,
13,
9948,
66,
1330,
34600,
198,
6738,
40087,
13,
469,
2117,
1330,
370,
83,
198,
6738,
40087,
13,
469,
2117,
1330,
11972,
198,
6738,
40087,
13,
16624,
13,
40664,
62,
7753,
... | 3.227273 | 44 |
# This test code was written by the `hypothesis.extra.ghostwriter` module
# and is provided under the Creative Commons Zero public domain dedication.
from hypothesis import given
from hypothesis import strategies as st
import threedframe.scad.label
# TODO: replace st.nothing() with an appropriate strategy
@given(
... | [
2,
770,
1332,
2438,
373,
3194,
416,
262,
4600,
36362,
313,
8497,
13,
26086,
13,
38933,
16002,
63,
8265,
198,
2,
290,
318,
2810,
739,
262,
17404,
13815,
12169,
1171,
7386,
22445,
13,
198,
198,
6738,
14078,
1330,
1813,
198,
6738,
14078,... | 2.890052 | 191 |
from help_handler import HelpHandler
| [
6738,
1037,
62,
30281,
1330,
10478,
25060,
628
] | 4.75 | 8 |
# Copyright IBM All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from typing import List, Dict, Tuple, Optional
import pandas as pd
import plotly.express as px
import plotly.graph_objs as go
import numpy as np
# from dse_do_utils.datamanager import DataManager
from dse_do_utils.plotlymanager import PlotlyMan... | [
2,
15069,
19764,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
11,
309,
29291,
11,
32233,
198,
11748,
19798,
292,
355,
279,
67,
19... | 2.201449 | 1,380 |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
13130,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 2.859358 | 903 |
from .get_timetable import get_timetable
| [
6738,
764,
1136,
62,
16514,
316,
540,
1330,
651,
62,
16514,
316,
540,
198
] | 2.928571 | 14 |
"""adding database for prefect
Revision ID: cecfd30de918
Revises: 361fde4943a9
Create Date: 2021-07-27 16:30:44.676573
"""
from alembic import op
import sqlalchemy as sa
import psycopg2
# revision identifiers, used by Alembic.
revision = 'cecfd30de918'
down_revision = '361fde4943a9'
branch_labels = None
depends_on ... | [
37811,
26872,
6831,
329,
662,
2309,
198,
198,
18009,
1166,
4522,
25,
269,
721,
16344,
1270,
2934,
24,
1507,
198,
18009,
2696,
25,
47744,
69,
2934,
2920,
3559,
64,
24,
198,
16447,
7536,
25,
33448,
12,
2998,
12,
1983,
1467,
25,
1270,
... | 2.587302 | 126 |
from pwn import *
context.log_level = 'info'
exe = './mr_snowy'
# This will automatically get context arch, bits, os etc
elf = context.binary = ELF(exe, checksec=False)
# Start program
io = process('./mr_snowy')
#io = remote('138.68.174.27', 31056)
offset = 72
# Build the payload
payload = flat(
{offset: 0x00401... | [
6738,
279,
675,
1330,
1635,
198,
198,
22866,
13,
6404,
62,
5715,
796,
705,
10951,
6,
198,
198,
13499,
796,
705,
19571,
43395,
62,
82,
2197,
88,
6,
198,
2,
770,
481,
6338,
651,
4732,
3934,
11,
10340,
11,
28686,
3503,
198,
7046,
796... | 2.767773 | 211 |
#!/usr/bin/python3
# flake8: noqa
from builtins import __test_sink, __test_source
| [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
781,
539,
23,
25,
645,
20402,
198,
6738,
3170,
1040,
1330,
11593,
9288,
62,
82,
676,
11,
11593,
9288,
62,
10459,
628,
198
] | 2.545455 | 33 |
import csv
import gym
import envs
ENV_ID = "CustomEnv-v0"
my_env = gym.make(ENV_ID)
done = False
my_env.current_states = my_env.reset()
my_env.save_counter = 10000
while not done:
# current_action = my_contr.Controller_model(my_env.current_states, my_env.dt * my_env.counter, action=sl_action)
my_env.current_st... | [
11748,
269,
21370,
198,
11748,
11550,
198,
11748,
551,
14259,
198,
198,
1677,
53,
62,
2389,
796,
366,
15022,
4834,
85,
12,
85,
15,
1,
198,
1820,
62,
24330,
796,
11550,
13,
15883,
7,
1677,
53,
62,
2389,
8,
198,
28060,
796,
10352,
1... | 2.289902 | 307 |
from bitstring import BitArray, BitStream
# Definition of constants
KEY_SIZE = 128
REGISTER_SIZE = 128
LAST_INDEX = 127
INITIALIZATION_CLOCKS = 256
if __name__ == '__main__':
# Define number of rounds
NO_ROUNDS = 25
ONES_PADDING = BitArray('0xFFFFFFFF')
# Test vector of GRAIN(128 bit key)
# ... | [
6738,
1643,
8841,
1330,
4722,
19182,
11,
4722,
12124,
198,
198,
2,
30396,
286,
38491,
198,
20373,
62,
33489,
796,
13108,
198,
31553,
41517,
62,
33489,
796,
13108,
198,
43,
11262,
62,
12115,
6369,
796,
18112,
198,
1268,
2043,
12576,
1488... | 2.481752 | 548 |
from setuptools import setup, find_packages
from os import path
this_directory = path.abspath(path.dirname(__file__))
try:
import pypandoc
long_description = pypandoc.convert_file('README.md', 'rst')
except:
long_description = ""
requirements = list(map(str.strip, open("requirements.txt").readlines()))
... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
28686,
1330,
3108,
198,
198,
5661,
62,
34945,
796,
3108,
13,
397,
2777,
776,
7,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
28311,
25,
198,
220,
220,... | 2.721254 | 287 |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
33448,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 2.566594 | 2,305 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
2864,
383,
3012,
9552,
15417,
4816,
46665,
290,
383,
12905,
2667,
32388,
3457,
13,
1074,
13,
198,
2,
15069,
357,
66,
8,
2864,
11,
15127,
23929,
44680,
6234,
13,
220,
1439,
2489,
10395,
13,... | 2.594409 | 3,649 |
"""
Collect PSF files, run
ex for using the average file:
gp = piff.GPInterp2pcf(kernel="0.009 * RBF(300.*0.26)",
optimize=fit_hyp, white_noise=1e-5, average_fits='output/average.fits')
gp.initialize(stars_training)
gp.solve(stars_training)
"""
from __future__ i... | [
37811,
198,
31337,
6599,
37,
3696,
11,
1057,
198,
198,
1069,
329,
1262,
262,
2811,
2393,
25,
198,
220,
220,
220,
220,
220,
220,
220,
27809,
796,
279,
733,
13,
16960,
9492,
79,
17,
79,
12993,
7,
33885,
2625,
15,
13,
28694,
1635,
17... | 2.453704 | 432 |
########################################################################################################
# DEFAULT CONFIG FILE VFX
########################################################################################################
# GLOBAL
FULL_SCREEN = False
# VIDEO
VIDEO_WINDOW_NAME = "SAW2F2"
VIDEO_SCREEN_SIZ... | [
29113,
29113,
29113,
7804,
198,
2,
5550,
38865,
25626,
45811,
569,
17213,
198,
29113,
29113,
29113,
7804,
198,
198,
2,
10188,
9864,
1847,
198,
37,
9994,
62,
6173,
2200,
1677,
796,
10352,
198,
198,
2,
35507,
198,
42937,
62,
28929,
3913,
... | 2.596721 | 305 |
import asyncio
import asynctest
import pytest
from diffuse import worker
| [
11748,
30351,
952,
198,
198,
11748,
355,
2047,
310,
395,
198,
11748,
12972,
9288,
198,
198,
6738,
42864,
1330,
8383,
628
] | 3.619048 | 21 |
# Escreva um programa que exiba o resultado de 2a x 3b, em que a vale 3 e b vale 5
a = 3
b = 5
print(2 * a * 3 * b)
| [
2,
16319,
260,
6862,
23781,
1430,
64,
8358,
409,
23718,
267,
1255,
4533,
390,
362,
64,
2124,
513,
65,
11,
795,
8358,
257,
410,
1000,
513,
304,
275,
410,
1000,
642,
198,
198,
64,
796,
513,
198,
65,
796,
642,
198,
4798,
7,
17,
163... | 2.25 | 52 |
import cutter
from .extras import hex_pad, file_name
| [
11748,
38121,
198,
6738,
764,
2302,
8847,
1330,
17910,
62,
15636,
11,
2393,
62,
3672,
628,
198
] | 3.235294 | 17 |
#!/usr/bin/env python
import RPi.GPIO as GPIO
import SimpleMFRC522
import os, pickle, time
import pickle
reader = SimpleMFRC522.SimpleMFRC522()
tags = {}
load_tags()
try:
while True:
print("Hold a tag next to the reader")
id = reader.read_id()
command = tags.get... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
17427,
49800,
7397,
49542,
198,
11748,
28686,
11,
2298,
293,
11,
640,
198,
11748,
2298,
293,
198,
198,
46862,
796,
17427,
... | 2.132231 | 242 |