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 |
|---|---|---|---|---|---|
bin/analysis/ipa/constraints/split.py | ncbray/pystream | 6 | 11699 | # Copyright 2011 <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 agreed to in writing, softw... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29896,
529,
5813,
29958,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
... |
src/typhoonae/redis/tests/benchmark.py | ukris/typhoonae.redis | 0 | 1600121 | <reponame>ukris/typhoonae.redis
# -*- coding: utf-8 -*-
#
# Copyright 2010 <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... | [
1,
529,
276,
1112,
420,
29958,
2679,
3780,
29914,
1017,
561,
29877,
2681,
29872,
29889,
1127,
275,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
... |
URLSHORT/app.py | its-mr-monday/Url-Shortener | 0 | 148787 | <reponame>its-mr-monday/Url-Shortener<filename>URLSHORT/app.py
from flask import Flask, render_template, flash, redirect, url_for, session, logging, request
from flask_mysqldb import MySQL
from functools import wraps
from passlib.hash import sha256_crypt
from webforms import *
from lib import *
from config import *
fro... | [
1,
529,
276,
1112,
420,
29958,
1169,
29899,
29885,
29878,
29899,
8315,
388,
29914,
5983,
29899,
21322,
759,
29966,
9507,
29958,
4219,
7068,
8476,
29914,
932,
29889,
2272,
13,
3166,
29784,
1053,
2379,
1278,
29892,
4050,
29918,
6886,
29892,
... |
MIDI Remote Scripts/Push2/mode_collector.py | aarkwright/ableton_devices | 0 | 105 | # uncompyle6 version 3.3.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)]
# Embedded file name: c:\Jenkins\live\output\win_64_static\Release\python-bundle\MIDI Remote Scripts\Push2\mode_collector.py
# Compiled at: 2018-11-30 15:48:11
from __fut... | [
1,
396,
443,
2388,
1508,
29953,
1873,
29871,
29941,
29889,
29941,
29889,
29945,
13,
29937,
5132,
7023,
401,
29871,
29906,
29889,
29955,
313,
29953,
29906,
29906,
29896,
29896,
29897,
13,
29937,
897,
2388,
2356,
515,
29901,
5132,
29871,
2994... |
Comportamentais/Strategy/main.py | DionVitor/design_pattern | 0 | 179792 | """Baseado no livro Python Fluente, <NAME>."""
from abc import ABC, abstractmethod
from collections import namedtuple
Customer = namedtuple('Customer', 'name fidelity')
a = namedtuple('int', 'name')
class LineItem:
def __init__(self, product, quantity, price):
self.__product = product
self.__quan... | [
1,
9995,
5160,
912,
694,
7294,
307,
5132,
2379,
29884,
2016,
29892,
529,
5813,
29958,
1213,
15945,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
3166,
16250,
1053,
4257,
23583,
13,
13,
15122,
353,
4257,
23583,
877,
15122,
742,
52... |
src/dataset.py | kjahan/evaluation | 0 | 150414 | <reponame>kjahan/evaluation
import os
from datetime import datetime
import pandas as pd
import tqdm
def load(filename, path, delim='\t'):
filename = os.path.join(path, filename)
dataframe = pd.read_csv(filename, sep=delim)
return dataframe
def parse_time(df):
date_parse = lambda x: pd.datetime.strp... | [
1,
529,
276,
1112,
420,
29958,
29895,
29926,
801,
273,
29914,
24219,
362,
13,
5215,
2897,
13,
3166,
12865,
1053,
12865,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
260,
29939,
18933,
13,
13,
13,
1753,
2254,
29898,
9507,
29892,
2224,
29... |
tests/cryolo_relion_it/test_mask_soft_edge_external_job.py | DiamondLightSource/python-relion | 5 | 80596 | import json
import os
import sys
from unittest import mock
import gemmi
from relion.cryolo_relion_it import mask_soft_edge_external_job
@mock.patch("relion.cryolo_relion_it.mask_soft_edge_external_job.subprocess")
def test_mask_soft_edge_main(mock_subprocess, tmpdir):
# Prepare things
os.chdir(tmpdir)
c... | [
1,
1053,
4390,
13,
5215,
2897,
13,
5215,
10876,
13,
3166,
443,
27958,
1053,
11187,
13,
13,
5215,
7055,
2460,
13,
13,
3166,
1104,
291,
29889,
29883,
719,
3543,
29918,
2674,
291,
29918,
277,
1053,
11105,
29918,
2695,
29918,
12864,
29918,
... |
2018/Day15/setup.py | dh256/adventofcode | 0 | 172920 | <reponame>dh256/adventofcode<gh_stars>0
from setuptools import setup
setup(
name='day15',
author='<NAME>',
packages=['day15'],
description='Advent of Code 2018 Day 15 Solution'
) | [
1,
529,
276,
1112,
420,
29958,
12744,
29906,
29945,
29953,
29914,
328,
794,
974,
401,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
3250,
29896,
29945,
... |
models/py_utils/global_local.py | gezekun/End-to-end-Lane-Detection-with-Convolution-and-Transformer | 0 | 80340 | import torch
import torch.nn as nn
import torch.nn.functional as F
class ConvBNReLU(nn.Module):
def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1,
dilation=1, groups=1, bias=False):
super(ConvBNReLU, self).__init__()
self.conv = nn.Conv2d(
in_ch... | [
1,
1053,
4842,
305,
30004,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
30004,
13,
30004,
13,
1990,
1281,
29894,
29933,
29940,
1123,
29931,
29965,
29898,
15755,
... |
crf.py | ottokart/sequence-labeler | 10 | 55534 | import theano
import numpy
# CRF implementation based on Lample et al.
# "Neural Architectures for Named Entity Recognition"
floatX=theano.config.floatX
def log_sum(x, axis=None):
x_max_value = x.max(axis=axis)
x_max_tensor = x.max(axis=axis, keepdims=True)
return x_max_value + theano.tensor.log(theano.t... | [
1,
1053,
278,
1562,
13,
5215,
12655,
13,
13,
29937,
15600,
29943,
5314,
2729,
373,
365,
981,
634,
394,
29889,
13,
29937,
376,
8139,
3631,
2595,
4496,
1973,
363,
405,
2795,
14945,
3599,
3811,
654,
29908,
13,
13,
7411,
29990,
29922,
155... |
OpenCV/5.1.py | Nivedya-27/Autumn-of-Automation | 0 | 151915 | import cv2
import numpy as np
from imutils.video import FileVideoStream
import imutils
import time
vs = FileVideoStream('messi.webm').start()
while vs.more():
frame=vs.read()
if frame is None:
continue
output=frame.copy()
gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
gray=cv2.medianBlur(gray,5)
gray=cv2.adaptiveT... | [
1,
1053,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
527,
13239,
29889,
9641,
1053,
3497,
15167,
3835,
13,
5215,
527,
13239,
13,
5215,
931,
13,
4270,
353,
3497,
15167,
3835,
877,
12062,
29875,
29889,
2676,
29885,
2824,
2962,
580... |
wacky_rl/layers/__init__.py | maik97/wacky-rl | 0 | 102265 | <reponame>maik97/wacky-rl<filename>wacky_rl/layers/__init__.py
#from wacky_rl.layers.actor_layer import DiscreteActionLayer
#from wacky_rl.layers.actor_layer import ContinActionLayer
from wacky_rl.layers.contin_actor_layer import ContinActionLayer
from wacky_rl.layers.discrete_actor_layer import DiscreteActionLayer
fr... | [
1,
529,
276,
1112,
420,
29958,
655,
638,
29929,
29955,
29914,
29893,
547,
29891,
29899,
2096,
29966,
9507,
29958,
29893,
547,
29891,
29918,
2096,
29914,
29277,
29914,
1649,
2344,
26914,
2272,
13,
29937,
3166,
281,
547,
29891,
29918,
2096,
... |
awwards/urls.py | cossie14/slyawwards | 0 | 15978 |
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import include,url
from . import views
urlpatterns=[
url(r'api/user/user-id/(?P<pk>[0-9]+)/$',
views.UserDescription.as_view()),
url(r'api/project/project-id/(?P<pk>[0-9]+)/$',
views.ProjectDesc... | [
1,
1678,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
5527,
29889,
26045,
29889,
7959,
1053,
2294,
13,
3166,
9557,
29889,
5527,
29889,
26045,
1053,
3160,
29892,
2271,
13,
3166,
869,
1053,
8386,
13,
13,
2271,
11037,
29... |
day8/test_day8.py | bwbeach/advent-of-code-2020 | 0 | 12621 | <filename>day8/test_day8.py
from day8.day8 import fix_code, parse_code, run
SAMPLE_CODE_LOOP = """nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
jmp -4
acc +6
"""
SAMPLE_CODE_HALT = """nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
nop -4
acc +6
"""
def test_parse():
assert parse_code("nop +0\nacc +1\nacc... | [
1,
529,
9507,
29958,
3250,
29947,
29914,
1688,
29918,
3250,
29947,
29889,
2272,
13,
3166,
2462,
29947,
29889,
3250,
29947,
1053,
2329,
29918,
401,
29892,
6088,
29918,
401,
29892,
1065,
13,
13,
8132,
3580,
1307,
29918,
16524,
29918,
3927,
... |
metrics/metric_factory/sc2reader_factory.py | matthewj8489/Starcraft2Metrics | 4 | 179536 | <filename>metrics/metric_factory/sc2reader_factory.py
import sc2reader
from metrics.metric_containers import *
from metrics.util import convert_to_realtime_r
class Sc2ReaderFactory(object):
def __init__(self, file_path):
self._replay = sc2reader.load_replay(file_path)
def generateResources... | [
1,
529,
9507,
29958,
2527,
10817,
29914,
16414,
29918,
14399,
29914,
1557,
29906,
16950,
29918,
14399,
29889,
2272,
13,
5215,
885,
29906,
16950,
30004,
13,
30004,
13,
3166,
21556,
29889,
16414,
29918,
1285,
475,
414,
1053,
334,
30004,
13,
... |
core/tests/test_models.py | UlmBlois/website | 0 | 44869 | from django.test import TestCase
# from django.db.utils import IntegrityError
from core.models import User
class CaseInsensitiveUserNameManagerTest(TestCase):
@classmethod
def setUpTestData(cls):
cls.user1 = User.objects.create_user(username="user1",
pass... | [
1,
515,
9557,
29889,
1688,
1053,
4321,
8259,
13,
29937,
515,
9557,
29889,
2585,
29889,
13239,
1053,
17100,
537,
2392,
13,
13,
3166,
7136,
29889,
9794,
1053,
4911,
13,
13,
13,
1990,
11733,
797,
23149,
3321,
28129,
3260,
3057,
29898,
3057... |
src/lib/pythonds/graphs/priorityQueue.py | blockpy-edu/skulpt | 4 | 147013 | # <NAME>, <NAME>
# Introduction to Data Structures and Algorithms in Python
# Copyright 2005
#
import unittest
# this implementation of binary heap takes key value pairs,
# we will assume that the keys are all comparable
class PriorityQueue:
def __init__(self):
self.heapArray = [(0, 0)]
self.cur... | [
1,
396,
529,
5813,
10202,
529,
5813,
29958,
13,
29937,
27576,
304,
3630,
28771,
1973,
322,
11545,
12404,
297,
5132,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29900,
29945,
13,
29937,
29871,
13,
5215,
443,
27958,
13,
13,
13,
29937,
44... |
backend/farming/graphql/types/natura2000.py | PwC-FaST/fast-webapp | 7 | 32156 | import graphene
import os
from promise import Promise
from datetime import datetime
from promise.dataloader import DataLoader
import requests
from core.graphql.types import CountryType
from core.models import Country
class Natura2000FeatureType(graphene.ObjectType):
id = graphene.String()
site_code = graphene... | [
1,
1053,
3983,
1600,
13,
5215,
2897,
13,
3166,
11640,
1053,
21501,
13,
3166,
12865,
1053,
12865,
13,
3166,
11640,
29889,
29881,
2075,
29877,
1664,
1053,
3630,
10036,
13,
5215,
7274,
13,
3166,
7136,
29889,
4262,
1519,
29889,
8768,
1053,
... |
starsim/__init__.py | dbarochlopez/starsim | 0 | 95172 | # -*- coding: utf-8 -*-
__version__ = "3.0.1"
__all__ = ['starsim','spectra','nbspectra','SA']
from .starsim import StarSim | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1649,
3259,
1649,
353,
376,
29941,
29889,
29900,
29889,
29896,
29908,
13,
13,
1649,
497,
1649,
353,
6024,
303,
1503,
326,
3788,
21494,
336,
3788,
2... |
script.py | rohank63/SEC | 1 | 53998 | import infer_organism
import subprocess as sp
print(infer_organism.infer(
file_1="./first_mate.fastq",
min_match=2,factor=1,
transcript_fasta="transcripts.fasta.zip"
))
print(infer_organism.infer(
file_1="./SRR13496438.fastq.gz",
min_match=2,factor=1,
transcript_fasta="transcripts.fasta.zip"
))
'''
print(... | [
1,
1053,
10115,
29918,
6388,
1608,
13,
13,
5215,
1014,
5014,
408,
805,
13,
13,
13,
13,
2158,
29898,
262,
571,
29918,
6388,
1608,
29889,
262,
571,
29898,
13,
12,
1445,
29918,
29896,
543,
6904,
4102,
29918,
25046,
29889,
11255,
29939,
6... |
userbot/core/vcbot/controls.py | Rewtio/Mikoo-Userbot | 4 | 16386 | <reponame>Rewtio/Mikoo-Userbot
# Mikoo - UserBot
# Copyright (c) 2022 Mikoo-Userbot
# Credits: @divarvian || https://github.com/divarvian
#
# This file is a part of < https://github.com/divarvian/Mikoo-Userbot/ >
# t.me/MikooUserbot & t.me/MikooUserbot
from pytgcalls.types.input_stream import AudioPiped, AudioVideoPi... | [
1,
529,
276,
1112,
420,
29958,
29934,
809,
29873,
601,
29914,
29924,
638,
3634,
29899,
2659,
7451,
13,
29937,
13803,
3634,
448,
4911,
29933,
327,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29906,
13803,
3634,
2... |
tools/run_tests/performance/loadtest_config.py | amidlash/grpc | 1 | 187665 | <filename>tools/run_tests/performance/loadtest_config.py
#!/usr/bin/env python3
# Copyright 2021 The gRPC Authors
#
# 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... | [
1,
529,
9507,
29958,
8504,
29914,
3389,
29918,
21150,
29914,
546,
13390,
29914,
1359,
1688,
29918,
2917,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
... |
solvers/shikaku.py | kevinychen/nikoli-puzzle-solver | 4 | 179778 | <gh_stars>1-10
from solvers.utils import *
class ShikakuSolver(AbstractSolver):
def __init__(self, pzprv3):
matched = match('pzprv3/shikaku/(\\d+)/(\\d+)/(.*)/', pzprv3)
self.height = int(matched.group(1))
self.width = int(matched.group(2))
self.grid = parse_table(matched.group(3)... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
899,
874,
29889,
13239,
1053,
334,
13,
13,
13,
1990,
1383,
638,
16774,
13296,
369,
29898,
9118,
13296,
369,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
... |
pypy/module/_hpy_universal/interp_descr.py | pymtl/pypy-pymtl3 | 1 | 77140 | <reponame>pymtl/pypy-pymtl3
"""
Implements HPy attribute descriptors, i.e members and getsets.
"""
from rpython.rtyper.lltypesystem import rffi, lltype
from rpython.rlib.unroll import unrolling_iterable
from pypy.interpreter.error import oefmt
from pypy.interpreter.baseobjspace import DescrMismatch
from pypy.interprete... | [
1,
529,
276,
1112,
420,
29958,
29886,
962,
15206,
29914,
29886,
1478,
29891,
29899,
29886,
962,
15206,
29941,
13,
15945,
29908,
13,
1888,
9711,
379,
19737,
5352,
29037,
943,
29892,
474,
29889,
29872,
5144,
322,
679,
7224,
29889,
13,
15945... |
lib/surface/pubsub/subscriptions/update.py | kylewuolle/google-cloud-sdk | 0 | 198196 | # -*- coding: utf-8 -*- #
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
396,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
5087,
9266,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
27... |
polecat/db/sql/expression/values.py | furious-luke/polecat | 4 | 5146 | <reponame>furious-luke/polecat
from functools import partial
from polecat.db.query import query as query_module
from psycopg2.sql import SQL, Placeholder
from .expression import Expression
class Values(Expression):
def __init__(self, values, relation=None):
self.values = values
self.relation = r... | [
1,
529,
276,
1112,
420,
29958,
22613,
2738,
29899,
6092,
446,
29914,
15831,
4117,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
13,
3166,
22775,
4117,
29889,
2585,
29889,
1972,
1053,
2346,
408,
2346,
29918,
5453,
13,
3166,
6529,
29891,
970... |
_test_request.py | arshadkazmi42/crul | 6 | 32028 | <filename>_test_request.py
import unittest
from unittest.mock import Mock, patch
from request import Request
RESPONSE = {
"status": "success",
"message": "Processed"
}
class Response:
def __init__(self):
self.text = RESPONSE['message']
def json(self):
return RESPONSE
mock_respons... | [
1,
529,
9507,
29958,
29918,
1688,
29918,
3827,
29889,
2272,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
29889,
17640,
1053,
26297,
29892,
13261,
13,
13,
3166,
2009,
1053,
10729,
13,
13,
13,
1525,
5550,
1164,
1660,
353,
426,
13,
1678,
... |
src/Knn-Tensor.py | python-itb/knn-from-scratch | 0 | 7923 | <reponame>python-itb/knn-from-scratch
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 13 18:52:28 2018
@author: amajidsinar
"""
from sklearn import datasets
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('seaborn-white')
iris = datasets.load_iris()
dataset = iris.data
# only ... | [
1,
529,
276,
1112,
420,
29958,
4691,
29899,
277,
29890,
29914,
3959,
29876,
29899,
3166,
29899,
10526,
905,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,... |
backend/api/paginations.py | vindem22/work-hour-registration | 0 | 65634 | from rest_framework.pagination import (
PageNumberPagination,
CursorPagination,
LimitOffsetPagination,
)
from rest_framework.response import Response
class Pagination(object):
@classmethod
def number_of_pages(cls, num_of_instances, instances_per_page=12):
num_of_pages = (
(num_o... | [
1,
515,
1791,
29918,
4468,
29889,
13573,
3381,
1053,
313,
13,
1678,
9305,
4557,
29925,
351,
3381,
29892,
13,
1678,
315,
5966,
29925,
351,
3381,
29892,
13,
1678,
9628,
277,
10302,
29925,
351,
3381,
29892,
13,
29897,
13,
3166,
1791,
29918... |
Exercicios/lei_estadual/lei.py | Arthurnevs/E3 | 0 | 163097 | <filename>Exercicios/lei_estadual/lei.py
'''
UFCG
PROGRAMAÇÃO 1
<NAME> DE BRITO - 119210204
Lei Estadual
'''
idade = int(input("Idade? "))
if(idade < 12):
print('criança (meia entrada)')
elif(idade >= 65):
print('idoso (meia entrada)')
else:
estudante = input('Estudante? ')
if(estudante == 's'):
rp = input('Red... | [
1,
529,
9507,
29958,
1252,
6269,
19382,
29914,
16301,
29918,
342,
328,
950,
29914,
16301,
29889,
2272,
13,
12008,
13,
29965,
8610,
29954,
13,
8618,
29954,
4717,
1529,
30219,
30179,
29949,
29871,
29896,
13,
29966,
5813,
29958,
5012,
25185,
... |
gget/compile.py | lauraluebbert/gget | 3 | 127165 | import os
import subprocess
import sys
import platform
import logging
# Add and format time stamp in logging messages
logging.basicConfig(
format="%(asctime)s %(levelname)s %(message)s",
level=logging.INFO,
datefmt="%c",
)
# Mute numexpr threads info
logging.getLogger("numexpr").setLevel(logging.WARNING)
... | [
1,
1053,
2897,
13,
5215,
1014,
5014,
13,
5215,
10876,
13,
5215,
7481,
13,
5215,
12183,
13,
13,
29937,
3462,
322,
3402,
931,
25214,
297,
12183,
7191,
13,
21027,
29889,
16121,
3991,
29898,
13,
1678,
3402,
543,
29995,
29898,
294,
312,
60... |
p020.py | drcsturm/project-euler | 0 | 108789 |
# n! means n × (n − 1) × ... × 3 × 2 × 1
# For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
# and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
# Find the sum of the digits in the number 100!
import math
total = 0
for i in str(math.factorial(100)):
total += int(i)
print(total) | [
1,
29871,
13,
29937,
302,
29991,
2794,
302,
13105,
313,
29876,
13935,
29871,
29896,
29897,
13105,
2023,
13105,
29871,
29941,
13105,
29871,
29906,
13105,
29871,
29896,
13,
13,
29937,
1152,
1342,
29892,
29871,
29896,
29900,
29991,
353,
29871,
... |
get_floor.py | deemozyc/zycs_WiFi_location | 2 | 71199 | <reponame>deemozyc/zycs_WiFi_location
# coding:utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from knn_main import *
from sklearn.svm import SVC
if sys.getdefaultencoding() != 'utf-8':
reload(sys)
sys.setdefaultencoding('utf-8')
def run_knn_floor(trn_coord_file, tst_coord_file, trn_rss_file, tst_... | [
1,
529,
276,
1112,
420,
29958,
311,
15810,
1537,
29883,
29914,
1537,
2395,
29918,
29956,
29875,
18800,
29918,
5479,
13,
29937,
14137,
29901,
9420,
29899,
29947,
13,
5215,
10876,
13,
28120,
29898,
9675,
29897,
13,
9675,
29889,
842,
4381,
2... |
setup.py | simonthor/zfit-physics | 7 | 174412 | <filename>setup.py
#!/usr/bin/env python
"""The setup script."""
import os
from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "requirements.txt"), encoding="utf-8") as requirements_file:
requirements = requirements_file.read().splitlines()
... | [
1,
529,
9507,
29958,
14669,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
15945,
29908,
1576,
6230,
2471,
1213,
15945,
13,
5215,
2897,
13,
13,
3166,
731,
21245,
8789,
1053,
1284,
29918,
8318,
29892,
6230,
... |
src/fingerflow/matcher/VerifyNet/verify_net_model.py | jakubarendac/fingerflow | 0 | 85052 | <filename>src/fingerflow/matcher/VerifyNet/verify_net_model.py
import tensorflow as tf
from . import constants, utils
def get_verify_net_model(precision, verify_net_path=None):
embedding_network = get_embeddings_model(precision)
input_1 = tf.keras.Input(utils.get_input_shape(precision))
input_2 = tf.ker... | [
1,
529,
9507,
29958,
4351,
29914,
29888,
5621,
1731,
29914,
4352,
261,
29914,
6565,
1598,
6779,
29914,
27902,
29918,
1212,
29918,
4299,
29889,
2272,
13,
5215,
26110,
408,
15886,
13,
13,
3166,
869,
1053,
17727,
29892,
3667,
29879,
13,
13,
... |
notes/code/linkedin/one_request_http_server.py | skrilladeville/msds692 | 87 | 100202 | <filename>notes/code/linkedin/one_request_http_server.py
import BaseHTTPServer
import urlparse
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
p = self.path.split('?')
if len(p) > 1:
params = urlparse.parse_qs(p[1], True, True)
print params
... | [
1,
529,
9507,
29958,
16953,
29914,
401,
29914,
2324,
287,
262,
29914,
650,
29918,
3827,
29918,
1124,
29918,
2974,
29889,
2272,
13,
5215,
7399,
10493,
6004,
13,
5215,
3142,
5510,
13,
13,
1990,
1619,
4598,
29898,
5160,
10493,
6004,
29889,
... |
_estudoPython_solid/clima-cotacao-dolar/venv/Lib/site-packages/pyowm/weatherapi25/parsers/forecastparser.py | carlos-freitas-gitHub/Python_Analise_De_Dados | 1 | 90368 | """
Module containing a concrete implementation for JSONParser abstract class,
returning Forecast objects
"""
import json
import time
from pyowm.weatherapi25 import location
from pyowm.weatherapi25 import weather
from pyowm.weatherapi25 import forecast
from pyowm.abstractions import jsonparser
from pyowm.exceptions im... | [
1,
9995,
13,
7355,
6943,
263,
18387,
5314,
363,
4663,
11726,
9846,
770,
29892,
13,
2457,
292,
28297,
4384,
3618,
13,
15945,
29908,
13,
13,
5215,
4390,
13,
5215,
931,
13,
3166,
11451,
340,
29885,
29889,
705,
1624,
2754,
29906,
29945,
1... |
genedescriptions/trimming.py | alliance-genome/agr_genedescriptions | 2 | 160139 | import logging
from abc import ABCMeta, abstractmethod
from collections import defaultdict
from typing import List, Set, Union, Tuple, Any
from ontobio import Ontology
from ontobio.assocmodel import AssociationSet
from genedescriptions.commons import CommonAncestor, TrimmingResult
from genedescriptions.ontology_tools... | [
1,
1053,
12183,
13,
3166,
25638,
1053,
16417,
19346,
29892,
9846,
5696,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
19229,
1053,
2391,
29892,
3789,
29892,
7761,
29892,
12603,
552,
29892,
3139,
13,
13,
3166,
11480,
24840,
1053,
18265,
300... |
zinnia/tests/test_feeds.py | julienc91/django-blog-zinnia | 10 | 1608931 | <filename>zinnia/tests/test_feeds.py
# coding=utf-8
"""Test cases for Zinnia's feeds"""
from urllib.parse import urljoin
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.core.exceptions import ObjectDoesNotExist
from django.core.files.base import Conte... | [
1,
529,
9507,
29958,
29920,
2559,
423,
29914,
21150,
29914,
1688,
29918,
1725,
5779,
29889,
2272,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
15945,
29908,
3057,
4251,
363,
796,
2559,
423,
29915,
29879,
1238,
5779,
15945,
29908,
13,
... |
PROCESSOR/MachineLearning.py | leelim81/Pair-Trading-Reinforcement-Learning | 186 | 1614246 | import random
import numpy as np
from MAIN.Basics import Processor, Space
from operator import itemgetter
class StateSpace(Processor, Space):
def __init__(self, agent):
self.agent = agent
super().__init__(agent.config['StateSpaceState'])
def process(self):
self.agent.dat... | [
1,
1053,
4036,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
3166,
14861,
1177,
29889,
9496,
1199,
1053,
10554,
272,
29892,
14121,
30004,
13,
3166,
5455,
1053,
2944,
657,
357,
30004,
13,
30004,
13,
30004,
13,
1990,
4306,
14936,
29898,
1... |
get_vocab.py | Amir-Mehrpanah/hgraph2graph | 182 | 13037 | <gh_stars>100-1000
import sys
import argparse
from hgraph import *
from rdkit import Chem
from multiprocessing import Pool
def process(data):
vocab = set()
for line in data:
s = line.strip("\r\n ")
hmol = MolGraph(s)
for node,attr in hmol.mol_tree.nodes(data=True):
smiles =... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
5215,
10876,
13,
5215,
1852,
5510,
29871,
13,
3166,
298,
4262,
1053,
334,
13,
3166,
364,
29881,
7354,
1053,
12677,
13,
3166,
6674,
307,
... |
src/thornfield/caches/cache_compression_decorator.py | drorvinkler/thornfield | 2 | 3610 | from typing import Callable, AnyStr, Optional
from zlib import compress as default_compress, decompress as default_decompress
from .cache import Cache
from ..constants import NOT_FOUND
class CacheCompressionDecorator(Cache):
def __init__(
self,
cache: Cache,
compress: Optional[Callable[[s... | [
1,
515,
19229,
1053,
8251,
519,
29892,
3139,
5015,
29892,
28379,
13,
3166,
503,
1982,
1053,
27122,
408,
2322,
29918,
510,
2139,
29892,
17753,
2139,
408,
2322,
29918,
311,
510,
2139,
13,
13,
3166,
869,
8173,
1053,
28540,
13,
3166,
6317,
... |
tests/test_UniformFlow.py | RandalJBarnes/Ginebig | 0 | 167200 | <gh_stars>0
import unittest
import cmath
import numpy
from ginebig.analytic_element import AnalyticElement
from ginebig.uniform_flow import UniformFlow
class TestUniformFlow(unittest.TestCase):
"""Test the UniformFlow class."""
# --------------------------------------------------------------------------
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
443,
27958,
13,
5215,
274,
755,
13,
5215,
12655,
13,
13,
3166,
330,
457,
3752,
29889,
7054,
3637,
293,
29918,
5029,
1053,
11597,
3637,
293,
2642,
13,
3166,
330,
457,
3752,
29889... |
krake/krake/controller/scheduler/scheduler.py | rak-n-rok/Krake | 1 | 189903 | <filename>krake/krake/controller/scheduler/scheduler.py<gh_stars>1-10
import asyncio
from datetime import timedelta
import logging
import random
from typing import NamedTuple
from functools import total_ordering
from aiohttp import ClientError
from krake import utils
from krake.data.openstack import (
Project,
... | [
1,
529,
9507,
29958,
29895,
336,
446,
29914,
29895,
336,
446,
29914,
8299,
29914,
816,
14952,
29914,
816,
14952,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
408,
948,
3934,
13,
3166,
12865,
10... |
Python/Python Automation/Python Automation/File Locker/password_manager.py | Yuo86653/File-Locker-made-with-python | 0 | 198831 | <reponame>Yuo86653/File-Locker-made-with-python<filename>Python/Python Automation/Python Automation/File Locker/password_manager.py
import sqlite3
from hashlib import sha256
ADMIN_PASSWORD = "<PASSWORD>"
connect = input("What is your password?\n")
while connect != ADMIN_PASSWORD:
connect = input("What is your ... | [
1,
529,
276,
1112,
420,
29958,
29979,
25608,
29947,
29953,
29953,
29945,
29941,
29914,
2283,
29899,
29931,
8658,
29899,
26350,
29899,
2541,
29899,
4691,
29966,
9507,
29958,
11980,
29914,
11980,
15854,
362,
29914,
11980,
15854,
362,
29914,
228... |
blox/modules/url.py | pollett/blox | 0 | 1602348 | <gh_stars>0
from blox.modules.module import module
from blox.exceptions import *
import urllib2,base64,logging
logger = logging.getLogger( 'blox.url' )
class url(module):
def input(self, params):
logger.debug('getting data from url: %s'%params['url'])
request = urllib2.Request( params['url'] )
if 'proxy... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
6668,
29916,
29889,
7576,
29889,
5453,
1053,
3883,
13,
3166,
6668,
29916,
29889,
11739,
29879,
1053,
334,
13,
5215,
3142,
1982,
29906,
29892,
3188,
29953,
29946,
29892,
21027,
13,
2... |
cellpy/utils/batch_tools/batch_analyzers.py | lithium-ion/cellpy | 1 | 102431 | import logging
import pandas as pd
from cellpy.utils.batch_tools.batch_core import BaseAnalyzer
from cellpy.utils.ocv_rlx import select_ocv_points
from cellpy.exceptions import UnderDefined
class ICAAnalyzer(BaseAnalyzer):
def __init__(self):
super().__init__()
class EISAnalyzer(BaseAnalyzer):
def... | [
1,
1053,
12183,
13,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
3038,
2272,
29889,
13239,
29889,
16175,
29918,
8504,
29889,
16175,
29918,
3221,
1053,
7399,
2744,
14997,
3298,
13,
3166,
3038,
2272,
29889,
13239,
29889,
542,
29894,
29918,
20... |
video_clipping.py | corberan/video_clipper | 27 | 68912 | <gh_stars>10-100
import os
from collections import OrderedDict
from glob import glob
import imageio
import click
def get_formatted_time(seconds):
m, s = divmod(seconds, 60)
h, m = divmod(m, 60)
if h > 0:
return '%02d:%02d:%02d' % (h, m, s)
elif m > 0:
return '%02d:%02d' % (m, s)
el... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
3166,
13149,
1053,
13149,
13,
5215,
1967,
601,
13,
5215,
2828,
13,
13,
13,
1753,
679,
29918,
... |
gg/game.py | willieLjohnson/pygg | 0 | 49118 | from dataclasses import dataclass
import pygame
import pymunk
import pymunk.pygame_util
from . import style
from . import display
from . import structures
@dataclass(unsafe_hash=True)
class Game:
__metaclass__ = structures.IterableObject
name = ""
entities = {}
style = style.GGSTYLE()
space:... | [
1,
515,
848,
13203,
1053,
848,
1990,
13,
5215,
22028,
13,
5215,
282,
962,
2960,
13,
5215,
282,
962,
2960,
29889,
2272,
11802,
29918,
4422,
13,
13,
13,
3166,
869,
1053,
3114,
13,
3166,
869,
1053,
2479,
13,
3166,
869,
1053,
12286,
13,... |
config.py | Flowdeeps/flatearth | 1 | 178406 | #!/usr/bin/env python
import configparser
def getconfig ( input ):
config = configparser.ConfigParser()
config.sections()
config.read( input )
config.sections()
config_dict={}
for section in config:
for var in config[ section ]:
config_dict[ var ] = config[ section ][ var... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
2295,
16680,
13,
13,
1753,
679,
2917,
313,
1881,
29871,
1125,
13,
13,
1678,
2295,
353,
2295,
16680,
29889,
3991,
11726,
580,
13,
1678,
2295,
29889,
27117,
580,
13,
1678,
22... |
Teacher_ListUpdate.py | RMednis/TimeTableDump | 0 | 56009 | <reponame>RMednis/TimeTableDump
###################################
# #
# MedsNET Internal Data Scraper #
# #
###################################
# This script will parse the Data from timetables.xml on the asctimetables server and
# insert it into the ... | [
1,
529,
276,
1112,
420,
29958,
29934,
19302,
6994,
29914,
2481,
3562,
29928,
3427,
13,
13383,
13383,
2277,
29937,
13,
29937,
462,
462,
396,
13,
29937,
29871,
3436,
29879,
6006,
512,
1890,
3630,
2522,
336,
546,
29871,
396,
13,
29937,
462... |
filters_json.py | sazlin/reTOracle | 0 | 177202 | <reponame>sazlin/reTOracle<filename>filters_json.py
import json
filter_list = {"c/cpp": {'search_terms':
{'hashtags': ['#cprogramming', '#clanguage'],
'users': [],
'keywords': ['cplusplus', 'C++']},
'blacklist':
... | [
1,
529,
276,
1112,
420,
29958,
29879,
834,
1915,
29914,
276,
4986,
10792,
29966,
9507,
29958,
26705,
29918,
3126,
29889,
2272,
13,
5215,
4390,
13,
13,
4572,
29918,
1761,
353,
8853,
29883,
29914,
8223,
1115,
11117,
4478,
29918,
357,
1516,
... |
tests/validators/test_genomic_duplication.py | cancervariants/varlex | 0 | 178216 | <reponame>cancervariants/varlex<filename>tests/validators/test_genomic_duplication.py
"""Module for testing Genomic Duplication Validator."""
import unittest
from variation.validators import GenomicDuplication
from variation.classifiers import GenomicDuplicationClassifier
from .validator_base import ValidatorBase
cl... | [
1,
529,
276,
1112,
420,
29958,
3068,
2265,
5927,
1934,
29914,
1707,
2506,
29966,
9507,
29958,
21150,
29914,
3084,
4097,
29914,
1688,
29918,
1885,
25426,
29918,
20908,
1414,
29889,
2272,
13,
15945,
29908,
7355,
363,
6724,
5739,
25426,
18733,... |
ci-tests/tests/__main__.py | fossabot/hoard | 0 | 99873 | <filename>ci-tests/tests/__main__.py<gh_stars>0
import hashlib
import os
import subprocess
import sys
from pathlib import Path
from testers.cleanup import LogCleanupTester
from testers.correct_errors import CorrectErrorsTester
from testers.hoard_diff import DiffCommandTester
from testers.hoard_edit import EditCommandTe... | [
1,
529,
9507,
29958,
455,
29899,
21150,
29914,
21150,
29914,
1649,
3396,
26914,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
6608,
1982,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
5215,
10876,
13,
3166,
2224,
1982,
1053,
... |
input/scrap_record.py | ibrahimberb/My-ELASPIC-Web-API | 0 | 194069 | <reponame>ibrahimberb/My-ELASPIC-Web-API
from bs4 import BeautifulSoup as BS
import re
import logging
logging.basicConfig(level=logging.INFO, format='%(message)s')
def split_pair_occurrence(input_str):
"""
Q9HD36.A79T (x11) → (Q9HD36.A79T, 11)
"""
if '(x' not in input_str:
return input_str, 1... | [
1,
529,
276,
1112,
420,
29958,
747,
19856,
326,
495,
29890,
29914,
3421,
29899,
6670,
3289,
2227,
29907,
29899,
3609,
29899,
8787,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
408,
350,
29903,
13,
5215,
337,
13,
5215,
12183,
13,
13... |
LintCode/DynamicProgramming/20200113_667_longest_palindromic_subsequence.py | Fabriceli/MachingLearning | 0 | 98876 | # -*-coding:utf-8 -*-
#Reference:**********************************************
# @Time : 2020-01-14 00:47
# @Author : <NAME>
# @File : 20200113_667_longest_palindromic_subsequence.py
# @User : liyihao
# @Software : PyCharm
# @Description: Given a string s, find the longest palindromic subsequence's lengt... | [
1,
396,
448,
29930,
29899,
29883,
3689,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
29937,
7422,
29901,
7775,
7775,
4189,
2328,
1068,
13,
29937,
732,
2481,
30081,
20246,
29871,
584,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
298... |
src/cfgparse.py | user12986714/SpamSoup | 0 | 49417 | <reponame>user12986714/SpamSoup<filename>src/cfgparse.py
# coding=utf-8
import json
import decorator
import verinfo
def resolve_path(base, path):
""" Resolve (some) relative path. """
if path[0] == "/":
# Absolute path
return path
return base + path
def depth_first_parser(data_base, rou... | [
1,
529,
276,
1112,
420,
29958,
1792,
29896,
29906,
29929,
29947,
29953,
29955,
29896,
29946,
29914,
5592,
314,
29903,
1132,
29966,
9507,
29958,
4351,
29914,
16859,
5510,
29889,
2272,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
13,
5215... |
filmoteca_api/admin.py | NelsonPenagos/filmoteca-app-api | 0 | 171115 | from django.contrib import admin
from filmoteca_api.models.movie_models import Movie
admin.site.register(Movie)
| [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
2706,
19011,
29918,
2754,
29889,
9794,
29889,
27362,
29918,
9794,
1053,
7871,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
18749,
29897,
13,
2
] |
Level2/Ex_3.py | zac11/Python_Excerices | 2 | 170710 | """
Question:
Write a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence
after sorting them alphabetically.
Suppose the following input is supplied to the program:
without,hello,bag,world
Then, the output should be:
bag,hello,without,world
"""
enter_st... | [
1,
9995,
13,
13,
16492,
29901,
13,
6113,
263,
1824,
393,
21486,
263,
16694,
13055,
5665,
310,
3838,
408,
1881,
322,
14677,
278,
3838,
297,
263,
16694,
29899,
25048,
630,
5665,
13,
7045,
16548,
963,
22968,
1711,
29889,
13,
20182,
852,
... |
tensorflow_probability/python/experimental/mcmc/sample_fold.py | rupei/probability | 0 | 14993 | <gh_stars>0
# Copyright 2020 The TensorFlow Probability Authors.
#
# 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,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
450,
323,
6073,
17907,
1019,
29890,
3097,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079... |
starfish/core/image/Filter/test/test_zero_by_channel_magnitude.py | haoxusci/starfish | 164 | 1608459 | import numpy as np
from starfish import ImageStack
from starfish.core.image.Filter.zero_by_channel_magnitude import ZeroByChannelMagnitude
def create_imagestack_with_magnitude_scale():
"""create an imagestack with increasing magnitudes"""
data = np.linspace(0, 1, 11, dtype=np.float32)
data = np.repeat(dat... | [
1,
1053,
12655,
408,
7442,
13,
13,
3166,
5810,
15161,
1053,
7084,
7264,
13,
3166,
5810,
15161,
29889,
3221,
29889,
3027,
29889,
5072,
29889,
9171,
29918,
1609,
29918,
12719,
29918,
29885,
4211,
4279,
1053,
28933,
2059,
13599,
29924,
4211,
... |
submissions/diverta2019/a.py | m-star18/atcoder | 1 | 54903 | n, k = map(int, input().split())
ans = n-k+1
print(ans)
| [
1,
302,
29892,
413,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
550,
353,
302,
29899,
29895,
29974,
29896,
13,
2158,
29898,
550,
29897,
13,
2
] |
python3/hackerrank_leetcode/defactor_power_sum/main.py | seLain/codesnippets | 0 | 77135 | <filename>python3/hackerrank_leetcode/defactor_power_sum/main.py
import sys, copy
from collections import defaultdict, Counter
sys.setrecursionlimit(10000)
memory = defaultdict(list)
memory[1] = [{1}]
def recur_powerSum(X, N):
#print('enter f(x='+str(X)+')')
if X == 1:
return memory[1]
all_co... | [
1,
529,
9507,
29958,
4691,
29941,
29914,
29882,
28940,
10003,
29918,
280,
300,
401,
29914,
1753,
7168,
29918,
13519,
29918,
2083,
29914,
3396,
29889,
2272,
13,
5215,
10876,
29892,
3509,
13,
3166,
16250,
1053,
2322,
8977,
29892,
315,
5336,
... |
app/appdev.py | student1304/co2 | 0 | 178999 | <gh_stars>0
import streamlit as st
import pandas as pd
#import numpy as np
#import time
from api_tools import get_product_info
# load md text from file and display on page
path_to_md = "./intro.md"
with open(path_to_md, "r") as f:
md_text = f.read()
st.markdown(md_text)
# load and display cart
cart_csv = st.file... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4840,
19411,
408,
380,
13,
5215,
11701,
408,
10518,
13,
29937,
5215,
12655,
408,
7442,
13,
29937,
5215,
931,
13,
3166,
7882,
29918,
8504,
1053,
679,
29918,
4704,
29918,
3888,
13,
... |
common/layers.py | bhneo/FMRouting | 0 | 171513 | import time
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.layers import Layer
from tensorflow.python.keras.utils import tf_utils
from common import utils
from common.ops import ops as custom_ops
from common.ops import transformation
from common.ops.em_routing import em_... | [
1,
1053,
931,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
3166,
26110,
1053,
13023,
294,
13,
3166,
26110,
29889,
3946,
294,
29889,
29277,
1053,
365,
2747,
13,
3166,
26110,
29889,
4691,
29889,
3946,
294,
29889,
13239... |
apps/steam.py | nestorcalvo/Buencafe_dashboard | 0 | 23917 | import dash
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
import pandas as pd
import plotly.express as px
import plotly.graph_objs as go
from datetime import date
import dash_loading_spinners as dls
from dash.dependencies import Input, Output, ClientsideF... | [
1,
1053,
12569,
13,
5215,
12569,
29918,
3221,
29918,
14036,
408,
270,
617,
13,
5215,
12569,
29918,
8704,
29918,
14036,
408,
4833,
29883,
13,
5215,
12569,
29918,
1420,
29918,
14036,
408,
3472,
13,
5215,
11701,
408,
10518,
13,
5215,
6492,
... |
interface.py | chuong/robot-arm-manipulation | 0 | 59532 |
"""
the camera robot, position position must be fixed
in process of calculating transformation, the paper position must be fixed
the final y position must be same as the proginal y position
@author: yuboya
"""
import time
import sys
from DobotSerialInterface import DobotSerialInterface
dobot_interface = DobotSeri... | [
1,
29871,
13,
13,
15945,
29908,
13,
1552,
10656,
19964,
29892,
2602,
2602,
1818,
367,
4343,
13,
262,
1889,
310,
25202,
13852,
29892,
278,
5650,
2602,
1818,
367,
4343,
29871,
13,
1552,
2186,
343,
2602,
1818,
367,
1021,
408,
278,
410,
2... |
hon/preprocessors/variables.py | swquinn/hon | 0 | 57975 | import re
from collections import namedtuple
from hon.utils.numberutils import to_int_ns
from .preprocessor import Preprocessor
class VariablesPreprocessor(Preprocessor):
"""The variable preprocessor.
The variable preprocessor takes the variables defined in the book's
configuration file, i.e. ``book.yaml... | [
1,
1053,
337,
13,
3166,
16250,
1053,
4257,
23583,
13,
3166,
4207,
29889,
13239,
29889,
4537,
13239,
1053,
304,
29918,
524,
29918,
1983,
13,
3166,
869,
1457,
26482,
1053,
4721,
26482,
13,
13,
13,
1990,
9586,
1849,
6572,
26482,
29898,
657... |
App/migrations/0010_remove_user_percentage_preferences_user_preferences.py | dlanghorne0428/StudioMusicPlayer | 0 | 6349 | <filename>App/migrations/0010_remove_user_percentage_preferences_user_preferences.py
# Generated by Django 4.0 on 2022-03-03 02:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('App', '0009_alter_song_holiday_alter_songfileinput_holiday'),
]
o... | [
1,
529,
9507,
29958,
2052,
29914,
26983,
800,
29914,
29900,
29900,
29896,
29900,
29918,
5992,
29918,
1792,
29918,
25376,
482,
29918,
1457,
10662,
29918,
1792,
29918,
1457,
10662,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29946,
... |
src/gt4sd/training_pipelines/paccmann/core.py | hhhsu0825/gt4sd-core | 0 | 101175 | <gh_stars>0
"""PaccMann training utilities."""
from dataclasses import dataclass, field
from typing import Any, Dict
from ..core import TrainingPipeline, TrainingPipelineArguments
class PaccMannTrainingPipeline(TrainingPipeline):
"""PyTorch lightining training pipelines."""
def train( # type: ignore
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
29925,
5753,
29924,
812,
6694,
3667,
1907,
1213,
15945,
13,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
3166,
19229,
1053,
3139,
29892,
360,
919,
13,
13,
3166,... |
HospitalManagement/Landing/views.py | yonathanF/Hospital_Management | 0 | 184720 | <reponame>yonathanF/Hospital_Management
from django.http import HttpResponse
from django.shortcuts import render
def index(request):
''' renders the landing html page ... everything is in the html for this '''
return HttpResponse(render(request, 'Landing/index.html'))
| [
1,
529,
276,
1112,
420,
29958,
29891,
265,
11385,
29943,
29914,
29950,
8189,
29918,
27107,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
13,
13,
13,
1753,
2380,
29898,
3827,
1125,
... |
VTiger_KPI_Dashboard/cases/migrations/0001_initial.py | roovyshapiro/VTiger_Sales_Dashboard | 2 | 56267 | <filename>VTiger_KPI_Dashboard/cases/migrations/0001_initial.py
# Generated by Django 3.0.3 on 2020-12-14 20:35
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Cases',... | [
1,
529,
9507,
29958,
29963,
29911,
4087,
29918,
29968,
2227,
29918,
29928,
1161,
3377,
29914,
11436,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29896,
29918,
11228,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900... |
desafios/des003/des003_p03.py | brenoedl0/python | 0 | 22473 | nota1 = float(input('nota 1: '))
nota2 = float(input('nota 2: '))
media = (nota1 + nota2)/2
print('A media entre a nota 1 e a nota 2 é {}'.format(media))
| [
1,
451,
29874,
29896,
353,
5785,
29898,
2080,
877,
1333,
29874,
29871,
29896,
29901,
525,
876,
13,
1333,
29874,
29906,
353,
5785,
29898,
2080,
877,
1333,
29874,
29871,
29906,
29901,
525,
876,
13,
9799,
353,
313,
1333,
29874,
29896,
718,
... |
venv/lib/python3.5/site-packages/igraph/test/atlas.py | dtklinh/Protein-Rigid-Domains-Estimation | 2 | 7640 | <reponame>dtklinh/Protein-Rigid-Domains-Estimation
import warnings
import unittest
from igraph import *
class TestBase(unittest.TestCase):
def testPageRank(self):
for idx, g in enumerate(self.__class__.graphs):
try:
pr = g.pagerank()
except Exception as ex:
... | [
1,
529,
276,
1112,
420,
29958,
6008,
29895,
1915,
29882,
29914,
1184,
371,
262,
29899,
29934,
335,
333,
29899,
11096,
2708,
29899,
12787,
7715,
13,
13,
13,
5215,
18116,
13,
5215,
443,
27958,
13,
3166,
8919,
1140,
1053,
334,
13,
13,
19... |
python/pytest_fixtures/fizzbuzz.py | zkan/100DaysOfCode | 2 | 138672 | <reponame>zkan/100DaysOfCode
class FizzBuzz(object):
def say(self, number):
if number % 3 == 0 and number % 5 == 0:
return 'FizzBuzz'
elif number % 3 == 0:
return 'Fizz'
elif number % 5 == 0:
return 'Buzz'
else:
return number
| [
1,
529,
276,
1112,
420,
29958,
7730,
273,
29914,
29896,
29900,
29900,
25991,
2776,
3399,
13,
1990,
383,
4981,
29933,
18813,
29898,
3318,
1125,
13,
1678,
822,
1827,
29898,
1311,
29892,
1353,
1125,
13,
4706,
565,
1353,
1273,
29871,
29941,
... |
algoanim/stats.py | Gaming32/Python-AlgoAnim | 0 | 32513 | <reponame>Gaming32/Python-AlgoAnim<filename>algoanim/stats.py
class Stats:
writes: int
reads: int
accesses: int
def __init__(self) -> None:
self.reset()
def reset(self) -> None:
self.writes = 0
self.reads = 0
self.accesses = 0
def add_reads(self, count: int = 1... | [
1,
529,
276,
1112,
420,
29958,
29954,
11500,
29941,
29906,
29914,
11980,
29899,
2499,
1484,
21645,
29966,
9507,
29958,
284,
1484,
11576,
29914,
16202,
29889,
2272,
13,
1990,
624,
1446,
29901,
13,
1678,
15873,
29901,
938,
13,
1678,
13623,
... |
python/iter/generator1.py | bismog/leetcode | 0 | 1613388 | <reponame>bismog/leetcode<filename>python/iter/generator1.py
#!/usr/bin/env python
#-*- coding:utf-8 -*-
def count():
c = 0
while True:
c = c + 1
yield c
a = count()
print a.next()
print a.send(None)
# print a.send()
print a.next()
b = a.__iter__()
print b.next()
c = count()
print c.next()
... | [
1,
529,
276,
1112,
420,
29958,
29890,
1608,
468,
29914,
280,
300,
401,
29966,
9507,
29958,
4691,
29914,
1524,
29914,
27959,
29896,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
29899,
29930,
29899,
14137,
... |
app/dropins/adafruit_bme280.py | NaeiKinDus/ANCS | 0 | 74248 | # -*- coding: utf-8 -*-
from app.core.dropin.base_i2c_dropin import BaseI2CDropIn
from logging import Logger
from prometheus_client import Gauge, Counter, metrics, Info, Enum
from typing import Optional, Dict
class DropIn(BaseI2CDropIn):
"""
Drop-in to use Adafruit's BME280 sensor using I2C.
"""
DEFA... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
623,
29889,
3221,
29889,
8865,
262,
29889,
3188,
29918,
29875,
29906,
29883,
29918,
8865,
262,
1053,
7399,
29902,
29906,
6530,
1336,
797,
13,
3... |
ajit.py | kuehnelth/aheui-editor | 1 | 157145 | import os
import sys
def do_nothing(machine, code):
pass
def exit_machine(machine, code):
machine.terminate_flag = True
def select_storage(machine, code):
machine.select_storage(code)
def send(machine, code):
machine.current_storage.send(machine.get_storage(code))
def compare(machine, code):
st... | [
1,
1053,
2897,
13,
5215,
10876,
13,
13,
1753,
437,
29918,
28450,
29898,
23523,
29892,
775,
1125,
13,
1678,
1209,
13,
13,
1753,
6876,
29918,
23523,
29898,
23523,
29892,
775,
1125,
13,
1678,
4933,
29889,
18821,
403,
29918,
15581,
353,
585... |
electrum/dnssec.py | Jesusown/electrum | 5,905 | 321 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 <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 without limitati... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
13,
29937,
10513,
5848,
448,
3578,
7915,
18531,
1111,
262,
3132,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29945,
529,
5813,
29958,
13,
29937,
13,
299... |
arni_countermeasure/src/arni_countermeasure/reaction_publish_rosout_node.py | UTNuclearRobotics/arni | 16 | 49791 | from reaction import *
import rospy
class ReactionPublishRosOutNode(Reaction):
"""A reaction that is able to publish a message on rosout."""
def __init__(self, autonomy_level, message, loglevel):
super(ReactionPublishRosOutNode, self).__init__(None, autonomy_level)
#: The message to publish... | [
1,
515,
19848,
1053,
334,
13,
5215,
696,
1028,
29891,
13,
13,
13,
1990,
830,
2467,
21076,
1674,
29934,
359,
3744,
4247,
29898,
1123,
2467,
1125,
13,
13,
1678,
9995,
29909,
19848,
393,
338,
2221,
304,
9805,
263,
2643,
373,
14652,
449,
... |
src/surfclass/__init__.py | plimkilde/surfclass | 3 | 152194 | """Process LiDAR data into a surface clasified raster."""
from collections import namedtuple
__version__ = "0.0.1"
__description__ = "Processes Lidar-Data into a surface classified raster"
__author__ = "<NAME>"
__email__ = "<EMAIL>"
__uri__ = "https://github.com/septima/surfclass"
__license__ = "Licensed under the MIT... | [
1,
9995,
7032,
2718,
29928,
1718,
848,
964,
263,
7101,
22215,
2164,
364,
1901,
1213,
15945,
13,
3166,
16250,
1053,
4257,
23583,
13,
13,
1649,
3259,
1649,
353,
376,
29900,
29889,
29900,
29889,
29896,
29908,
13,
1649,
8216,
1649,
353,
376... |
Curso de Desarrollo Web con Flask/Flask/example7.py | Emir-97/My-practices-with-Flask | 0 | 1604929 | <reponame>Emir-97/My-practices-with-Flask
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
#SE CREA EL DIRECTORIO DE NUESTRO ARCHIVO PARA LA BASE DE DATOS
directory = os.path.abspath(os.path.dirname(__file__))
app = Flask(__name__)
#SE CONFIGURA LA... | [
1,
529,
276,
1112,
420,
29958,
6026,
381,
29899,
29929,
29955,
29914,
3421,
29899,
29886,
1461,
1575,
29899,
2541,
29899,
8754,
1278,
13,
5215,
2897,
30004,
13,
3166,
29784,
1053,
2379,
1278,
30004,
13,
3166,
29784,
29918,
2850,
284,
305,... |
Tests/modules/misc/test_system_namespaces.py | aisk/ironpython3 | 1,872 | 136332 | <filename>Tests/modules/misc/test_system_namespaces.py
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
'''
Ensures we can import from .NET 2.0 namespaces and ty... | [
1,
529,
9507,
29958,
24376,
29914,
7576,
29914,
29885,
10669,
29914,
1688,
29918,
5205,
29918,
7039,
22459,
29889,
2272,
13,
29937,
10413,
21144,
304,
278,
869,
6006,
10606,
1090,
697,
470,
901,
8571,
4110,
29889,
13,
29937,
450,
869,
600... |
config/tools/export.py | ghjinlei/one_mmorpg | 0 | 37181 | #!/usr/bin/env python3
#coding:utf-8
import os, sys
from sys import exit
from utils.excel import read_excel_data
import utils.path as utils_path
from utils.logger import Logger
os.chdir(utils_path.TOOLS_ROOT_PATH)
key_map = {
"cmd" : "string",
"lang" : "string",
"script" : "s... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
29883,
3689,
29901,
9420,
29899,
29947,
13,
13,
5215,
2897,
29892,
10876,
13,
3166,
10876,
1053,
6876,
13,
3166,
3667,
29879,
29889,
24633,
1053,
1303,
29918,
24633,
29918,
... |
Chatbot.py | stardust55/SoniFer | 0 | 53729 | <gh_stars>0
# import Chatbot module from chatterbot library
# import ChatterBotCorpusTrainer from chatterbot.trainers library
# import ListTrainer from chatterbot.trainers library
# importing json file
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.trainers ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
1053,
678,
271,
7451,
3883,
515,
521,
2620,
7451,
3489,
30004,
13,
29937,
1053,
678,
2620,
29933,
327,
12521,
13364,
5323,
4983,
515,
521,
2620,
7451,
29889,
14968,
414,
3489,
30... |
core/network/utils.py | jlin/inventory | 22 | 50154 | <gh_stars>10-100
from core.network.models import Network
def calc_networks(network, nq=None):
network.update_network()
eldars = []
sub_networks = []
if not nq:
nq = Network.objects.all()
for pnet in nq.order_by('prefixlen', 'ip_upper', 'ip_lower'):
pnet.update_network()
if... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
7136,
29889,
11618,
29889,
9794,
1053,
8527,
13,
13,
13,
1753,
22235,
29918,
11618,
29879,
29898,
11618,
29892,
302,
29939,
29922,
8516,
1125,
13,
... |
service/service.py | caohui-ouba/cadvis-graph-analysis-server | 1 | 134246 | import networkx as nx
from entity.entity import Graph, Node
from node2vec import Node2Vec
import numpy as np
from gensim.models.word2vec import Word2Vec
from flask import current_app
from sklearn.decomposition import PCA
from sklearn import manifold
from algorithm.search_community import PyLouvain
from algorithm.simila... | [
1,
1053,
3564,
29916,
408,
302,
29916,
13,
3166,
7855,
29889,
10041,
1053,
12367,
29892,
9071,
13,
3166,
2943,
29906,
2003,
1053,
9071,
29906,
25987,
13,
5215,
12655,
408,
7442,
13,
3166,
26943,
326,
29889,
9794,
29889,
1742,
29906,
2003,... |
stockquant/odl/tushare/util.py | dabuc/StockQuant | 0 | 140998 | from stockquant.util import logger
from datetime import datetime
from stockquant.settings import CQ_Config
from stockquant.util.models import TaskTable
from stockquant.util.stringhelper import TaskEnum
import concurrent.futures
from stockquant.util.database import get_new_session
from tqdm import tqdm
import time
impor... | [
1,
515,
10961,
12150,
29889,
4422,
1053,
17927,
13,
3166,
12865,
1053,
12865,
13,
3166,
10961,
12150,
29889,
11027,
1053,
315,
29984,
29918,
3991,
13,
3166,
10961,
12150,
29889,
4422,
29889,
9794,
1053,
9330,
3562,
13,
3166,
10961,
12150,
... |
oops_fhir/r4/value_set/provenance_activity_type.py | Mikuana/oops_fhir | 0 | 33213 | <gh_stars>0
from pathlib import Path
from fhir.resources.valueset import ValueSet as _ValueSet
from oops_fhir.utils import ValueSet
from oops_fhir.r4.code_system.v3_participation_type import v3ParticipationType
__all__ = ["ProvenanceActivityType"]
_resource = _ValueSet.parse_file(Path(__file__).with_suffix(".jso... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
3166,
285,
29882,
381,
29889,
13237,
29889,
5975,
300,
1053,
7865,
2697,
408,
903,
1917,
2697,
13,
13,
3166,
288,
3554,
29918,
29888,
29882,
381,
... |
client/ros2/pymkeros2/pymkeros2/pymkeros2_node.py | MagikEyeInc/SDK | 12 | 112280 | <reponame>MagikEyeInc/SDK
#!/usr/bin/env python3
"""
* python_mkeros2_node
*
* Copyright (c) 2020-2021, Magik-Eye Inc.
* author: <NAME>, <EMAIL>
"""
# ============================================================================
# ROS2
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import PointCloud2, P... | [
1,
529,
276,
1112,
420,
29958,
19095,
638,
29923,
4099,
797,
29883,
29914,
26912,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
13,
29930,
3017,
29918,
29885,
3946,
359,
29906,
29918,
3177,
13,
29930,
13... |
arjuna/core/discovery.py | test-mile/arjuna | 9 | 177044 | '''
This file is a part of Test Mile Arjuna
Copyright 2018 Test Mile Software Testing Pvt Ltd
Website: www.TestMile.com
Email: support [at] testmile.com
Creator: <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 cop... | [
1,
14550,
13,
4013,
934,
338,
263,
760,
310,
4321,
341,
488,
826,
29926,
4347,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29947,
4321,
341,
488,
18540,
4321,
292,
349,
21908,
19806,
13,
13,
3609,
2746,
29901,
7821,
29889,
3057,
29924,... |
examples/trackers.py | noah-ziethen/py-pde | 0 | 135063 | """
Using simulation trackers
=========================
This example illustrates how trackers can be used to analyze simulations.
"""
from pde import (DiffusionPDE, UnitGrid, ScalarField, MemoryStorage,
PlotTracker, PrintTracker, RealtimeIntervals)
grid = UnitGrid([32, 32]) # generate grid
state = ... | [
1,
9995,
13,
15156,
17402,
5702,
414,
13,
9166,
4936,
29922,
13,
13,
4013,
1342,
8632,
1078,
920,
5702,
414,
508,
367,
1304,
304,
27599,
23876,
29889,
13,
15945,
29908,
13,
13,
3166,
282,
311,
1053,
313,
26023,
3958,
29925,
2287,
2989... |
7. Call function using a button.py | codingprivacy/Developing-GUI-with-Python-Tkinter | 1 | 162058 | import tkinter as tk
root = tk.Tk()
root.title("CodingPrivacy")
root.geometry("300x150")
def func():
print("Button is clicked!!")
btn = tk.Button(root, text="click here", command = func)
btn.pack(side="top")
root.mainloop()
| [
1,
1053,
18883,
1639,
408,
18883,
13,
13,
4632,
353,
18883,
29889,
29911,
29895,
580,
13,
4632,
29889,
3257,
703,
29907,
3689,
29925,
1150,
4135,
1159,
13,
4632,
29889,
19156,
703,
29941,
29900,
29900,
29916,
29896,
29945,
29900,
1159,
13... |
keras/lstm_my.py | mobarski/sandbox | 0 | 44358 | text = """
ala ma kota
a kot ma ale
"""
# ------------------------------------------------------------------------------
# TODO as class
chars = list(sorted(set(text))) # stabilne indeksy
len_chars = len(chars)+1
c_to_i = {c:i+1 for i,c in enumerate(chars)}
i_to_c = {i+1:c for i,c in enumerate(chars)}
def text_to_i... | [
1,
1426,
353,
9995,
13,
2883,
611,
413,
4616,
13,
29874,
21062,
611,
8080,
13,
15945,
29908,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
13,
29937,
14402,
408,
770,
13,
13,
305,
1503,
353,
1051,
29898,
24582,
29898,
... |
src/api/handlers/projects/tokens.py | sap-steffen/InfraBox | 50 | 23465 | <filename>src/api/handlers/projects/tokens.py<gh_stars>10-100
from flask import request, g, abort
from flask_restplus import Resource, fields
from pyinfrabox.utils import validate_uuid4
from pyinfraboxutils.ibflask import auth_required, OK
from pyinfraboxutils.ibrestplus import api
from pyinfraboxutils.token import en... | [
1,
529,
9507,
29958,
4351,
29914,
2754,
29914,
3179,
9306,
29914,
16418,
29914,
517,
12360,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
29784,
1053,
2009,
29892,
330,
29892,
27450,
... |
geolocations_service/service/brumadinho/migrations/0002_auto_20190129_2219.py | JBezerra/brumadinho_location | 666 | 160118 | # Generated by Django 2.1.3 on 2019-01-29 22:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('brumadinho', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='FoundPeople',
... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29896,
29889,
29941,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29896,
29899,
29906,
29929,
29871,
29906,
29906,
29901,
29896,
29929,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
mandelbruh/util.py | pereradrian/mandelbruh | 0 | 4869 | import numpy as np
def normalize(x):
return x / np.linalg.norm(x)
def norm_sq(v):
return np.dot(v,v)
def norm(v):
return np.linalg.norm(v)
def get_sub_keys(v):
if type(v) is not tuple and type(v) is not list:
return []
return [k for k in v if type(k) is str]
def to_vec3(v):
if isinstance(v, (float, int)):
... | [
1,
1053,
12655,
408,
7442,
13,
13,
1753,
4226,
675,
29898,
29916,
1125,
13,
12,
2457,
921,
847,
7442,
29889,
29880,
979,
29887,
29889,
12324,
29898,
29916,
29897,
13,
13,
1753,
6056,
29918,
3044,
29898,
29894,
1125,
13,
12,
2457,
7442,
... |
python_module/SuperGLU/Services/TextProcessing/Tests/Inflect/test_pl_si.py | GeneralizedLearningUtilities/SuperGLU | 8 | 168448 |
# use nosetest to run these tests
from nose.tools import eq_
import inflect
FNAME = 'tests/words.txt'
# FNAME = 'tests/list-of-nouns.txt'
# FNAME = '/usr/share/dict/british-english'
# FNAME = 'tricky.txt'
def getwords():
words = open(FNAME).readlines()
words = [w.strip() for w in words]
return words
... | [
1,
29871,
13,
29937,
671,
7814,
300,
342,
304,
1065,
1438,
6987,
13,
13,
3166,
26414,
29889,
8504,
1053,
11594,
29918,
13,
13,
5215,
3041,
781,
13,
13,
29943,
5813,
353,
525,
21150,
29914,
9303,
29889,
3945,
29915,
13,
29937,
383,
581... |
[Kaleido-subs]/Dropped/FGO - Absolute Demonic Front - Babylonia/ac_Babylonia_00.py | tuilakhanh/Encoding-Projects | 57 | 92735 | <reponame>tuilakhanh/Encoding-Projects
#!/usr/bin/env python3
import vapoursynth as vs
import audiocutter
import lvsfunc as lvf
from subprocess import call
core = vs.core
ts_in = r'G:/src/[Funimation] Fate Grand Order Zettai Majuu Sensen Babylonia - 00 [1080p].mkv'
src = lvf.src(ts_in)
ac = audiocutter.AudioCutter(... | [
1,
529,
276,
1112,
420,
29958,
9161,
309,
557,
5403,
29882,
29914,
14934,
29899,
25119,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
325,
481,
2470,
948,
386,
408,
7186,
13,
5215,
16147,
542,
6463,
13,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.