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 |
|---|---|---|---|---|---|
py_projects_boilerplates/sphinx_loguru_pytest_boiler/app/modules/hello_world/tools/tools.py | rypaik/PYTHON | 0 | 45525 | <gh_stars>0
#from config import console, log
from config import console
from loguru import logger
import sys
#TODO: factory function to create logger
# setting up Logger
logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")
logger.add("./common/loguru_log/Tools_{time}.log", rotation="500 MB")
# @log... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
3166,
2295,
1053,
2991,
29892,
1480,
13,
3166,
2295,
1053,
2991,
13,
3166,
1480,
20144,
1053,
17927,
13,
5215,
10876,
13,
29937,
4986,
3970,
29901,
12529,
740,
304,
1653,
17927,
... |
geniepy/src/geniepy/classmgmt/classifiers.py | geralddzx/genie | 1 | 61252 | """Implementation of predictive classifiers."""
from abc import ABC, abstractmethod
import pandas as pd
from google_drive_downloader import GoogleDriveDownloader as gdd
from joblib import load as jload
from geniepy.errors import ClassifierError
import geniepy.config as gc
ERROR_SCORE = float(-1)
PCPCLSFR_NAME = "pub_... | [
1,
9995,
1888,
14607,
310,
8500,
573,
770,
14903,
1213,
15945,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
5215,
11701,
408,
10518,
13,
3166,
5386,
29918,
21594,
29918,
10382,
261,
1053,
5087,
29928,
4401,
6767,
12657,
408,
330,
... |
ants/core/__init__.py | ncullen93/ANTsPy | 3 | 1603901 |
from .ants_image import *
from .ants_transform import *
from .image_io import *
from .transform_io import *
| [
1,
29871,
13,
3166,
869,
1934,
29918,
3027,
1053,
334,
13,
3166,
869,
1934,
29918,
9067,
1053,
334,
13,
13,
3166,
869,
3027,
29918,
601,
1053,
334,
13,
3166,
869,
9067,
29918,
601,
1053,
334,
13,
2
] |
DNN_Experiments/MaskRCNN/convert.py | wmjpillow/FlameDetectionAPP | 2 | 23770 | #!/usr/bin/env python
# convert jpg tp png
from glob import glob
import cv2
pngs = glob('./*.jpg')
for j in pngs:
img = cv2.imread(j)
cv2.imwrite(j[:-3] + 'png', img)
# delete jpg files
import glob
import os
dir = "/Users/wangmeijie/ALLImportantProjects/FlameDetectionAPP/Models/MaskRCNN/02_26_2020/Mask_RCNN... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
3588,
432,
4061,
260,
29886,
282,
865,
13,
3166,
13149,
1053,
13149,
13,
5215,
13850,
29906,
13,
2732,
29879,
353,
13149,
12839,
5515,
29889,
6173,
1495,
13,
13,
1454,
432,
297,... |
linkcopy.py | priximmo/scripts-scripts | 1 | 166173 | # This script is for Windows
#
import sys
import pathlib
import subprocess as sub
if len(sys.argv) < 3:
print("{} - Make symbolic links for input's contents into output's contents"
.format(sys.argv[0]))
print("Usage: {} INPUT_DIRECTORY OUTPUT_DIRECTORY".format(sys.argv[0]))
sys.exit(1)
INP... | [
1,
396,
910,
2471,
338,
363,
3852,
30004,
13,
29937,
30004,
13,
5215,
10876,
30004,
13,
5215,
2224,
1982,
30004,
13,
5215,
1014,
5014,
408,
1014,
30004,
13,
30004,
13,
361,
7431,
29898,
9675,
29889,
19218,
29897,
529,
29871,
29941,
2990... |
predict_with_ssd7.py | esp32wrangler/ssd_keras | 0 | 24775 | <gh_stars>0
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, TerminateOnNaN, CSVLogger
from keras import backend as K
from keras.models import load_model
from math import ceil
import numpy as np
from matplotlib import pyplot as plt
from models.keras_ssd7 ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
13023,
294,
29889,
20640,
19427,
1053,
11783,
13,
3166,
13023,
294,
29889,
14035,
29879,
1053,
8125,
5596,
3149,
29892,
11095,
20754,
3262,
29892,
4367,
24551,
29931,
1672,
29876,
324... |
src/basic_example/catkin_generated/installspace/eye_node.py | juliojn/eye-saccade | 0 | 123294 | #!/usr/bin/python3.7
from std_msgs.msg import String
import opensim as osim
from basic_example.srv import *
import rospy
import sys
import os
# ----------------------------------------------------------------------
# Load the musculoskeletal model from a file.
# --------------------------------------------------------... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
29889,
29955,
13,
3166,
3659,
29918,
1516,
3174,
29889,
7645,
1053,
1714,
13,
5215,
13246,
326,
408,
2897,
326,
13,
3166,
6996,
29918,
4773,
29889,
29879,
15291,
1053,
334,
13,
5215,
696,
... |
jpp_boosted_django/jpp_boosted/website/templatetags/project_overview_list.py | QualmandDriven/jpp_boosted | 1 | 45847 | from django import template
from django.template.loader import get_template
register = template.Library()
@register.inclusion_tag('project_overview_list.html')
def project_overview_list(project_list):
return {'project_list': project_list} | [
1,
515,
9557,
1053,
4472,
13,
3166,
9557,
29889,
6886,
29889,
12657,
1053,
679,
29918,
6886,
13,
9573,
353,
4472,
29889,
12284,
580,
13,
13,
29992,
9573,
29889,
262,
10085,
29918,
4039,
877,
4836,
29918,
957,
1493,
29918,
1761,
29889,
1... |
analysis_helpers/general.py | davidcrowland/layer_vb_tagging | 0 | 177270 | from __future__ import print_function # Python 2.x
import os
import numpy as np
import pandas as pd
import h5py
import sys
import math
from fnmatch import fnmatch
# helper functions klusta analysis pipeline
def get_param_file(filename,params_folder):
found = False
params = []
for path, subdirs, files in ... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
396,
5132,
29871,
29906,
29889,
29916,
13,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
298,
29945,
2272,
13,
5215,
10876,
13,
5215,
5844,
... |
42_Google_Hash_Code/pizza_ml_0/ingredients.py | gguarnay/42 | 1 | 94104 | import numpy as np
class Ingredients:
'''
Class for calculations of ingredients inside an area.
'''
def __init__(self, pizza_lines):
self._lines = [list(l) for l in pizza_lines]
self._unique, self._map = np.unique(self._lines, return_inverse=True)
self._map = self._map.reshape(... | [
1,
1053,
12655,
408,
7442,
13,
13,
1990,
22607,
1127,
10070,
29901,
13,
1678,
14550,
13,
1678,
4134,
363,
17203,
310,
2348,
1127,
10070,
2768,
385,
4038,
29889,
13,
1678,
14550,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
282,
... |
nested_admin/tests/gfk/models.py | mionch/django-nested-admin | 0 | 74097 | from __future__ import unicode_literals
from django.contrib.contenttypes.fields import GenericRelation, GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import ForeignKey, CASCADE
from django.utils.encoding import python_2_unicode_compatibl... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
21570,
29889,
3051,
8768,
29889,
9621,
1053,
3251,
293,
9662,
362,
29892,
3251,
293,
27755,
2558,
13,
3166,
9557,
29889,
21570,
29889,
3051,
8768... |
src/spectrabuster/Spectrum/spectrum.py | eduardosprp/spectrabuster | 0 | 146853 | import numpy as np
from time import sleep
from math import exp
import matplotlib.pyplot as plt
from scipy.integrate import trapz
from os import path
import struct
import spectrabuster.functions as sbf
from importlib import import_module
from datetime import date, datetime
from functools import partial
class Spectrum(... | [
1,
1053,
12655,
408,
7442,
13,
3166,
931,
1053,
8709,
13,
3166,
5844,
1053,
1518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
4560,
2272,
29889,
14146,
403,
1053,
26505,
29920,
13,
3166,
2897,
1053,
2224,
13,
5215,
2281,
... |
bbc1/libs/bbclib_msgtype.py | imony/py-bbclib | 1 | 1601752 | <reponame>imony/py-bbclib
# -*- coding: utf-8 -*-
"""
Copyright (c) 2018 beyond-blockchain.org.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unles... | [
1,
529,
276,
1112,
420,
29958,
326,
2592,
29914,
2272,
29899,
1327,
29883,
1982,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
... |
src/psqlsync/ghmoteqlync/sync.py | tiptenbrink/psqlsync | 0 | 88447 | from pathlib import Path
from functools import partial
import tempfile
import logging
import tomli
import trio
from dirgh import find_download
import psqlsync.actions
logger = logging.getLogger(__name__)
def prepare(target, owner, repo, repo_dir, overwrite, config, token, verbose):
logger.info("Downloading bac... | [
1,
515,
2224,
1982,
1053,
10802,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
5215,
5694,
1445,
13,
5215,
12183,
13,
5215,
6454,
492,
13,
5215,
3367,
29877,
13,
3166,
4516,
12443,
1053,
1284,
29918,
10382,
13,
13,
5215,
282,
2850,
16593... |
PDA_Transport/multi_period_aam.py | gaufung/LMDI | 4 | 72334 | <filename>PDA_Transport/multi_period_aam.py
# -*- encoding:utf-8 -*-
from single_period_aam import Spaam
class Mpaam(object):
def __init__(self, dmus_s, name, global_dmus, cefs, years):
self._period_count = len(dmus_s)
self._dmus_s = dmus_s
self._province_count = len(dmus_s[0])
sel... | [
1,
529,
9507,
29958,
29925,
7698,
29918,
27395,
29914,
9910,
29918,
19145,
29918,
29874,
314,
29889,
2272,
13,
29937,
448,
29930,
29899,
8025,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
3166,
2323,
29918,
19145,
29918,
29874,
314,
10... |
ivy/test/afterinit1.py | b1f6c1c4/cfg-enum | 113 | 42268 |
from ivy import ivy_module as im
from ivy.ivy_compiler import ivy_from_string
from ivy.tk_ui import new_ui
from ivy import ivy_utils as iu
prog = """#lang ivy1.6
type t
individual x(X:t) : t
object foo(me:t) = {
after init {
x(me) := me;
assert false
}
}
isolate iso_foo(me:t) = foo(me) wit... | [
1,
29871,
13,
3166,
20444,
29891,
1053,
20444,
29891,
29918,
5453,
408,
527,
13,
3166,
20444,
29891,
29889,
440,
29891,
29918,
21789,
1053,
20444,
29891,
29918,
3166,
29918,
1807,
13,
3166,
20444,
29891,
29889,
11178,
29918,
1481,
1053,
716... |
grammar.py | ankieter-gui/release | 0 | 79750 | import typing
import error
REQUEST_TABLE = {
'get': [[str]],
'as': [str],
'by': ([str], 'optional'),
'if': ([list], 'optional'),
'except': ([list], 'optional'),
'join': ([
{
'name': str,
'of': [str],
}
], 'optional'),
'macro': ... | [
1,
1053,
19229,
13,
5215,
1059,
13,
13,
16244,
29918,
21009,
353,
426,
13,
1678,
525,
657,
2396,
1678,
5519,
710,
20526,
13,
1678,
525,
294,
2396,
268,
518,
710,
1402,
13,
1678,
525,
1609,
2396,
268,
9310,
710,
1402,
29871,
525,
252... |
python2.7/site-packages/zope/interface/tests/test_verify.py | 84KaliPleXon3/sslstrip-hsts-openwrt | 4 | 1609893 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | [
1,
835,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29896,
29892,
29871,
29906,
29900,
29900,
29906,
796,
2300,
15025,
322,
2866,
1091,
29560,
29889,
13,
2... |
databasetools/projectiontest.py | salhasalman/DatabaseTools | 0 | 145558 | # pew in databasetools-venv python /home/hayj/wm-dist-tmp/DatabaseTools/databasetools/projectiontest.py
import sys, os; sys.path.append("/".join(os.path.abspath(__file__).split("/")[0:-2]))
import pymongo
import random
import string
import time
from systemtools.system import *
from systemtools.duration import *
# W... | [
1,
396,
282,
809,
297,
16236,
24541,
8789,
29899,
854,
29894,
3017,
847,
5184,
29914,
29882,
388,
29926,
29914,
29893,
29885,
29899,
5721,
29899,
7050,
29914,
9112,
24183,
29914,
29503,
24541,
8789,
29914,
771,
6929,
1688,
29889,
2272,
13,
... |
dev/otu_handler.py | michaelwiest/microbiome_rnn | 0 | 185844 | <filename>dev/otu_handler.py<gh_stars>0
import copy
import pandas as pd
import numpy as np
from scipy.stats.mstats import gmean, zscore
'''
This is the main object that handles the OTU data.
It has a few main functions:
1. Managing data normalization.
2. Managing training, validation, and test data.
3. Da... | [
1,
529,
9507,
29958,
3359,
29914,
327,
29884,
29918,
13789,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
3509,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
16202,
29889,
298... |
pos_tagger/pos_replace_v5.py | ZirconiumZr/UOB_SIT | 0 | 1617223 | <gh_stars>0
# -*- coding: utf-8 -*-
"""pos_replace_v5.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Mdfqrn2Nc8xE6xFlAstCmzPeEMCgguP-
"""
import nltk
from nltk import word_tokenize, pos_tag
import pandas as pd
import io
from nltk.tokenize.tree... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
1066,
29918,
6506,
29918,
29894,
29945,
29889,
666,
948,
29890,
13,
13,
28451,
19574,
5759,... |
helpers/labml_helpers/datasets/remote/test/mnist_server.py | mcx/labml | 174 | 113625 | <reponame>mcx/labml<gh_stars>100-1000
from labml import lab
from labml_helpers.datasets.remote import DatasetServer
from torchvision import datasets, transforms
def main():
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))
])
train_dataset ... | [
1,
529,
276,
1112,
420,
29958,
14047,
29916,
29914,
8205,
828,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
9775,
828,
1053,
9775,
13,
3166,
9775,
828,
29918,
3952,
6774,
29889,
... |
costflow/config.py | StdioA/costflow | 0 | 183685 | <filename>costflow/config.py<gh_stars>0
from dataclasses import dataclass, field
@dataclass
class Config:
default_currency: str = "CNY"
formulas: dict = field(default_factory=dict)
def get_formula(self, name):
return self.formulas.get(name, "")
# TODO: Beancount loader for default currency
... | [
1,
529,
9507,
29958,
18253,
1731,
29914,
2917,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
12782,
29901,
13,
1678,
2322,
29918,
... |
django/dashboard/views/index.py | aistairc/voteclustering_aist | 0 | 69666 | from django.db.models import Count, Q
from django.shortcuts import redirect, render
from django.utils import timezone
from AIST_survey.models import Enquete, Respondent, Question, Choice, Evaluation
def index(request):
if "enquete_id" not in request.session:
return redirect("login")
enquete_id = requ... | [
1,
515,
9557,
29889,
2585,
29889,
9794,
1053,
3917,
29892,
660,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
6684,
29892,
4050,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
13,
3166,
319,
9047,
29918,
7610,
6950,
29889,
9794,
1053,
... |
test/test_server.py | sebastianludwig/SensationDriver | 0 | 116373 | <reponame>sebastianludwig/SensationDriver<filename>test/test_server.py
from utils import *
from sensationdriver.server import Server
class TestServer(unittest.TestCase):
class MemoryHandler(object):
def __init__(self):
self.set_up_called_counter = 0
self.tear_down_called_counter =... | [
1,
529,
276,
1112,
420,
29958,
344,
29890,
579,
713,
29880,
566,
9192,
29914,
29903,
575,
362,
12376,
29966,
9507,
29958,
1688,
29914,
1688,
29918,
2974,
29889,
2272,
13,
3166,
3667,
29879,
1053,
334,
13,
13,
3166,
4771,
362,
9465,
2988... |
statsWaveletFilt/threshold.py | Tiarles/Statistical-Wavelet-Filtering | 3 | 61809 | <reponame>Tiarles/Statistical-Wavelet-Filtering<filename>statsWaveletFilt/threshold.py<gh_stars>1-10
# -*- coding: utf-8 -*-
'''
**Wavelet Based in CUSUM control chart for filtering signals Project (module**
``statsWaveletFilt.threshold`` **):** Statistic functions for obtain threshold
values for wavelet coefficients ... | [
1,
529,
276,
1112,
420,
29958,
29911,
4447,
793,
29914,
9513,
391,
936,
29899,
29956,
1351,
1026,
29899,
5072,
292,
29966,
9507,
29958,
16202,
29956,
1351,
1026,
29943,
2782,
29914,
386,
12268,
29889,
2272,
29966,
12443,
29918,
303,
1503,
... |
school/eCornell/Python Cert/Currency Converter/src/exchangeit.py | KyleGortych/sample_work | 0 | 1605067 | """
User interface for module currency
When run as a script, this module prompts the user for two currencies and amount.
It prints out the result of converting the first currency to the second.
Author: <NAME>
Date: 02/16/2022
"""
import currency
src = input("3-letter code for original currency: ")
src = str(src)
... | [
1,
9995,
13,
2659,
5067,
363,
3883,
27550,
13,
13,
10401,
1065,
408,
263,
2471,
29892,
445,
3883,
9508,
29879,
278,
1404,
363,
1023,
16256,
15942,
322,
5253,
29889,
13,
3112,
14677,
714,
278,
1121,
310,
17415,
278,
937,
27550,
304,
27... |
PythonMPI/computepi/ComputePiSeq.py | terasakisatoshi/MPI | 1 | 177540 | import math
import time
#compute \pi using formula shown below:
#\pi=\int_{0}^{1}\frac{4}{1+x^2}dx \sim =\frac{1}{n}\sum_{i=0}^{n-1}\frac{4}{1+(\frac{i+0.5}{n})^2}
#
def compute_pi(num_step):
h=1.0/num_step
s=0.0
for i in range(num_step):
x=h*(i+0.5)
s+=4.0/(1.0+x**2)
return s*h
def mai... | [
1,
1053,
5844,
13,
5215,
931,
13,
29937,
26017,
320,
1631,
773,
7063,
4318,
2400,
29901,
13,
29937,
29905,
1631,
2013,
524,
648,
29900,
2844,
29896,
1012,
1154,
29912,
29946,
1157,
29896,
29974,
29916,
29985,
29906,
29913,
8235,
320,
3601... |
code/tensorflow/tests/test_image_generator.py | siduojiang/BERTVision | 5 | 106254 | <reponame>siduojiang/BERTVision<gh_stars>1-10
import unittest
import h5py
#git repo specific setup
import sys
sys.path.append('../utils')
from training_utils import *
from evaluation import *
class TestBERTImageGenerator(unittest.TestCase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **k... | [
1,
529,
276,
1112,
420,
29958,
29879,
333,
25608,
2397,
574,
29914,
13635,
8050,
2459,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
443,
27958,
13,
5215,
298,
29945,
2272,
13,
13,
29937,
5559,
13761,
2702,
... |
Crypto-hardRSA/flag.py | JSW2020/hsctf-2019-freshmen | 16 | 14930 | flag = "flag{b3453333-9da9-49ae-b4ed-0017c392d58e}"
e1 = 65537
e2 = 368273 | [
1,
7353,
353,
376,
15581,
29912,
29890,
29941,
29946,
29945,
29941,
29941,
29941,
29941,
29899,
29929,
1388,
29929,
29899,
29946,
29929,
3660,
29899,
29890,
29946,
287,
29899,
29900,
29900,
29896,
29955,
29883,
29941,
29929,
29906,
29881,
29945... |
tests/service/ai/test_not_killing_itself_ai.py | jonashellmann/informaticup21-team-chillow | 3 | 11942 | import unittest
from datetime import datetime, timezone
from typing import List
from chillow.service.ai.not_killing_itself_ai import NotKillingItselfAI
from chillow.model.action import Action
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from chillow.model.game import Game
from chil... | [
1,
1053,
443,
27958,
13,
3166,
12865,
1053,
12865,
29892,
29431,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
521,
453,
340,
29889,
5509,
29889,
1794,
29889,
1333,
29918,
29895,
8873,
29918,
1169,
761,
29918,
1794,
1053,
2216,
29968,
8873,
... |
ebl/tests/corpus/test_line.py | ElectronicBabylonianLiterature/ebl-api | 4 | 111754 | <gh_stars>1-10
from typing import Sequence
import pytest
from ebl.corpus.domain.line import Line, LineVariant, ManuscriptLine
from ebl.transliteration.domain.atf import Ruling, Surface
from ebl.transliteration.domain.dollar_line import RulingDollarLine
from ebl.transliteration.domain.enclosure_tokens import BrokenAwa... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
19229,
1053,
922,
3910,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
321,
2204,
29889,
2616,
13364,
29889,
7247,
29889,
1220,
1053,
7407,
29892,
7407,
10444,
424,
... |
plottwist/bootstrap/maya/userSetup.py | Plot-Twist-Short-Film/plottwist-bootstrap | 0 | 152413 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Initialization for Plot Twist Tools
"""
from __future__ import print_function, division, absolute_import
__author__ = "<NAME>"
__license__ = "MIT"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
import maya.cmds as cmds # Do not remove
def init():
prin... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
15514,
2133,
363,
18399,
8168,
391,
27564,
13,
15945,
29908,
13,
13,
3166,
4770,... |
kensu/client/models/field_def.py | vidma/kensu-py | 16 | 46838 | <reponame>vidma/kensu-py
# coding: utf-8
"""
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: beta
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iterit... | [
1,
529,
276,
1112,
420,
29958,
8590,
655,
29914,
12360,
29884,
29899,
2272,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
15945,
29908,
13,
268,
13,
13,
1678,
1939,
6139,
4944,
313,
13525,
491,
3925,
9921,
5920,
1885,
2045,
597,... |
psi/controller/plugin.py | bburan/psiexperiment | 5 | 193981 | <reponame>bburan/psiexperiment
import logging
log = logging.getLogger(__name__)
from functools import partial
import operator as op
import threading
import numpy as np
from atom.api import Enum, Bool, Typed, Property
from enaml.application import deferred_call
from enaml.qt.QtCore import QTimer
from enaml.workbench.... | [
1,
529,
276,
1112,
420,
29958,
1327,
332,
273,
29914,
567,
347,
29916,
15362,
13,
5215,
12183,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
5215,
5455,
408,
1015,
13,... |
stable-baselines/tests/test_deterministic.py | princeton-vl/PackIt | 49 | 9989 | import pytest
from stable_baselines import A2C, ACER, ACKTR, DeepQ, DDPG, PPO1, PPO2, TRPO
from stable_baselines.ddpg import AdaptiveParamNoiseSpec
from stable_baselines.common.identity_env import IdentityEnv, IdentityEnvBox
from stable_baselines.common.vec_env import DummyVecEnv
PARAM_NOISE_DDPG = AdaptiveParamNoise... | [
1,
1053,
11451,
1688,
13,
13,
3166,
13714,
29918,
6500,
24210,
1053,
319,
29906,
29907,
29892,
14614,
1001,
29892,
319,
7077,
5659,
29892,
21784,
29984,
29892,
360,
11191,
29954,
29892,
349,
13152,
29896,
29892,
349,
13152,
29906,
29892,
10... |
bot/utils/github.py | mtrsk/PUGMA-bot | 9 | 119869 | """
Modulo dedicado a classes/funções sem nenhuma outra dependência ou
que não sejam parte do core do Bot.
"""
import json
import requests
def photo_meetup(repo_data, matches):
"""
Recebe como entrada uma Dataclass com dados do nosso
repositório no Github e retorna a url de uma imagem
do meetup.
... | [
1,
9995,
13,
2111,
7207,
8856,
912,
263,
4413,
29914,
7692,
5616,
3031,
302,
264,
29882,
10859,
714,
336,
8839,
10544,
2123,
13,
802,
8145,
409,
29926,
314,
3810,
437,
7136,
437,
11273,
29889,
13,
15945,
29908,
13,
5215,
4390,
13,
13,... |
src/experiments/random_projections_aistats_ridge_regression.py | c-dickens/FrequentDirectionsRidgeRegression | 0 | 116922 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | [
1,
396,
10413,
21144,
304,
278,
13380,
18540,
10606,
313,
3289,
29943,
29897,
1090,
697,
470,
901,
13,
29937,
17737,
3406,
19405,
8571,
4110,
29889,
29871,
2823,
278,
6058,
12107,
934,
13235,
411,
13,
29937,
445,
664,
363,
5684,
2472,
1... |
emoticonvis/apps/api/tests/test_serializers.py | nanchenchen/emoticon-analysis | 0 | 127553 | from django.test import TestCase
from django.utils.timezone import now, timedelta
from emoticonvis.apps.corpus import models as corpus_models
from emoticonvis.apps.corpus import utils as corpus_utils
from emoticonvis.apps.coding import models as coding_models
from emoticonvis.apps.api import serializers
from django.con... | [
1,
515,
9557,
29889,
1688,
1053,
4321,
8259,
13,
3166,
9557,
29889,
13239,
29889,
2230,
8028,
1053,
1286,
29892,
5335,
287,
2554,
13,
3166,
23023,
4144,
1730,
29889,
13371,
29889,
2616,
13364,
1053,
4733,
408,
1034,
13364,
29918,
9794,
13... |
migrations/versions/1fba1a39c681_initial_data.py | eubr-bigsea/thorn | 0 | 114245 | <filename>migrations/versions/1fba1a39c681_initial_data.py
"""initial data
Revision ID: <KEY>
Revises: <PASSWORD>
Create Date: 2020-03-02 09:28:48.614317
"""
import datetime
import bcrypt
from alembic import context
from alembic import op
from sqlalchemy import String, Integer, DateTime
from sqlalchemy.orm import se... | [
1,
529,
9507,
29958,
26983,
800,
29914,
26100,
29914,
29896,
29888,
2291,
29896,
29874,
29941,
29929,
29883,
29953,
29947,
29896,
29918,
11228,
29918,
1272,
29889,
2272,
13,
15945,
29908,
11228,
848,
13,
13,
1123,
4924,
3553,
29901,
529,
10... |
effect_of_vanishing_photos/effect_of_vanishing_photos.py | gil9red/SimplePyScripts | 117 | 144049 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
"""Эффект исчезновения фотографии
Кликая на области на фотографии запускаются процессы плавного увеличения
прозрачности пикселей, эффект как круги воды, будут расходиться пока не
закончатся непрозрачные пиксели"""
import sys
import traceback
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1649,
8921,
1649,
353,
525,
666,
18184,
1161,
29915,
13,
13,
13,
15945,
29908,
30082,
30011... |
tests/fixtures/test_product.py | oldarmyc/cap | 1 | 22815 | <reponame>oldarmyc/cap
# Copyright 2016 <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 applicable law or agre... | [
1,
529,
276,
1112,
420,
29958,
1025,
279,
1357,
29883,
29914,
5030,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
529,
5813,
29958,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,... |
models.py | danger-ahead/notes-backend-service | 1 | 134936 | from sqlalchemy.orm import relationship
from sqlalchemy.sql.functions import now
from sqlalchemy.sql.schema import ForeignKey
from sqlalchemy.sql.sqltypes import TIMESTAMP
from database import Base
from sqlalchemy import Column, Integer, String
class Note(Base):
__tablename__ = "notes"
id = Column(Integer, p... | [
1,
515,
4576,
284,
305,
6764,
29889,
555,
1053,
9443,
13,
3166,
4576,
284,
305,
6764,
29889,
2850,
29889,
12171,
1053,
1286,
13,
3166,
4576,
284,
305,
6764,
29889,
2850,
29889,
11010,
1053,
19358,
2558,
13,
3166,
4576,
284,
305,
6764,
... |
gui/verifyseed.py | roshan-c/shoeshive.tv | 2 | 162861 | import PySimpleGUI as sg
sg.theme('SandyBeach')
layout = [
[sg.Text('Please enter your Username and the Seed provided by the Host')],
[sg.Text('Username', size =(15, 1)), sg.InputText()],
[sg.Text('Server Seed', size =(15, 1)), sg.InputText()],
[sg.Submit(), sg.Cancel()]
]
window = s... | [
1,
1053,
10772,
15427,
29954,
3120,
408,
269,
29887,
30004,
13,
30004,
13,
5311,
29889,
18193,
877,
29903,
13910,
3629,
496,
1495,
418,
6756,
13,
2680,
353,
518,
30004,
13,
1678,
518,
5311,
29889,
1626,
877,
12148,
3896,
596,
4911,
978,... |
Curso_Coursera/Ex1_ParImpar.py | shirleyguimaraes/Linguagem_Python | 0 | 33098 |
def main():
n = int(input("Digite um número inteiro: "))
resto = n % 2
if resto == 0:
print("Par")
else:
print("Impar")
main()
| [
1,
6756,
13,
1753,
1667,
7295,
30004,
13,
30004,
13,
1678,
302,
353,
938,
29898,
2080,
703,
14991,
568,
1922,
13831,
2293,
3350,
29901,
376,
876,
30004,
13,
30004,
13,
1678,
25814,
353,
302,
1273,
29871,
29906,
30004,
13,
30004,
13,
1... |
cttools/config.py | nik849/ct-tools | 0 | 74928 | import numpy as np
from .parse import parse_xtekct_file
class Config(object):
def __init__(self):
""" Configuration object which contains all settings neccessary for the forward projection
and tomographic reconstruction using the axitom algorithm.
"""
self.n_voxels_x = 2000
... | [
1,
1053,
12655,
408,
7442,
13,
3166,
869,
5510,
1053,
6088,
29918,
29916,
12681,
312,
29918,
1445,
13,
13,
13,
1990,
12782,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
9995,
20999,
1203,
607,
3743,
5... |
tests/basic_store.py | fmarczin/simplekv | 0 | 134401 | <gh_stars>0
# coding: utf8
import os
import time
import tempfile
from tempdir import TempDir
import pytest
from simplekv._compat import BytesIO, xrange, text_type
from simplekv.decorator import PrefixDecorator
from simplekv.crypt import HMACDecorator
from simplekv.idgen import UUIDDecorator, HashDecorator
from simple... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14137,
29901,
23616,
29947,
13,
13,
5215,
2897,
13,
5215,
931,
13,
5215,
5694,
1445,
13,
3166,
5694,
3972,
1053,
21121,
9170,
13,
13,
5215,
11451,
1688,
13,
3166,
2560,
27049,
... |
usermess/migrations/0002_auto_20181111_2211.py | HemanthJella/ewallet | 0 | 138956 | # Generated by Django 2.1.2 on 2018-11-11 22:11
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('usermess', '0001_initial'),
]
operations = [
migrations.AlterField(
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29896,
29889,
29906,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29896,
29896,
29899,
29896,
29896,
29871,
29906,
29906,
29901,
29896,
29896,
30004,
13,
30004,
13,
5215,
12865,
30004,
13,... |
sdk/python/pulumi_aiven/get_service_user.py | pulumi/pulumi-aiven | 7 | 180868 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
18610,
399,
25614,
29901,
445,
934,
471,
5759,
491,
278,
27477,
15547,
20839,
689,
16230,
313,
13264,
1885,
29897,
21704,
29889,
18610,
13,
29937,
18610,
1938,
451,
3863,
491,
1361,
652... |
gwk/constants.py | aixcyi/gwk | 1 | 181388 | # -*- coding: utf-8 -*-
__all__ = [
'GachaType',
'WishType',
'JsonStruct',
'CEILINGS',
'UNIFORM_TIME_FORMAT',
'DT_STAMP_OFFSET_CHANGE',
'DT_VERSION_START_2_3',
]
from datetime import datetime
from enum import Enum
from gwk.typing import Choices
class GachaType(Choices):
"""祈愿的卡池类型。"... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1649,
497,
1649,
353,
518,
13,
1678,
525,
29954,
496,
29874,
1542,
742,
13,
1678,
525,
29956,
728,
1542,
742,
13,
1678,
525,
8148,
19560,
742,
13... |
Python/Code/Python3-Base/11_Advance/Generator.py | hiloWang/notes | 2 | 40781 | <filename>Python/Code/Python3-Base/11_Advance/Generator.py
#########################
# 生成器
#########################
# 创建一个生成器
L = (x * 2 for x in range(5))
print(type(L))
print(L)
for value in L:
print(value, end=' ')
print()
# 创建一个函数生成器
def fib(times):
n = 0
a, b = 0, 1
while n < times:
... | [
1,
529,
9507,
29958,
11980,
29914,
3399,
29914,
11980,
29941,
29899,
5160,
29914,
29896,
29896,
29918,
3253,
29894,
749,
29914,
21575,
29889,
2272,
13,
13383,
7346,
29937,
13,
29937,
259,
30486,
30494,
30943,
13,
13383,
7346,
29937,
13,
13,... |
Language Skills/Python/Unit 11/2-Classes/Using Classes/7-Creating class methods.py | vpstudios/codecademy-exercise-answers | 1 | 197192 | <reponame>vpstudios/codecademy-exercise-answers<gh_stars>1-10
class Car(object):
condition = "new"
def __init__(self, model, color, mpg):
self.model = model
self.color = color
self.mpg = mpg
def display_car(self):
return "This is a %s %s with %s MPG." % (self.color, self.m... | [
1,
529,
276,
1112,
420,
29958,
29894,
29886,
18082,
2363,
29914,
401,
9567,
29899,
735,
6269,
895,
29899,
550,
17538,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1990,
1704,
29898,
3318,
1125,
13,
1678,
4195,
35... |
training/pretrainav/weightsampling.py | rub-ksv/-lrs_avsr1_local- | 1 | 170559 | <reponame>rub-ksv/-lrs_avsr1_local-
import torch
from espnet.nets.pytorch_backend.transformer.embedding import PositionalEncoding
class Conv2dSubsampling(torch.nn.Module):
"""Convolutional 2D subsampling (to 1/4 length)
:param int idim: input dim
:param int odim: output dim
:param flaot dropout_rate... | [
1,
529,
276,
1112,
420,
29958,
29878,
431,
29899,
2039,
29894,
24028,
29880,
2288,
29918,
485,
21935,
29896,
29918,
2997,
29899,
13,
5215,
4842,
305,
13,
13,
3166,
5152,
1212,
29889,
1212,
29879,
29889,
2272,
7345,
305,
29918,
27852,
2988... |
csbiginteger/BigIntegerNet.py | NeoResearch/csBigInteger.py | 2 | 30829 | <gh_stars>1-10
#!/usr/bin/python3
from csbiginteger.BigInteger import BigInteger
from functools import total_ordering
# requires: pip install msl-loadlib pycparser pythonnet
from msl.loadlib import LoadLibrary
# remember to execute first: cd csbiginteger/dotnet && dotnet build -c Release
net = LoadLibrary('csbigin... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
13,
3166,
5939,
3752,
16031,
29889,
6970,
7798,
1053,
7997,
7798,
13,
13,
3166,
2090,
312,
8789,
1053,
... |
drs2.py | gling07/Text2DRS | 3 | 1608128 | <filename>drs2.py
# MIT License
#
# Copyright (c) [2018] [<NAME> (<EMAIL>),
# <NAME> (<EMAIL>)]
#
# 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, inc... | [
1,
529,
9507,
29958,
29881,
2288,
29906,
29889,
2272,
13,
29937,
341,
1806,
19245,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
518,
29906,
29900,
29896,
29947,
29962,
518,
29966,
5813,
29958,
313,
29966,
26862,
6227,
29958,
511,
... |
hrl_dynamic_mpc/src/opt_traj_tools.py | gt-ros-pkg/hrl-haptic-manip | 1 | 75566 | #
#
# Copyright (c) 2013, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, ... | [
1,
396,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
29892,
16762,
1920,
305,
10550,
15025,
13,
29937,
2178,
10462,
21676,
29889,
13,
29937,
29871,
13,
29937,
4367,
391,
3224,
322,
671,
297,
275... |
General/serverInfo.py | Aggis15/T4NK0R | 0 | 195310 | import logging
import discord
from discord.ext import commands
from discord.commands import slash_command
import json
import requests
from PIL import Image, ImageDraw, ImageFont
from resizeimage import resizeimage
# Logging
logging.basicConfig(
filename="./logs/discordlogs.log",
filemode="w",
format="%(nam... | [
1,
1053,
12183,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
3166,
2313,
536,
29889,
26381,
1053,
24765,
29918,
6519,
13,
5215,
4390,
13,
5215,
7274,
13,
3166,
349,
6227,
1053,
7084,
29892,
7084,
8537,
29892,
... |
tests/test_mangling.py | ecoinvent/brightway2-parameters | 0 | 23145 | from bw2parameters import *
def test_mangle_formula():
given = "log(foo * bar) + 7 / baz"
prefix = "pre"
assert mangle_formula(given, prefix, ['bar']) == '(log((pre__foo * bar)) + (7 / pre__baz))'
def test_prefix_parameter_dict():
given = {
'a': {'formula': 'a + b / c', 'foo': True},
... | [
1,
515,
289,
29893,
29906,
16744,
1053,
334,
13,
13,
13,
1753,
1243,
29918,
29885,
2521,
29918,
689,
2497,
7295,
13,
1678,
2183,
353,
376,
1188,
29898,
5431,
334,
2594,
29897,
718,
29871,
29955,
847,
12741,
29908,
13,
1678,
10944,
353,
... |
designer/new_dialog.py | katnino/kivy-designer | 0 | 100068 | from functools import partial
from os.path import join
from designer.helper_functions import get_kd_dir
from kivy.adapters.listadapter import ListAdapter
from kivy.core.window import Keyboard, Window
from kivy.factory import Factory
from kivy.properties import NumericProperty, ObjectProperty
from kivy.uix.boxlayout im... | [
1,
515,
2090,
312,
8789,
1053,
7687,
13,
3166,
2897,
29889,
2084,
1053,
5988,
13,
13,
3166,
23383,
29889,
20907,
29918,
12171,
1053,
679,
29918,
29895,
29881,
29918,
3972,
13,
3166,
413,
440,
29891,
29889,
328,
481,
2153,
29889,
1761,
2... |
Extensions/Dependencies/tools/extract_objects.py | kylefmohr/Pyto | 0 | 1605021 | from subprocess import check_output
import sys
objects = check_output(["ar", "-t", sys.argv[1]]).decode().split("\n")
for object in objects:
if not object.endswith(".o") or object.endswith("lso.o"):
continue
check_output(["ar", "-xv", sys.argv[1], object])
| [
1,
515,
1014,
5014,
1053,
1423,
29918,
4905,
13,
5215,
10876,
13,
13,
12650,
353,
1423,
29918,
4905,
29898,
3366,
279,
613,
11663,
29873,
613,
10876,
29889,
19218,
29961,
29896,
5262,
467,
13808,
2141,
5451,
14182,
29876,
1159,
13,
13,
... |
node-api/get-block-transfers/request.py | Venoox/casper-integrations | 5 | 11051 | <reponame>Venoox/casper-integrations
import json
import os
import pycspr
# A known casper test-net node address.
_NODE_ADDRESS = os.getenv("CASPER_NODE_ADDRESS", "192.168.127.12")
# A known block hash.
_BLOCK_HASH: bytes = bytes.fromhex("c7148e1e2e115d8fba357e04be2073d721847c982dc70d5c36b5f6d3cf66331c")
# A known... | [
1,
529,
276,
1112,
420,
29958,
29963,
8154,
2251,
29914,
9398,
546,
29899,
14146,
800,
13,
5215,
4390,
13,
5215,
2897,
13,
13,
5215,
11451,
2395,
558,
13,
13,
13,
13,
29937,
319,
2998,
3209,
546,
1243,
29899,
1212,
2943,
3211,
29889,
... |
setup.py | saquib-mehmood/pyproblib | 1 | 186089 | <reponame>saquib-mehmood/pyproblib
from setuptools import setup
setup(name='pyproblib',
version='1.1',
description='Probability Distribution Functions',
packages=['pyproblib'],
author='<NAME>',
author_email='<EMAIL>',
zip_safe=False) | [
1,
529,
276,
1112,
420,
29958,
4977,
339,
747,
29899,
1004,
7184,
2092,
29914,
2272,
22795,
1982,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
978,
2433,
2272,
22795,
1982,
742,
13,
418,
1873,
2433,
29896,
29889,
... |
aioinject/__init__.py | ThirVondukr/aioinject | 4 | 176713 | from .containers import Container
from .context import InjectionContext, SyncInjectionContext
from .decorators import inject
from .markers import Inject
from .providers import Callable, Object, Provider, Singleton
__all__ = [
"Container",
"InjectionContext",
"SyncInjectionContext",
"inject",
"Injec... | [
1,
515,
869,
1285,
475,
414,
1053,
21679,
13,
3166,
869,
4703,
1053,
512,
6929,
2677,
29892,
317,
2720,
797,
6929,
2677,
13,
3166,
869,
19557,
4097,
1053,
11658,
13,
3166,
869,
3502,
414,
1053,
512,
622,
13,
3166,
869,
771,
29454,
1... |
zinc/utils/validation.py | PressLabs/zinc | 29 | 37359 | <gh_stars>10-100
import ipaddress
def is_ipv6(ip_addr):
try:
ipaddress.IPv6Address(ip_addr)
return True
except ipaddress.AddressValueError:
return False
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
10377,
7328,
13,
13,
13,
1753,
338,
29918,
666,
29894,
29953,
29898,
666,
29918,
10030,
1125,
13,
1678,
1018,
29901,
13,
4706,
10377,
7328,
29889,... |
resistics/window.py | resistics/resistics | 38 | 193431 | """
Module for calculating window related data. Windows can be indexed relative to
two starting indices.
- Local window index
- Window index relative to the TimeData is called "local_win"
- Local window indices always start at 0
- Global window index
- The global window index is relative to the project ... | [
1,
9995,
13,
7355,
363,
25202,
3474,
4475,
848,
29889,
3852,
508,
367,
27541,
6198,
304,
13,
10184,
6257,
16285,
29889,
13,
13,
29899,
9959,
3474,
2380,
13,
13,
1678,
448,
18379,
2380,
6198,
304,
278,
5974,
1469,
338,
2000,
376,
2997,... |
acmicpc/python/14405.py | hyeongyun0916/Algorithm | 1 | 1600248 | <reponame>hyeongyun0916/Algorithm
import sys
# chupikachupipichu
s = sys.stdin.readline().strip()
i = 0
while i < len(s):
if s[i] == 'p':
if i+1 < len(s) and s[i+1] == 'i':
i += 1
else:
print('NO')
exit()
elif s[i] == 'k':
if i+1 < len(s) and s[i+1] ... | [
1,
529,
276,
1112,
420,
29958,
29882,
4099,
549,
29891,
348,
29900,
29929,
29896,
29953,
29914,
22461,
4540,
13,
5215,
10876,
13,
29937,
521,
786,
638,
496,
786,
666,
436,
29884,
13,
13,
29879,
353,
10876,
29889,
4172,
262,
29889,
949,
... |
save_restore/check_frozen_model.py | scotthuang1989/mytensorflow_example_code | 32 | 141193 | import tensorflow as tf
import argparse
def load_graph(frozen_graph_filename):
# We load the protobuf file from the disk and parse it to retrieve the
# unserialized graph_def
with tf.gfile.GFile(frozen_graph_filename, "rb") as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())... | [
1,
1053,
26110,
408,
15886,
13,
5215,
1852,
5510,
13,
13,
1753,
2254,
29918,
4262,
29898,
29888,
307,
2256,
29918,
4262,
29918,
9507,
1125,
13,
1678,
396,
1334,
2254,
278,
17814,
9721,
934,
515,
278,
8086,
322,
6088,
372,
304,
10563,
... |
learning/LearnPython3TheHardWay/InteractiveFictionClass/GoogleColabStarterCode/Parser.py | AlexanderTN/Python | 1 | 47793 | <filename>learning/LearnPython3TheHardWay/InteractiveFictionClass/GoogleColabStarterCode/Parser.py<gh_stars>1-10
class Parser:
"""The Parser is the class that handles the player's input. The player
writes commands, and the parser performs natural language understanding
in order to interpret what the playe... | [
1,
529,
9507,
29958,
21891,
29914,
29931,
799,
29876,
11980,
29941,
1576,
29950,
538,
29956,
388,
29914,
4074,
4925,
29943,
2463,
2385,
29914,
14207,
1625,
370,
855,
4254,
3399,
29914,
11726,
29889,
2272,
29966,
12443,
29918,
303,
1503,
299... |
run.py | zgoda/kyfood | 0 | 193311 | from argparse import ArgumentParser
from dotenv import find_dotenv, load_dotenv
from werkzeug.serving import run_simple
from api._local import API
def get_options():
parser = ArgumentParser()
parser.add_argument(
"-o", "--host", default="127.0.0.1", help="host name or IP address to bind"
)
p... | [
1,
515,
1852,
5510,
1053,
23125,
11726,
13,
13,
3166,
8329,
6272,
1053,
1284,
29918,
6333,
6272,
29892,
2254,
29918,
6333,
6272,
13,
3166,
23085,
13289,
29889,
643,
1747,
1053,
1065,
29918,
12857,
13,
13,
3166,
7882,
3032,
2997,
1053,
3... |
question_bank/merge-two-binary-trees/merge-two-binary-trees.py | yatengLG/leetcode-python | 9 | 143442 | # -*- coding: utf-8 -*-
# @Author : LG
"""
执行用时:104 ms, 在所有 Python3 提交中击败了64.10% 的用户
内存消耗:14.4 MB, 在所有 Python3 提交中击败了79.35% 的用户
解题思路:
具体实现见代码注释
"""
class Solution:
def mergeTrees(self, t1: TreeNode, t2: TreeNode) -> TreeNode:
def find(root1, root2): # 两棵树的对应节点
if root1 and root2: # 如果节点都存... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
732,
13720,
29871,
584,
365,
29954,
13,
13,
15945,
29908,
13,
233,
140,
170,
30448,
30406,
30594,
30383,
29896,
29900,
29946,
10887,
29892,
29871,
... |
Ex021-Tocando_um_mp3.py | Diego-Sil/Python_do_Curso_em_Video | 0 | 110403 | import pygame
pygame.mixer.init()
pygame.init()
pygame.mixer.music.load('asus-yamete-kudasai.mp3')
pygame.mixer.music.play()
pygame.event.wait()
| [
1,
1053,
22028,
13,
2272,
11802,
29889,
28084,
261,
29889,
2344,
580,
13,
2272,
11802,
29889,
2344,
580,
13,
2272,
11802,
29889,
28084,
261,
29889,
23596,
29889,
1359,
877,
294,
375,
29899,
29891,
314,
2650,
29899,
29895,
566,
294,
1794,
... |
tests/test_search_core.py | dinghino/searchengine | 0 | 75747 | <gh_stars>0
"""
Testing module for the search core functionalities
"""
from search import core
from tests.helpers import Item
class TestCore:
@classmethod
def setup_class(cls):
cls.items = Item.setup()
cls.search = core.SearchEngine(['words'], limit=10)
def test_single_words(self):
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
3057,
292,
3883,
363,
278,
2740,
7136,
13303,
1907,
13,
15945,
29908,
13,
3166,
2740,
1053,
7136,
13,
3166,
6987,
29889,
3952,
6774,
1053,
10976,
13,
13,
13,
1990,
4... |
stian/day_thirteen/python/day_thirteen.py | stian-eng/advent-2021 | 0 | 65965 | <reponame>stian-eng/advent-2021
from requests.api import get
import time
import aoc_frame
def get_points(data) :
points = []
instr = []
flag = True
for i in data :
if i :
if flag :
x, y = i.split(',')
points.append((int(x), int(y)))
else :... | [
1,
529,
276,
1112,
420,
29958,
303,
713,
29899,
996,
29914,
328,
794,
29899,
29906,
29900,
29906,
29896,
13,
3166,
7274,
29889,
2754,
1053,
679,
13,
5215,
931,
13,
5215,
263,
542,
29918,
2557,
13,
13,
1753,
679,
29918,
9748,
29898,
12... |
queue_services/common/tests/integration/test_queue_connections.py | argush3/lear | 8 | 139742 | <reponame>argush3/lear
# Copyright © 2019 Province of British Columbia
#
# 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 b... | [
1,
529,
276,
1112,
420,
29958,
1191,
1878,
29941,
29914,
1945,
13,
29937,
14187,
1266,
29871,
30211,
29871,
29906,
29900,
29896,
29929,
17325,
310,
4908,
15411,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
2987... |
docs/generate_example_images.py | KhaledSharif/kornia | 0 | 8661 | <reponame>KhaledSharif/kornia<gh_stars>0
import importlib
import math
import os
from pathlib import Path
from typing import Optional, Tuple
import cv2
import numpy as np
import requests
import torch
import kornia as K
def read_img_from_url(url: str, resize_to: Optional[Tuple[int, int]] = None) -> torch.Tensor:
... | [
1,
529,
276,
1112,
420,
29958,
29968,
29882,
7943,
2713,
279,
361,
29914,
29895,
1398,
423,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
1053,
1982,
13,
5215,
5844,
13,
5215,
2897,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,... |
userprofile/migrations/0014_auto_20190430_2023.py | Riphiphip/website | 25 | 167600 | <gh_stars>10-100
# Generated by Django 2.0.10 on 2019-04-30 20:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userprofile', '0013_auto_20190408_1825'),
]
operations = [
migrations.RemoveField(
model_name='profile',
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29896,
29900,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29946,
29899,
29941,
29... |
python2/probe_yd.py | Nzen/run_ydl | 0 | 22214 | <filename>python2/probe_yd.py<gh_stars>0
from sys import argv
from subprocess import call
try :
link = argv[ 1 ]
except IndexError:
link = raw_input( " - which url interests you? " )
try:
ydl_answ = call( "youtube-dl -F "+ link, shell = True )
if ydl_answ is not 0 :
print "-- failed "+ link + " code "+ str(ydl... | [
1,
529,
9507,
29958,
4691,
29906,
29914,
771,
915,
29918,
2941,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
10876,
1053,
1852,
29894,
13,
3166,
1014,
5014,
1053,
1246,
13,
13,
13,
2202,
584,
13,
12,
2324,
353,
... |
lib/ldapconn.py | ArcaniteSolutions/zabbix-ldap-sync | 0 | 1615065 | import ldap
import ldap.filter
import logging
class LDAPConn(object):
"""
LDAP connector class
Defines methods for retrieving users and groups from LDAP server.
"""
def __init__(self, config):
self.conn = None
self.disabled_filter = config.ad_filterdisabled
self.uri = co... | [
1,
1053,
301,
29881,
481,
13,
5215,
301,
29881,
481,
29889,
4572,
13,
5215,
12183,
13,
13,
13,
1990,
365,
29928,
3301,
1168,
29876,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
365,
29928,
3301,
1826,
2801,
770,
13,
13,
1678,
5282,
... |
google/cloud/bigquery/reservation_v1/types/reservation.py | shollyman/python-bigquery-reservation | 0 | 137874 | <gh_stars>0
# -*- coding: utf-8 -*-
# Copyright 2020 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 appl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
5087,
365,
12182,
13,
29937,
13,
29937,
10413,... |
job-queue-portal/postgres_django_queue/djangoenv/lib/python3.8/site-packages/django_celery_results/utils.py | Sruthi-Ganesh/postgres-django-queue | 0 | 185979 | """Utilities."""
# -- XXX This module must not use translation as that causes
# -- a recursive loader import!
from django.conf import settings
from django.utils import timezone
# see Issue celery/django-celery#222
now_localtime = getattr(timezone, 'template_localtime', timezone.localtime)
def now():
"""Return t... | [
1,
9995,
7270,
1907,
1213,
15945,
13,
29937,
1192,
22615,
910,
3883,
1818,
451,
671,
13962,
408,
393,
9946,
13,
29937,
1192,
263,
16732,
23466,
1053,
29991,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
13239,
1053... |
code/Dictionary/key_of_min.py | jumploop/30-seconds-of-python | 0 | 197308 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
功能实现:在字典中查找最小值的键。
解读:
使用min()并将key参数设置为dict.get()来查找并返回给定字典中最小值的键。
"""
def key_of_min(d):
return min(d, key=d.get)
# Examples
print(key_of_min({'a': 4, 'b': 0, 'c': 13}))
# output:
# b
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
31134,
30815,
31195,
31424,
30383,
30505,
30578,
31259,
30275,
31213,
233,
140,
193,
3... |
dronesym-python/flask-api/src/dronepool.py | dilinade/DroneSym | 1 | 3946 | <reponame>dilinade/DroneSym<filename>dronesym-python/flask-api/src/dronepool.py
#DronePool module which handles interaction with SITLs
from dronekit import Vehicle, VehicleMode, connect
from dronekit_sitl import SITL
from threading import Lock
import node, time
import mavparser
import threadrunner
drone_pool = {}
ins... | [
1,
529,
276,
1112,
420,
29958,
29881,
309,
1099,
311,
29914,
25639,
650,
25548,
29966,
9507,
29958,
29881,
1617,
267,
962,
29899,
4691,
29914,
1579,
1278,
29899,
2754,
29914,
4351,
29914,
7707,
650,
10109,
29889,
2272,
13,
29937,
25639,
6... |
python3/hackerrank_leetcode/coin_change/main.py | seLain/codesnippets | 0 | 183246 | '''
Hackerrank: https://www.hackerrank.com/challenges/coin-change/problem
this solution will get timeout in many test cases
however, this solution can get all the combination during computation
'''
import sys
from collections import Counter, defaultdict
sys.setrecursionlimit(10000)
memory = defaultdict(list)
def rec... | [
1,
14550,
13,
29950,
28940,
10003,
29901,
2045,
597,
1636,
29889,
29882,
28940,
10003,
29889,
510,
29914,
305,
16047,
267,
29914,
1111,
262,
29899,
3167,
29914,
17199,
13,
1366,
1650,
674,
679,
11815,
297,
1784,
1243,
4251,
13,
3525,
1310... |
src/sdk/pynni/nni/compressors/torch_compressor/_nnimc_torch.py | LeonardoWang/nni | 0 | 123083 | <gh_stars>0
from torch import Tensor
from torch.nn import Module, Parameter
from ruamel.yaml import YAML
from typing import List
import logging
logger = logging.getLogger('torch_compressor')
__all__ = [
'TorchCompressor',
'TorchPruner',
'TorchQuantizer',
'_torch_detect_prunable_layers',
'_torch_def... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
3166,
4842,
305,
29889,
15755,
1053,
15591,
29892,
24953,
13,
3166,
5796,
314,
295,
29889,
25162,
1053,
612,
23956,
13,
3166,
19229,
1053,
2391,
13... |
Python/problem0050.py | 1050669722/LeetCode-Answers | 0 | 43814 | # -*- coding: utf-8 -*-
"""
Created on Fri May 31 10:11:51 2019
@author: Administrator
"""
class Solution:
def myPow(self, x: float, n: int) -> float:
# if n == 1:
# return x
# if x!=0 and n == 0:
# return 1
# if x == 0 and n <= 0:
# return None
# if n>... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
11169,
2610,
29871,
29941,
29896,
29871,
29896,
29900,
29901,
29896,
29896,
29901,
29945,
29896,
29871,
29906,
29900,
29896,
29... |
ConvertShellcode.py | rvrsh3ll/CPLResourceRunner | 232 | 110036 | <reponame>rvrsh3ll/CPLResourceRunner<filename>ConvertShellcode.py
#!/usr/bin/env python
import binascii
import sys
file_name = sys.argv[1]
with open (file_name) as f:
hexdata = binascii.hexlify(f.read())
hexlist = map(''.join, zip(hexdata[::2], hexdata[1::2]))
shellcode = ''
for i in hexlist:
shellcode += "0x{},... | [
1,
529,
276,
1112,
420,
29958,
29878,
13416,
845,
29941,
645,
29914,
6271,
29931,
6848,
16802,
29966,
9507,
29958,
18455,
16037,
401,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
9016,
294,
18869,
13,
521... |
rnn.py | peterwilliams97/deidentification | 0 | 70497 | <reponame>peterwilliams97/deidentification
import tensorflow as tf
import numpy as np
from tensorflow.contrib import rnn
from os.path import expanduser
from glob import glob
import re
import random
import time
import os
import spacy
from collections import defaultdict
# Parameters
seed = 112
use_spacy = True
MAX_VOCA... | [
1,
529,
276,
1112,
420,
29958,
29886,
1308,
14043,
10909,
29929,
29955,
29914,
311,
1693,
2450,
13,
5215,
26110,
408,
15886,
13,
5215,
12655,
408,
7442,
13,
3166,
26110,
29889,
21570,
1053,
364,
15755,
13,
3166,
2897,
29889,
2084,
1053,
... |
account_verification_flask/services/twilio_services.py | TwilioDevEd/account-verification-flask | 8 | 191141 | <reponame>TwilioDevEd/account-verification-flask<gh_stars>1-10
import account_verification_flask.utilities
from account_verification_flask.utilities.settings import TwilioSettings
from twilio.rest import Client
class TwilioServices:
twilio_client = None
def __init__(self):
if TwilioServices.twilio_c... | [
1,
529,
276,
1112,
420,
29958,
27418,
14876,
16618,
3853,
29914,
10149,
29899,
369,
2450,
29899,
1579,
1278,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
30143,
5215,
3633,
29918,
369,
2450,
29918,
1579,
1278,
2988... |
utils/glove.py | MirunaPislar/Word2vec | 13 | 5371 | import numpy as np
DEFAULT_FILE_PATH = "utils/datasets/glove.6B.50d.txt"
def loadWordVectors(tokens, filepath=DEFAULT_FILE_PATH, dimensions=50):
"""Read pretrained GloVe vectors"""
wordVectors = np.zeros((len(tokens), dimensions))
with open(filepath) as ifs:
for line in ifs:
line = lin... | [
1,
1053,
12655,
408,
7442,
13,
13,
23397,
29918,
7724,
29918,
10145,
353,
376,
13239,
29914,
14538,
1691,
29914,
29887,
417,
345,
29889,
29953,
29933,
29889,
29945,
29900,
29881,
29889,
3945,
29908,
13,
13,
1753,
2254,
14463,
29963,
11142,
... |
to_excel_demo.py | 46319943/geopandas_demo | 0 | 190712 | <filename>to_excel_demo.py<gh_stars>0
from pathlib2 import Path
import geopandas
# 存放所有城市的目录
source_dir = Path(r'D:\Document\HousePricing\公司')
# 获取所有目录名字
city_dir_list = [x for x in source_dir.iterdir() if x.is_dir()]
# 输出目录
output_dir = Path(r'D:\Document\HousePricing\公司')
for city_dir in city_dir_list:
if (city... | [
1,
529,
9507,
29958,
517,
29918,
24633,
29918,
17482,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
2224,
1982,
29906,
1053,
10802,
13,
5215,
1737,
459,
7086,
13,
13,
29937,
29871,
30946,
31182,
30744,
30417,
30626,
... |
bin/lmi-add-cat.py | mkelley/dct-redux | 0 | 44897 | #!/usr/bin/env python3
from astropy.modeling.models import Const1D, Const2D, Gaussian1D, Gaussian2D
from astropy.modeling.fitting import LevMarLSQFitter
from astropy.modeling import Fittable2DModel, Parameter
import sys
import logging
import argparse
import warnings
from datetime import datetime
from glob import glob
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
3166,
8717,
14441,
29889,
4299,
292,
29889,
9794,
1053,
5798,
29896,
29928,
29892,
5798,
29906,
29928,
29892,
22477,
29896,
29928,
29892,
22477,
29906,
29928,
13,
3166,
8717,
14441,
... |
lib/evaluation/sort_class_mean_accuracy.py | YerongLi2/LTVRR | 13 | 196691 | <filename>lib/evaluation/sort_class_mean_accuracy.py
'''
# How can we do the long tail with the soft?
# we pick the winner from our table (most likely a hubness) and the baseline.
# I want a csv that tells me for every predition (rel. or sbj.)
# a) its class, (optionally the class-frequency), and the top-1 or top-5 [c... | [
1,
529,
9507,
29958,
1982,
29914,
24219,
362,
29914,
6605,
29918,
1990,
29918,
12676,
29918,
562,
2764,
4135,
29889,
2272,
13,
12008,
13,
29937,
1128,
508,
591,
437,
278,
1472,
12464,
411,
278,
4964,
29973,
29871,
13,
29937,
591,
5839,
... |
supervisor/medusa/text_socket.py | infoxchange/supervisor | 1 | 100089 | # -*- Mode: Python -*-
__author__ = '<NAME>'
from supervisor.compat import PY3
from supervisor.compat import as_string, as_bytes
from socket import * # relied on to be imported from elsewhere
if PY3:
bin_socket = socket
class text_socket(socket):
def __init__(self, family=AF_INET, type=SOCK_STREAM, ... | [
1,
396,
448,
29930,
29899,
21864,
29901,
5132,
448,
29930,
29899,
13,
13,
1649,
8921,
1649,
353,
12801,
5813,
16299,
13,
13,
3166,
2428,
19188,
29889,
12667,
1053,
349,
29979,
29941,
13,
3166,
2428,
19188,
29889,
12667,
1053,
408,
29918,
... |
irc/bot.py | suut/psychic-happiness | 1 | 1607972 | <gh_stars>1-10
# -*- coding: utf-8 -*-
# Copyright (C) 1999-2002 <NAME>
# Portions Copyright © 2011-2012 <NAME>
"""
Simple IRC bot library.
This module contains a single-server IRC bot class that can be used to
write simpler bots.
"""
from __future__ import absolute_import
import sys
import irc.client
import irc... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29896,
29929,
29929,
29929,
29899,
... |
schema/test_connection.py | ramrod-project/database-brain | 0 | 166709 | <filename>schema/test_connection.py<gh_stars>0
"""
Pytest file for the connection wrapper
"""
from os import environ
from pytest import fixture, raises
import docker
from .brain import connect, r
from .brain.connection import DefaultConnection, BrainNotReady
CLIENT = docker.from_env()
@fixture(scope='module')
def r... | [
1,
529,
9507,
29958,
11010,
29914,
1688,
29918,
9965,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
13,
19737,
1688,
934,
363,
278,
3957,
14476,
13,
15945,
29908,
13,
13,
3166,
2897,
1053,
12471,
13,
3166,
... |
Main/migrations/0072_auto_20210506_0016.py | Muhammet-Yildiz/Ecommerce_Website-HepsiOrada | 10 | 8383 | # Generated by Django 3.1.4 on 2021-05-05 21:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Main', '0071_auto_20210506_0004'),
]
operations = [
migrations.RemoveField(
model_name='product',
name='chooseColor',
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29896,
29889,
29946,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29945,
29899,
29900,
29945,
29871,
29906,
29896,
29901,
29896,
29953,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
tools/c7n_mailer/tests/common.py | gowthamsubbu/cloud-custodian | 0 | 131359 | <filename>tools/c7n_mailer/tests/common.py<gh_stars>0
# Copyright 2017 Capital One Services, 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... | [
1,
529,
9507,
29958,
8504,
29914,
29883,
29955,
29876,
29918,
2549,
261,
29914,
21150,
29914,
9435,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
25343,
3118,
15538,
2989... |
pymic/transform/threshold.py | HiLab-git/PyMIC | 147 | 22249 | <reponame>HiLab-git/PyMIC
# -*- coding: utf-8 -*-
from __future__ import print_function, division
import torch
import json
import math
import random
import numpy as np
from scipy import ndimage
from pymic.transform.abstract_transform import AbstractTransform
from pymic.util.image_process import *
class ChannelWiseTh... | [
1,
529,
276,
1112,
420,
29958,
18567,
28632,
29899,
5559,
29914,
19737,
29924,
2965,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
29892,
8542... |
Node_Utility.py | SBCV/PythonBlenderUtility | 1 | 74203 |
import bpy
import os
from collections import defaultdict
from Utility.Logging_Extension import logger
# http://blender.stackexchange.com/questions/8936/does-switching-from-blender-render-to-cycles-mess-things-up
# * All matierals in cycles use nodes (even if you set up the material in the Properties panel, it will c... | [
1,
29871,
13,
5215,
289,
2272,
13,
5215,
2897,
13,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
22310,
537,
29889,
3403,
3460,
29918,
17657,
1053,
17927,
13,
13,
29937,
1732,
597,
2204,
1581,
29889,
7041,
29889,
510,
29914,
2619,
29914,... |
trivector/trivector.py | nklapste/trivector | 1 | 70706 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Image conversion functionality for trivector"""
from enum import Enum
import numpy as np
import svgwrite
import cv2
import progressbar
def upper_tri_sum(d3array: np.ndarray) -> np.ndarray:
"""Get a 3D image array's upper diagonal's pixel color average
:par... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
2940,
11301,
9863,
363,
3367,
8111,
15945,
29908,
13,
13,
3166,
14115,
1053,
1174,
3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.