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 |
|---|---|---|---|---|---|
insights/parsers/tests/test_zipl_conf.py | lhuett/insights-core | 121 | 14053 | <filename>insights/parsers/tests/test_zipl_conf.py
from insights.parsers.zipl_conf import ZiplConf
from insights.tests import context_wrap
from insights.parsers import ParseException
import pytest
ZIPL_CONF = """
[defaultboot]
defaultauto
prompt=1
timeout=5
default=linux
target=/boot
[linux]
image=/boot/vmlinuz-3.... | [
1,
529,
9507,
29958,
1144,
5861,
29914,
862,
4253,
29914,
21150,
29914,
1688,
29918,
2526,
572,
29918,
5527,
29889,
2272,
13,
3166,
1663,
5861,
29889,
862,
4253,
29889,
2526,
572,
29918,
5527,
1053,
796,
29875,
572,
16376,
13,
3166,
1663,... |
server.py | jalqueza/CMPUT404-assignment-webserver | 0 | 75600 | <reponame>jalqueza/CMPUT404-assignment-webserver<filename>server.py
# coding: utf-8
import socketserver, os
# Copyright 2013 <NAME>, <NAME>
# Copyright 2021 <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... | [
1,
529,
276,
1112,
420,
29958,
12429,
802,
1362,
29914,
29907,
3580,
2692,
29946,
29900,
29946,
29899,
465,
10194,
29899,
2676,
2974,
29966,
9507,
29958,
2974,
29889,
2272,
13,
29937,
29871,
14137,
29901,
23616,
29899,
29947,
29871,
13,
521... |
gatsby/urls.py | Simple2B/askew12 | 0 | 1606590 | from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include
from django.views.generic import TemplateView
from rest_framework import routers
from api import views
router = routers.DefaultRouter()
router.register(r'samples', views.C... | [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
5527,
29889,
26045,
29889,
7959,
1053,
2294,
13,
3166,
9557,
29889,
26045,
1053,
2224,
29892,
3160,
13,
3166,
9557,
29889,
7406,
29889... |
tripoli/resource_validators/manifest_validator.py | DDMAL/tripoli | 18 | 80355 | # Copyright (c) 2016 <NAME>, <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 limitation the rights
# to use, copy, modify, merge, publish, distr... | [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
529,
5813,
10202,
529,
5813,
29958,
13,
13,
29937,
20894,
2333,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
13,
... |
chopsticks/bubble.py | gitter-badger/chopsticks | 0 | 184457 | from __future__ import print_function
import sys
sys.path = [p for p in sys.path if p.startswith('/')]
__name__ = '__bubble__'
sys.modules[__name__] = sys.modules.pop('__main__')
def debug(msg):
print(msg, file=sys.stderr)
# Reshuffle fds so that we can't break our transport by printing to stdout
import os
infd ... | [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
10876,
13,
9675,
29889,
2084,
353,
518,
29886,
363,
282,
297,
10876,
29889,
2084,
565,
282,
29889,
27382,
2541,
11219,
1495,
29962,
13,
1649,
978,
1649,
353,
525,
1649,... |
waterspout_api/models.py | Water-Systems-Management-UCM/Waterspout | 1 | 1606815 | import logging
import traceback
import decimal
import json
import numpy
import django
from django.db import models # we're going to geodjango this one - might not need it, but could make some things nicer
from django.db.models import Q
from django.contrib.auth.models import Group
from django.contrib.auth import get_... | [
1,
1053,
12183,
13,
5215,
9637,
1627,
13,
5215,
13677,
13,
5215,
4390,
13,
13,
5215,
12655,
13,
13,
5215,
9557,
13,
3166,
9557,
29889,
2585,
1053,
4733,
29871,
396,
591,
29915,
276,
2675,
304,
1737,
397,
5364,
445,
697,
448,
1795,
4... |
ui/app/startup.py | BenjaminPelletier/streamtagger | 2 | 183133 | <filename>ui/app/startup.py<gh_stars>1-10
import logging
from .lib import dbinit
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
log = logging.getLogger('streamtagger')
log.info('Initializing database...')
dbinit.init_db()
log.info('Startup complete; system ready.')
| [
1,
529,
9507,
29958,
1481,
29914,
932,
29914,
2962,
786,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12183,
13,
13,
3166,
869,
1982,
1053,
270,
2109,
277,
13,
13,
21027,
29889,
16121,
3991,
... |
download_scp_stream/download_ftp.py | ahmadsalimi/UtilityScripts | 0 | 99676 | <filename>download_scp_stream/download_ftp.py
import ftplib
from ftplib import FTP
from sys import argv
import warnings
import functions as F
from tqdm import tqdm
import os
warnings.filterwarnings('ignore')
not_to_download = [
"LIDC-IDRI-0001",
"LIDC-IDRI-0004",
"LIDC-IDRI-0007",
"LIDC-IDRI-0010",
... | [
1,
529,
9507,
29958,
10382,
29918,
1557,
29886,
29918,
5461,
29914,
10382,
29918,
23102,
29889,
2272,
13,
5215,
285,
9392,
1982,
13,
3166,
285,
9392,
1982,
1053,
383,
3557,
13,
3166,
10876,
1053,
1852,
29894,
13,
5215,
18116,
13,
5215,
... |
tests/util_test.py | novaksam/elastalert2 | 1 | 133460 | # -*- coding: utf-8 -*-
import logging
import os
import pytest
from datetime import datetime
from datetime import timedelta
from dateutil.parser import parse as dt
from dateutil.tz import tzutc
from unittest import mock
from elastalert.util import add_raw_postfix
from elastalert.util import build_es_conn_config
fro... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
11451,
1688,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
13,
3166,
2635,
4422,... |
setup.py | mudox/pytav | 0 | 41608 | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import find_packages, setup
version = re.search(r"^__version__\s*=\s*'(.*)'",
open('src/tav/cmd.py').read(), re.M).group(1)
setup(
name='tav',
version=version,
description='TBD',
long_descriptio... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
14669,
29889,
2272,
29901,
731,
21245,
8789,
2761,
1213,
15945,
13,
13,
5215,
337,
13,
13,
3166,
731,
21245,
8789,
1053,
1284,
29918,
8318,... |
src/utils/regex_utils/regex_utils.py | BichengWang/python-notebook | 0 | 23069 | import re
def find_indices():
return [m.start(0) for m in re.finditer(reg, content)]
def find_content():
return re.findall(reg, content)
if __name__ == "__main__":
content = 'an example word:cat and word:dog'
reg = r'word:\w'
print(find_indices())
print(find_content())
| [
1,
1053,
337,
13,
13,
13,
1753,
1284,
29918,
513,
1575,
7295,
13,
1678,
736,
518,
29885,
29889,
2962,
29898,
29900,
29897,
363,
286,
297,
337,
29889,
2886,
1524,
29898,
1727,
29892,
2793,
4638,
13,
13,
13,
1753,
1284,
29918,
3051,
729... |
webapp/run.py | 128technology/blaster | 0 | 121805 | from blaster import factory
import blaster
if __name__ == "__main__":
app = factory.create_app(celery=blaster.celery)
app.jinja_env.add_extension('jinja2.ext.do')
app.run(host='0.0.0.0', port=80)
| [
1,
515,
1999,
1901,
1053,
12529,
13,
5215,
1999,
1901,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
623,
353,
12529,
29889,
3258,
29918,
932,
29898,
2242,
708,
29922,
2204,
1901,
29889,
2242,
708,
29897,
13,
... |
Exam_Exercises/Sase.py | Konstantin-Bogdanoski/VI | 2 | 68530 | <reponame>Konstantin-Bogdanoski/VI
from Python_neinformirano_prebaruvanje_final import *
# Check if the white Rook is in a valid position (not in the line of fire of all the black Rooks)
def validityOfWhite(gun, A):
#print("TESTING WHITE VALIDITY")
# print(gun)
location = gun
#print(location[0] != A[4... | [
1,
529,
276,
1112,
420,
29958,
29968,
265,
303,
13027,
29899,
29933,
468,
29881,
16469,
1984,
29914,
18118,
13,
3166,
5132,
29918,
484,
262,
689,
381,
1562,
29918,
1457,
1646,
29884,
3703,
1324,
29918,
8394,
1053,
334,
13,
13,
13,
29937... |
Content/Networking/loadbalancers/AzureELB/WorkloadManager/src/azurelb/common.py | saikirangurijal/cloudcentersuite | 8 | 127598 | <reponame>saikirangurijal/cloudcentersuite<gh_stars>1-10
#!/usr/bin/env python
def construct_fip_id(subscription_id, group_name, lb_name, fip_name):
"""Build the future FrontEndId based on components name.
"""
return ('/subscriptions/{}'
'/resourceGroups/{}'
'/providers/Microsoft.Ne... | [
1,
529,
276,
1112,
420,
29958,
4977,
638,
381,
574,
332,
823,
284,
29914,
9274,
1760,
414,
29884,
568,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
17... |
Core/chekhabar.py | hossshakiba/Che-Khabar-Bot | 3 | 101719 | from telegram.ext import Updater, CommandHandler, callbackcontext
from telegram import Update, ReplyKeyboardMarkup
from telegram.chataction import ChatAction
from telegram.ext import MessageHandler
from telegram.ext.filters import Filters
from currency import *
from coin_gold import *
from crypto import *
from stock im... | [
1,
515,
4382,
1393,
29889,
1062,
1053,
5020,
29881,
1008,
29892,
10516,
4598,
29892,
6939,
4703,
13,
3166,
4382,
1393,
1053,
10318,
29892,
10088,
368,
2558,
3377,
9802,
786,
13,
3166,
4382,
1393,
29889,
305,
532,
428,
1053,
678,
271,
42... |
saas/backend/apps/group/views.py | Canway-shiisa/bk-iam-saas | 0 | 5428 | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29911,
264,
1760,
21319,
29968,
292,
338,
22301,
304,
2304,
278,
1722,
2752,
7881,
491,
3907,
29871,
235,
150,
160,
236,
181,
187,
31... |
app/realoem.py | ballon3/electricdisc | 0 | 51335 | import httpx
import requests
from bs4 import BeautifulSoup as bso
class BMW:
BASE_URL = 'https://www.realoem.com/bmw/'
LANGUAGE = 'enUS'
URL = f"{BASE_URL}{LANGUAGE}"
'https://www.realoem.com/bmw/enUS/partgrp?id=0573-USA-12-1991-K569-BMW-K_75_RT_0565,0573_&mg=46'
'https://www.realoem.com/bmw/enU... | [
1,
1053,
1732,
29916,
29871,
13,
5215,
7274,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
408,
289,
578,
13,
13,
1990,
350,
25365,
29901,
13,
13,
1678,
350,
8127,
29918,
4219,
353,
525,
991,
597,
1636,
29889,
6370,
21942,
29889,
... |
catalogo/views/empleado_view.py | lp2-20172/polleria-serve | 0 | 113709 | from ..models_raiz import Empleado
from rest_framework import serializers, viewsets
from rest_framework import permissions
from django.db.models import Q
from operator import __or__ as OR
from functools import reduce
class EmpleadoSerializer(serializers.ModelSerializer):
class Meta:
model = Empleado
... | [
1,
515,
6317,
9794,
29918,
336,
466,
1053,
2812,
552,
912,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
29892,
1776,
7224,
13,
3166,
1791,
29918,
4468,
1053,
11239,
13,
3166,
9557,
29889,
2585,
29889,
9794,
1053,
660,
13,
3166,
5455,... |
O.py | duongnguyenkt11/data-realtime | 0 | 19835 | <reponame>duongnguyenkt11/data-realtime
from functools import reduce
from bokeh.plotting import figure, output_file, show
from bokeh.io import output_notebook
from CONSTANTS import *
from utilities import *
from bokeh.plotting import figure, output_file, show
import pandas as pd, numpy as np
ENVIRON = C.LOCAL
def mma... | [
1,
529,
276,
1112,
420,
29958,
700,
549,
865,
8631,
264,
1193,
29896,
29896,
29914,
1272,
29899,
276,
1997,
603,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
3166,
1045,
446,
29882,
29889,
5317,
1259,
1053,
4377,
29892,
1962,
29918,
1445... |
stats/management/commands/cachewarmup.py | OlexandrTopuzov/Data_converter | 0 | 1614950 | <filename>stats/management/commands/cachewarmup.py
from django.core.management.base import BaseCommand
from stats.tasks import cache_warm_up
class Command(BaseCommand):
help = 'Cache warming up for stats for now.'
def handle(self, *args, **options):
cache_warm_up()
| [
1,
529,
9507,
29958,
16202,
29914,
21895,
29914,
26381,
29914,
29883,
496,
809,
2817,
786,
29889,
2272,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
3166,
22663,
29889,
20673,
1053,
7090,
29918,
29893,
2817,... |
tests/integration/test_map_failure.py | elin1231/htmap | 21 | 52556 | # Copyright 2018 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
3154,
10983,
272,
8583,
29892,
20972,
17253,
10317,
29892,
13,
29937,
3014,
310,
22581,
29899,
21878,
2285,
29892,
399,
29902,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
133... |
multi_agent.py | liuruoze/HierNet-SC2 | 2 | 190654 | # Copyright 2017 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 required by applicable law or ... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
5087,
9266,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
19... |
whisk/template/{{ cookiecutter.repo_name }}/setup.py | BookletAI/whisk | 8 | 83958 | <filename>whisk/template/{{ cookiecutter.repo_name }}/setup.py
from setuptools import find_packages, setup
setup(
name='{{cookiecutter.project_name}}',
package_dir={'': 'src'},
packages=find_packages(where='src'),
version='0.1.0',
include_package_data=True,
# By default only whisk is added as a... | [
1,
529,
9507,
29958,
1332,
3873,
29914,
6886,
29914,
6224,
15327,
29883,
6463,
29889,
20095,
29918,
978,
500,
6822,
14669,
29889,
2272,
13,
3166,
731,
21245,
8789,
1053,
1284,
29918,
8318,
29892,
6230,
13,
13,
14669,
29898,
13,
1678,
1024... |
2016/python/day20.py | astonshane/AdventOfCode | 0 | 47724 | MAX = 4294967295
blacklist = []
with open("inputs/day20.txt") as f:
for line in f:
line = line.strip().split('-')
blacklist.append([int(x) for x in line])
blacklist.sort()
def part1():
ip = 0
for i in range(0, len(blacklist)):
bl = blacklist[i]
if ip < bl[0]:
... | [
1,
18134,
353,
29871,
29946,
29906,
29929,
29946,
29929,
29953,
29955,
29906,
29929,
29945,
13,
13,
8517,
1761,
353,
5159,
13,
2541,
1722,
703,
2080,
29879,
29914,
3250,
29906,
29900,
29889,
3945,
1159,
408,
285,
29901,
13,
1678,
363,
119... |
readqueue.py | YousefAllam221b/QuickStor | 0 | 1602795 | #!/usr/bin/python3.6
import os,sys, datetime
from subprocess import run
from subprocess import PIPE
cmdline='sh getqueue.sh'
x=run(cmdline.split(),stdout=PIPE).stdout
y=x.decode('utf-8')
z=y.split('\n')
stopfinish=[]
allstopfinish=[]
other=[]
countfinish=0
for x in z:
if len(x) < 4:
continue
st=x.split()
if 'finis... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
29889,
29953,
13,
5215,
2897,
29892,
9675,
29892,
12865,
13,
3166,
1014,
5014,
1053,
1065,
13,
3166,
1014,
5014,
1053,
349,
29902,
4162,
13,
9006,
1220,
2433,
845,
679,
9990,
29889,
845,
... |
synestia-book/_build/jupyter_execute/docs/syndef/PowerLawFits.py | ststewart/synestiabook2 | 0 | 174367 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
#move this notebook to folder above syndef to run
from syndef import synfits #import synestia snapshot (impact database)
import numpy as np
import matplotlib.pyplot as plt
test_rxy=np.linspace(7e6,60e6,100) #m
test_z=np.linspace(0.001e6,30e6,50) #m
rxy=np.log10(test_rx... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29896,
5387,
13,
13,
13,
29937,
11631,
445,
451,
19273,
304,
4138,
2038,
22898,
1389,
304,
1065,
13,
3166,
22898,
1... |
covid/stream.py | yiliayliu/twitter-streaming | 1 | 150038 | <filename>covid/stream.py<gh_stars>1-10
import boto3
import json
from datetime import datetime
import calendar
import random
import time
import sys
# from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from configparser import SafeConfigParser
#Variables th... | [
1,
529,
9507,
29958,
24542,
333,
29914,
5461,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
289,
3747,
29941,
30004,
13,
5215,
4390,
30004,
13,
3166,
12865,
1053,
12865,
30004,
13,
5215,
17684,
... |
src/udemy_dl/udemy_dl.py | krishnaramg3/hello1 | 17 | 82797 | <reponame>krishnaramg3/hello1<gh_stars>10-100
#!/usr/bin/env python
# -*- coding: utf8 -*-
import requests
import requests.sessions
import argparse
import getpass
import sys
import re
import os
import json
from .download import download, DLException
from ._version import __version__
class Session:
headers = {'U... | [
1,
529,
276,
1112,
420,
29958,
12748,
728,
29876,
11269,
29887,
29941,
29914,
12199,
29896,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
... |
lib_exec/StereoPipeline/libexec/asp_image_utils.py | sebasmurphy/iarpa | 20 | 4190 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __BEGIN_LICENSE__
# Copyright (c) 2009-2013, United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The NGT platform is licensed under the Apache License, Version 2.0 (the
# "Lic... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
4770,
29933,
17958,
29918,
27888,
1430,
1660,
1649,
13,
29937,
29871,
14187,
1266,
313,
29883,
29... |
graphdg/parse/distances.py | gncs/graphdg | 22 | 116456 | from dataclasses import dataclass
from typing import Tuple, List
import ase.data
import numpy as np
from networkx import Graph
from rdkit import Chem
import graphdg.parse.tools as tools
from graphdg.parse.extended_graph import mol_to_extended_graph
from graphdg.tools import GLOBALS, NODES, EDGES, SENDERS, RECEIVERS, ... | [
1,
515,
848,
13203,
1053,
848,
1990,
13,
3166,
19229,
1053,
12603,
552,
29892,
2391,
13,
13,
5215,
263,
344,
29889,
1272,
13,
5215,
12655,
408,
7442,
13,
3166,
3564,
29916,
1053,
12367,
13,
3166,
364,
29881,
7354,
1053,
12677,
13,
13,... |
pandasbikeshed/plot.py | sholderbach/pandasbikeshed | 1 | 135763 | <gh_stars>1-10
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.stats import pearsonr, spearmanr
def robust_hist(x, ax=None, **kwargs):
"""
Wrapper function to `plt.hist` dropping values that are not finite
Returns:
A... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
408,
286,
572,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
409,
370,
1398,
408,
... |
vpnmon.py | clambin/vpnmon | 0 | 155941 | <gh_stars>0
from vpnmon.vpnmon import vpnmon
from vpnmon.configuration import get_configuration
if __name__ == '__main__':
vpnmon(get_configuration())
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
325,
21257,
3712,
29889,
29894,
21257,
3712,
1053,
325,
21257,
3712,
13,
3166,
325,
21257,
3712,
29889,
13305,
1053,
679,
29918,
13305,
13,
13,
361,
4770,
978,
1649,
1275,
525,
16... |
hproxy/scheduler/valid_proxy.py | yejianxin2015/hproxy | 0 | 80218 | #!/usr/bin/env python
"""
Created by howie.hu at 08/04/2018.
"""
import asyncio
import sys
import time
sys.path.append('../../')
from hproxy.database import DatabaseSetting
from hproxy.utils import logger
from hproxy.spider.proxy_tools import get_proxy_info
db_client = DatabaseSetting()
async def valid_proxies():... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
6760,
630,
491,
920,
347,
29889,
6905,
472,
29871,
29900,
29947,
29914,
29900,
29946,
29914,
29906,
29900,
29896,
29947,
29889,
13,
15945,
29908,
13,
5215,
408,
948,
39... |
webservice/gh_api.py | maoo/github_app_boilerplate | 0 | 175357 | from cryptography.hazmat.backends import default_backend
from requests.models import HTTPBasicAuth
import jwt
import requests
import time
import os
gh_pat = os.environ.get("GH_PAT")
gh_user = "maoo"
gh_app_id = os.environ.get("GH_APP_ID")
fname = os.environ.get("GH_PRIVATE_KEY")
cert_str = open(fname, 'r').read()
cert... | [
1,
515,
24941,
5275,
29889,
29882,
834,
2922,
29889,
1627,
1975,
1053,
2322,
29918,
27852,
13,
3166,
7274,
29889,
9794,
1053,
7331,
16616,
6444,
13,
5215,
432,
14554,
13,
5215,
7274,
13,
5215,
931,
13,
5215,
2897,
13,
13,
12443,
29918,
... |
prototorch/functions/__init__.py | codacy-badger/prototorch | 0 | 177899 | <reponame>codacy-badger/prototorch<filename>prototorch/functions/__init__.py<gh_stars>0
"""ProtoTorch functions."""
from .activations import identity, sigmoid_beta, swish_beta
from .competitions import knnc, wtac
__all__ = [
'identity',
'sigmoid_beta',
'swish_beta',
'knnc',
'wtac',
]
| [
1,
529,
276,
1112,
420,
29958,
19284,
4135,
29899,
12313,
914,
29914,
771,
4260,
25350,
29966,
9507,
29958,
771,
4260,
25350,
29914,
12171,
29914,
1649,
2344,
26914,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
1184... |
src/utils.py | dsilvalo28/AIVA-DAIA | 1 | 185823 | import cv2
import os, sys
import numpy as np
save_path = 'images/train/'
# Helpful functions #
def save_image(name, img):
if not os.path.exists(save_path):
os.makedirs(save_path)
cv2.imwrite(save_path+name+'.tif', np.array(img, dtype=np.uint8))
def get_api_key():
if len(sys.argv) is 2:
... | [
1,
1053,
13850,
29906,
13,
5215,
2897,
29892,
10876,
13,
5215,
12655,
408,
7442,
13,
13,
7620,
29918,
2084,
353,
525,
8346,
29914,
14968,
22208,
13,
13,
13,
29937,
22305,
1319,
3168,
396,
13,
1753,
4078,
29918,
3027,
29898,
978,
29892,
... |
bupt_ncov_report/program_utils/program_utils.py | llllxq/bupt-ncov-report | 8 | 110027 | <gh_stars>1-10
__all__ = (
'ProgramUtils',
)
import json
import logging
from typing import Any, Dict, List, Tuple, cast
from ..constant import *
from ..predef import *
from ..pure_utils import *
logger = logging.getLogger(__name__)
class ProgramUtils:
"""关系到疫情上报网站的具体逻辑的工具函数。"""
def __init__(
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1649,
497,
1649,
353,
313,
13,
1678,
525,
9283,
12177,
742,
13,
29897,
13,
13,
5215,
4390,
13,
5215,
12183,
13,
3166,
19229,
1053,
3139,
29892,
360,
919,
29892,
2... |
rogerthat/utils/parsing_numbers.py | TheHolyRoger/RogerThat | 9 | 1610470 | <reponame>TheHolyRoger/RogerThat
from decimal import Decimal as Dec
def decimal_or_none(num_string):
return Dec(str(num_string)) if num_string and str(num_string).replace('.', '').isdigit() else None
def decimal_or_zero(num_string):
return Dec(str(num_string)) if num_string and str(num_string).replace('.', ... | [
1,
529,
276,
1112,
420,
29958,
1576,
29950,
18333,
29934,
468,
261,
29914,
29934,
468,
261,
7058,
13,
3166,
13677,
1053,
3826,
3039,
408,
3826,
13,
13,
13,
1753,
13677,
29918,
272,
29918,
9290,
29898,
1949,
29918,
1807,
1125,
13,
1678,
... |
service/app.py | alceballosa/BikeDemandEACD | 0 | 130377 | <reponame>alceballosa/BikeDemandEACD
import sys
import typing as t
from datetime import datetime
from functools import lru_cache
import joblib
import numpy as np
import pandas as pd
from fastapi import Body # type: ignore # noqa: E402
from fastapi import Depends
from fastapi import FastAPI
from pydantic import BaseSe... | [
1,
529,
276,
1112,
420,
29958,
284,
346,
2135,
3628,
29914,
29933,
9345,
29928,
331,
392,
29923,
2477,
29928,
13,
5215,
10876,
13,
5215,
19229,
408,
260,
13,
3166,
12865,
1053,
12865,
13,
3166,
2090,
312,
8789,
1053,
301,
582,
29918,
... |
scripts/Figures and Videos/Figure 2B/produce_fig_2B.py | jfaccioni/clovars | 0 | 133688 | <reponame>jfaccioni/clovars<gh_stars>0
import random
import sys
from pathlib import Path
import numpy as np
from clovars.main import main as clovars_main
RANDOMNESS_SEED = 31
def main():
"""Main function of this script."""
random.seed(RANDOMNESS_SEED)
np.random.seed(RANDOMNESS_SEED)
for scenario in... | [
1,
529,
276,
1112,
420,
29958,
29926,
29888,
5753,
3688,
29914,
29883,
5590,
1503,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4036,
13,
5215,
10876,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
12655,
408,
7442,
13,
13,... |
losses/msloss.py | hiimmuc/Speaker-verification | 2 | 46182 | <filename>losses/msloss.py<gh_stars>1-10
# Copyright (c) Malong Technologies Co., Ltd.
# All rights reserved.
#
# Contact: <EMAIL>
#
# This source code is licensed under the LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
class LossFunction(n... | [
1,
529,
9507,
29958,
6758,
267,
29914,
1516,
6758,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
313,
29883,
29897,
3792,
549,
8364,
11763,
3189,
1696,
19806,
29889,
13,
29937,
2178,... |
loldib/getratings/models/NA/na_khazix/na_khazix_top.py | koliupy/loldib | 0 | 19217 | from getratings.models.ratings import Ratings
class NA_Khazix_Top_Aatrox(Ratings):
pass
class NA_Khazix_Top_Ahri(Ratings):
pass
class NA_Khazix_Top_Akali(Ratings):
pass
class NA_Khazix_Top_Alistar(Ratings):
pass
class NA_Khazix_Top_Amumu(Ratings):
pass
class NA_Khazix_Top_Anivia(Ratings):
... | [
1,
515,
679,
3605,
886,
29889,
9794,
29889,
3605,
886,
1053,
17450,
886,
30004,
13,
30004,
13,
1990,
8598,
29918,
29968,
29882,
834,
861,
29918,
7031,
29918,
29909,
7816,
29916,
29898,
29934,
271,
886,
1125,
30004,
13,
12,
3364,
30004,
... |
dislib/model_selection/_search.py | alexbarcelo/dislib | 36 | 9659 | <gh_stars>10-100
from abc import ABC, abstractmethod
from collections import defaultdict
from collections.abc import Sequence
from functools import partial
from itertools import product
import numpy as np
from pycompss.api.api import compss_wait_on
from scipy.stats import rankdata
from sklearn import clone
from sklear... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
25638,
1053,
16417,
29892,
9846,
5696,
13,
3166,
16250,
1053,
2322,
8977,
13,
3166,
16250,
29889,
10736,
1053,
922,
3910,
13,
3166,
2090,
312,
878... |
remove.py | LaureoleSAS/RaspberryPi | 0 | 109569 | <reponame>LaureoleSAS/RaspberryPi
import os, sys
path = "/home/pi/Documents/Serveur/Videos/copy/"
dirs = os.listdir(path)
for file in dirs:
if '.mp4' in file:
nom_split = file.split('-')
os.system('sudo cp '+ path + file + ' /home/pi/Documents/Serveur/Videos/'+nom_split[0]+'_'+nom_split[1]+'/')
... | [
1,
529,
276,
1112,
420,
29958,
5661,
545,
1772,
29903,
3289,
29914,
29934,
4692,
16344,
12197,
13,
5215,
2897,
29892,
10876,
13,
13,
2084,
353,
5591,
5184,
29914,
1631,
29914,
20128,
29914,
1748,
345,
332,
29914,
29963,
7958,
29914,
8552,... |
cdd/cst.py | SamuelMarks/docstring2class | 0 | 69780 | """
Concrete Syntax Tree for Python 3.6+ source code
"""
from cdd.cst_utils import cst_parser, cst_scanner
def cst_parse(source):
"""
Parse Python source lines into a Concrete Syntax Tree
:param source: Python source code
:type source: ```str```
:return: List of `namedtuple`s with at least ("li... | [
1,
9995,
13,
1168,
9084,
21306,
15472,
363,
5132,
29871,
29941,
29889,
29953,
29974,
2752,
775,
13,
15945,
29908,
13,
13,
3166,
274,
1289,
29889,
29883,
303,
29918,
13239,
1053,
274,
303,
29918,
16680,
29892,
274,
303,
29918,
1557,
7310,
... |
tests/main.py | tdegeus/enstat | 0 | 46535 | import unittest
from collections import defaultdict
import numpy as np
import enstat.mean
class Test_mean(unittest.TestCase):
"""
tests
"""
def test_scalar(self):
"""
Basic test of "mean" and "std" using a random sample.
"""
average = enstat.scalar()
averag... | [
1,
1053,
443,
27958,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
5215,
12655,
408,
7442,
13,
13,
5215,
427,
6112,
29889,
12676,
13,
13,
13,
1990,
4321,
29918,
12676,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,... |
Clients/PythonCatalyst/Testing/package_test/__init__.py | xj361685640/ParaView | 815 | 82042 | <gh_stars>100-1000
# filename: __init__.py
# used to test that Catalyst can load Packages
# correctly.
from paraview.simple import *
from paraview import print_info
# print start marker
print_info("begin '%s'", __name__)
tracker = {}
def count(f):
def wrapper(*args, **kwargs):
global tracker
c = ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
10422,
29901,
4770,
2344,
26914,
2272,
13,
29937,
1304,
304,
1243,
393,
11732,
858,
508,
2254,
18744,
1179,
13,
29937,
5149,
29889,
... |
tests/test_condition.py | richshaw2015/behavior3py | 0 | 64830 | import b3
import unittest
class TestCondition(unittest.TestCase):
def test_category(self):
self.assertEqual(b3.Condition.category, b3.CONDITION)
if __name__ == '__main__':
unittest.main()
| [
1,
1053,
289,
29941,
13,
5215,
443,
27958,
13,
13,
13,
1990,
4321,
25255,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
7320,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29890,
29941,
29889,
25... |
main.py | Kingtous/pyLex | 1 | 94374 | <gh_stars>1-10
'''
@Author: Kingtous
@Date: 2019-11-01 18:40:29
@LastEditors: Kingtous
@LastEditTime: 2019-11-06 19:47:42
@Description: Kingtous' Code
'''
"""
Author: Kingtous
Date : 2019/09/24
"""
import nfa2dfa as DFATool
import reg2nfa as REGTool
import sys,os,networkx as nx
import tools,constDef
# 因为字符中(,),*跟词法里面的... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
29992,
13720,
29901,
4088,
29873,
681,
13,
29992,
2539,
29901,
29871,
29906,
29900,
29896,
29929,
29899,
29896,
29896,
29899,
29900,
29896,
29871,
29896,
29947... |
setup.py | ev3dev-python-tools/ev3devlogging | 0 | 175774 | from setuptools import setup
import os.path
import sys
setup(
name="ev3devlogging",
version="1.0.1",
description="easy logging library for ev3dev",
long_description="""
easy logging library for ev3dev
For more info: https://github.com/ev3dev-python-tools/ev3devlogging
""",
url="https://... | [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
5215,
2897,
29889,
2084,
13,
5215,
10876,
13,
13,
13,
14669,
29898,
13,
418,
1024,
543,
5750,
29941,
3359,
21027,
613,
13,
418,
1873,
543,
29896,
29889,
29900,
29889,
29896,
613,
13,
418,
6139... |
Project1/toFrames.py | vinitkumawat/uta-machine-learning | 0 | 183634 | import cv2
import numpy as np
import imutils
import shutil,os
shutil.rmtree('frames')
try:
os.makedirs('frames')
except OSError as e:
pass
video='2.mp4'
cap = cv2.VideoCapture(video)
cnt=0
if (cap.isOpened()== False):
print("Error opening video stream or file")
ret,first_frame = cap.read()
while(cap.isOp... | [
1,
1053,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
527,
13239,
13,
5215,
528,
4422,
29892,
359,
13,
13,
13,
845,
4422,
29889,
1758,
8336,
877,
19935,
1495,
13,
2202,
29901,
13,
1678,
2897,
29889,
29885,
12535,
12935,
877,
19... |
backend/termination_request/models.py | adabutch/account_tracker | 0 | 111360 | from django.db import models
from django.contrib.auth.models import User
class TerminationRequest(models.Model):
"""
When an employee leaves the organization
remove access to the different services that were previously requested
"""
requester = models.ForeignKey(
User, related_name='reques... | [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
13,
13,
1990,
11814,
3381,
3089,
29898,
9794,
29889,
3195,
1125,
13,
1678,
9995,
13,
1678,
1932,
385,
19001,
11308,
278,
1301... |
utils/rendering_layer.py | CSuppan/two-shot-brdf-shape | 0 | 186625 | <reponame>CSuppan/two-shot-brdf-shape
# -----------------------------------------------------------------------
# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
#
# This work is made available
# under the Nvidia Source Code License (1-way Commercial).
#
# Official Implementation of the CVPR2020 Paper
# Tw... | [
1,
529,
276,
1112,
420,
29958,
29907,
20182,
273,
29914,
10184,
29899,
8962,
29899,
1182,
2176,
29899,
12181,
13,
29937,
448,
2683,
2683,
2683,
2683,
22158,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
29892... |
genes/models.py | xueyanmu/django-genes | 4 | 106011 | <reponame>xueyanmu/django-genes<gh_stars>1-10
import re
from django.db import models
from django.core.exceptions import FieldError
from organisms.models import Organism
# Regular expressions to be matched in the methods of 'Gene'.
nonalpha = re.compile(r'[^a-zA-Z0-9]')
num = re.compile(r'[0-9]')
class Gene(models.M... | [
1,
529,
276,
1112,
420,
29958,
29916,
434,
10094,
2589,
29914,
14095,
29899,
1885,
267,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
337,
13,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
... |
src/utils/pytorch_evaluation.py | owkin/idash-2020 | 5 | 89801 | #!/usr/bin/env python
# Copyright 2021 Owkin, inc.
#
# 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... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
438,
29893,
9089,
29892,
5528,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
... |
Tests/Methods/Mesh/Interpolation/test_interpolation.py | harshasunder-1/pyleecan | 2 | 8222 | <filename>Tests/Methods/Mesh/Interpolation/test_interpolation.py<gh_stars>1-10
# -*- coding: utf-8 -*-
import pytest
import numpy as np
from unittest import TestCase
from pyleecan.Classes.CellMat import CellMat
from pyleecan.Classes.MeshSolution import MeshSolution
from pyleecan.Classes.PointMat import PointMat
from ... | [
1,
529,
9507,
29958,
24376,
29914,
26112,
29914,
29924,
12094,
29914,
4074,
3733,
362,
29914,
1688,
29918,
1639,
3733,
362,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
... |
dashboard/source/dashboard/__init__.py | mueller-stephan/car-classification | 2 | 190011 | from .layout import attempt, finish_page, main_layout, result, start_page
__all__ = ['main_layout', 'attempt', 'result', 'start_page', 'finish_page']
| [
1,
515,
869,
2680,
1053,
4218,
29892,
8341,
29918,
3488,
29892,
1667,
29918,
2680,
29892,
1121,
29892,
1369,
29918,
3488,
13,
13,
1649,
497,
1649,
353,
6024,
3396,
29918,
2680,
742,
525,
1131,
3456,
742,
525,
2914,
742,
525,
2962,
29918... |
LogRecorder.py | yangshouguo/Graph-based_Bug_Search | 9 | 1613237 |
import logging
class CLogRecoder:
def __init__(self, logfile = 'log.log', format = '%(asctime)s : %(message)s', level = logging.DEBUG):
logging.basicConfig(filename= logfile, level= level , format= format)
self._ft = format
def addStreamHandler(self):
console = logging.StreamHandler... | [
1,
29871,
13,
5215,
12183,
13,
13,
13,
1990,
315,
3403,
4789,
6119,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1480,
1445,
353,
525,
1188,
29889,
1188,
742,
3402,
353,
14210,
29898,
294,
312,
603,
29897,
29879,
584,
127... |
percona-nagios-plugins/nagios/bin/pmp-check-aws-rds.py | waja/pkg-nagios-plugins-contrib | 0 | 143366 | <gh_stars>0
#!/usr/bin/env python
"""Nagios plugin for Amazon RDS monitoring.
This program is part of $PROJECT_NAME$
License: GPL License (see COPYING)
Author <NAME>
Copyright 2014-2015 Percona LLC and/or its affiliates
"""
import datetime
import optparse
import pprint
import sys
import boto
import boto.rds
import ... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
29940,
351,
2363,
7079,
363,
16631,
390,
8452,
29652,
29889,
13,
13,
4013,
1824,
338,
760,
310,
395,
8618,
17637,
2... |
Models/__init__.py | Sijiu/Xbill | 14 | 81756 | <reponame>Sijiu/Xbill
from .BaseModel import database, BillModel
from .AlipayBill import AlipayBill
from .WeChatBill import WeChatBill
from .ICBCBill import ICBCBill
from .XBill import XBill
def create_table():
database.create_tables([AlipayBill, WeChatBill, ICBCBill, XBill], safe=True)
| [
1,
529,
276,
1112,
420,
29958,
29903,
823,
5871,
29914,
29990,
29890,
453,
13,
3166,
869,
5160,
3195,
1053,
2566,
29892,
6682,
3195,
13,
3166,
869,
29909,
3466,
388,
29933,
453,
1053,
319,
3466,
388,
29933,
453,
13,
3166,
869,
4806,
1... |
TwoDPCA.py | UtkarshPandey55557/Face_detcetion | 0 | 131938 | <reponame>UtkarshPandey55557/Face_detcetion
import numpy as np
import cv2
import scipy.linalg as s_linalg
class two_d_pca_class:
#function used for finding value of p for covering 95% of image information
def give_p(self, d):
#sum of all eigen values
sum = np.sum(d)
sum_9... | [
1,
529,
276,
1112,
420,
29958,
29965,
29873,
5689,
845,
29925,
4182,
29891,
29945,
29945,
29945,
29945,
29955,
29914,
23360,
29918,
4801,
29883,
300,
291,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
13850,
29906,
30004,
13,
5215,
4560,
2... |
graphbar/graphbar.py | manuelgilm/graphbar | 0 | 170253 | import matplotlib.pyplot as plt
import numpy as np
def plot_bars_by_group(grouped_data,colors,edgecolor=None,property_name="Data by group",ylabel="Value",figsize=(16,6),annotations = True):
"""Make bar graph by group.
Params:
------
grouped_data: (dict)
Each key represents a grou... | [
1,
1053,
22889,
29889,
2272,
5317,
408,
14770,
29871,
13,
5215,
12655,
408,
7442,
29871,
13,
13,
13,
13,
1753,
6492,
29918,
28408,
29918,
1609,
29918,
2972,
29898,
2972,
287,
29918,
1272,
29892,
27703,
29892,
12864,
2780,
29922,
8516,
298... |
RACE_for_thesis/src/nn_layers.py | l11x0m7/master_thesis_public | 1 | 199101 | <gh_stars>1-10
import theano.tensor as T
import lasagne
import lasagne.layers as L
# my addition
class SelfAttention(L.MergeLayer):
# incomings[0]: B * P * 2D
# B * P
def __init__(self, incomings, num_units,
nonlinearity=lasagne.nonlinearities.tanh,
mask_input=None,
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
278,
1562,
29889,
20158,
408,
323,
13,
5215,
1869,
5889,
13,
5215,
1869,
5889,
29889,
29277,
408,
365,
13,
13,
13,
29937,
590,
6124,
13,
1990,
21782,
4165,
... |
tmach/tmach_def.py | cbchoi/tmach | 0 | 120132 | from enum import Enum, auto
class StrEnum(Enum):
def _generate_next_value(name, start, count, last_values):
return name
def __repr__(self):
return self.name
def __str__(self):
return self.name
class RegRegOpcode(StrEnum):
HALT = auto()
IN = auto()
OUT = auto()
ADD = auto()
SUB = auto()
MUL = auto()
... | [
1,
515,
14115,
1053,
1174,
398,
29892,
4469,
13,
13,
1990,
3767,
16854,
29898,
16854,
1125,
13,
12,
1753,
903,
17158,
29918,
4622,
29918,
1767,
29898,
978,
29892,
1369,
29892,
2302,
29892,
1833,
29918,
5975,
1125,
13,
12,
12,
2457,
1024... |
tests/transformers/test_uniqueness.py | vishalbelsare/tsfuse | 23 | 72718 | import numpy as np
from tsfuse.transformers.uniqueness import *
from tsfuse.data import Collection
def test_has_duplicate_true():
x = Collection.from_array([1, 2, 3, 3])
actual = HasDuplicate().transform(x).values
np.testing.assert_equal(actual, True)
def test_has_duplicate_false():
x = Collection.... | [
1,
1053,
12655,
408,
7442,
13,
13,
3166,
260,
4668,
1509,
29889,
9067,
414,
29889,
3909,
339,
18543,
1053,
334,
13,
3166,
260,
4668,
1509,
29889,
1272,
1053,
14348,
13,
13,
13,
1753,
1243,
29918,
5349,
29918,
20908,
5926,
29918,
3009,
... |
app.py | victorcesc/sistema-gerador-avaliacoes | 0 | 133028 | <reponame>victorcesc/sistema-gerador-avaliacoes
import random
from flask import render_template, flash, request
from flask_bootstrap import Bootstrap
from flask_nav import Nav
from flask_nav.elements import Navbar, View, Subgroup, Link
from werkzeug.utils import redirect
from forms import *
from models import *
boos... | [
1,
529,
276,
1112,
420,
29958,
29894,
919,
272,
778,
29883,
29914,
29879,
28474,
29899,
914,
3136,
29899,
7712,
423,
1111,
267,
13,
5215,
4036,
13,
13,
3166,
29784,
1053,
4050,
29918,
6886,
29892,
11013,
29892,
2009,
13,
3166,
29784,
29... |
backend/app/utils.py | dashdashforce/int20h-test-photo-viewer | 0 | 23276 |
from functools import reduce
from itertools import groupby
from operator import add, itemgetter
def merge_records_by(key, combine):
return lambda first, second: {
k: first[k] if k == key else combine(first[k], second[k])
for k in first
}
def merge_list_of_records_by(key, combine):
keypr... | [
1,
29871,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
3166,
4256,
8504,
1053,
2318,
1609,
13,
3166,
5455,
1053,
788,
29892,
2944,
657,
357,
13,
13,
13,
1753,
10366,
29918,
3757,
4339,
29918,
1609,
29898,
1989,
29892,
14405,
1125,
13,
... |
arviz/plots/backends/matplotlib/separationplot.py | sudojarvis/arviz | 1,159 | 31540 | <reponame>sudojarvis/arviz
"""Matplotlib separation plot."""
import matplotlib.pyplot as plt
import numpy as np
from ...plot_utils import _scale_fig_size
from . import backend_kwarg_defaults, backend_show, create_axes_grid
def plot_separation(
y,
y_hat,
y_hat_line,
label_y_hat,
expected_events,
... | [
1,
529,
276,
1112,
420,
29958,
29879,
566,
3848,
279,
1730,
29914,
279,
29894,
466,
13,
15945,
29908,
9782,
17357,
23683,
6492,
1213,
15945,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
2023,... |
src/python/turicreate/toolkits/object_detector/_tf_image_augmenter.py | cookingcodewithme/turicreate | 11,356 | 194278 | # -*- coding: utf-8 -*-
# Copyright © 2019 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14187,
1266,
29871,
30211,
29871,
29906,
29900,
29896,
29929,
12113,
9266,
29889,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
4803,
310,
445,
2... |
tests/__init__.py | zhangyiming07/QT4C | 53 | 6345 | # -*- coding: utf-8 -*-
#
# Tencent is pleased to support the open source community by making QT4C available.
# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
# QT4C is licensed under the BSD 3-Clause License, except for the third-party components listed below.
# A copy of the BSD 3-Cla... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
13,
29937,
12444,
1760,
338,
22301,
304,
2304,
278,
1722,
2752,
7881,
491,
3907,
660,
29911,
29946,
29907,
3625,
29889,
259,
13,
29937,
14187,
126... |
ver_colores.py | maltenzo/surrendeador | 0 | 34878 | <gh_stars>0
import mouse
import keyboard
from PIL import Image
import pyscreenshot
from time import sleep
import os
def ver():
while True:
img = pyscreenshot.grab()
width, height = img.size
pixel_values = list(img.getdata())
print (pixel_values[width*mouse.get_position()[1]+mouse.get_posi... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
9495,
30004,
13,
5215,
12247,
30004,
13,
3166,
349,
6227,
1053,
7084,
30004,
13,
5215,
282,
952,
24546,
8711,
30004,
13,
3166,
931,
1053,
8709,
30004,
13,
5215,
2897,
30004,
13,
... |
bounded_multi_processing.py | zinob/python_tutorials | 0 | 117953 | #!/usr/bin/python
## """
## How do i parallelize a retriever function and a sender/saver function when they
## 1: require mpthreads
## 2: The dataammount is significant enough that I don't want the receiver to get to far ahead of the sender.
## """
## This code uses a semaphore to bound the amount of in-flight data.
#... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
2277,
9995,
13,
2277,
1128,
437,
474,
8943,
675,
263,
5663,
347,
369,
740,
322,
263,
10004,
29914,
4977,
369,
740,
746,
896,
13,
2277,
29871,
29896,
29901,
1996,
22326,
28993,
13,
2277... |
__init__.py | dedalodaelus/hass-http_legacy_auth | 1 | 135155 | <reponame>dedalodaelus/hass-http_legacy_auth
import asyncio
from aiohttp.web import middleware
from aiohttp.frozenlist import FrozenList
import logging
from homeassistant.components.http import HomeAssistantHTTP
from homeassistant.components.http.const import KEY_AUTHENTICATED
# The domain of your component. Should b... | [
1,
529,
276,
1112,
420,
29958,
7176,
284,
397,
4271,
375,
29914,
29882,
465,
29899,
1124,
29918,
1397,
4135,
29918,
5150,
13,
5215,
408,
948,
3934,
13,
3166,
263,
601,
1124,
29889,
2676,
1053,
7256,
2519,
13,
3166,
263,
601,
1124,
298... |
src/zojax/security/utils.py | Zojax/zojax.security | 0 | 43279 | ##############################################################################
#
# Copyright (c) 2007 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | [
1,
835,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29955,
796,
2300,
15025,
322,
2866,
1091,
29560,
29889,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
... |
simulation_fluid.py | danielpm153/fluid2D | 1 | 82469 | <reponame>danielpm153/fluid2D
import numpy
import cv2
class MeshImage:
def __init__(self, image_path: str) -> None:
self.__image = cv2.imread(image_path)
self.__image_gray = cv2.cvtColor(self.__image, cv2.COLOR_RGB2GRAY)
self.__height = self.__image_gray.shape[0]
self.__width = sel... | [
1,
529,
276,
1112,
420,
29958,
18386,
709,
3358,
29896,
29945,
29941,
29914,
1579,
5416,
29906,
29928,
13,
5215,
12655,
13,
5215,
13850,
29906,
13,
13,
13,
1990,
341,
12094,
2940,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
19... |
script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | 2 | 22816 | <filename>script/download_pretrained.py
"""
fork THIS excellent downloader
https://www.kaggle.com/maroberti/transformers-model-downloader-pytorch-tf2-0
"""
from typing import Union
from pathlib import Path
import os
import transformers
from transformers import AutoConfig, AutoTokenizer, TFAutoModel
def transformers... | [
1,
529,
9507,
29958,
2154,
29914,
10382,
29918,
1457,
3018,
1312,
29889,
2272,
13,
15945,
29908,
13,
29888,
548,
3446,
3235,
15129,
5142,
261,
13,
991,
597,
1636,
29889,
29895,
351,
6234,
29889,
510,
29914,
3034,
4950,
2034,
29914,
9067,
... |
drf_signed_auth/compat.py | marcgibbons/drf_signed_auth | 11 | 125249 | # pylint: disable=W0611
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
try:
from unittest import mock
except ImportError:
import mock
try:
from importlib import reload
except ImportError:
reload = reload
| [
1,
396,
282,
2904,
524,
29901,
11262,
29922,
29956,
29900,
29953,
29896,
29896,
13,
2202,
29901,
13,
1678,
515,
9557,
29889,
26045,
1053,
11837,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
9557,
29889,
3221,
29889,
2271,
9778,
874,
1053... |
codewars/range-extraction.py | austinmccalley/challenge-sites | 0 | 104252 | <reponame>austinmccalley/challenge-sites
def check_next_num(inp, j):
for i in range(j, len(inp)):
elm = inp[i]
if len(inp) > i+1:
if inp[i+1] == (elm+1):
check_next_num(inp, i+1)
else:
if j == 0:
return i
ret... | [
1,
529,
276,
1112,
420,
29958,
29874,
504,
262,
29885,
617,
284,
2330,
29914,
305,
11768,
29899,
16315,
13,
1753,
1423,
29918,
4622,
29918,
1949,
29898,
262,
29886,
29892,
432,
1125,
13,
1678,
363,
474,
297,
3464,
29898,
29926,
29892,
7... |
src/core/schemas/base.py | nefarius/portfolio-backend | 6 | 1617046 | <filename>src/core/schemas/base.py
import json
import logging
from marshmallow import Schema, post_load
from django.utils.translation import get_language
from ..skosmos import get_preflabel
logger = logging.getLogger(__name__)
class GenericModel:
def __init__(self, schema, **kwargs):
self.__schema__ =... | [
1,
529,
9507,
29958,
4351,
29914,
3221,
29914,
11993,
29914,
3188,
29889,
2272,
13,
5215,
4390,
13,
5215,
12183,
13,
13,
3166,
1766,
845,
29885,
9536,
1053,
1102,
2603,
29892,
1400,
29918,
1359,
13,
13,
3166,
9557,
29889,
13239,
29889,
... |
manage.py | sergiosuarez/MapTweets | 0 | 165924 | #!/usr/bin/env python
import os
import sys
from twit.wsgi import application
WSGI_APPLICATION = 'twit.wsgi.application'
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "twit.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
3166,
3252,
277,
29889,
5652,
3146,
1053,
2280,
13,
13,
7811,
29954,
29902,
29918,
3301,
7390,
28541,
353,
525,
7516,
277,
29889,
5652,
3146,
29889... |
namePlotter.py | partofthething/nameAnalysis | 0 | 54742 | <reponame>partofthething/nameAnalysis
"""
Scans text for first names and prints out most common ones as document goes on
Useful for analyzing journals or whatever.
"""
# controls
NUM_FILE_SEGMENTS = 25
NUM_TOP_NAMES = 8
# consts
FEMALE = 0
MALE = 1
EITHER = 2
def read_names(filename):
"""
read potential fi... | [
1,
529,
276,
1112,
420,
29958,
1595,
974,
386,
1408,
29914,
978,
21067,
4848,
13,
15945,
29908,
13,
4421,
550,
1426,
363,
937,
2983,
322,
14677,
714,
1556,
3619,
6743,
408,
1842,
5771,
373,
13,
13,
11403,
1319,
363,
29537,
292,
21824,... |
sagas/tests/test_trans_2.py | samlet/stack | 3 | 199146 | #! /usr/bin/env python
# -*- coding:utf-8 -*-
import urllib.request
import urllib.parse
import json
import execjs
import re
import time
import random
from sagas.nlu.translator import display_translations
class GoogleTrans(object):
def __init__(self):
self.url = 'https://translate.google.cn/translate_a/s... | [
1,
396,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
9420,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
3142,
1982,
29889,
3827,
13,
5215,
3142,
1982,
29889,
5510,
13,
5215,
4390,
13,
5... |
installer/plugins/apt.py | ssbanerje/dotfiles | 5 | 182808 | <gh_stars>1-10
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import subprocess
import dotbot
class Apt(dotbot.Plugin):
_updateDirective = 'aptupdate'
_aptDirective = 'apt'
def __init__(self, context):
super(Apt, self).__init__(context)
self._sup_stdout = False if context.optio... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
2897,
13,
5215,
... |
second_neural_network/generator_second_neural_network.py | ADCenterNetwork/discern-fmk | 0 | 137753 | import numpy
import os
import torch as torch
import torch.nn as nn
import torch.nn.functional as F
from utils.node_object_creator import *
from layers.coding_layer import Coding_layer
from layers.convolutional_layer import Convolutional_layer
from layers.pooling_layer import Pooling_layer
from layers.dynamic_pooling i... | [
1,
1053,
12655,
13,
5215,
2897,
13,
5215,
4842,
305,
408,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
13,
3166,
3667,
29879,
29889,
3177,
29918,
331... |
tests/examples/minlplib/waterno2_03.py | ouyang-w-19/decogo | 2 | 23511 | <reponame>ouyang-w-19/decogo
# MINLP written by GAMS Convert at 04/21/18 13:55:18
#
# Equation counts
# Total E G L N X C B
# 617 367 103 147 0 0 0 0
#
# Variable counts
# x b i... | [
1,
529,
276,
1112,
420,
29958,
283,
29891,
574,
29899,
29893,
29899,
29896,
29929,
29914,
7099,
10482,
13,
29937,
29871,
341,
1177,
13208,
3971,
491,
402,
29909,
4345,
14806,
472,
29871,
29900,
29946,
29914,
29906,
29896,
29914,
29896,
2994... |
project/project/basicOpencv.py | LamLauChiu/DjangoReact-Boilerplate | 1 | 169927 | <reponame>LamLauChiu/DjangoReact-Boilerplate
import numpy as np
import cv2
from matplotlib import pyplot as plt
# sources: https://blog.gtwang.org/programming/opencv-basic-image-read-and-write-tutorial/
# 讀取圖檔
img = cv2.imread('/Users/Ivan.lam/Projects/DjangoReact-Boilerplate/project/project/human-20180303-01-1024x68... | [
1,
529,
276,
1112,
420,
29958,
29931,
314,
29931,
585,
1451,
5871,
29914,
29928,
5364,
1123,
627,
29899,
8431,
3955,
2341,
13,
5215,
12655,
408,
7442,
13,
5215,
13850,
29906,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
13,
13,
... |
rl/utils/return_utils.py | jrobine/smaller-world-models | 0 | 134943 | <filename>rl/utils/return_utils.py
import torch
from torch import Tensor
__all__ = ['compute_return', 'compute_gae_return']
def compute_return(
rewards: Tensor,
terminals: Tensor,
bootstrap_value: Tensor,
discount_rate: float,
batch_first: bool = False) -> Tensor:
"""Compu... | [
1,
529,
9507,
29958,
2096,
29914,
13239,
29914,
2457,
29918,
13239,
29889,
2272,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
13,
1649,
497,
1649,
353,
6024,
26017,
29918,
2457,
742,
525,
26017,
29918,
3249,
29872,
299... |
pyqt_drawer/drawer.py | yjg30737/pyqt-drawer | 7 | 164698 | <reponame>yjg30737/pyqt-drawer
from PyQt5.QtWidgets import QWidget, QGridLayout, QGraphicsOpacityEffect, qApp, QMainWindow
from PyQt5.QtCore import Qt, QPropertyAnimation, QAbstractAnimation, QParallelAnimationGroup
from PyQt5.QtGui import QColor, QPalette
from pyqt_svg_icon_pushbutton import SvgIconPushButton
class ... | [
1,
529,
276,
1112,
420,
29958,
17472,
29887,
29941,
29900,
29955,
29941,
29955,
29914,
2272,
17915,
29899,
19811,
556,
13,
3166,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
660,
8801,
29892,
660,
5756,
3453,
29892,
660,
17290,
117... |
vows/blacklist_vows.py | 2947721120/thumbor | 0 | 1608274 | <gh_stars>0
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com <EMAIL>
from pyvows import Vows, expect
from tornado_pyvows.context import Tornad... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
28968,
272,
6382,
292,
2669,
13,
29937,
20... |
lab03/gabriel-teston.py | Desnord/lab-mc102 | 7 | 85579 | # Rescebe os valores de entrada.
P1 = float(input())
P2 = float(input())
Ml = float(input())
# Calculo da media parcial.
Mp = (2 * P1 + 3 * P2) / 5.0
# Regras para aprovação.
if Ml < 5.0 or Mp < 5.0:
M = min(Mp, 4.9)
else:
M = (3 * Mp + 2 * Ml) / 5.0
if 5.0 > M >= 2.5:
E = float(input())
F = (M + E) ... | [
1,
396,
2538,
346,
915,
2897,
659,
2361,
316,
9953,
1114,
29889,
13,
29925,
29896,
353,
5785,
29898,
2080,
3101,
13,
29925,
29906,
353,
5785,
29898,
2080,
3101,
13,
29924,
29880,
353,
5785,
29898,
2080,
3101,
13,
13,
29937,
3037,
17227,... |
Dense_mnist.py | YuanshengZhao/adiabaticbinary | 0 | 123895 | import tensorflow as tf
import numpy as np
import layers
import mnist
import trainer
import sys
class DenseNet(tf.keras.Model):
def __init__(self,binW,binA):
super(DenseNet, self).__init__()
self.binW=binW
self.binA=binA
self.flat= tf.keras.layers.Flatten()
se... | [
1,
1053,
26110,
408,
15886,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
15359,
30004,
13,
5215,
28597,
391,
30004,
13,
5215,
1020,
4983,
30004,
13,
5215,
10876,
30004,
13,
30004,
13,
30004,
13,
1990,
360,
1947,
6779,
29898,
1326... |
bulma/apps.py | makiolo/django-bulma | 330 | 137759 | from django.apps import AppConfig
class BulmaConfig(AppConfig):
name = 'bulma'
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
8313,
655,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
8645,
655,
29915,
13,
2
] |
bnn_mcmc_examples/datasets/pima/data1/constants.py | papamarkou/bnn_mcmc_examples | 1 | 197212 | <reponame>papamarkou/bnn_mcmc_examples
# %% Import packages
from bnn_mcmc_examples.datasets import data_paths
# %% Define constants
data_base_name = 'data1'
data_path = data_paths['pima'].joinpath(data_base_name)
| [
1,
529,
276,
1112,
420,
29958,
29886,
481,
314,
935,
283,
29914,
11197,
29876,
29918,
29885,
4912,
29883,
29918,
19057,
13,
29937,
17806,
16032,
9741,
13,
13,
3166,
289,
15755,
29918,
29885,
4912,
29883,
29918,
19057,
29889,
14538,
1691,
... |
TrainHelper/callbacks/__init__.py | MaLiN2223/TrainHelper | 1 | 113493 | <reponame>MaLiN2223/TrainHelper
from .repeater import Repeater
| [
1,
529,
276,
1112,
420,
29958,
21870,
23410,
29940,
29906,
29906,
29906,
29941,
29914,
5323,
262,
10739,
13,
3166,
869,
276,
412,
1008,
1053,
830,
412,
1008,
13,
2
] |
src/api/controllers/connection/CheckConnectionDatabaseResource.py | PythonDataIntegrator/pythondataintegrator | 14 | 49370 | from injector import inject
from domain.connection.CheckDatabaseConnection.CheckDatabaseConnectionCommand import CheckDatabaseConnectionCommand
from domain.connection.CheckDatabaseConnection.CheckDatabaseConnectionRequest import CheckDatabaseConnectionRequest
from infrastructure.api.ResourceBase import ResourceBase
fr... | [
1,
515,
11658,
272,
1053,
11658,
13,
13,
3166,
5354,
29889,
9965,
29889,
5596,
9112,
5350,
29889,
5596,
9112,
5350,
6255,
1053,
5399,
9112,
5350,
6255,
13,
3166,
5354,
29889,
9965,
29889,
5596,
9112,
5350,
29889,
5596,
9112,
5350,
3089,
... |
depsolver/solver/policy.py | teoliphant/depsolver | 1 | 149791 | <filename>depsolver/solver/policy.py<gh_stars>1-10
import collections
import six
from depsolver.errors \
import \
DepSolverError
from depsolver.version \
import \
MaxVersion
class DefaultPolicy(object):
"""A Policy class that implements 'reasonable' defaults.
Its behavior is:
... | [
1,
529,
9507,
29958,
311,
567,
324,
369,
29914,
2929,
369,
29914,
22197,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
16250,
13,
13,
5215,
4832,
13,
13,
3166,
316,
567,
324,
369,
29889,
12523... |
acceptance_tests/features/pages/inbox_internal.py | ONSdigital/ras-integration-tests | 2 | 160501 | from acceptance_tests import browser
from common.browser_utilities import wait_for_url_matches
from config import Config
def go_to_using_context(context, conversation_tab='open'):
tab = conversation_tab.replace(' ', '+')
target_url = f"{Config.RESPONSE_OPERATIONS_UI}/messages/{context.short_name}?conversation... | [
1,
515,
3544,
749,
29918,
21150,
1053,
4714,
13,
3166,
3619,
29889,
15965,
29918,
4422,
1907,
1053,
4480,
29918,
1454,
29918,
2271,
29918,
20317,
13,
3166,
2295,
1053,
12782,
13,
13,
13,
1753,
748,
29918,
517,
29918,
4746,
29918,
4703,
... |
deepinesStore/cardg.py | xoascf/store_deepines | 6 | 33873 | <filename>deepinesStore/cardg.py<gh_stars>1-10
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'guis/card.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class QLabelClickable(QtWidg... | [
1,
529,
9507,
29958,
24535,
1475,
9044,
29914,
7543,
29887,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
3... |
setup.py | rabernat/xarray | 0 | 196445 | #!/usr/bin/env python
import os
import re
import sys
import warnings
from setuptools import setup, find_packages
from setuptools import Command
MAJOR = 0
MINOR = 10
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
QUALIFIER = 'rc2'
DISTNAME = 'xarray'
LICENSE = 'Apache'
AUTHOR = 'xarray Dev... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
10876,
13,
5215,
18116,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
3166,
731,
21245,
8789,
1053,
10516,
13,
13,
15... |
models/Conditionners/CouplingConditioner.py | jonathandumas/generative-models-power-systems | 11 | 1600329 | <filename>models/Conditionners/CouplingConditioner.py
from .Conditioner import Conditioner
import torch
import torch.nn as nn
class CouplingMLP(nn.Module):
def __init__(self, in_size, hidden, out_size, cond_in = 0):
super(CouplingMLP, self).__init__()
l1 = [in_size - int(in_size/2) + cond_in] + hi... | [
1,
529,
9507,
29958,
9794,
29914,
25255,
8397,
29914,
29907,
283,
10335,
25255,
261,
29889,
2272,
13,
3166,
869,
25255,
261,
1053,
11790,
654,
261,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
13,
13,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.