max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 117 | max_stars_count int64 0 95.2k | id stringlengths 1 7 | content stringlengths 12 593k | input_ids listlengths 7 549k |
|---|---|---|---|---|---|
e3d/synth_dataset/params.py | ZiyunClaudeWang/e3d | 9 | 193681 | from dataclasses import dataclass, field
from utils.params import ParamsBase
shapenet_synset_map = {
'car': '02958343',
'chair': '02691156',
'plane': '03001627'
}
@dataclass
class Params(ParamsBase):
gpu_num: int
name: str
config_file: str = ""
# Dataset Generation Para... | [
1,
515,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
13,
3166,
3667,
29879,
29889,
7529,
1053,
1459,
2232,
5160,
13,
13,
845,
481,
264,
300,
29918,
19274,
842,
29918,
1958,
353,
426,
13,
1678,
525,
4287,
2396,
525,
29900,
29906,
2992... |
tantipy/__init__.py | izihawa/tantipy | 0 | 1607789 | <reponame>izihawa/tantipy
from .tantivy_coder import (
TantivyCoder,
TantivyDocument,
)
from .tantivy_reader import TantivyReader
__all__ = ['TantivyCoder', 'TantivyDocument', 'TantivyReader']
| [
1,
529,
276,
1112,
420,
29958,
466,
4861,
10011,
29914,
29873,
424,
666,
29891,
13,
3166,
869,
29873,
424,
440,
29891,
29918,
29883,
6119,
1053,
313,
13,
1678,
323,
424,
440,
29891,
29907,
6119,
29892,
13,
1678,
323,
424,
440,
29891,
... |
vnpy/extension/chart/item.py | asciili/vnpy | 0 | 166127 | <filename>vnpy/extension/chart/item.py
from datetime import datetime
from typing import List, Tuple, Dict
from vnpy.trader.ui import create_qapp, QtCore, QtGui, QtWidgets
from pyqtgraph import ScatterPlotItem
import pyqtgraph as pg
import numpy as np
import talib
import copy
from vnpy.chart import ChartWidget, Volume... | [
1,
529,
9507,
29958,
18564,
2272,
29914,
17588,
29914,
15425,
29914,
667,
29889,
2272,
13,
3166,
12865,
1053,
12865,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
29892,
360,
919,
13,
13,
3166,
325,
29876,
2272,
29889,
509,
1664,
29889,... |
BinaryTree/Node.py | Pedro29152/binary-search-tree-python | 0 | 23994 | <gh_stars>0
class Node():
def __init__(self, id: int, value = None, right: 'Node' = None, left: 'Node' = None):
self.id = id
self.value = value
self.right = right
self.left = left
self.parent: 'Node' = None
def add(self, node: 'Node'):
if not node:
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1990,
9071,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1178,
29901,
938,
29892,
995,
353,
6213,
29892,
1492,
29901,
525,
4247,
29915,
353,
6213,
29892,
2175,
29901,
525,
4247,
... |
run.py | RecepVural/Eight-Queens | 0 | 1604614 | #libraries are imported
import numpy as np
import random
# Chess table is created
a=['|',' ','|',' ','|',' ','|',' ','|',' ','|',' ','|',' ','|',' ','|']
chart= np.array([a,a,a,a,a,a,a,a],dtype=object)
chart2= chart.copy()
list1=[]
# possible columns are listed and first random selection is performed
columns_list=[1,3... | [
1,
396,
492,
8464,
526,
19673,
13,
5215,
12655,
408,
7442,
13,
5215,
4036,
13,
13,
29937,
678,
404,
1591,
338,
2825,
13,
29874,
29922,
1839,
29989,
3788,
525,
5501,
29989,
3788,
525,
5501,
29989,
3788,
525,
5501,
29989,
3788,
525,
550... |
scripts/migrations/versions/200e7ea0e64b_create_base_schema.py | hqhs/gosupport | 0 | 173685 | <gh_stars>0
"""Create base schema
Revision ID: 200e7ea0e64b
Revises:
Create Date: 2019-02-16 12:15:59.212678
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.creat... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
4391,
2967,
10938,
13,
13,
1123,
4924,
3553,
29901,
29871,
29906,
29900,
29900,
29872,
29955,
11248,
29900,
29872,
29953,
29946,
29890,
13,
1123,
1730,
267,
29901,
29871,
13,
... |
metrics/fid/fid_score.py | vfcosta/coegan-trained | 0 | 21965 | # Code apapted from https://github.com/mseitzer/pytorch-fid
"""Calculates the Frechet Inception Distance (FID) to evalulate GANs
The FID metric calculates the distance between two distributions of images.
Typically, we have summary statistics (mean & covariance matrix) of one
of these distributions, while the 2nd dist... | [
1,
396,
5920,
3095,
2156,
287,
515,
2045,
597,
3292,
29889,
510,
29914,
29885,
344,
13510,
29914,
2272,
7345,
305,
29899,
29888,
333,
13,
13,
15945,
29908,
27065,
1078,
278,
3878,
305,
300,
512,
1441,
6652,
749,
313,
29943,
1367,
29897,... |
molsysmt/tests/pbc/box_lengths_from_box_vectors/test_box_lengths_from_box_vectors.py | dprada/molsysmt | 0 | 195239 | <filename>molsysmt/tests/pbc/box_lengths_from_box_vectors/test_box_lengths_from_box_vectors.py
"""
Unit and regression test for the box_lengths_from_box_vectors module of the molsysmt package.
"""
# Import package, test suite, and other packages as needed
import molsysmt as msm
import numpy as np
# Distance between a... | [
1,
529,
9507,
29958,
29885,
3775,
952,
4378,
29914,
21150,
29914,
29886,
12328,
29914,
1884,
29918,
2848,
29879,
29918,
3166,
29918,
1884,
29918,
345,
14359,
29914,
1688,
29918,
1884,
29918,
2848,
29879,
29918,
3166,
29918,
1884,
29918,
345,
... |
source/evaluate_slt.py | faresbs/slrt | 2 | 71480 | #######################################################
#This script is for evaluating for the task of SLR #
#######################################################
import argparse
import time
import collections
import os
import sys
import torch
import torch.nn
from torch.autograd import Variable
import torch.nn as... | [
1,
835,
13383,
13383,
13383,
4136,
13,
29937,
4013,
2471,
338,
363,
6161,
1218,
363,
278,
3414,
310,
27146,
29934,
1678,
396,
13,
13383,
13383,
13383,
4136,
2277,
29937,
13,
13,
5215,
1852,
5510,
13,
5215,
931,
13,
5215,
16250,
13,
52... |
origamicon/app.py | Mailea/individual-sha1-avatars | 14 | 97082 | from flask import Flask, render_template, request, send_file
import io
import base64 as b64
import generator
app = Flask(__name__)
def page(**kwargs):
return render_template('main.html', **kwargs)
@app.route("/")
def home():
return page()
@app.route("/<text>", methods=['GET'])
def load_origamicon(text)... | [
1,
515,
29784,
1053,
2379,
1278,
29892,
4050,
29918,
6886,
29892,
2009,
29892,
3638,
29918,
1445,
13,
13,
5215,
12013,
13,
5215,
2967,
29953,
29946,
408,
289,
29953,
29946,
13,
13,
5215,
15299,
13,
13,
932,
353,
2379,
1278,
22168,
978,
... |
polymorphic/tests/test_utils.py | likeanaxon/django-polymorphic | 1 | 20437 | <filename>polymorphic/tests/test_utils.py
from django.test import TransactionTestCase
from polymorphic.models import PolymorphicModel, PolymorphicTypeUndefined
from polymorphic.tests.models import (
Enhance_Base,
Enhance_Inherit,
Model2A,
Model2B,
Model2C,
Model2D,
)
from polymorphic.utils impo... | [
1,
529,
9507,
29958,
3733,
962,
5676,
293,
29914,
21150,
29914,
1688,
29918,
13239,
29889,
2272,
13,
3166,
9557,
29889,
1688,
1053,
4103,
2467,
3057,
8259,
13,
13,
3166,
24324,
5676,
293,
29889,
9794,
1053,
2043,
962,
5676,
293,
3195,
2... |
src/testing/postgresql.py | kmane-bbcock1/python_postgresql | 0 | 1613185 | <gh_stars>0
# -*- coding: utf-8 -*-
# Copyright 2013 <NAME>
#
# 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 app... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
529,
5813,
29958,
13,
29937,
13,
29937,
298... |
tests/ut/test_core_files_public_link.py | CTERA-Networks/ctera-python-sdk | 5 | 163739 | import datetime
from unittest import mock
from cterasdk.core.enum import FileAccessMode
from cterasdk.common import Object
from tests.ut import base_core_services
class BaseCoreServicesFilesPublicLink(base_core_services.BaseCoreServicesTest):
def setUp(self):
super().setUp()
self._path = 'My Fil... | [
1,
1053,
12865,
13,
3166,
443,
27958,
1053,
11187,
13,
13,
3166,
274,
357,
294,
8181,
29889,
3221,
29889,
18605,
1053,
3497,
6638,
6818,
13,
3166,
274,
357,
294,
8181,
29889,
9435,
1053,
4669,
13,
3166,
6987,
29889,
329,
1053,
2967,
2... |
tests/io/threading/serial/receiver.py | ethanjli/phyllo-python | 0 | 149910 | <filename>tests/io/threading/serial/receiver.py
"""Print all data received on the serial port."""
# Builtins
import logging
# Packages
from phylline.links.events import LinkException
from phyllo.io.cli.args.args import parse_args
from phyllo.io.cli.args.protocol import (
args_application_stack, args_transport_... | [
1,
529,
9507,
29958,
21150,
29914,
601,
29914,
7097,
292,
29914,
15550,
29914,
13556,
2147,
29889,
2272,
13,
15945,
29908,
11816,
599,
848,
4520,
373,
278,
7797,
2011,
1213,
15945,
13,
13,
29937,
5373,
2782,
1144,
13,
13,
5215,
12183,
1... |
dedsecuritybot.py | dedsecurity/DedSecuritySearch | 0 | 34351 | <gh_stars>0
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
import pandas as pd
import json
import nltk
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.layers import Input, Embedding, LSTM , Dense,GlobalMaxPooling1D,Flatten
from tensorflow.keras.pre... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
26110,
408,
15886,
13,
5215,
12655,
... |
projects/fizzbuzz/python/test.py | jthompson22/methods | 0 | 106304 | <filename>projects/fizzbuzz/python/test.py
import pytest
from fizz_buzz import fizz_buzz
def test_fizzbuzz():
fizzbuzz_string5 = ' 1\n2\nfizz\n4\nbuzz\n'
fizzbuzz_string10 = ' 1\n2\nfizz\n4\nbuzz\nfizz\nbazz\n8\nfizz\nbuzz\n'
fizzbuzz_string21 =' 1\n2\nfizz\n4\nbuzz\nfizz\nbazz\n8\nfizz\nbuzz\n11\nfizz\n... | [
1,
529,
9507,
29958,
16418,
29914,
29888,
4981,
2423,
5617,
29914,
4691,
29914,
1688,
29889,
2272,
13,
5215,
11451,
1688,
13,
13,
3166,
285,
4981,
29918,
2423,
5617,
1053,
285,
4981,
29918,
2423,
5617,
13,
13,
13,
1753,
1243,
29918,
298... |
spexxy/weight/fromgridnearest.py | thusser/spexxy | 4 | 39239 | <gh_stars>1-10
import os
import numpy as np
import pandas as pd
from typing import List, Union
from .weight import Weight
from ..data import Spectrum
class WeightFromGridNearest(Weight):
"""
This class loads the weights from a grid depending on the initial values of the fit parameters by choosing the
n... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
19229,
1053,
2391,
29892,
7761,
13,
13,
3166,
869,
7915,
1053,
1334,
523,
13,
3... |
testing_app.py | michal090497/python-fruits-recognition | 1 | 28503 | # Import required libraries
import cv2
from os.path import os, dirname
import tensorflow as tf
import numpy as np
from tqdm import tqdm
import random
# List of categories (directories names)
CATEGORIES = ["bad_apple", "bad_grape", "bad_pear", "cherry", "good_apple", "good_avocado", "good_grape", "good_pear", "ripe_avo... | [
1,
396,
16032,
3734,
9562,
13,
5215,
13850,
29906,
13,
3166,
2897,
29889,
2084,
1053,
2897,
29892,
4516,
978,
13,
5215,
26110,
408,
15886,
13,
5215,
12655,
408,
7442,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
5215,
4036,... |
Python/main.py | akulaarora/My-All-Weather-Strategy | 0 | 51157 | # For importing keys
import sys
sys.path.append("../")
sys.path.append("DONOTPUSH/")
import api_keys
# My modules
import database as db
# Libraries
import json
from time import sleep
# from github import Github
from alpha_vantage.timeseries import TimeSeries
import logging
# Constants
REPO_NAME = "My-All-Weather-Str... | [
1,
396,
1152,
28348,
6611,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
4397,
703,
6995,
1159,
13,
9675,
29889,
2084,
29889,
4397,
703,
29928,
1164,
2891,
29925,
3308,
29950,
29914,
1159,
13,
5215,
7882,
29918,
8149,
13,
13,
29937,
16... |
contents/MyExperiment/Exp3_test/cluster_env.py | Feng-XiaoYue/Reinforcement-learning-with-tensorflow-master | 0 | 16726 | <reponame>Feng-XiaoYue/Reinforcement-learning-with-tensorflow-master
import numpy as np
import pandas as pd
import random
import time
import sys
if sys.version_info.major == 2:
import Tkinter as tk
else:
import tkinter as tk
class Cluster(tk.Tk, object):
def __init__(self, state_init, server_attribute):
... | [
1,
529,
276,
1112,
420,
29958,
29943,
996,
29899,
29990,
29653,
29979,
434,
29914,
1123,
262,
1454,
13561,
29899,
21891,
29899,
2541,
29899,
29056,
29899,
6207,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
4036,
13,
... |
seqtools/get_gene_info.py | NeilHumps/SequenceTools | 0 | 92378 | from Bio import SeqIO
import gzip
import os
import sys
from seqtools.general import rc, translate
def parse_gtf_dict(gtf_str):
return {i.split(' "')[0]:i.split(' "')[1] for i in gtf_str.split('"; ')}
def gtf_to_gene_length(gtf_file, outfile, sum_type='transcript_longest'):
"""
Get Gene length, 3 option... | [
1,
515,
21184,
1053,
25981,
5971,
13,
5215,
330,
7554,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
3166,
19359,
8504,
29889,
17492,
1053,
364,
29883,
29892,
14240,
13,
13,
13,
1753,
6088,
29918,
4141,
29888,
29918,
8977,
29898,
4141,
29888... |
src/transformers/models/layoutlmv3/configuration_layoutlmv3.py | bugface/transformers | 5 | 113461 | # coding=utf-8
# Copyright 2022 Microsoft Research and The HuggingFace Inc. team. 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/L... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29906,
7783,
10550,
322,
450,
379,
688,
3460,
23360,
9266,
29889,
3815,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090... |
ml4sts/summary_statistics.py | aguirre-lab/sts-ml | 0 | 103781 | <gh_stars>0
# Imports: standard library
import os
import logging
# Imports: third party
import pandas as pd
from tableone import TableOne
# Imports: ml4sts
# Imports: first party
from ml4sts.definitions import (
OUTCOME_MAP,
OPERATIVE_FEATURES,
CONTINUOUS_FEATURES,
DESCRIPTIVE_FEATURE_NAMES,
)
def s... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
1954,
4011,
29901,
3918,
3489,
13,
5215,
2897,
13,
5215,
12183,
13,
13,
29937,
1954,
4011,
29901,
4654,
6263,
13,
5215,
11701,
408,
10518,
13,
3166,
1591,
650,
1053,
6137,
6716,
... |
DjangoSite/apps/tones/migrations/0001_initial.py | abec/getabe.com | 0 | 60209 | <reponame>abec/getabe.com<filename>DjangoSite/apps/tones/migrations/0001_initial.py<gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel... | [
1,
529,
276,
1112,
420,
29958,
370,
687,
29914,
657,
4302,
29889,
510,
29966,
9507,
29958,
29928,
5364,
17033,
29914,
13371,
29914,
880,
267,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29896,
29918,
11228,
29889,
2272,
29966,
12443,
299... |
ch05/challenge.py | laszlokiraly/LearningAlgorithms | 74 | 100034 | <filename>ch05/challenge.py
"""
Challenge Exercises for Chapter 5.
"""
import timeit
from algs.table import DataTable, ExerciseNum, caption
from algs.modeling import n_log_n_model, quadratic_model, numpy_error
from ch01.book import Order
numRecursiveImproved = [0]
def num_swaps(A):
"""Given an array of integers... | [
1,
529,
9507,
29958,
305,
29900,
29945,
29914,
305,
11768,
29889,
2272,
13,
15945,
29908,
13,
1451,
11768,
1222,
261,
3476,
267,
363,
23040,
29871,
29945,
29889,
13,
15945,
29908,
13,
13,
5215,
931,
277,
13,
13,
3166,
3093,
29879,
29889... |
tests/test_bin.py | CiscoSystems/ceilometer | 1 | 61810 | <reponame>CiscoSystems/ceilometer
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 eNovance <<EMAIL>>
#
# Author: <NAME> <<EMAIL>>
#
# 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 Lic... | [
1,
529,
276,
1112,
420,
29958,
29907,
275,
1111,
3924,
29879,
29914,
27696,
8328,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
8025,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29... |
configs/production.py | syz247179876/Flask-Sports | 2 | 14634 | <reponame>syz247179876/Flask-Sports
# -*- coding: utf-8 -*-
# @Time : 2020/12/1 下午11:24
# @Author : 司云中
# @File : production.py
# @Software: Pycharm
from configs.default import DefaultConfig
class ProductionConfig(DefaultConfig):
"""the config of production env"""
DEBUG = False
TESTING = False
MONGOD... | [
1,
529,
276,
1112,
420,
29958,
29879,
12339,
29906,
29946,
29955,
29896,
29955,
29929,
29947,
29955,
29953,
29914,
8754,
1278,
29899,
29903,
4011,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
... |
Python/insert-delete-getrandom-o1-duplicates-allowed.py | RideGreg/LeetCode | 1 | 109726 | <reponame>RideGreg/LeetCode
# Time: O(1)
# Space: O(n)
# 381
# Design a data structure that supports all following operations in average O(1) time.
#
# Note: Duplicate elements are allowed.
# insert(val): Inserts an item val to the collection.
# remove(val): Removes an item val from the collection if present.
# getRa... | [
1,
529,
276,
1112,
420,
29958,
29934,
680,
29954,
1727,
29914,
3226,
300,
3399,
13,
29937,
5974,
29901,
29871,
438,
29898,
29896,
29897,
13,
29937,
14121,
29901,
438,
29898,
29876,
29897,
13,
13,
29937,
29871,
29941,
29947,
29896,
13,
299... |
middleware.py | wjayesh/flask-prometheus | 0 | 46345 | <filename>middleware.py
from flask import request
import time
import sys
from prometheus_client import Counter, Histogram
APP_REQUEST_COUNT_TOTAL = Counter(
'app_request_count_total', 'App Request Count Total',
['app_name', 'method', 'endpoint']
)
APP_REQUEST_COUNT_FAILED = Counter(
'app_request_count_fai... | [
1,
529,
9507,
29958,
17662,
2519,
29889,
2272,
13,
3166,
29784,
1053,
2009,
13,
5215,
931,
13,
5215,
10876,
13,
3166,
2504,
23043,
375,
29918,
4645,
1053,
315,
5336,
29892,
15179,
13342,
13,
13,
20576,
29918,
16244,
29918,
18736,
29918,
... |
setup.py | adriangb/EasyAnimation | 1 | 121460 | <reponame>adriangb/EasyAnimation
from setuptools import setup
setup(name='easyanimation',
version='0.1',
description='Wrapper for live plotting in matplotlib and Qt',
author='<NAME>',
author_email='<EMAIL>',
url='https://github.com/adriangb/easyanimation',
package_dir={'easyanimatio... | [
1,
529,
276,
1112,
420,
29958,
328,
374,
574,
29890,
29914,
29923,
8995,
13579,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
978,
2433,
29872,
8995,
18962,
742,
13,
418,
1873,
2433,
29900,
29889,
29896,
742,
13,
418,
... |
app/BaseHandler.py | Trupal00p/polymer-template | 0 | 116044 | <gh_stars>0
from AuthHandler import AuthHandler
import json
class BaseHandler(AuthHandler):
def serve_json(self, dict):
self.response.write(json.dumps(dict))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
13189,
4598,
1053,
13189,
4598,
13,
13,
5215,
4390,
13,
13,
13,
1990,
7399,
4598,
29898,
6444,
4598,
1125,
13,
13,
1678,
822,
9080,
29918,
3126,
29898,
1311,
29892,
9657,
1125,
... |
tests/extractors/test_etrade.py | mkazin/StatementRenamer | 0 | 7819 | <filename>tests/extractors/test_etrade.py
from datetime import datetime
from statement_renamer.extractors.etrade import ETradeDateExtractor as EXTRACTOR_UNDER_TEST
from statement_renamer.extractors.factory import ExtractorFactory
TESTDATA = (
"""
PAGE 1 OF 6 February 1, 2019 - March 31, 2019AccountNumber:###... | [
1,
529,
9507,
29958,
21150,
29914,
21111,
943,
29914,
1688,
29918,
300,
15464,
29889,
2272,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
3229,
29918,
1267,
4183,
29889,
21111,
943,
29889,
300,
15464,
1053,
382,
5323,
311,
2539,
5647,
28891... |
python/utils.py | fpbfabio/newsgroups1000s | 0 | 61704 | import os
from const import *
class Utils:
@staticmethod
def string_find(to_find_string, target_string):
result = str(target_string).find(to_find_string)
if (result != -1):
return result
return None
@staticmethod
def string_replace(to_find_string, replace_string, ... | [
1,
1053,
2897,
13,
3166,
1040,
1053,
334,
13,
13,
13,
1990,
22310,
29879,
29901,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1347,
29918,
2886,
29898,
517,
29918,
2886,
29918,
1807,
29892,
3646,
29918,
1807,
1125,
13,
4706,
1121,
35... |
tests/test_glove.py | muxgt/pycadl | 398 | 184112 | <reponame>muxgt/pycadl<gh_stars>100-1000
from cadl import glove
from cadl.utils import exists
from numpy.testing import run_module_suite
def test_glove_exists():
assert(exists('http://nlp.stanford.edu/data/wordvecs/glove.6B.zip'))
def test_glove_model():
model = glove.get_model()
assert(model[0].shape ==... | [
1,
529,
276,
1112,
420,
29958,
29885,
1314,
4141,
29914,
2272,
29883,
328,
29880,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
13840,
29880,
1053,
15482,
345,
13,
3166,
13840,
2988... |
notebooks/deprecated/notebooks/nets/_seq2vec.py | grchristensen/avpd | 0 | 179026 | import torch
from torch import Tensor
from torch.nn import Module
from torch.nn.utils.rnn import PackedSequence, pad_packed_sequence
class Seq2Vec(Module):
"""A sequence-to-vector RNN."""
def __init__(self, rnn, attn=None):
"""
Initialize a Seq2Vec module.
:param rnn: The RNN module ... | [
1,
1053,
4842,
305,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
3166,
4842,
305,
29889,
15755,
1053,
15591,
13,
3166,
4842,
305,
29889,
15755,
29889,
13239,
29889,
29878,
15755,
1053,
18744,
287,
20529,
29892,
17132,
29918,
4058,
287,
29918... |
src/sas/sasgui/perspectives/invariant/invariant_widgets.py | opendatafit/sasview | 0 | 169305 | ################################################################################
# This software was developed by the University of Tennessee as part of the
# Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
# project funded by the US National Science Foundation.
#
# See the license text in license.t... | [
1,
835,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
29937,
910,
7047,
471,
8906,
491,
278,
3014,
310,
22664,
408,
760,
310,
278,
13,
29937,
6652,
7541,
3630,
24352,
310,
2448,
329,
1617,
2522,
2620,
292,
28224,
7862,
313,
29928,
... |
diff-operations.py | suhasksv/py-ground | 3 | 152713 | <reponame>suhasksv/py-ground
import time
print("Hi, Welcome to Quantum Tricks")
time.sleep(1.0)
print("This a different operations calculator using same numbers")
time.sleep(2.0)
print("Lets start calculating")
time.sleep(1.0)
num1 = int(input("Enter an integer:"))
num2 = int(input("Enter an integer:"))
# Calculati... | [
1,
529,
276,
1112,
420,
29958,
2146,
29882,
1278,
4501,
29914,
2272,
29899,
2057,
13,
5215,
931,
13,
13,
2158,
703,
18567,
29892,
21829,
304,
22746,
398,
1605,
7358,
1159,
13,
2230,
29889,
17059,
29898,
29896,
29889,
29900,
29897,
13,
2... |
Fetch_contents/youtube_search.py | tshe777/WebSearch | 9 | 1606428 | import time
import webbrowser
import selenium
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.we... | [
1,
1053,
931,
30004,
13,
5215,
591,
1327,
8777,
30004,
13,
5215,
18866,
30004,
13,
3166,
18866,
1053,
1856,
9465,
30004,
13,
3166,
18866,
29889,
29813,
29889,
5924,
29889,
1481,
1053,
2563,
12376,
15716,
30004,
13,
3166,
18866,
29889,
298... |
src/crl/devutils/_tmpindex.py | petrieh/crl-devutils | 0 | 69996 | <gh_stars>0
import os
from contextlib import contextmanager
import virtualenvrunner.runner
from crl.devutils.utils import get_randomstring
from crl.devutils.doccreator import DocCreator
from crl.devutils.devpiindex import DevpiIndex
__copyright__ = 'Copyright (C) 2019, Nokia'
class _TmpIndex(DevpiIndex):
def _... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
3166,
3030,
1982,
1053,
3030,
12847,
13,
5215,
6901,
6272,
27492,
29889,
27492,
13,
3166,
274,
2096,
29889,
3359,
13239,
29889,
13239,
1053,
679,
29918,
8172,
1807,
13,
... |
cytoskeleton_analyser/database/sqlite_alchemy_orm/containers/cell_elements.py | vsukhor/cytoskeleton-analyser | 0 | 29222 | <reponame>vsukhor/cytoskeleton-analyser
# Copyright (c) 2021 <NAME>. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, ... | [
1,
529,
276,
1112,
420,
29958,
29894,
2146,
29895,
2015,
29914,
1270,
29873,
359,
446,
11285,
29899,
24209,
643,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29896,
529,
5813,
15513,
2178,
10462,
21676,
29889,
13,
... |
handybeam/opencl_wrappers/propagator_wrappers.py | ultraleap/HandyBeam | 2 | 160564 | ## Imports
import handybeam
import handybeam.opencl_wrappers.abstract_wrapper
import handybeam.propagator_mixins
import handybeam.propagator_mixins.clist_propagator
import handybeam.propagator_mixins.rect_propagator
import handybeam.propagator_mixins.hex_propagator
import handybeam.propagator_mixins.lamb_propagator
im... | [
1,
444,
1954,
4011,
13,
13,
5215,
1361,
29891,
915,
314,
13,
5215,
1361,
29891,
915,
314,
29889,
3150,
695,
29918,
29893,
336,
22437,
29889,
16595,
29918,
17699,
13,
5215,
1361,
29891,
915,
314,
29889,
7728,
351,
1061,
29918,
28084,
114... |
a10_octavia/controller/housekeeping/house_keeping.py | sridharsrinivas/a10-octavia | 1 | 182821 | <gh_stars>1-10
# Copyright 2019, A10 Networks
#
# 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 appl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
1678,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
29892,
319,
29896,
29900,
8527,
29879,
13,
29937,
13,
29937,
1678,
10413,
21144,
1090,
278,
13380,
19245,
2... |
zeus/networks/pytorch/backbones/getter.py | shaido987/vega | 1 | 12142 | <filename>zeus/networks/pytorch/backbones/getter.py
# -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be ... | [
1,
529,
9507,
29958,
911,
375,
29914,
11618,
29879,
29914,
2272,
7345,
305,
29914,
1627,
29890,
2873,
29914,
657,
357,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
14187,
... |
mydocpy/types.py | R1tschY/mydocpy | 0 | 189923 | <filename>mydocpy/types.py
# -*- coding=utf-8 -*-
#
# Copyright 2017 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | [
1,
529,
9507,
29958,
1357,
1514,
2272,
29914,
8768,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29922,
9420,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
529,
5813,
29958,
13,
... |
Chapter39.Decorators/3-timerdeco1.py | mindnhand/Learning-Python-5th | 0 | 177319 | #!/usr/bin/env python3
#encoding=utf-8
#-----------------------------------------------
# Usage: python3 3-timerdeco1.py
# Description: timing function decorators
#-----------------------------------------------
import sys
import time
force = list if sys.version_info[0] == 3 else lambda X: X
class Timer:
def... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
22331,
29922,
9420,
29899,
29947,
13,
13,
13,
29937,
2683,
2683,
9072,
5634,
13,
29937,
10783,
482,
29901,
3017,
29941,
29871,
29941,
29899,
20404,
311,
1111,
29896,
29889,
... |
yt_dlp/downloader/parallel.py | evolution-ant/local-youtube-dl | 0 | 198009 | import os
import threading
import time
import socket
import json
import re
from .common import FileDownloader
from .http import HttpFD
from ..compat import (
compat_str,
compat_urllib_error,
)
from ..utils import (
encodeFilename,
int_or_none,
sanitize_open,
sanitized_Request,
)
class ParallelF... | [
1,
1053,
2897,
13,
5215,
3244,
292,
13,
5215,
931,
13,
5215,
9909,
13,
5215,
4390,
13,
5215,
337,
13,
3166,
869,
9435,
1053,
3497,
6767,
12657,
13,
3166,
869,
1124,
1053,
9056,
26453,
13,
3166,
6317,
12667,
1053,
313,
13,
1678,
1000... |
projects/day024/main.py | gabrielmdr/100-days-of-code | 0 | 81953 | <reponame>gabrielmdr/100-days-of-code
names = []
startingletter = ""
# Open file and getting all names from it
with open("./Input/Names/invited_names.txt") as file:
for line in file:
names.append(line.strip())
# Getting the text from the starting letter
with open("./Input/Letters/starting_letter.txt") as ... | [
1,
529,
276,
1112,
420,
29958,
29887,
370,
12836,
3487,
29878,
29914,
29896,
29900,
29900,
29899,
16700,
29899,
974,
29899,
401,
13,
7039,
353,
5159,
13,
2962,
292,
15670,
353,
5124,
13,
13,
29937,
4673,
934,
322,
2805,
599,
2983,
515,
... |
commands/network.py | prometheanfire/openstack-guest-agents-unix | 1 | 78502 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2011 Openstack, LLC.
# 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... | [
1,
396,
325,
326,
29901,
4434,
9847,
29922,
29946,
9500,
2103,
29922,
29946,
4964,
3891,
9847,
29922,
29946,
13,
29937,
13,
29937,
29871,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29896,
4673,
1429,
29892,
365,
12182,
2988... |
CNN_classify.py | chunnuanhuakai/chuanganqi_classify | 2 | 133868 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 3 17:14:53 2019
@author: liuhongbing
"""
import pandas as pd
import numpy as np
from scipy import stats
from sklearn.metrics import precision_score, recall_score, f1_score, confusion_matrix, roc_curve, auc
import tensorflow as tf
# 加载数据集
def read... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
15050,
2739,
259,
29941,
29871,
29896,
29955,
29901,
29896,
29946,
... |
gpslocation/migrations/0001_initial.py | VekotinVerstas/DjangoHttpBroker-GpsLocation | 0 | 178581 | # Generated by Django 2.2 on 2019-04-27 12:49
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('broker', '0007_auto_20190427_1224'),
migrations.swappable_depende... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29946,
29899,
29906,
29955,
29871,
29896,
29906,
29901,
29946,
29929,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
95... |
lemur/plugins/lemur_linuxdst/plugin.py | prdonahue/lemur | 0 | 73648 | #!/usr/bin/python
from lemur.plugins.bases import DestinationPlugin
from lemur.plugins.lemur_linuxdst import remote_host
class LinuxDstPlugin(DestinationPlugin):
title = 'Linux Destination Plugin'
slug = 'linux-destination'
description = 'Allow the distribution of certificates to a Linux host'
version... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
3166,
9336,
332,
29889,
12800,
29889,
29890,
2129,
1053,
15435,
3381,
16288,
13,
3166,
9336,
332,
29889,
12800,
29889,
2409,
332,
29918,
9389,
22992,
1053,
7592,
29918,
3069,
13,
13,
13,
1990,... |
src/utils/plots.py | Light4Code/tensorflow-research | 5 | 33045 | <filename>src/utils/plots.py
import matplotlib.pyplot as plt
import numpy as np
import numpy.ma as ma
import utils.image_util as iu
from utils.custom_types import Vector
def plot_history(loss, acc, val_loss, val_acc):
plt.figure(figsize=(20, 10))
plt.subplot(2, 1, 1)
plt.title("Loss")
plt.grid()
... | [
1,
529,
9507,
29958,
4351,
29914,
13239,
29914,
26762,
29889,
2272,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
5215,
12655,
29889,
655,
408,
611,
13,
13,
5215,
3667,
29879,
29889,
3027,
29918,
4422,
... |
xmodaler/engine/build.py | cclauss/xmodaler | 830 | 68589 | # Copyright 2021 JD.com, Inc., JD AI
"""
@author: <NAME>
@contact: <EMAIL>
"""
from xmodaler.utils.registry import Registry
ENGINE_REGISTRY = Registry("ENGINE")
ENGINE_REGISTRY.__doc__ = """
Registry for engine
"""
def build_engine(cfg):
engine = ENGINE_REGISTRY.get(cfg.ENGINE.NAME)(cfg)
return engine | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
435,
29928,
29889,
510,
29892,
9266,
1696,
435,
29928,
319,
29902,
13,
15945,
29908,
13,
29992,
8921,
29901,
529,
5813,
29958,
13,
29992,
12346,
29901,
529,
26862,
6227,
29958,
13,
1... |
inlet_data.py | cyborgsphinx/ios-inlets | 0 | 162199 | from dataclasses import dataclass
import datetime
import logging
import os
import sqlite3
from typing import List, Tuple
sqlite3.paramstyle = "named"
DB_NAME = os.path.join("data", "inlet_data.db")
def _table_name(inlet_name: str) -> str:
return inlet_name.lower().replace(" ", "_")
@dataclass(frozen=True)
cla... | [
1,
515,
848,
13203,
1053,
848,
1990,
13,
5215,
12865,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
21120,
29941,
13,
3166,
19229,
1053,
2391,
29892,
12603,
552,
13,
13,
13,
22793,
29941,
29889,
3207,
3293,
353,
376,
17514,
29908,
13,
40... |
tools/bk7231u/gen_firmware_img.py | Ai-Thinker-Open/Ai-Thinker-Open_ALIOS_DEV | 12 | 192247 | <filename>tools/bk7231u/gen_firmware_img.py
import os
import sys
import struct
import zlib
import time
def pack_image(fw_file, boot_file):
print 'app file_name:', fw_file
print 'boot file_name:', boot_file
fname = os.path.splitext(fw_file)
f = file(boot_file, 'rb')
bootloader = f.re... | [
1,
529,
9507,
29958,
8504,
29914,
29890,
29895,
29955,
29906,
29941,
29896,
29884,
29914,
1885,
29918,
29888,
3568,
2519,
29918,
2492,
29889,
2272,
13,
5215,
2897,
30004,
13,
5215,
10876,
30004,
13,
5215,
2281,
30004,
13,
5215,
503,
1982,
... |
examples/2-benchmark/fock_multigrid.py | QuESt-Calculator/pyscf | 8 | 196588 | #!/usr/bin/env python
import os
import time
import numpy as np
import pyscf
from pyscf.pbc.dft import multigrid
log = pyscf.lib.logger.Logger(verbose=5)
with open('/proc/cpuinfo') as f:
for line in f:
if 'model name' in line:
log.note(line[:-1])
break
with open('/proc/meminfo') as ... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
2897,
13,
5215,
931,
13,
5215,
12655,
408,
7442,
13,
5215,
282,
952,
6854,
13,
3166,
282,
952,
6854,
29889,
29886,
12328,
29889,
29881,
615,
1053,
1773,
335,
2429,
13,
13,
... |
scitbx/math/tests/tst_gaussian.py | rimmartin/cctbx_project | 0 | 36645 | <reponame>rimmartin/cctbx_project
from __future__ import division
from scitbx.examples import immoptibox_ports
from scitbx.math import gaussian
from scitbx.array_family import flex
from libtbx.test_utils import approx_equal, eps_eq
from libtbx.utils import format_cpu_times
try:
import cPickle as pickle
except ImportE... | [
1,
529,
276,
1112,
420,
29958,
5632,
28402,
262,
29914,
29883,
312,
29890,
29916,
29918,
4836,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
885,
277,
29890,
29916,
29889,
19057,
1053,
5198,
3670,
747,
2251,
29918,
4011,
13,
... |
Python/surface-area-of-3d-shapes.py | RideGreg/LeetCode | 1 | 71304 | <gh_stars>1-10
# Time: O(n^2)
# Space: O(1)
# 892
# On a N * N grid, we place some 1 * 1 * 1 cubes.
#
# Each value v = grid[i][j] represents a tower of v cubes
# placed on top of grid cell (i, j).
#
# Return the total surface area of the resulting shapes.
#
# Example 1:
#
# Input: [[2]]
# Output: 10
# Example 2:
#
# ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
5974,
29901,
29871,
438,
29898,
29876,
29985,
29906,
29897,
13,
29937,
14121,
29901,
438,
29898,
29896,
29897,
13,
13,
29937,
29871,
29947,
29929,
29906,
13,
299... |
weekly-context-133/two-city-scheduling.py | elfgzp/leetCode | 3 | 157072 | <filename>weekly-context-133/two-city-scheduling.py<gh_stars>1-10
from typing import List
class Solution:
def twoCitySchedCost(self, costs: List[List[int]]) -> int:
# costs.sort(key=lambda x: (-(abs(x[0] - x[1])), x[0] + x[1]))
costs.sort(key=lambda x: -(abs(x[0] - x[1])))
half = ... | [
1,
529,
9507,
29958,
18448,
368,
29899,
4703,
29899,
29896,
29941,
29941,
29914,
10184,
29899,
12690,
29899,
816,
287,
19478,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
19229,
1053,
2391,
13,
1... |
Linked-in Job scrapper.py | MMallah/Linked-in-Job-scrapper | 0 | 32377 | <reponame>MMallah/Linked-in-Job-scrapper
#!/usr/bin/env python
# coding: utf-8
# # Project Data Science Desired Skills
#
# this project will Answer the question of what are the most desired skills for Data Science in Egypt and UAE.
# * Extract data from Linked in Via webscrapping or Manually.
# * Perform data wrangli... | [
1,
529,
276,
1112,
420,
29958,
7428,
284,
8083,
29914,
6595,
287,
29899,
262,
29899,
11947,
29899,
1557,
6794,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
396,
8010,... |
appengine/components/tests/datastore_utils_properties_test.py | pombreda/swarming | 0 | 3870 | <filename>appengine/components/tests/datastore_utils_properties_test.py
#!/usr/bin/env python
# Copyright 2014 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
import sys
import unittest
import test_env
test_env.setup_... | [
1,
529,
9507,
29958,
932,
10599,
29914,
14036,
29914,
21150,
29914,
4130,
579,
487,
29918,
13239,
29918,
11330,
29918,
1688,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14187,
1266,
29871,
29906,
29900,
2... |
day08.py | Pil0u/adventofcode2020 | 0 | 323 | <filename>day08.py
from copy import deepcopy
def boot(seq):
index = 0
played_indices = set()
acc = 0
while True:
if index == len(seq):
return True, acc
if index in played_indices:
return False, acc
played_indices.add(index)
line = seq[index].... | [
1,
529,
9507,
29958,
3250,
29900,
29947,
29889,
2272,
13,
3166,
3509,
1053,
6483,
8552,
13,
13,
1753,
6579,
29898,
11762,
1125,
13,
1678,
2380,
353,
29871,
29900,
13,
1678,
5318,
29918,
513,
1575,
353,
731,
580,
13,
13,
1678,
1035,
35... |
data_collection/gazette/spiders/sc_laguna.py | kaiocp/querido-diario | 454 | 1616433 | from gazette.spiders.base.fecam import FecamGazetteSpider
class ScLagunaSpider(FecamGazetteSpider):
name = "sc_laguna"
FECAM_QUERY = "cod_entidade:146"
TERRITORY_ID = "4209409"
| [
1,
515,
12642,
2353,
29889,
1028,
11376,
29889,
3188,
29889,
29888,
687,
314,
1053,
383,
687,
314,
29954,
834,
2353,
5592,
1241,
13,
13,
13,
1990,
2522,
29931,
351,
4347,
5592,
1241,
29898,
29943,
687,
314,
29954,
834,
2353,
5592,
1241,... |
finder.py | giuseppebrb/Pynder | 3 | 23389 | <gh_stars>1-10
import os
import fnmatch
import smtplib
import email.mime.application
import sys
import subprocess
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from pathlib import Path
home = str(Path.home()) # Return a string representing the user’s home directory
fileFound = 0... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
2897,
13,
5215,
7876,
4352,
13,
5215,
1560,
9392,
1982,
13,
5215,
4876,
29889,
29885,
603,
29889,
6214,
13,
5215,
10876,
13,
5215,
1014,
5014,
13,
3166,
4876,... |
BaseTest/click_button_chrome.py | lloydtawanda/AzurePriceListWebScrapper | 2 | 18314 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 16 14:36:46 2019
@author: Tawanda
"""
import sys
import argparse
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_arg... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
323,
434,
2739,
29871,
29896,
29953,
29871,
29896,
29946,
29901,
29... |
PEC4-Oscar_Rojo.py | zumaia/PEC_4 | 0 | 178502 | <reponame>zumaia/PEC_4
# # Ejercicio
#
# Primero, será necesario que leáis los archivos facilitados de la forma más óptima teniendo en cuenta las tareas pedidas. Tendréis que justificar vuestra decisión.
# Importo los módulos necesarios
import pandas as pd
import glob
import matplotlib.pyplot as plt
import os
impor... | [
1,
529,
276,
1112,
420,
29958,
29920,
10859,
423,
29914,
4162,
29907,
29918,
29946,
13,
29937,
396,
26087,
6269,
11088,
13,
29937,
29871,
13,
29937,
9724,
1489,
29892,
724,
29976,
16632,
2628,
712,
454,
29976,
275,
1232,
3190,
12927,
1608... |
trivial.py | nvlass/pongctrl | 0 | 121551 | #!/usr/bin/env python
import sys
import random
if __name__ == '__main__':
try:
y0 = 0
while True:
fmax = 0
b = sys.stdin.readline()
width = int(b.split(" ")[0])
height = int(b.split(" ")[1])
for q in range(height):
a = sys... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
10876,
13,
5215,
4036,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1018,
29901,
13,
4706,
343,
29900,
353,
29871,
29900,
13,
4706,
1550,
5852... |
queridodiario_toolbox/process/text_process.py | jvanz/querido-diario-toolbox | 0 | 156809 | <gh_stars>0
from subprocess import check_output, DEVNULL
import re
import string
def remove_breaks(text: str) -> str:
"""
Remove breaks, multiple whitespaces (including trimming leading
and trailing spaces), and return single text.
"""
text = _remove_new_line_splitting_word(text)
text ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1014,
5014,
1053,
1423,
29918,
4905,
29892,
5012,
29963,
10074,
13,
5215,
337,
13,
5215,
1347,
13,
13,
13,
1753,
3349,
29918,
8690,
29879,
29898,
726,
29901,
851,
29897,
1599,
851... |
codes/scripts/extract_subimgs_single.py | audzms2776/BasicSR | 0 | 1607810 | <reponame>audzms2776/BasicSR
import os
import os.path as osp
import sys
from concurrent.futures import ThreadPoolExecutor, as_completed
import numpy as np
import cv2
from tqdm import tqdm
from glob import glob
import time
pbar = None
crop_sz = 96
step = crop_sz // 2
thres_sz = 48
def main():
global pbar
... | [
1,
529,
276,
1112,
420,
29958,
15052,
29920,
1516,
29906,
29955,
29955,
29953,
29914,
16616,
14098,
13,
5215,
2897,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
5215,
10876,
13,
3166,
21984,
29889,
29888,
329,
1973,
1053,
10480,
11426... |
labs/lab-09/checkpoint5.py | AayushSriram/oss-repo | 0 | 47053 | from pymongo import MongoClient
from bson.objectid import ObjectId
from datetime import datetime as dt
import pprint
client = MongoClient()
db = client['mongo_db_lab']
defs = db['definitions']
def random_word_requester():
'''
This function should return a random word and its definition and also
log in the... | [
1,
515,
282,
962,
7443,
1053,
18294,
4032,
13,
3166,
289,
1100,
29889,
3318,
333,
1053,
4669,
1204,
13,
3166,
12865,
1053,
12865,
408,
11636,
13,
5215,
282,
2158,
13,
4645,
353,
18294,
4032,
580,
13,
2585,
353,
3132,
1839,
29885,
7443... |
tests/factories.py | seik/django-belt | 0 | 199606 | from factory import DjangoModelFactory
from factory.fuzzy import FuzzyText
from tests.app.models import Post, Category, Blog
from factory.declarations import SubFactory
class BlogFactory(DjangoModelFactory):
class Meta:
model = Blog
class PostFactory(DjangoModelFactory):
blog = SubFactory(BlogFacto... | [
1,
515,
12529,
1053,
15337,
3195,
5126,
13,
3166,
12529,
29889,
29888,
3365,
1537,
1053,
383,
3365,
1537,
1626,
13,
13,
3166,
6987,
29889,
932,
29889,
9794,
1053,
4918,
29892,
17943,
29892,
350,
1188,
13,
3166,
12529,
29889,
311,
16544,
... |
wlmrt/review.py | jayrumi/walmart_pars_lib | 3 | 106767 | from random import randint
import requests
from lxml import html
import datetime
import time
def reviews(in_product_id, *arg):
product_id = str(in_product_id)
try:
if str(arg[0]).lower() == 'log':
log = 1
else:
log = 0
except:
log = 0
gen_headers = st... | [
1,
515,
4036,
1053,
20088,
524,
13,
5215,
7274,
13,
3166,
301,
3134,
1053,
3472,
13,
5215,
12865,
13,
5215,
931,
13,
13,
1753,
21804,
29898,
262,
29918,
4704,
29918,
333,
29892,
334,
1191,
1125,
13,
13,
1678,
3234,
29918,
333,
353,
... |
doc/samples/pos.py | m4ta1l/doit | 1,390 | 6821 | def task_pos_args():
def show_params(param1, pos):
print('param1 is: {0}'.format(param1))
for index, pos_arg in enumerate(pos):
print('positional-{0}: {1}'.format(index, pos_arg))
return {'actions':[(show_params,)],
'params':[{'name':'param1',
'shor... | [
1,
822,
3414,
29918,
1066,
29918,
5085,
7295,
13,
1678,
822,
1510,
29918,
7529,
29898,
3207,
29896,
29892,
926,
1125,
13,
4706,
1596,
877,
3207,
29896,
338,
29901,
426,
29900,
29913,
4286,
4830,
29898,
3207,
29896,
876,
13,
4706,
363,
2... |
setup.py | egrp365/python-egrp365-api | 0 | 124096 | <reponame>egrp365/python-egrp365-api
import setuptools
with open('README.rst', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='egrp365',
version='0.0.4',
packages=['egrp365'],
url='https://github.com/egrp365/python-egrp365-api',
license='MIT License (MIT)',
long_descriptio... | [
1,
529,
276,
1112,
420,
29958,
4872,
29886,
29941,
29953,
29945,
29914,
4691,
29899,
4872,
29886,
29941,
29953,
29945,
29899,
2754,
13,
5215,
731,
21245,
8789,
13,
13,
2541,
1722,
877,
16310,
2303,
29889,
29878,
303,
742,
525,
29878,
1495... |
Pr_test.py | mohaEs/Train-Predict-Landmarks-by-dlib | 3 | 91451 | #!/usr/bin/python
# The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
#
# This example program shows how to use dlib's implementation of the paper:
# One Millisecond Face Alignment with an Ensemble of Regression Trees by
# <NAME> and <NAME>, CVPR 2014
#
# In particular, we... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
450,
8118,
310,
445,
934,
526,
297,
278,
970,
5354,
29889,
2823,
365,
2965,
1430,
1660,
29918,
22051,
29918,
5746,
19297,
1307,
29918,
8618,
29954,
4717,
4345,
29889,
3945,
13,
29937,
... |
profiles/models.py | geoanalytic/geopap-rest | 0 | 159142 | <filename>profiles/models.py
from django.db import models
from django.contrib.postgres.fields import ArrayField
# Geopaparrazi profiles model
class Project(models.Model):
path = models.CharField(max_length=100, blank=True, default='')
modifieddate = models.DateTimeField(auto_now_add=True)
url = models.... | [
1,
529,
9507,
29958,
771,
5325,
29914,
9794,
29889,
2272,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
21570,
29889,
2490,
7201,
29889,
9621,
1053,
4398,
3073,
13,
29937,
1879,
459,
481,
279,
336,
2526,
28723,
1904,
1... |
f3dasm/abaqus/post_processing/get_data.py | bessagroup/F3DASM | 26 | 64390 | <filename>f3dasm/abaqus/post_processing/get_data.py
'''
Created on 2020-04-15 14:50:02
Last modified on 2020-05-07 21:21:10
Python 2.7.16
v0.1
@author: <NAME> (<EMAIL>)
Main goal
---------
Develop functions to get data from odb files.
'''
#%% history outputs
def get_xydata_from_nodes_history_output(odb, nodes, var... | [
1,
529,
9507,
29958,
29888,
29941,
29881,
11625,
29914,
5363,
339,
29879,
29914,
2490,
29918,
19170,
29914,
657,
29918,
1272,
29889,
2272,
13,
12008,
13,
20399,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29946,
29899,
29896,
29945,... |
detect_fraud_email_enron/tools/k_best_selector.py | gotamist/other_machine_learning | 0 | 22349 | <gh_stars>0
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 25 18:26:45 2018
@author: gotamist
"""
import sys
sys.path.append("../tools/")
from feature_format import featureFormat, targetFeatureSplit
from sklearn.feature_selection import SelectKBest
def KBestSelector(data_dict, features_list, k):... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
323,
434,
... |
locationsharinglib/locationsharinglib.py | lufton/locationsharinglib | 0 | 165303 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: locationsharinglib.py
#
# Copyright 2017 <NAME>
#
# 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 withou... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3497,
29901,
14354,
29882,
4362,
1982,
29889,
2272,
13,
29937,
13,
29937,
14187,
1266,
29871,
299... |
events/handler/views.py | totaki/learn-python-pnz-00 | 0 | 97230 | from rest_framework import viewsets
from handler.serializers import EventsSerializer, PlaceSerializer
from handler.models import Event, Place
class EventViewSet(viewsets.ModelViewSet):
"""
API endpoint that allows users to be viewed or edited.
"""
queryset = Event.objects.all()
serializer_class = ... | [
1,
515,
1791,
29918,
4468,
1053,
1776,
7224,
13,
3166,
7834,
29889,
15550,
19427,
1053,
28488,
17679,
29892,
15484,
17679,
13,
3166,
7834,
29889,
9794,
1053,
6864,
29892,
15484,
13,
13,
13,
1990,
6864,
1043,
2697,
29898,
1493,
7224,
29889... |
58/main.py | pauvrepetit/leetcode | 0 | 63515 | <filename>58/main.py
class Solution:
def lengthOfLastWord(self, s: str) -> int:
s = s.strip()
wordList = s.split(' ')
try:
lastWord = wordList[-1]
return len(lastWord)
except IndexError:
return 0
sol = Solution()
print(sol.lengthOfLastWord("hello ... | [
1,
529,
9507,
29958,
29945,
29947,
29914,
3396,
29889,
2272,
13,
1990,
24380,
29901,
13,
1678,
822,
3309,
2776,
8897,
14463,
29898,
1311,
29892,
269,
29901,
851,
29897,
1599,
938,
29901,
13,
4706,
269,
353,
269,
29889,
17010,
580,
13,
4... |
python/bulk_ignore_alerts.py | uptime-com/rest-api-examples | 0 | 1608463 | #!/usr/bin/env python3
import argparse
import datetime as dt
import time
import requests
def date(d):
return dt.datetime.strptime(d, '%Y-%m-%d').date()
def parse_args():
parser = argparse.ArgumentParser(description='Ignore alerts between date ranges for '
'o... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
5215,
1852,
5510,
13,
5215,
12865,
408,
11636,
13,
5215,
931,
13,
13,
5215,
7274,
13,
13,
13,
1753,
2635,
29898,
29881,
1125,
13,
1678,
736,
11636,
29889,
12673,
29889,
710,
4... |
MAModule/networks/predict.py | MrReochen/MultiAgentModule | 0 | 15996 | import torch
import torch.nn as nn
from ..networks.basic.util import check
from ..networks.basic.predict import PredictNet, PredictLayer, OutLayer
from ..utils.util import get_shape_from_obs_space
class OneHot:
def __init__(self, out_dim):
self.out_dim = out_dim
def transform(self, tensor):
y_... | [
1,
1053,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
6317,
11618,
29879,
29889,
16121,
29889,
4422,
1053,
1423,
13,
3166,
6317,
11618,
29879,
29889,
16121,
29889,
27711,
1053,
21099,
919,
6779,
29892,
21099,
9... |
phigaro/const.py | bobeobibo/phigaro | 31 | 53666 | <gh_stars>10-100
DEFAULT_WINDOW_SIZE = 32
DEFAULT_THRESHOLD_MIN_BASIC = 45.39
DEFAULT_THRESHOLD_MAX_BASIC = 46.0
DEFAULT_THRESHOLD_MIN_ABS = 50.32
DEFAULT_THRESHOLD_MAX_ABS = 52.96
DEFAULT_THRESHOLD_MIN_WITHOUT_GC = 11.28
DEFAULT_THRESHOLD_MAX_WITHOUT_GC = 11.42
DEFAULT_MEAN_GC = 0.46354823199323626
DEFAULT_MAX_EVALUE ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
23397,
29918,
25152,
3970,
29956,
29918,
14226,
353,
29871,
29941,
29906,
13,
23397,
29918,
4690,
1525,
7068,
5607,
29928,
29918,
16173,
29918,
29933,
3289,... |
envs/env_base.py | imdeep2905/Turing-Q-Learning | 0 | 195203 | import logging
import numpy as np
import tensorflow as tf
from tf_agents.specs import TensorSpec
from envs.utils import Epsilon, TFUniformReplayBufferWrapper
class BaseEnvWrapper:
def __init__(
self,
env,
eval_env,
name,
in_interactor,
out_interactor,
replay... | [
1,
1053,
12183,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
3166,
15886,
29918,
351,
1237,
29889,
5965,
2395,
1053,
323,
6073,
10299,
13,
3166,
427,
4270,
29889,
13239,
1053,
382,
3232,
29892,
323,
29943,
2525,
5560,
11... |
tests/test_rpc.py | tzoiker/aio-pika | 0 | 14228 | <reponame>tzoiker/aio-pika
import asyncio
import logging
import pytest
from aio_pika import Message, connect_robust
from aio_pika.exceptions import DeliveryError
from aio_pika.patterns.rpc import RPC, log as rpc_logger
from tests import AMQP_URL
from tests.test_amqp import BaseTestCase
pytestmark = pytest.mark.asyn... | [
1,
529,
276,
1112,
420,
29958,
29873,
2502,
5603,
29914,
29874,
601,
29899,
29886,
4106,
13,
5215,
408,
948,
3934,
13,
5215,
12183,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
263,
601,
29918,
29886,
4106,
1053,
7777,
29892,
4511,
29918,
... |
server/app/views.py | Bryan-0/Python-Web-Interpreter | 0 | 1616639 | <filename>server/app/views.py<gh_stars>0
from app import app, datetime, request, Path, subprocess, os, uuid4
'''
@app.route('/')
def index():
return app.send_static_file('index.html')
'''
@app.route('/api/python/interprete', methods=['POST'])
def get_python_code():
code = request.json['pyCode']
fixed_Code... | [
1,
529,
9507,
29958,
2974,
29914,
932,
29914,
7406,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
623,
1053,
623,
29892,
12865,
29892,
2009,
29892,
10802,
29892,
1014,
5014,
29892,
2897,
29892,
318,
5416,
29946,
13,
... |
allennlp/commands/test_install.py | MaxMotovilov/allennlp | 21 | 129028 | <filename>allennlp/commands/test_install.py
"""
The ``test-install`` subcommand verifies
an installation by running the unit tests.
.. code-block:: bash
$ allennlp test-install --help
usage: allennlp test-install [-h] [--run-all]
[--include-package INCLUDE_PACKAGE]
Test t... | [
1,
529,
9507,
29958,
497,
2108,
22833,
29914,
26381,
29914,
1688,
29918,
6252,
29889,
2272,
13,
15945,
29908,
13,
1576,
4954,
1688,
29899,
6252,
16159,
1014,
6519,
1147,
11057,
13,
273,
11161,
491,
2734,
278,
5190,
6987,
29889,
13,
13,
... |
better-bus-buffers/BBB_Polygons_Step1.py | d-wasserman/public-transit-tools | 130 | 83686 | <reponame>d-wasserman/public-transit-tools<filename>better-bus-buffers/BBB_Polygons_Step1.py
####################################################
## Tool name: BetterBusBuffers
## Created by: <NAME>, Esri, <EMAIL>
## Last updated: 5 December 2017
####################################################
''' BetterBusBuffers... | [
1,
529,
276,
1112,
420,
29958,
29881,
29899,
29893,
465,
3504,
29914,
3597,
29899,
3286,
277,
29899,
8504,
29966,
9507,
29958,
6878,
357,
29899,
8262,
29899,
28040,
414,
29914,
14388,
29933,
29918,
7713,
4790,
787,
29918,
14448,
29896,
2988... |
notebooks/project_jupyter_notebooks/RINGO_T1.3/modules/STILT_modules_plus.py | ICOS-Carbon-Portal/jupyter | 6 | 147861 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import numpy as np
import pandas as pd
import datetime as dt
import netCDF4 as cdf
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import cartopy
cartopy.config['data_dir'] = '/data/project/cartopy/'
import cartopy.crs as ccrs
impor... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
... |
bring_in_stt.py | ICTD-IITD/Voice_App_Automated_QnA | 1 | 151454 | <filename>bring_in_stt.py
import pandas as pd
from bs4 import BeautifulSoup
import requests
def get_unique_index(url):
if url.endswith('.mp3'):
return url
r = requests.get(url)
soup = BeautifulSoup(r.content,'html.parser')
links = soup.findAll('a')
mp3_links = [link['href'] for link in... | [
1,
529,
9507,
29958,
1182,
292,
29918,
262,
29918,
303,
29873,
29889,
2272,
13,
5215,
11701,
408,
10518,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
5215,
7274,
13,
13,
1753,
679,
29918,
13092,
29918,
2248,
29898,
2271,
1125,
... |
scripts/data_extract.py | amichalski2/WBC-SHAP | 0 | 9760 | import os
import cv2
import random
import numpy as np
from tensorflow.keras.utils import to_categorical
from scripts.consts import class_dict
def get_data(path, split=0.2):
X, y = [], []
for directory in os.listdir(path):
dirpath = os.path.join(path, directory)
print(directory, len(os.listd... | [
1,
1053,
2897,
13,
5215,
13850,
29906,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
3166,
26110,
29889,
3946,
294,
29889,
13239,
1053,
304,
29918,
29883,
20440,
936,
13,
3166,
12078,
29889,
3075,
29879,
1053,
770,
29918,
8977,
13,
13... |
tools/train_net.py | achalddave/maskrcnn-benchmark | 6 | 188448 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
r"""
Basic training script for PyTorch
"""
# Set up custom environment before nearly anything else is imported
# NOTE: this should be the first import (no not reorder)
from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:s... | [
1,
396,
14187,
1266,
313,
29883,
29897,
13327,
29892,
9266,
29889,
322,
967,
23736,
1078,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29878,
15945,
29908,
13,
16616,
6694,
2471,
363,
10772,
29911,
25350,
13,
15945,
29908,
13,
13,
29937,
37... |
tests/test_app.py | MrHenryD/serverless-lambda | 0 | 1602515 | <reponame>MrHenryD/serverless-lambda
from fastapi.testclient import TestClient
from main import app
def test_search__success(mock_response_api__jikan_v4_anime__success):
client = TestClient(app)
response = client.get("/anime", params=[("q", "some-text")])
assert response.status_code == 200
assert re... | [
1,
529,
276,
1112,
420,
29958,
20335,
24030,
719,
29928,
29914,
2974,
2222,
29899,
2892,
13,
3166,
5172,
2754,
29889,
1688,
4645,
1053,
4321,
4032,
13,
13,
3166,
1667,
1053,
623,
13,
13,
13,
1753,
1243,
29918,
4478,
1649,
8698,
29898,
... |
project_V1/core/models.py | arnabtarwani/UCD-MSc-Project | 1 | 85755 | <reponame>arnabtarwani/UCD-MSc-Project
from django.db import models
# Create your models here.
# model for following table
class following(models.Model):
class Meta:
unique_together=(("user_id","twitter_handle"),)
user_id=models.CharField("user_id",max_length=40)
twitter_handle=models.CharField("tw... | [
1,
529,
276,
1112,
420,
29958,
2753,
370,
12637,
29893,
3270,
29914,
29965,
6530,
29899,
4345,
29883,
29899,
7653,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
29937,
1904,
363,
1494,
1591,
1... |
Hitalent/UI/migrations/0001_initial.py | iliyas01/Django | 0 | 1613194 | # Generated by Django 4.0.3 on 2022-03-25 07:33
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | [
1,
396,
3251,
630,
491,
15337,
29871,
29946,
29889,
29900,
29889,
29941,
373,
29871,
29906,
29900,
29906,
29906,
29899,
29900,
29941,
29899,
29906,
29945,
29871,
29900,
29955,
29901,
29941,
29941,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
... |
source/utils/augmentations.py | dovietchinh/multi-task-classification | 0 | 3490 | <reponame>dovietchinh/multi-task-classification<filename>source/utils/augmentations.py<gh_stars>0
import numpy as np
import cv2
import random
def preprocess(img,img_size,padding=True):
"""[summary]
Args:
img (np.ndarray): images
img_size (int,list,tuple): target size. eg: 224 , (224,224) or [... | [
1,
529,
276,
1112,
420,
29958,
29881,
586,
2035,
24338,
29882,
29914,
9910,
29899,
7662,
29899,
1990,
2450,
29966,
9507,
29958,
4993,
29914,
13239,
29914,
2987,
358,
800,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
... |
packages/labs/webpack/index.bzl | benlesh/rules_nodejs | 1 | 1606960 | # Public API surface re-exports
# Users shouldn't import under src/
load("//webpack/src:webpack_bundle.bzl", _webpack_bundle = "webpack_bundle")
webpack_bundle = _webpack_bundle
| [
1,
396,
5236,
3450,
7101,
337,
29899,
26500,
13,
29937,
23861,
9273,
29915,
29873,
1053,
1090,
4765,
29914,
13,
13,
1359,
703,
458,
27327,
29914,
4351,
29901,
27327,
29918,
16718,
29889,
29890,
29920,
29880,
613,
903,
27327,
29918,
16718,
... |
python/MDSplus/tests/connectionUnitTest.py | WhoBrokeTheBuild/mdsplus | 0 | 159677 | <filename>python/MDSplus/tests/connectionUnitTest.py
#!/usr/bin/env python
# Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistribut... | [
1,
529,
9507,
29958,
4691,
29914,
5773,
29903,
11242,
29914,
21150,
29914,
9965,
8325,
3057,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29955,
... |
slicer_module/comm/asyncsock.py | dentsoft-foundation/linkSlicerBlender | 6 | 148985 | """
@author: <NAME>
"""
# REFERENCES:
# https://pymotw.com/2/asynchat/
# tuple unpacking https://stackoverflow.com/questions/1993727/expanding-tuples-into-arguments
# https://pymotw.com/2/asyncore/
import asyncore
import logging
import socket
import threading #would multiprocessing be better?
import time
packet_... | [
1,
9995,
13,
29992,
8921,
29901,
529,
5813,
29958,
13,
13,
15945,
29908,
13,
13,
13,
29937,
5195,
29943,
1001,
1430,
27266,
29901,
13,
29937,
2045,
597,
29886,
962,
327,
29893,
29889,
510,
29914,
29906,
29914,
294,
948,
13496,
29914,
13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.