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 |
|---|---|---|---|---|---|
data.py | Broxibear97/ABSA-Honours | 0 | 100179 | # This class was created to be the goto for any functions that involve data manipulation or reading.
import os
import xml.etree.ElementTree as ET
import praw
# read xml from file.
def get_xml_data(file):
tree = ET.parse(file)
reviews = tree.findall('review')
text, labels = [], []
for review in revi... | [
1,
396,
910,
770,
471,
2825,
304,
367,
278,
2355,
29877,
363,
738,
3168,
393,
25135,
848,
11525,
2785,
470,
5183,
29889,
13,
13,
5215,
2897,
13,
5215,
4903,
29889,
300,
929,
29889,
2642,
9643,
408,
382,
29911,
13,
5215,
20467,
13,
1... |
tests/test_stardist2D.py | ianbgroves/stardist | 1 | 15472 | import numpy as np
from stardist import star_dist, relabel_image_stardist
import pytest
from utils import random_image, real_image2d, check_similar, circle_image
@pytest.mark.parametrize('img', (real_image2d()[1], random_image((128, 123))))
@pytest.mark.parametrize('n_rays', (4, 16, 32))
def test_types(img, n_rays):
... | [
1,
1053,
12655,
408,
7442,
13,
3166,
380,
538,
391,
1053,
5810,
29918,
5721,
29892,
1104,
1107,
29918,
3027,
29918,
303,
538,
391,
13,
5215,
11451,
1688,
13,
3166,
3667,
29879,
1053,
4036,
29918,
3027,
29892,
1855,
29918,
3027,
29906,
2... |
test/test_python/range_usage.py | liuyuqi123/scenario_runner | 0 | 122218 | <reponame>liuyuqi123/scenario_runner<gh_stars>0
a = range(2, 10, 2)
b = list(a)
c = [a]
print('')
| [
1,
529,
276,
1112,
420,
29958,
492,
8631,
29884,
26461,
29896,
29906,
29941,
29914,
1557,
24893,
29918,
27492,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
13,
29874,
353,
3464,
29898,
29906,
29892,
29871,
29896,
29900,
29892,
2987... |
models.py | sumukhaithal6/Enduro-Imitation-Learning | 1 | 102228 | <reponame>sumukhaithal6/Enduro-Imitation-Learning
#!/usr/bin/env python3
"""
Model architecture.
Authors:
LICENCE:
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
class SimpleNet(nn.Module):
"""Test net."""
def __init__(self):
"""Ctor."""
super().__init__()
sel... | [
1,
529,
276,
1112,
420,
29958,
2083,
2679,
2350,
389,
284,
29953,
29914,
5044,
2192,
29899,
1888,
7018,
29899,
29931,
799,
1076,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
13,
3195,
11258,
29889,
13,
... |
python_code_tips/functions_example/functions-before.py | VLTSankalpa/python_networking | 0 | 40930 | <filename>python_code_tips/functions_example/functions-before.py
#! /usr/bin/env python
import requests
import json
import argparse
# Diable InsecureRequestWarning
requests.packages.urllib3.disable_warnings(
requests.packages.urllib3.exceptions.InsecureRequestWarning
)
# DevNet Always-On Sandbox DNA C... | [
1,
529,
9507,
29958,
4691,
29918,
401,
29918,
2034,
567,
29914,
12171,
29918,
4773,
29914,
12171,
29899,
11083,
29889,
2272,
13,
29937,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
30004,
13,
30004,
13,
5215,
7274,
30004,
13,
5215,
4... |
towel/incubator/frankenresource.py | enterstudio/towel | 0 | 153437 | from __future__ import absolute_import, unicode_literals
import httplib
from django.contrib.messages.api import get_messages
from towel.api import Resource, APIException
class FrankenResource(Resource):
"""
Really ugly and hacky way of reusing customizations made in a ``ModelView``
subclass for API res... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
13,
13,
5215,
1732,
1982,
13,
13,
3166,
9557,
29889,
21570,
29889,
19158,
29889,
2754,
1053,
679,
29918,
19158,
13,
13,
3166,
304,
20466,
29889,
... |
Chap_07/exe_156_sum_collection_numbers.py | aleattene/python-workbook | 0 | 150759 | """
The program SUMS all of the NUMBERS entered by the USER,
while ignoring any input that is not a VALID NUMBER.
"""
# Import MATH module
import math
# Acquisition and Control of the DATA entered by the USER
number = input("Enter the NUMBER to add: ")
numbers = []
while number != "":
try:
# Storing the ... | [
1,
9995,
13,
1576,
1824,
20134,
4345,
599,
310,
278,
28019,
13635,
29903,
7802,
491,
278,
3148,
1001,
29892,
13,
8000,
5330,
8253,
738,
1881,
393,
338,
451,
263,
12599,
1367,
28019,
13635,
29889,
13,
15945,
29908,
13,
13,
29937,
16032,
... |
bindings/pydeck/docs/scripts/embed_examples.py | marsupialmarcos/deck.gl | 2 | 2695 | """Script to embed pydeck examples into .rst pages with code
These populate the files you see once you click into a grid cell
on the pydeck gallery page
"""
from multiprocessing import Pool
import os
import subprocess
import sys
from const import DECKGL_URL_BASE, EXAMPLE_GLOB, GALLERY_DIR, HTML_DIR, HOSTED_STATIC_PAT... | [
1,
9995,
4081,
304,
8297,
11451,
16565,
6455,
964,
869,
29878,
303,
6515,
411,
775,
13,
13,
1349,
968,
19450,
278,
2066,
366,
1074,
2748,
366,
2828,
964,
263,
6856,
3038,
13,
265,
278,
11451,
16565,
23363,
1813,
13,
15945,
29908,
13,
... |
invest_ml/model_funcs.py | convergenceIM/invest-ML | 6 | 53645 | <reponame>convergenceIM/invest-ML<filename>invest_ml/model_funcs.py
'''
Copyright Convergence Investement Management (2018) All rights reserved.
''' | [
1,
529,
276,
1112,
420,
29958,
535,
369,
10238,
7833,
29914,
262,
10147,
29899,
1988,
29966,
9507,
29958,
262,
10147,
29918,
828,
29914,
4299,
29918,
7692,
2395,
29889,
2272,
13,
12008,
13,
11882,
1266,
1281,
369,
10238,
512,
10147,
882,
... |
dnn/get_safe_balanced_split.py | takashi-matsushita/lab | 0 | 135005 | def get_safe_balanced_split(target, train_ratio=0.8, get_test_indices=True, shuffle=False, seed=None):
classes, counts = np.unique(target, return_counts=True)
num_per_class = float(len(target))*float(train_ratio)/float(len(classes))
if num_per_class > np.min(counts):
print("Insufficient data to produce a bala... | [
1,
822,
679,
29918,
11177,
29918,
5521,
8362,
29918,
5451,
29898,
5182,
29892,
7945,
29918,
3605,
601,
29922,
29900,
29889,
29947,
29892,
679,
29918,
1688,
29918,
513,
1575,
29922,
5574,
29892,
528,
21897,
29922,
8824,
29892,
16717,
29922,
... |
src/book/migrations/0005_alter_book_video.py | benniphilipp/dj_ajax | 0 | 152078 | # Generated by Django 3.2.7 on 2021-09-14 09:00
from django.db import migrations
import embed_video.fields
class Migration(migrations.Migration):
dependencies = [
('book', '0004_alter_book_video'),
]
operations = [
migrations.AlterField(
model_name='book',
name='... | [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29906,
29889,
29955,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29929,
29899,
29896,
29946,
29871,
29900,
29929,
29901,
29900,
29900,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
... |
cssws/db/dao/userdb.py | jaywoong/learn_django | 0 | 1616560 | # userdb.py Control 역할
import sqlite3
from db.frame.sqlitedao import SqliteDao
from db.sql.sql import Sql
from db.vo.uservo import UserVO
class UserDB(SqliteDao):
def __init__(self, dbName):
super().__init__(dbName);
def insert(self, u):
cc = self.getConn();
cc['cursor'].execute(Sql.i... | [
1,
396,
1404,
2585,
29889,
2272,
11264,
29871,
31987,
240,
152,
163,
13,
5215,
21120,
29941,
13,
13,
3166,
4833,
29889,
2557,
29889,
2850,
1573,
6241,
1053,
13093,
568,
29928,
6241,
13,
3166,
4833,
29889,
2850,
29889,
2850,
1053,
13093,
... |
ref_task/models/conv_models.py | asappresearch/texrel | 0 | 94512 | <filename>ref_task/models/conv_models.py
from typing import Iterable, Optional, List
from torch import nn
# import abc
import torch
# from ref_task.models import common_models
# from ref_task.models import pre_conv as pre_conv_lib
class CNNModel(nn.Module):
def __init__(
self, grid_planes: int, cnn_si... | [
1,
529,
9507,
29958,
999,
29918,
7662,
29914,
9794,
29914,
20580,
29918,
9794,
29889,
2272,
13,
3166,
19229,
1053,
20504,
519,
29892,
28379,
29892,
2391,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
29937,
1053,
25638,
13,
5215,
4842,
305,
... |
utils/camera.py | THU-luvision/SurRF | 3 | 105990 | import pdb
import copy
import numpy as np
import os
import scipy
import math
import torch
import torch
from pytorch3d.transforms import euler_angles_to_matrix, matrix_to_euler_angles
def read_total_poses(cam_file_path):
with open(cam_file_path) as f:
lines = f.readlines()
index_list = np.array(list(... | [
1,
1053,
282,
2585,
13,
5215,
3509,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
5215,
4560,
2272,
13,
5215,
5844,
13,
5215,
4842,
305,
13,
13,
5215,
4842,
305,
13,
3166,
282,
3637,
25350,
29941,
29881,
29889,
9067,
29879,
1053,
... |
tests/test_clients.py | rodrigoapereira/python-hydra-sdk | 0 | 9690 | # Copyright (C) 2017 O.S. Systems Software LTDA.
# This software is released under the MIT License
import unittest
from hydra import Hydra, Client
class ClientsTestCase(unittest.TestCase):
def setUp(self):
self.hydra = Hydra('http://localhost:4444', 'client', 'secret')
self.client = Client(
... | [
1,
396,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29955,
438,
29889,
29903,
29889,
23985,
18540,
365,
29911,
7698,
29889,
13,
29937,
910,
7047,
338,
5492,
1090,
278,
341,
1806,
19245,
13,
13,
5215,
443,
27958,
13,
13,
... |
tests/test_binaryop_add.py | ioancornea/niveristand-python | 6 | 139222 | import sys
from niveristand import nivs_rt_sequence
from niveristand import realtimesequencetools
from niveristand.clientapi import ChannelReference, DoubleValue, I32Value
from niveristand.clientapi import RealTimeSequence
from niveristand.errors import TranslateError, VeristandError
from niveristand.library.primitives... | [
1,
1053,
10876,
13,
3166,
302,
2147,
391,
392,
1053,
302,
440,
29879,
29918,
2273,
29918,
16506,
13,
3166,
302,
2147,
391,
392,
1053,
1855,
9346,
968,
339,
3977,
300,
8789,
13,
3166,
302,
2147,
391,
392,
29889,
4645,
2754,
1053,
17368... |
pypy/translator/cli/rte.py | benoitc/pypy | 1 | 149322 | <gh_stars>1-10
"""
Support for an automatically compiled Run Time Environment.
The source of the RTE is in the src/ directory.
"""
import os
import os.path
import shutil
import py
import subprocess
from pypy.translator.cli.sdk import SDK
from pypy.tool.ansi_print import ansi_log
log = py.log.Producer("cli")
py.log.set... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
14039,
363,
385,
6336,
13126,
7525,
5974,
16738,
29889,
13,
1576,
2752,
310,
278,
390,
4330,
338,
297,
278,
4765,
29914,
3884,
29889,
13,
15945,
2... |
migcon/attachment_info.py | rappdw/migcon | 0 | 139016 | <gh_stars>0
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List
from markdown_it.token import Token
@dataclass
class Attachment:
"""
A class to hold information about an attachment. With Page attachments in confluence, multiple files
can share the same name, also with... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
848,
13203,
1053,
848,
1990,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
13,
13,
3166,
2791,
3204,
29918,
277,
29889,
6979,
1053,
25159,
13,
... |
cyberfloodClient/cyberfloodClient.py | acastaner/cf-py-cfclient | 0 | 99705 | <gh_stars>0
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import requests
import json
import pickle
import logging
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
class CfClient:
def __init__(self, userName, userPassword, controllerAddress):
self.userName = us... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
7274,
29889,
8318,
29889,
2271,
1982,
29941,
29889,
11739,
29879,
1053,
512,
24216,
3089,
22709,
13,
5215,
7274,
13,
5215,
4390,
13,
5215,
5839,
280,
13,
5215,
12183,
13,
24830,
2... |
djangosige/apps/cadastro/models/empresa.py | MateusMolina/lunoERP | 0 | 6525 | # -*- coding: utf-8 -*-
import os
from django.db import models
from django.db.models.signals import post_delete
from django.dispatch import receiver
from .base import Pessoa
from djangosige.apps.login.models import Usuario
from djangosige.configs.settings import MEDIA_ROOT
def logo_directory_path(inst... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
5215,
2897,
30004,
13,
30004,
13,
3166,
9557,
29889,
2585,
1053,
4733,
30004,
13,
3166,
9557,
29889,
2585,
29889,
9794,
29889,
4530,
13... |
anyconfig/backend/json.py | masatake/python-anyconfig | 0 | 64670 | #
# Copyright (C) 2011 - 2018 <NAME> <<EMAIL>>
# License: MIT
#
# Ref. python -c "import json; help(json)"
#
# pylint: disable=import-error
r"""JSON backend:
- Format to support: JSON, http://www.json.org
- Requirements: json in python standard library (>= python 2.6) or simplejson
- Development Status :: 5 - Producti... | [
1,
396,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29896,
448,
29871,
29906,
29900,
29896,
29947,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
19245,
29901,
341,
1806,
13,
29937,
13,
29937,
9897,
29889,
... |
messages/GetActiveHostsResponseMessage.py | zadjii/nebula | 2 | 198562 | # last generated 2016-04-10 21:56:22.756000
from messages import BaseMessage
from msg_codes import GET_ACTIVE_HOSTS_RESPONSE as GET_ACTIVE_HOSTS_RESPONSE
__author__ = 'Mike'
class GetActiveHostsResponseMessage(BaseMessage):
def __init__(self, cloud=None):
# type: (Cloud) -> None
super(GetActiveHo... | [
1,
396,
1833,
5759,
29871,
29906,
29900,
29896,
29953,
29899,
29900,
29946,
29899,
29896,
29900,
29871,
29906,
29896,
29901,
29945,
29953,
29901,
29906,
29906,
29889,
29955,
29945,
29953,
29900,
29900,
29900,
13,
3166,
7191,
1053,
7399,
3728,
... |
src/features/videos/speech/extract_speech.py | ClaasM/VideoArticleRetrieval | 0 | 41282 | import os
from pocketsphinx import AudioFile
from pocketsphinx import Pocketsphinx
from src import util
test_video = os.environ['DATA_PATH'] + "/other/sphinx_test_video/beachball.mp4"
test_audio = os.environ['DATA_PATH'] + "/other/sphinx_test_audio/interview.wav"
fps = 100 # default
audio_file = AudioFile(audio_fil... | [
1,
1053,
2897,
13,
3166,
772,
9737,
561,
14668,
1053,
21764,
2283,
13,
3166,
772,
9737,
561,
14668,
1053,
349,
1698,
1691,
561,
14668,
13,
3166,
4765,
1053,
3667,
13,
13,
1688,
29918,
9641,
353,
2897,
29889,
21813,
1839,
14573,
29918,
... |
tests/test_cases.py | dcramer/exam | 1 | 1602414 | from mock import sentinel, MagicMock
from unittest2 import TestCase
import itertools
from exam.decorators import fixture, before, after, around, patcher
from exam.cases import Exam
from describe import expect
from dummy import get_thing, get_it
class FakeTest(object):
def __init__(self):
self.cleanups... | [
1,
515,
11187,
1053,
2665,
262,
295,
29892,
26494,
18680,
13,
3166,
443,
27958,
29906,
1053,
4321,
8259,
13,
5215,
4256,
8504,
13,
13,
3166,
4392,
29889,
19557,
4097,
1053,
5713,
15546,
29892,
1434,
29892,
1156,
29892,
2820,
29892,
13261,... |
quffka/gq.py | maremun/quffka | 15 | 144781 | <reponame>maremun/quffka<gh_stars>10-100
# enconding: utf-8
# gaussquad.py
# TODO fix Documentation
import numpy as np
import numpy.polynomial.hermite as herm
from .basics import get_D
def generate_gq_weights(d, n, deg=2):
'''
Subsample points and weights for Gauss-Hermite quadrature.
Args
d... | [
1,
529,
276,
1112,
420,
29958,
29885,
598,
24579,
29914,
339,
600,
1335,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
259,
427,
1116,
292,
29901,
23616,
29899,
29947,
13,
29937,
259,
330,
112... |
deps/lib/python3.5/site-packages/netdisco/discoverables/samsung_tv.py | jfarmer08/hassio | 78 | 6537 | """Discover Samsung Smart TV services."""
from . import SSDPDiscoverable
from ..const import ATTR_NAME
# For some models, Samsung forces a [TV] prefix to the user-specified name.
FORCED_NAME_PREFIX = '[TV]'
class Discoverable(SSDPDiscoverable):
"""Add support for discovering Samsung Smart TV services."""
de... | [
1,
9995,
4205,
11911,
317,
28935,
4116,
442,
5648,
5786,
1213,
15945,
13,
3166,
869,
1053,
5886,
11191,
4205,
11911,
519,
13,
3166,
6317,
3075,
1053,
15531,
5659,
29918,
5813,
13,
13,
29937,
1152,
777,
4733,
29892,
317,
28935,
8249,
263... |
nuscenes/eval/detection/evaluate.py | WJ-Lai/NightFusion | 0 | 6332 | # nuScenes dev-kit.
# Code written by <NAME> & <NAME>, 2018.
# Licensed under the Creative Commons [see licence.txt]
import argparse
import json
import os
import random
import time
from typing import Tuple, Dict, Any
import numpy as np
from nuscenes import NuScenes
from nuscenes.eval.detection.algo import accumulate... | [
1,
396,
4948,
4421,
25487,
2906,
29899,
7354,
29889,
13,
29937,
5920,
3971,
491,
529,
5813,
29958,
669,
529,
5813,
10202,
29871,
29906,
29900,
29896,
29947,
29889,
13,
29937,
10413,
21144,
1090,
278,
26635,
3468,
518,
4149,
7794,
663,
298... |
sp_api/auth/access_token_client.py | onesdata/python-amazon-sp-api | 0 | 1609563 | <reponame>onesdata/python-amazon-sp-api
import json
import os
import requests
from botocore.exceptions import ClientError
import hashlib
import logging
from cachetools import TTLCache
import boto3
from sp_api.base import BaseClient
from .credentials import Credentials
from .access_token_response import AccessTokenRes... | [
1,
529,
276,
1112,
420,
29958,
2873,
1272,
29914,
4691,
29899,
17260,
29899,
1028,
29899,
2754,
13,
5215,
4390,
13,
5215,
2897,
13,
13,
5215,
7274,
13,
3166,
9225,
542,
487,
29889,
11739,
29879,
1053,
12477,
2392,
13,
5215,
6608,
1982,
... |
pandas/io/parsers/readers.py | KneeShard/pandas | 0 | 64542 | """
Module contains tools for processing files into DataFrames or other objects
"""
from __future__ import annotations
from collections import abc
import csv
import sys
from textwrap import fill
from typing import Any
import warnings
import numpy as np
import pandas._libs.lib as lib
from pandas._libs.parsers import ... | [
1,
9995,
13,
7355,
3743,
8492,
363,
9068,
2066,
964,
3630,
14438,
1280,
470,
916,
3618,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
3166,
16250,
1053,
25638,
13,
5215,
11799,
13,
5215,
10876,
13,
3166,
14... |
example/controller/tests/testing/foo.py | donghak-shin/dp-tornado | 18 | 39575 | <filename>example/controller/tests/testing/foo.py
# -*- coding: utf-8 -*-
from dp_tornado.engine.controller import Controller
class FooController(Controller):
def post(self):
"""
.. test::
expect(text='foo==bar', params={'foo': 'bar'})
expect(code=400, params=... | [
1,
529,
9507,
29958,
4773,
29914,
8299,
29914,
21150,
29914,
13424,
29914,
5431,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
3166,
270,
29886,
29918,
29873,
1398,
912,
29889,
... |
arc/arc115/arc115b.py | c-yan/atcoder | 1 | 87658 | <reponame>c-yan/atcoder
N = int(input())
C = [list(map(int, input().split())) for _ in range(N)]
INF = 10 ** 18
a = INF
i, j = 0, 0
for y in range(N):
for x in range(N):
if C[y][x] >= a:
continue
i, j = y, x
a = C[y][x]
def f(z):
A = [INF] * N
B = [INF] * N
A[i] =... | [
1,
529,
276,
1112,
420,
29958,
29883,
29899,
10094,
29914,
271,
29883,
6119,
13,
29940,
353,
938,
29898,
2080,
3101,
13,
29907,
353,
518,
1761,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130,
363,
903,
297,
3464,
29898,
29940,
... |
tools/diff-db-disk.py | machao19902/st2 | 1 | 64781 | <reponame>machao19902/st2
#!/usr/bin/env python
# Licensed to the StackStorm, Inc ('StackStorm') 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, V... | [
1,
529,
276,
1112,
420,
29958,
29885,
496,
6241,
29896,
29929,
29929,
29900,
29906,
29914,
303,
29906,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
10413,
21144,
304,
278,
10292,
855,
555,
29892,
9266,
6702,
7264,
85... |
asreader/text_comprehension/eval/fusion.py | rkadlec/asreader | 113 | 73694 | <gh_stars>100-1000
from __future__ import division
import argparse
import glob
import numpy
import scipy.optimize as opt
import os
import pickle
import re
"""
This script computes ensemble predictions based on multiple ASReader models.
In an optional first step it loads a dumped model and generates predictions from ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
5215,
1852,
5510,
13,
5215,
13149,
13,
5215,
12655,
13,
5215,
4560,
2272,
29889,
20640,... |
accounts/admin.py | GuilhemN/site-interludes | 0 | 3749 | from django.contrib import admin
from django.contrib.auth.models import Group
from accounts.models import EmailUser
from shared.admin import ExportCsvMixin
# no need for groups - we only have regular users and superusers
admin.site.unregister(Group)
@admin.register(EmailUser)
class EmailUserAdmin(ExportCsvMixin, adm... | [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
6431,
13,
13,
3166,
15303,
29889,
9794,
1053,
22608,
2659,
13,
3166,
7258,
29889,
6406,
1053,
1222,
637,
29907,
4501,
29924,
861,
262,
... |
reviews/layout/components.py | adam-tokarski/reviews | 134 | 1617937 | <reponame>adam-tokarski/reviews
from datetime import datetime
from rich.panel import Panel
from rich.table import Table
class Header:
"""Display header with clock."""
def __rich__(self) -> Panel:
grid = Table.grid(expand=True)
grid.add_column(justify="center", ratio=1)
grid.add_colum... | [
1,
529,
276,
1112,
420,
29958,
328,
314,
29899,
517,
5689,
2574,
29914,
276,
7406,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
8261,
29889,
15119,
1053,
349,
3870,
13,
3166,
8261,
29889,
2371,
1053,
6137,
13,
13,
13,
1990,
19345,
2990... |
demo.py | Ph1lippK/anonymizer | 0 | 37300 | import streamlit as st
st.image(
"https://datascientest.com/wp-content/uploads/2020/10/logo-text-right.png.webp"
)
st.header("Développer et déployer une application de Machine learning en **Streamlit**")
st.info("Webinar du 04/05/2021")
st.markdown("---")
st.markdown(
"""
**Objectifs 🎯**
* Se f... | [
1,
1053,
4840,
19411,
408,
380,
13,
13,
303,
29889,
3027,
29898,
13,
1678,
376,
991,
597,
14538,
15566,
342,
29889,
510,
29914,
11912,
29899,
3051,
29914,
9009,
29879,
29914,
29906,
29900,
29906,
29900,
29914,
29896,
29900,
29914,
14569,
... |
src/headtracking_network/live_training.py | NaviRice/HeadTracking | 1 | 35153 | <reponame>NaviRice/HeadTracking<filename>src/headtracking_network/live_training.py
import numpy as np
import tensorflow as tf
import os
import navirice_image_pb2
import cv2
import random
import sys
from navirice_generate_data import generate_bitmap_label
from navirice_helpers import navirice_image_to_np
from navirice_... | [
1,
529,
276,
1112,
420,
29958,
29940,
17345,
29934,
625,
29914,
5494,
17936,
292,
29966,
9507,
29958,
4351,
29914,
2813,
11294,
292,
29918,
11618,
29914,
9258,
29918,
26495,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
1... |
fbpcs/private_computation/service/input_data_validation_stage_service.py | emmanuelsalawu/fbpcs | 0 | 143645 | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
import json
import logging
from typing import List, Optional
from fbpcp.service.onedocker import OneD... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
14187,
1266,
313,
29883,
29897,
20553,
28096,
29879,
29892,
9266,
29889,
322,
23736,
1078,
29889,
13,
29937,
13,
29937,
910,
2752,
775,
338,
7794,
21144,
1090,
278,
341,
18... |
app.py | gnmerritt/slack-translation-strings | 0 | 1602284 | <filename>app.py<gh_stars>0
import random
import os
from threading import Thread
import requests
from flask import Flask, jsonify, request
app = Flask(__name__)
VERIFICATION_TOKEN = os.environ.get('V_TOKEN')
APP_TOKEN = os.environ.get('A_TOKEN')
CHANNEL = os.environ.get('A_IN_CHANNEL')
@app.route('/slack', methods=... | [
1,
529,
9507,
29958,
932,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
5215,
2897,
13,
3166,
3244,
292,
1053,
10480,
13,
5215,
7274,
13,
3166,
29784,
1053,
2379,
1278,
29892,
4390,
1598,
29892,
2009,
13... |
gryphon/lib/exchange/itbit_btc_usd.py | scooke11/gryphon | 1,109 | 66717 | <filename>gryphon/lib/exchange/itbit_btc_usd.py<gh_stars>1000+
"""
Exchange documentation: https://api.itbit.com/docs
"""
# -*- coding: utf-8 -*-
import base64
from collections import OrderedDict, defaultdict
import hashlib
import hmac
import json
import time
import urllib
import cdecimal
from cdecimal import Decimal... | [
1,
529,
9507,
29958,
14793,
17607,
29914,
1982,
29914,
6543,
29914,
277,
2966,
29918,
3116,
29883,
29918,
375,
29881,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
15945,
29908,
13,
1252,
3167,
5... |
backend/users/serializers.py | alessondelmiro/github_monitor | 0 | 170967 | <reponame>alessondelmiro/github_monitor
from rest_framework.serializers import ModelSerializer
from .models import User
from django.core.paginator import Paginator
class UserSerializer(ModelSerializer):
class Meta:
model = User
fields = (
'id', 'email', 'username', 'avatar',
)
... | [
1,
529,
276,
1112,
420,
29958,
284,
404,
898,
295,
2460,
307,
29914,
3292,
29918,
3712,
2105,
13,
3166,
1791,
29918,
4468,
29889,
15550,
19427,
1053,
8125,
17679,
13,
3166,
869,
9794,
1053,
4911,
13,
3166,
9557,
29889,
3221,
29889,
1357... |
tests/smiley.py | zoso95/xArm | 0 | 105354 | from xarm.arm import *
import math
import time
grip_close()
def reset():
movej((500, 500, 500, 500, 500), 2000)
power_off()
#jDepart = (497, 426, 738, 55, 500)
jDepart = (497, 426, 700, 55, 500)
movej(jDepart, 2000)
eye_x = 10
z_up = 0
z_down = -18
#(495, 420, 700, 64, 502)
servo_coord = get_position(Fal... | [
1,
515,
921,
2817,
29889,
2817,
1053,
334,
13,
5215,
5844,
13,
5215,
931,
13,
13,
29887,
6472,
29918,
5358,
580,
13,
13,
13,
1753,
10092,
7295,
13,
1678,
4337,
29926,
3552,
29945,
29900,
29900,
29892,
29871,
29945,
29900,
29900,
29892,
... |
Dark_Scripts/calc_IPOIndex_v2.py | zmlabe/predictGMSTrate | 2 | 142606 | """
Script for calculating the IPO index in each ensemble member
Author : <NAME>
Date : 17 September 2021
Version : 12
"""
### Import packages
import sys
import math
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy.stats as stats
from mpl_toolkits.basemap im... | [
1,
9995,
13,
4081,
363,
25202,
278,
5641,
29949,
2380,
297,
1269,
21285,
4509,
13,
13,
13720,
268,
584,
529,
5813,
29958,
13,
2539,
539,
584,
29871,
29896,
29955,
3839,
29871,
29906,
29900,
29906,
29896,
13,
6594,
1678,
584,
29871,
2989... |
src/repair_mesh.py | vg-lab/MeshReconstruct | 0 | 43326 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import optparse
import os
import re
import sys
import vtk
from multiprocessing import Process
import parse_imx
RADIUS = 3 # For Open and Gauss
SCALE = 50.0 # For Rasterization
class RepairMeshParser(optparse.OptionParser):
def __init__(self):
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
12655,
408,
7442,
13,
5215,
3523,
5510,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
10876,
13,
52... |
extract-airbnb-properties.py | townofchapelhill/hospitality-python | 1 | 115674 | import airbnb
import airbnb_secrets
import csv
items=1
output_filename="airbnb_chapelhill.csv"
# Set CSV Header & line format
csv_header = ['City','Latitude','Longitude','Type','Bathrooms','Bedrooms','Public Address','Localized City','Source']
api = airbnb.Api()
# api = airbnb.Api(airbnb_secrets.login, airbnb_secrets... | [
1,
1053,
4799,
29890,
9877,
13,
5215,
4799,
29890,
9877,
29918,
344,
1037,
1372,
13,
5215,
11799,
13,
13,
7076,
29922,
29896,
13,
4905,
29918,
9507,
543,
1466,
29890,
9877,
29918,
305,
481,
295,
29131,
29889,
7638,
29908,
13,
29937,
378... |
bogglesolver.py | gammazero/pybogglesolver | 0 | 2331 | <reponame>gammazero/pybogglesolver
"""
Module to generate solutions for Boggle grids.
<NAME> 22 Dec. 2009
"""
from __future__ import print_function
import os
import sys
import collections
import trie
if sys.version < '3':
range = xrange
class BoggleSolver(object):
"""
This class uses an external words ... | [
1,
529,
276,
1112,
420,
29958,
4283,
9171,
29914,
2272,
29890,
468,
29887,
793,
324,
369,
13,
15945,
29908,
13,
7355,
304,
5706,
6851,
363,
350,
9804,
867,
4841,
29889,
13,
13,
29966,
5813,
29958,
29871,
29906,
29906,
3826,
29889,
29871... |
cyberpunk_theme/widget/option_menu.py | pyrustic/tk-cyberpunk-theme | 5 | 123846 | <gh_stars>1-10
import tkstyle
from cyberpunk_theme import constant
def get_style(font_family=constant.FONT_FAMILY,
font_size=constant.FONT_SIZE):
style = tkstyle.OptionMenu()
style.font = (font_family, font_size, "normal")
style.relief = "flat"
style.selectBackground = "#B4C7EF"
styl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
18883,
3293,
13,
3166,
5094,
495,
29886,
2960,
29918,
18193,
1053,
4868,
13,
13,
13,
1753,
679,
29918,
3293,
29898,
5657,
29918,
11922,
29922,
23362,
29889,
299... |
link_to_file.py | HoChiak/DownloadPDFs | 1 | 106886 | # -*- coding: utf-8 -*-
"""
Created Nov 2018
@author: henss
"""
# import built in libarys
import os
from urllib.request import urlretrieve, urlopen
# import 3rd party libarys
from bs4 import BeautifulSoup
# import local libarys
# define classes and functions
class Weblink():
"""
Class ... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
15945,
19451,
13,
20399,
2864,
29871,
29906,
29900,
29896,
29947,
30004,
13,
30004,
13,
29992,
8921,
29901,
298,
575,
29879,
30004,
13,
15945,
19451... |
utils/combine_csv_lists.py | DAA233/futurelab-ai-2018-image | 1 | 185684 | import csv
def load_csv_file(filepath):
list_file = []
with open(filepath, 'r') as csv_file:
all_lines = csv.reader(csv_file)
for line in all_lines:
list_file.append(line)
list_file.remove(list_file[0])
return list_file
def write_list_to_csv(filepath, data_list):
with... | [
1,
1053,
11799,
13,
13,
13,
1753,
2254,
29918,
7638,
29918,
1445,
29898,
1445,
2084,
1125,
13,
1678,
1051,
29918,
1445,
353,
5159,
13,
1678,
411,
1722,
29898,
1445,
2084,
29892,
525,
29878,
1495,
408,
11799,
29918,
1445,
29901,
13,
4706... |
src/pycolocstats/tools/jobparamsdict.py | hyperbrowser/conglomerate | 2 | 175608 | <gh_stars>1-10
from __future__ import absolute_import, division, print_function, unicode_literals
from pycolocstats.core.types import PathStr, PathStrList
from past.builtins import basestring
from collections import MutableMapping
__metaclass__ = type
class JobParamsDict(MutableMapping):
def __init__(self, para... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
13,
3166,
11451,
1054,
542,
16202,
... |
PyCharm/Aulas/Aula10.py | gabrieldtc/CursoEmVideoPython | 0 | 159961 | <filename>PyCharm/Aulas/Aula10.py
nome = str(input('Qual é o seu nome? ')).strip().upper()
if nome == 'GABRIEL':
print('Que lindo nome você tem!')
else:
print('Seu nome é tão normal!')
print('Bom dia, {}'.format(nome)) | [
1,
529,
9507,
29958,
19737,
1451,
2817,
29914,
29909,
15173,
29914,
29909,
2497,
29896,
29900,
29889,
2272,
13,
25155,
353,
851,
29898,
2080,
877,
24399,
904,
288,
5078,
9235,
29973,
525,
8106,
17010,
2141,
21064,
580,
13,
361,
9235,
1275... |
Configuration/DataProcessing/python/Impl/cosmicsEra_Run2_50ns.py | ckamtsikis/cmssw | 6 | 153057 | <gh_stars>1-10
#!/usr/bin/env python
"""
_cosmicsEra_Run2_50ns_
Scenario supporting cosmic data taking
"""
import os
import sys
from Configuration.Eras.Era_Run2_50ns_cff import Run2_50ns
from Configuration.DataProcessing.Impl.cosmics import cosmics
class cosmicsEra_Run2_50ns(cosmics):
def __init__(self):
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
29918,
3944,
29885,
1199,
29923,
336,
29918,
6558,
29906,
29918,
29945,
29900,
1983,
29918,
13... |
api/analyses/analyses.py | capdragon/cannlytics | 0 | 96618 | """
Analyses Views | Cannlytics API
Created: 4/21/2021
API to interface with cannabis regulation information.
"""
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
@api_view(['GET', 'POST', 'DELETE'])
def analyses(request, format=None):
... | [
1,
9995,
13,
21067,
952,
267,
4533,
29879,
891,
315,
812,
368,
29873,
1199,
3450,
13,
20399,
29901,
29871,
29946,
29914,
29906,
29896,
29914,
29906,
29900,
29906,
29896,
13,
13,
8787,
304,
5067,
411,
508,
7183,
275,
1072,
2785,
2472,
29... |
sample/html2txt.py | rodsenra/koondor | 2 | 108275 | import codecs
from glob import glob
import os
import sys
from bs4 import BeautifulSoup
dir_with_news_html = sys.argv[1]
dir_with_news_txt = sys.argv[2]
dirpath = os.path.join(dir_with_news_html, "*.html")
for filename in glob(dirpath):
html_file = codecs.open(filename, "r", encoding="utf-8")
soup = BeautifulS... | [
1,
1053,
775,
2395,
13,
3166,
13149,
1053,
13149,
13,
5215,
2897,
13,
5215,
10876,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
13,
13,
3972,
29918,
2541,
29918,
15753,
29918,
1420,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
... |
pytests/cbas/cbas_backup_restore.py | ashwin2002/TAF | 0 | 177705 | import random
from cbas.cbas_base import CBASBaseTest
from Jython_tasks.task import CreateDatasetsTask, DropDatasetsTask, \
CreateSynonymsTask, DropSynonymsTask, DropDataversesTask, \
CreateCBASIndexesTask, DropCBASIndexesTask, CreateUDFTask, DropUDFTask
from cbas_utils.cbas_utils_v2 import BackupUtils
from re... | [
1,
1053,
4036,
13,
13,
3166,
274,
6500,
29889,
29883,
6500,
29918,
3188,
1053,
315,
5688,
1744,
559,
3057,
13,
3166,
435,
1656,
29918,
20673,
29889,
7662,
1053,
6204,
16390,
294,
1691,
5398,
29892,
20724,
16390,
294,
1691,
5398,
29892,
... |
apps/accounts/views.py | Chamane/django-starter-project | 1 | 91093 | <reponame>Chamane/django-starter-project
from django.shortcuts import render, redirect
from django.contrib.auth import login as auth_login, authenticate, get_user_model
from django.urls import reverse
from .forms import LoginForm, RegisterForm
def login(request):
# if request is a HTTP POST try to pull out the re... | [
1,
529,
276,
1112,
420,
29958,
1451,
314,
1662,
29914,
14095,
29899,
303,
4254,
29899,
4836,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
6684,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
6464,
408,
4817,
29918,
7507... |
statsmodels/examples/ex_pareto_plot.py | madhushree14/statsmodels | 6,931 | 1611452 | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 01 19:20:16 2010
Author: josef-pktd
"""
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
nobs = 1000
r = stats.pareto.rvs(1, size=nobs)
#rhisto = np.histogram(r, bins=20)
rhisto, e = np.histogram(np.clip(r, 0 , 1000), bins=50)
plt.figure()
pl... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
8991,
22333,
29871,
29900,
29896,
29871,
29896,
29929,
29901,
29906,
29900,
29901,
29896,
29953,
29871,
29906,
29900,
29896,
29... |
notification.py | jsalazardev/webhookslack | 0 | 193480 | <reponame>jsalazardev/webhookslack<gh_stars>0
#!/usr/bin/env python2.7
# Import Libraries
import fire
from module.webHook import send_message_to_slack
class Notification(object):
def __init__(self, text, footer='', title='', status='good', username='', field=''):
self._text = text
self._footer = ... | [
1,
529,
276,
1112,
420,
29958,
1315,
284,
28690,
3359,
29914,
2676,
1251,
12117,
2364,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
29889,
29955,
13,
29937,
16032,
365,
4626,
... |
bluebottle/utils/migrations/0006_auto_20210825_1018.py | terrameijar/bluebottle | 10 | 1611342 | <filename>bluebottle/utils/migrations/0006_auto_20210825_1018.py
# Generated by Django 2.2.20 on 2021-08-25 08:18
from django.db import migrations, models
import django.db.models.deletion
import parler.fields
class Migration(migrations.Migration):
dependencies = [
('utils', '0005_auto_20200626_1145'),
... | [
1,
529,
9507,
29958,
9539,
29890,
1501,
280,
29914,
13239,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29953,
29918,
6921,
29918,
29906,
29900,
29906,
29896,
29900,
29947,
29906,
29945,
29918,
29896,
29900,
29896,
29947,
29889,
2272,
13,
2... |
pupil/sampling/uncertainty.py | hadi-gharibi/pupil | 2 | 52966 | <gh_stars>1-10
from __future__ import annotations
import math
from typing import Callable
import numpy as np
from pupil.types import NDArray2D
def least_confidence(prob_dist: NDArray2D) -> np.ndarray:
"""
Returns the uncertainty score of an array using
least confidence sampling in a 0-1 range where 1 i... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
5844,
13,
3166,
19229,
1053,
8251,
519,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
23449,
309,
29889,
8768,... |
asposecadcloud/models/requests/http_request.py | aspose-cad-cloud/aspose-cad-cloud-python | 2 | 77287 | -8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="HttpRequest.py">
# Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy o... | [
1,
448,
29947,
13,
29937,
29871,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
29871,
529,
8552,
1266,
5001,
543,
29909,
1028,
852,
29908,
934,
543,
26021,
29889,
2272,
1013,
13,
29937,
1678,
14187,
1266,
313,
29883,
29897,
29871,
... |
django_orm/sports_orm/leagues/migrations/0002_auto_20161031_1620.py | gfhuertac/coding_dojo_python | 0 | 5989 | <filename>django_orm/sports_orm/leagues/migrations/0002_auto_20161031_1620.py
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-31 23:20
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('leagues', '0001_initia... | [
1,
529,
9507,
29958,
14095,
29918,
555,
29914,
29879,
4011,
29918,
555,
29914,
280,
21628,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29906,
29918,
6921,
29918,
29906,
29900,
29896,
29953,
29896,
29900,
29941,
29896,
29918,
29896,
29953,
... |
spark_fhir_schemas/stu3/complex_types/messageheader_source.py | icanbwell/SparkFhirSchemas | 2 | 114958 | <filename>spark_fhir_schemas/stu3/complex_types/messageheader_source.py
from typing import Union, List, Optional
from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
# This file is auto-generated by generate_schema so do not edit manually
# noinspection PyPep8Naming
class MessageHea... | [
1,
529,
9507,
29958,
12597,
29918,
29888,
29882,
381,
29918,
11993,
29914,
303,
29884,
29941,
29914,
19676,
29918,
8768,
29914,
4906,
6672,
29918,
4993,
29889,
2272,
13,
3166,
19229,
1053,
7761,
29892,
2391,
29892,
28379,
13,
13,
3166,
282,... |
scraping/spider/spiders/links_spider.py | Shakk17/WebsiteReader | 0 | 150094 | <gh_stars>0
import random
import scrapy
from scrapy import signals
from helpers.printer import green, magenta
from helpers.scraper import scrape_links
from helpers.utility import add_scheme, get_domain, get_time
class LinksSpider(scrapy.Spider):
name = "links"
visited_links = []
@classmethod
def fr... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
13,
5215,
24559,
2272,
13,
3166,
24559,
2272,
1053,
18470,
13,
13,
3166,
1371,
414,
29889,
558,
1639,
1053,
7933,
29892,
2320,
6381,
13,
3166,
1371,
414,
29889,
1557,
... |
src/examples/g_lists_and_tuples/main.py | acc-cosc-1336-spring-2022/acc-cosc-1336-spring-2022-rObErT-a93 | 0 | 49743 | <gh_stars>0
import lists
nums = [99,100,101,102]
lists.loop_list_w_for(nums)
print('----------')
for n in nums:
print(n)
print('*************')
num = [99,100,101,102]
lists.loop_list_w_while(num)
print('----------')
for n in num:
print(n)
print('**************')
lists.collect_home_values()
print('-------... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
8857,
13,
13,
1949,
29879,
353,
518,
29929,
29929,
29892,
29896,
29900,
29900,
29892,
29896,
29900,
29896,
29892,
29896,
29900,
29906,
29962,
13,
13,
21513,
29889,
7888,
29918,
1761,
... |
Lib/dos_8x3/cgihttps.py | AtjonTV/Python-1.4 | 0 | 143617 | """CGI-savvy HTTP Server.
This module builds on SimpleHTTPServer by implementing GET and POST
requests to cgi-bin scripts.
"""
__version__ = "0.3"
import os
import sys
import time
import socket
import string
import urllib
import BaseHTTPServer
import SimpleHTTPServer
class CGIHTTPRequestHandler(SimpleHTTPServer... | [
1,
9995,
11135,
29902,
29899,
29879,
485,
13308,
7331,
5656,
29889,
13,
13,
4013,
3883,
23315,
373,
12545,
10493,
6004,
491,
16049,
12354,
322,
11971,
13,
24830,
304,
274,
3146,
29899,
2109,
12078,
29889,
13,
13,
15945,
29908,
13,
13,
1... |
step4e/aufrecht_transcode.py | funderburkjim/boesp-prep | 0 | 99323 | <filename>step4e/aufrecht_transcode.py
# coding=utf-8
""" aufrecht_transcode.py
"""
import sys, re,codecs
data="""
a1 ā
n2 ṇ
r2 ṛ
u7 ϋ
o7 ӧ
a7 ӓ
h2 ḥ
m2 ṃ
s2 ṣ
S4 Ś
s4 ś
u1 ū
n5 ñ
n3 ṅ
t2 ṭ
â ā
î ī
û ū
ç ś
Ç Ś
"""
class Rec(object):
def __init__(self,auf,uni):
self.auf = auf
self.uni = uni
def init_recs():... | [
1,
529,
9507,
29958,
10568,
29946,
29872,
29914,
4987,
15320,
29918,
3286,
401,
29889,
2272,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
15945,
29908,
1622,
15320,
29918,
3286,
401,
29889,
2272,
13,
15945,
29908,
13,
5215,
10876,
29892... |
tests/sync_test_megasync.py | lfcontato/meganz | 0 | 85542 | """
Application for testing syncing algorithm
(c) 2013-2014 by Mega Limited, Wellsford, New Zealand
This file is part of the MEGA SDK - Client Access Engine.
Applications using the MEGA API must present a valid application key
and comply with the the rules set forth in the Terms of Service.
The MEGA SDK is di... | [
1,
9995,
13,
8427,
363,
6724,
16523,
292,
5687,
13,
13,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29896,
29946,
491,
341,
2442,
28873,
29892,
5674,
29879,
4006,
29892,
1570,
13450,
13,
13,
910,
934,
338,
... |
FM/deepFM.py | sameul-yuan/markdowns | 0 | 34396 | import os
import sys
import numpy as np
import pandas as pd
import tensorflow as tf
from losses import focal_loss,weighted_binary_crossentropy
from utils import Dataset
class DeepFM(object):
def __init__(self, params):
self.feature_size = params['feature_size']
self.field_size = params['field_size'... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
26110,
408,
15886,
13,
3166,
28495,
1053,
12789,
284,
29918,
6758,
29892,
7915,
287,
29918,
19541,
29918,
19128,
296,
14441,
13,
3166,
36... |
frappe-bench/apps/erpnext/erpnext/shopping_cart/test_shopping_cart.py | Semicheche/foa_frappe_docker | 0 | 105988 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.utils import nowdate, add_months
from erpnext.shopping_cart.cart import _get_cart_quotation, update_cart, get_... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29945,
29892,
7347,
4798,
8364,
11763,
349,
21908,
29889,
19806,
29889,
322,
2866,
1091,
29560,
13,
29937,
19245,
29901,
15143,
4593,
5236,
19245,
325,
29941,
29889,
2823,
... |
shellish/command/contrib/ini.py | personnelink/shellish | 4 | 29127 | <gh_stars>1-10
"""
Show the INI config(s) used by a command tree.
"""
from .. import command
class Show(command.Command):
""" Show current INI configuration.
Programs may make use of a configuration file which is usually located in
your $HOME directory as .<prog>_config. The file is a standard INI
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
8964,
278,
2672,
29902,
2295,
29898,
29879,
29897,
1304,
491,
263,
1899,
5447,
29889,
13,
15945,
29908,
13,
13,
3166,
6317,
1053,
1899,
13,
13,
13... |
usaspending_api/awards/migrations/0074_auto_20170320_1607.py | toolness/usaspending-api | 1 | 12855 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-03-20 16:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('awards', '0073_auto_20170320_1455'),
]
operations = [
migrations.AlterField... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29900,
29889,
29896,
373,
29871,
29906,
29900,
29896,
29955,
29899,
29900,
29941,
29899,
29906,
299... |
logtrace/test.py | metazet/logtrace | 9 | 59152 | # -*- coding: utf-8 -*-
import uuid
import unittest
import logging
from __init__ import LogTrace
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
logger = logging.getLogger(__name__)
logger.setLevel(logging.I... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
318,
5416,
13,
5215,
443,
27958,
13,
5215,
12183,
13,
3166,
4770,
2344,
1649,
1053,
4522,
11591,
13,
13,
21027,
29889,
16121,
3991,
29898,
5563,
... |
tests/common/test_run/triangle_run.py | KnowingNothing/akg-test | 0 | 11359 | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
379,
3357,
26599,
8364,
11763,
3189,
1696,
19806,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
194... |
saucelab_api_client/base_classes/insights_api.py | Slamnlc/saucelab-api-client | 0 | 134578 | <filename>saucelab_api_client/base_classes/insights_api.py
from datetime import datetime
from saucelab_api_client.category import Base
from saucelab_api_client.models.insights import Insight
from saucelab_api_client.models.service import get_dict_from_locals, get_datetime_for_insights
class Insights(Base):
__sub... | [
1,
529,
9507,
29958,
29879,
585,
2242,
370,
29918,
2754,
29918,
4645,
29914,
3188,
29918,
13203,
29914,
1144,
5861,
29918,
2754,
29889,
2272,
13,
3166,
12865,
1053,
12865,
13,
13,
3166,
12507,
2242,
370,
29918,
2754,
29918,
4645,
29889,
7... |
pyansys/rst.py | JackGuyver/pyansys | 0 | 78645 | <reponame>JackGuyver/pyansys
"""Read ANSYS binary result files (*.rst)
Used:
/usr/ansys_inc/v150/ansys/customize/include/fdresu.inc
"""
from collections.abc import Iterable
import time
import warnings
from threading import Thread
from functools import wraps
import vtk
import numpy as np
import pyvista as pv
from tqdm... | [
1,
529,
276,
1112,
420,
29958,
27006,
29954,
8631,
369,
29914,
2272,
550,
952,
13,
15945,
29908,
6359,
319,
3059,
21554,
7581,
1121,
2066,
3070,
29889,
29878,
303,
29897,
13,
13,
29965,
8485,
29901,
13,
29914,
4855,
29914,
550,
952,
299... |
stock_quantity_history_location/tests/test_stock_quantity_history_location.py | NextERP-Romania/addons_extern | 0 | 14826 | <reponame>NextERP-Romania/addons_extern
# Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import SavepointCase
class TestStockQuantityHistoryLocation(SavepointCase):
@classmethod
def setUpClass(cls):
super(TestStockQuantityHistoryLo... | [
1,
529,
276,
1112,
420,
29958,
9190,
1001,
29925,
29899,
29934,
2480,
423,
29914,
1202,
787,
29918,
735,
725,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
1152,
479,
17907,
317,
29889,
29931,
29889,
13,
29937,
19245,
16369,
... |
advisor/api/urls.py | Sachin-c/api-test | 0 | 23044 | <filename>advisor/api/urls.py<gh_stars>0
from django.urls import path
from advisor.api.views import (
# api_advisor_view,
api_advisor_view_post,
)
app_name = 'advisor'
urlpatterns = [
path('admin/advisor/', api_advisor_view_post, name="post"),
# path('user/<int:id>/advisor/', api_advisor_view, name="d... | [
1,
529,
9507,
29958,
328,
19188,
29914,
2754,
29914,
26045,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
3166,
594,
19188,
29889,
2754,
29889,
7406,
1053,
313,
13,
1678,
396,
788... |
Homework/2019/Task4/1/code/SVM/DGA.py | ohhuola/Data-Mining-for-Cybersecurity | 0 | 1603431 | <gh_stars>0
import csv
import math
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score,recall_score
import joblib
from sklearn.preprocessing import StandardScaler
goodlist = []
badlist = []
def length(domain_name):
return ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
11799,
13,
5215,
5844,
13,
5215,
12655,
408,
7442,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
3166,
2071,
19668,
29889,
4501,
29885,... |
inventory/suppliers/api/views.py | cnobile2012/inventory | 10 | 179912 | #
# inventory/suppliers/api/views.py
#
"""
Supplier Views.
"""
__docformat__ = "restructuredtext en"
import logging
from decimal import Decimal
from rest_framework.generics import (
ListCreateAPIView, RetrieveUpdateDestroyAPIView)
from rest_framework.exceptions import PermissionDenied, NotAuthenticated
from rest_... | [
1,
396,
13,
29937,
11817,
706,
29914,
19303,
27801,
29914,
2754,
29914,
7406,
29889,
2272,
13,
29937,
13,
15945,
29908,
13,
20182,
4926,
4533,
29879,
29889,
13,
15945,
29908,
13,
1649,
1514,
4830,
1649,
353,
376,
5060,
1247,
2955,
726,
... |
tests/text/test_chrf.py | stancld/metrics | 769 | 80306 | from functools import partial
from typing import Sequence
import pytest
from torch import Tensor, tensor
from tests.text.helpers import TextTester
from tests.text.inputs import _inputs_multiple_references, _inputs_single_sentence_multiple_references
from torchmetrics.functional.text.chrf import chrf_score
from torchm... | [
1,
515,
2090,
312,
8789,
1053,
7687,
13,
3166,
19229,
1053,
922,
3910,
13,
13,
5215,
11451,
1688,
13,
3166,
4842,
305,
1053,
323,
6073,
29892,
12489,
13,
13,
3166,
6987,
29889,
726,
29889,
3952,
6774,
1053,
3992,
3057,
261,
13,
3166,
... |
day08/python/day8.py | mattvperry/AoC_2016 | 0 | 163355 | from re import compile
from functools import reduce
rectRe = compile(r'(rect) (\d+)x(\d+)')
rotaRe = compile(r'(rotate [rc])\w* \w=(\d+) by (\d+)')
def makeScreen(x, y):
return [[' '] * x for _ in range(y)]
def transpose(l):
return list(map(list, zip(*l)))
def parseInstruction(inst):
rect = rectRe.searc... | [
1,
515,
337,
1053,
6633,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
13,
1621,
1123,
353,
6633,
29898,
29878,
12215,
1621,
29897,
3441,
29881,
28135,
29916,
1194,
29881,
28135,
1495,
13,
307,
941,
1123,
353,
6633,
29898,
29878,
12215,
2... |
public/python/GlobalData.py | IzzatHalabi/newpix_prototype | 0 | 157200 | students = []
references = []
benefits = []
MODE_SPECIFIC = '1. SPECIFIC'
MODE_HOSTEL = '2. HOSTEL'
MODE_MCDM = '3. MCDM'
MODE_REMAIN = '4. REMAIN'
| [
1,
8041,
353,
5159,
13,
276,
10662,
353,
5159,
13,
1785,
1389,
1169,
353,
5159,
13,
13,
20387,
29918,
29903,
4162,
29907,
6545,
2965,
353,
525,
29896,
29889,
317,
4162,
29907,
6545,
2965,
29915,
13,
20387,
29918,
20832,
6670,
353,
525,
... |
outlier_detector.py | Sean-Ker/data_homework | 0 | 9459 | <gh_stars>0
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
'''
A function that detects outliers, where k is a tandard deviation threshold hyperparameter preferablly (2, 2.5, 3).
The algo could handle multivariable data frames with any number of features d.
For that manner, it first reduce... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
2071,
19668,
29889,
311,
510,
3283,
1053,
349,
5454,
13,
13,
12008,
13,
29909,
740,
393,
6459,
29879,
714,
27801,
29892,
... |
comments/admin.py | lesspointless/Shakal-NG | 10 | 62555 | # -*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from django.utils.html import format_html, escape, mark_safe
from mptt.admin import DraggableMPTTAdmin
from .models import Comment, RootHeader
from attachment.admin import AttachmentInline, Attac... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
21570,
29889,
3051,
8768,
29889,
6406,
1053,
3251,
293,
8863,
1070,
797,
1220,
13,
3166,
955... |
hitomezashi_grid.py | DavidLitwin/hitomizashi | 0 | 178021 | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 3 10:45:39 2022
@author: dgbli
"""
import numpy as np
import matplotlib.pyplot as plt
def return_true(n):
x = []
for i in range(n):
if i%2==0:
x.append(i)
x.append(i+1)
else:
x.append(None)
... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
15945,
19451,
13,
20399,
373,
2598,
2627,
259,
29941,
29871,
29896,
29900,
29901,
29946,
29945,
29901,
29941,
29929,
29871,
29906,
29900,
29906,
29906... |
ntcore/entry_notifier.py | amorygalili/pynetworktables | 0 | 118202 | # validated: 2017-10-01 DS e4a8bff70e77 cpp/EntryNotifier.cpp cpp/EntryNotifier.h cpp/IEntryNotifier.h
"""----------------------------------------------------------------------------"""
""" Copyright (c) FIRST 2017. All Rights Reserved. """
""" Open Source Software - may be modified and shar... | [
1,
396,
2854,
630,
29901,
29871,
29906,
29900,
29896,
29955,
29899,
29896,
29900,
29899,
29900,
29896,
360,
29903,
321,
29946,
29874,
29947,
29890,
600,
29955,
29900,
29872,
29955,
29955,
274,
407,
29914,
9634,
3664,
3709,
29889,
8223,
274,
... |
image_storage/apps.py | Addono/Django-Kubernetes-DevOps | 2 | 115424 | from django.apps import AppConfig
class ImageStorageConfig(AppConfig):
name = 'image_storage'
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
7084,
10486,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
3027,
29918,
12925,
29915,
13,
2
] |
test_package/conanfile.py | karasusan/conan-gtest-example | 0 | 76601 | <gh_stars>0
from conans.model.conan_file import ConanFile
from conans import CMake
class TestConanGTestExample(ConanFile):
name = "TestConanGTestExample"
version = "0.1.0"
author = "lasote"
url = "https://github.com/karasusan/conan-gtest-example"
license = "MIT"
settings = "os", "compiler", "a... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
378,
550,
29889,
4299,
29889,
535,
273,
29918,
1445,
1053,
1281,
273,
2283,
13,
3166,
378,
550,
1053,
315,
9984,
13,
13,
13,
1990,
4321,
1168,
273,
29954,
3057,
14023,
29898,
11... |
src/soap/__init__.py | thelabnyc/instrumented-soap | 1 | 117570 | from suds.client import Client
from suds.plugin import MessagePlugin
from suds.cache import FileCache
from .http import HttpTransport
from . import settings
import logging
logger = logging.getLogger(__name__)
#: Cache of :class:`suds.client.Client <suds.client.Client>` objects
#: When unit-testing SOAP APIs it's pr... | [
1,
515,
5053,
29879,
29889,
4645,
1053,
12477,
13,
3166,
5053,
29879,
29889,
8582,
1053,
7777,
16288,
13,
3166,
5053,
29879,
29889,
8173,
1053,
3497,
10408,
13,
3166,
869,
1124,
1053,
9056,
27395,
13,
3166,
869,
1053,
6055,
13,
5215,
12... |
app/api/v2/handlers/agent_api.py | resteex0/caldera | 1 | 149925 | import aiohttp_apispec
from aiohttp import web
from app.api.v2.handlers.base_object_api import BaseObjectApi
from app.api.v2.managers.agent_api_manager import AgentApiManager
from app.api.v2.schemas.deploy_command_schemas import DeployCommandsSchema
from app.api.v2.schemas.base_schemas import BaseGetAllQuerySchema, Ba... | [
1,
1053,
263,
601,
1124,
29918,
11355,
3135,
13,
3166,
263,
601,
1124,
1053,
1856,
13,
13,
3166,
623,
29889,
2754,
29889,
29894,
29906,
29889,
3179,
9306,
29889,
3188,
29918,
3318,
29918,
2754,
1053,
7399,
2061,
11713,
13,
3166,
623,
29... |
junky/dataset/__init__.py | fostroll/junky | 9 | 1610831 | # -*- coding: utf-8 -*-
# junky lib: dataset
#
# Copyright (C) 2020-present by <NAME>, <NAME>
# License: BSD, see LICENSE for details
"""
Provides implementagions of torch.utils.data.Dataset for different purposes.
"""
from junky.dataset.dummy_dataset import *
from junky.dataset.len_dataset import *
from junky.dataset.... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
432,
2960,
29891,
4303,
29901,
8783,
13,
29937,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29906,
29900,
29899,
6338,
491,
529,... |
cpc/criterion/clustering/clustering_quantization.py | anuragkumar95/CPC_audio | 6 | 24183 | import os
import sys
import json
import argparse
import progressbar
from pathlib import Path
from random import shuffle
from time import time
import torch
from cpc.dataset import findAllSeqs
from cpc.feature_loader import buildFeature, FeatureModule, loadModel, buildFeature_batch
from cpc.criterion.clustering import kM... | [
1,
1053,
2897,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
1852,
5510,
13,
5215,
6728,
1646,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
4036,
1053,
528,
21897,
13,
3166,
931,
1053,
931,
13,
5215,
4842,
305,
13,
3166,
274,
6739,
298... |
src/python/tags.py | alexjgriffith/alpha-score | 0 | 44721 | #!/usr/bin/env python2.7
#
# This file is part of peakAnalysis, http://github.com/alexjgriffith/peaks/,
# and is Copyright (C) University of Ottawa, 2014. It is Licensed under
# the three-clause BSD License; see doc/LICENSE.txt.
# Contact: <EMAIL>
#
# Created : AUG262014
# File : buildPeaksClass
# Author : <NAME>... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
29889,
29955,
13,
29937,
13,
29937,
910,
934,
338,
760,
310,
19224,
21067,
4848,
29892,
1732,
597,
3292,
29889,
510,
29914,
744,
29916,
29926,
629,
2593,
389,
29914,
412,
10327,
19637... |
2_prediction/regression.py | scale-lab/EDAonCloud | 7 | 127637 | import matplotlib.pyplot as plt
from dgl.data.utils import load_graphs
import numpy as np
from sklearn import linear_model
plt.rcParams.update({'font.size': 14})
def design_size(design_file):
g, _ = load_graphs('data/dgl/' + design_file + '.def.dgl')
return g[0].num_nodes(), g[0].num_edges()
def analyze():
... | [
1,
1053,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
270,
3820,
29889,
1272,
29889,
13239,
1053,
2254,
29918,
4262,
29879,
13,
5215,
12655,
408,
7442,
13,
3166,
2071,
19668,
1053,
5608,
29918,
4299,
13,
13,
572,
29873,
29889,
2214,
... |
sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_generated/models/_models_py3.py | mohamedshabanofficial/azure-sdk-for-python | 0 | 194372 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
29899,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19245,
... |
management/views.py | EsraelDawit-a/Drims-Fse-Project | 0 | 30255 | from django.shortcuts import render,redirect,get_object_or_404
from .forms import *
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from .models import *
from django.views.generic import DetailView,DeleteView
from django.urls import reverse_lazy
from test2.notification impo... | [
1,
515,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
17886,
29892,
657,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
13,
3166,
869,
9514,
1053,
334,
13,
3166,
9557,
29889,
21570,
1053,
7191,
13,
3166,
9557,
29889,
21570,
29... |
attention_module.py | mourga/variational-lstm | 13 | 102866 | import torch
from torch import nn
from torch.nn import functional as F
def masked_normalization(logits, mask):
scores = F.softmax(logits, dim=-1)
# apply the mask - zero out masked timesteps
masked_scores = scores * mask.float()
# re-normalize the masked scores
normed_scores = masked_scores.div(... | [
1,
1053,
4842,
305,
13,
3166,
4842,
305,
1053,
302,
29876,
13,
3166,
4842,
305,
29889,
15755,
1053,
13303,
408,
383,
13,
13,
13,
1753,
11105,
287,
29918,
8945,
2133,
29898,
1188,
1169,
29892,
11105,
1125,
13,
1678,
19435,
353,
383,
29... |
Scripts/HLS_Stream_Dowloader/hls_dowloader.py | WilliamMokoena/portfolio | 0 | 39490 | import sys, os, asyncio, shutil
import wget
from ffmpeg import FFmpeg
# Func calls wget to download the file given in url arg
def webget(url):
wget.download(url)
# Fuc calls ffmpeg to transcode .m3u8 to .mp4
def transcode(ffmpeg):
@ffmpeg.on('stderr')
def on_stderr(line):
print(line)
@ffmpeg.... | [
1,
1053,
10876,
29892,
2897,
29892,
408,
948,
3934,
29892,
528,
4422,
13,
5215,
281,
657,
13,
3166,
14336,
20856,
1053,
21379,
20856,
13,
13,
29937,
383,
4661,
5717,
281,
657,
304,
5142,
278,
934,
2183,
297,
3142,
1852,
13,
1753,
1856... |
src/inmediag/apps.py | TechFitU/MDSOM | 0 | 197598 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class MDSOMConfig(AppConfig):
name = 'inmediag'
label = 'inmediag'
verbose_name = u"<NAME>" | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
1990,
20672,
6156,
29924,
3991,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.