hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
171fe6d882315b0f19d2ffcf857ffebd5220e4a7
3,440
py
Python
ZHIHU_code/code/genezhihu.py
nlgandnlu/TED-code
7c00fc39c4412d57e378a5b205bcec1737e51e2e
[ "MIT" ]
1
2022-01-14T08:00:57.000Z
2022-01-14T08:00:57.000Z
ZHIHU_code/code/genezhihu.py
nlgandnlu/TED
c0b04ddbeaa6061cd1c888bf1bcf70ef717f6bee
[ "MIT" ]
null
null
null
ZHIHU_code/code/genezhihu.py
nlgandnlu/TED
c0b04ddbeaa6061cd1c888bf1bcf70ef717f6bee
[ "MIT" ]
null
null
null
from code.config import MODEL_PATH from code.config import TEST_TOPIC_PATH from code.config import TEST_OUTPUT_PATH from code.modeling_gpt2 import GPT2LMHeadModel from transformers import BertTokenizer, pipeline import json import torch def readtest(filename): with open(filename, 'r', encoding ='utf-8') as ...
35.463918
116
0.601744
3e955567998125f725f0fbdb7afee16e430510df
4,262
py
Python
cruft/_commands/utils/generate.py
languitar/cruft
7da9f81369ed07cf52058b7ab3fcf1aa3a51abd8
[ "MIT" ]
1
2021-05-14T20:00:35.000Z
2021-05-14T20:00:35.000Z
cruft/_commands/utils/generate.py
languitar/cruft
7da9f81369ed07cf52058b7ab3fcf1aa3a51abd8
[ "MIT" ]
null
null
null
cruft/_commands/utils/generate.py
languitar/cruft
7da9f81369ed07cf52058b7ab3fcf1aa3a51abd8
[ "MIT" ]
1
2021-09-07T12:35:18.000Z
2021-09-07T12:35:18.000Z
import os from pathlib import Path from shutil import move, rmtree from tempfile import TemporaryDirectory from typing import Optional, Set from cookiecutter.generate import generate_files from git import Repo from .cookiecutter import CookiecutterContext, generate_cookiecutter_context from .cruft import CruftState ...
34.934426
99
0.692163
ee59d1eb92b2630a2c97274021c775ed2e7ef044
2,161
py
Python
RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py
DavidNaizheZhou/RFEM_Python_Client
a5f7790b67de3423907ce10c0aa513c0a1aca47b
[ "MIT" ]
16
2021-10-13T21:00:11.000Z
2022-03-21T11:12:09.000Z
RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py
DavidNaizheZhou/RFEM_Python_Client
a5f7790b67de3423907ce10c0aa513c0a1aca47b
[ "MIT" ]
49
2021-10-19T13:18:51.000Z
2022-03-30T08:20:17.000Z
RFEM/TypesforConcreteDesign/ConcreteReinforcementDirections.py
DavidNaizheZhou/RFEM_Python_Client
a5f7790b67de3423907ce10c0aa513c0a1aca47b
[ "MIT" ]
7
2021-10-13T06:06:24.000Z
2022-03-29T17:48:39.000Z
from RFEM.initModel import Model, clearAtributes, ConvertToDlString from RFEM.enums import ReinforcementDirectionType from math import pi class ConcreteReinforcementDirection(): def __init__(self, no: int = 1, name: str = "RD 1", surfaces = "1", reinf...
33.246154
128
0.656178
2d4cce6264d281bf4da9fcf4de3200dc6e4fe17a
26
py
Python
tests/__init__.py
artreven/wikilinks_loader
b75b0bdc51178deb381e411c2d596cb9302ffd80
[ "MIT" ]
null
null
null
tests/__init__.py
artreven/wikilinks_loader
b75b0bdc51178deb381e411c2d596cb9302ffd80
[ "MIT" ]
null
null
null
tests/__init__.py
artreven/wikilinks_loader
b75b0bdc51178deb381e411c2d596cb9302ffd80
[ "MIT" ]
null
null
null
# __author__ = 'artreven'
13
25
0.692308
a33887f7b863630ac675f57ee9b0d52bf0d7b2aa
1,013
py
Python
Queue.py
victor3r/search-algorithms
0256349b20b314c3337264c4c2b1ef4b1992a914
[ "MIT" ]
null
null
null
Queue.py
victor3r/search-algorithms
0256349b20b314c3337264c4c2b1ef4b1992a914
[ "MIT" ]
null
null
null
Queue.py
victor3r/search-algorithms
0256349b20b314c3337264c4c2b1ef4b1992a914
[ "MIT" ]
null
null
null
class Queue: def __init__(self, size): self.size = size self.cities = [None] * self.size self.start = 0 self.end = -1 self.numberElements = 0 def enqueue(self, city): if not Queue.fullQueue(self): if self.end == self.size - 1: self.end...
26.657895
47
0.517275
043265ad7d190e1a05d9a29da0da5d88bf0b1958
5,192
py
Python
onnxruntime/test/python/onnxruntime_test_python_nuphar.py
hqucms/onnxruntime
6e4e76414639f50836a64546603c8957227857b0
[ "MIT" ]
null
null
null
onnxruntime/test/python/onnxruntime_test_python_nuphar.py
hqucms/onnxruntime
6e4e76414639f50836a64546603c8957227857b0
[ "MIT" ]
null
null
null
onnxruntime/test/python/onnxruntime_test_python_nuphar.py
hqucms/onnxruntime
6e4e76414639f50836a64546603c8957227857b0
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -*- coding: UTF-8 -*- import numpy as np import onnx from onnx import numpy_helper import onnxruntime as onnxrt import os from rnn_benchmark import perf_test, generate_model import sys import subprocess import tarfile from ...
49.923077
171
0.619414
13a983019bce138fce990a08d155af559e6ab0ff
26,212
py
Python
Code/API/funibot_tests/test_funiserial.py
philippewarren/neorobrooke-s4
9e9374334f8b5aa0de27b3afbd0858ddea935369
[ "BSD-3-Clause" ]
null
null
null
Code/API/funibot_tests/test_funiserial.py
philippewarren/neorobrooke-s4
9e9374334f8b5aa0de27b3afbd0858ddea935369
[ "BSD-3-Clause" ]
117
2021-01-20T21:16:07.000Z
2021-04-16T22:16:00.000Z
Code/API/funibot_tests/test_funiserial.py
philippewarren/neorobrooke-s4
9e9374334f8b5aa0de27b3afbd0858ddea935369
[ "BSD-3-Clause" ]
1
2022-01-06T20:47:27.000Z
2022-01-06T20:47:27.000Z
from __future__ import annotations from typing import Tuple, List from funibot_api.funiserial import FUNI_ERREUR_MAJ, FuniErreur, eFuniModeCalibration, eFuniModeDeplacement, FuniSerial, eFuniModeMoteur, eFuniType, eFuniErreur from funibot_api.funimock import MockSerial, eMockType, DualMockSerial import unittest clas...
46.475177
163
0.628834
15f0f2f0f7dfb42ee492463e5882b3688da10513
2,239
py
Python
pyanp/direct.py
cznewt/pyanp
2b90363ba3f9d60aef1e4f74c6cda9f5fda83561
[ "MIT" ]
17
2019-01-03T08:11:40.000Z
2021-12-27T03:19:26.000Z
pyanp/direct.py
ArdalanMarandi/pyanp
731fa2c6090e274843f854081610599a2001e00a
[ "MIT" ]
57
2018-03-31T13:18:39.000Z
2020-12-28T19:37:33.000Z
pyanp/direct.py
ArdalanMarandi/pyanp
731fa2c6090e274843f854081610599a2001e00a
[ "MIT" ]
14
2018-03-17T18:31:36.000Z
2022-03-11T16:52:38.000Z
''' Code for the direct data object ''' import numpy as np import pandas as pd from pyanp.prioritizer import Prioritizer, PriorityType, priority_type_default class Direct(Prioritizer): ''' Represents the concept of directly setting data. It is a single user only :class:`pyanp.prioritizer.Prioritizer` i...
26.975904
106
0.616347
f77ba914eb6f55b9930ab6cf9394742c46f914a7
18,372
py
Python
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
3
2016-08-31T21:54:06.000Z
2018-05-29T13:37:02.000Z
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ Terminal Colorization ===================== This module contains a class for sending strings with color and other attributes to a terminal application. Simple Usage Example -------------------- Print bold and bright red text on a white background. import termcolor termcolor.cprin...
29.3952
79
0.526236
aa553e2ce13ddd7ce7990f45101fa85b51adf8d7
1,563
py
Python
dpkt/ppp.py
0x4e38/dpkt
83c20a6a63a7ebc1a549d367bc07a61b926cecf3
[ "BSD-3-Clause" ]
1
2017-04-10T15:25:21.000Z
2017-04-10T15:25:21.000Z
dpkt/ppp.py
edisona/dpkt
83c20a6a63a7ebc1a549d367bc07a61b926cecf3
[ "BSD-3-Clause" ]
null
null
null
dpkt/ppp.py
edisona/dpkt
83c20a6a63a7ebc1a549d367bc07a61b926cecf3
[ "BSD-3-Clause" ]
1
2021-04-23T08:50:45.000Z
2021-04-23T08:50:45.000Z
# $Id$ """Point-to-Point Protocol.""" import struct import dpkt # XXX - finish later # http://www.iana.org/assignments/ppp-numbers PPP_IP = 0x21 # Internet Protocol PPP_IP6 = 0x57 # Internet Protocol v6 # Protocol field compression PFC_BIT = 0x01 class PPP(dpkt.Packet): __hdr__ = ( ('p', 'B', PPP_IP...
24.421875
74
0.549584
d623eae7b480c1bb3d6a9ebad5d1160ef4a090ad
1,482
py
Python
com/Leetcode/226.InvertBinaryTree.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
com/Leetcode/226.InvertBinaryTree.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
com/Leetcode/226.InvertBinaryTree.py
samkitsheth95/InterviewPrep
6be68c19bcaab4e64a8f646cc64f651bade8ba86
[ "MIT" ]
null
null
null
from collections import deque import sys sys.path.append('com/DataStructure/Python') from BinarySearchTree import BinarySearchTree # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = ri...
26.464286
73
0.616059
d354ae809c97a51da8a49eafdc798a2696520f88
9,797
py
Python
segmentation/mmdet/models/bbox_heads/bbox_head_with_scl.py
JDAI-CV/LIO
7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523
[ "Apache-2.0" ]
105
2020-03-27T09:26:35.000Z
2022-03-18T10:08:23.000Z
segmentation/mmdet/models/bbox_heads/bbox_head_with_scl.py
esimionato/LIO
7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523
[ "Apache-2.0" ]
12
2020-04-06T22:33:49.000Z
2022-03-12T14:33:23.000Z
segmentation/mmdet/models/bbox_heads/bbox_head_with_scl.py
esimionato/LIO
7bcd4d5e2990db5c8a7ec6ecc76a23c2e913e523
[ "Apache-2.0" ]
24
2020-06-03T08:22:02.000Z
2022-02-19T07:25:34.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _pair from mmdet.core import (auto_fp16, bbox_target, delta2bbox, force_fp32, multiclass_nms) from ..builder import build_loss from ..losses import accuracy from ..registry import HEADS from .s...
38.419608
79
0.557313
f4f4413d3fa354f41e424b5eaed2ed53dedac75f
2,048
py
Python
cleanup.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
2
2019-06-15T09:58:08.000Z
2020-08-24T09:51:37.000Z
cleanup.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
null
null
null
cleanup.py
kipkemoimayor/Traffic_control_system
840c01b8c031d613524b87b91c8d938a33348b3c
[ "MIT" ]
2
2019-06-26T07:30:05.000Z
2020-08-24T09:51:42.000Z
import RPi.GPIO as GPIO import time n=10 while n>0: GPIO.setmode(GPIO.BOARD) GPIO.setup(7,GPIO.OUT) GPIO.setup(16,GPIO.OUT) GPIO.setup(40,GPIO.OUT) GPIO.setup(11,GPIO.OUT) GPIO.setup(13,GPIO.IN) GPIO.setup(36,GPIO.OUT) GPIO.setup(3,GPIO.OUT) GPIO.setup(5,GPIO.IN) GPIO.setup(22,GP...
24.380952
29
0.573242
8a1b043bc85b2d6d5d926c9abcea773f052969fb
698
py
Python
src/wired_components/view/__init__.py
pauleveritt/wired_components
a9072d5fc48680d5ff895887842ffd0f06bc0081
[ "MIT" ]
1
2019-09-15T12:30:44.000Z
2019-09-15T12:30:44.000Z
src/wired_components/view/__init__.py
pauleveritt/wired_components
a9072d5fc48680d5ff895887842ffd0f06bc0081
[ "MIT" ]
null
null
null
src/wired_components/view/__init__.py
pauleveritt/wired_components
a9072d5fc48680d5ff895887842ffd0f06bc0081
[ "MIT" ]
null
null
null
""" Gather state and logic needed to render a request/resource. Views are the central actor in processing a ``wired_components`` request. They gather the needed input, specify a renderer, then do the rendering. Views can be registered against certain context types, allowing different views for different kinds of res...
21.8125
67
0.734957
9673fc33dbe9deefdbb0d0326bad88496f3284ad
1,329
py
Python
MininetTopology/PyTapDEMON_topo.py
ericchou-python/PyTapDEMON
5903569f6ed1d98de26cfb5622f81c5d14419dd1
[ "Apache-2.0" ]
5
2017-01-26T18:40:51.000Z
2021-01-23T11:58:07.000Z
MininetTopology/PyTapDEMON_topo.py
ericchou-python/PyTapDEMON
5903569f6ed1d98de26cfb5622f81c5d14419dd1
[ "Apache-2.0" ]
1
2018-11-04T19:12:49.000Z
2018-11-04T19:12:49.000Z
MininetTopology/PyTapDEMON_topo.py
ericchou-python/PyTapDEMON
5903569f6ed1d98de26cfb5622f81c5d14419dd1
[ "Apache-2.0" ]
4
2015-03-31T08:48:23.000Z
2020-09-30T21:45:12.000Z
#!/usr/bin/env python """ author: Eric Chou (@ericchou) 1. 2x port Filter Switches with 5 hosts and 5 trunk ports. 2. 1x port Aggregation Switch with 10 trunk ports and Deep inspection host """ from mininet.net import Mininet from mininet.node import OVSSwitch from mininet.cli import CLI from mininet.log import set...
22.913793
74
0.617005
1d28fafd8effda72ad1b1823aa9d19aa22812038
27,350
py
Python
sympy/printing/c.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
8,323
2015-01-02T15:51:43.000Z
2022-03-31T13:13:19.000Z
sympy/printing/c.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
15,102
2015-01-01T01:33:17.000Z
2022-03-31T22:53:13.000Z
sympy/printing/c.py
shilpiprd/sympy
556e9c61b31d0d5f101cd56b43e843fbf3bcf121
[ "BSD-3-Clause" ]
4,490
2015-01-01T17:48:07.000Z
2022-03-31T17:24:05.000Z
""" C code printer The C89CodePrinter & C99CodePrinter converts single sympy expressions into single C expressions, using the functions defined in math.h where possible. A complete code generator, which uses ccode extensively, can be found in sympy.utilities.codegen. The codegen module can be used to generate complet...
36.129458
99
0.568958
c958a96215d97182ad050727a7234e20bc19cf3a
995
py
Python
modules/pushgateway_tools.py
eSkry/VKFriendOnlineWatcher
321233c8b1f090aa313315ee2baa3ab471e2b128
[ "MIT" ]
2
2020-07-10T07:23:53.000Z
2021-09-03T02:02:55.000Z
modules/pushgateway_tools.py
eSkry/VKFriendOnlineWatcher
321233c8b1f090aa313315ee2baa3ab471e2b128
[ "MIT" ]
null
null
null
modules/pushgateway_tools.py
eSkry/VKFriendOnlineWatcher
321233c8b1f090aa313315ee2baa3ab471e2b128
[ "MIT" ]
null
null
null
import requests import os class PushgatewaySender(object): def __init__(self, server_addres): self.SERVER_ADDRES = server_addres self.HEADERS = {'Content-type': 'text/plain; charset=utf-8'} self.METRICKS_POOL = [] def AddToPool(self, metricks_string: str): self.METRICKS_POOL.ap...
30.151515
93
0.61809
49c8af1e7b13da46964a9c89f2a138ac945b9f57
67,905
py
Python
evennia/utils/utils.py
frnknstn/evennia
db637941af2e6c697ef745bb4d8e6ecbee97a727
[ "BSD-3-Clause" ]
127
2015-04-16T15:27:59.000Z
2022-03-10T08:35:37.000Z
evennia/utils/utils.py
frnknstn/evennia
db637941af2e6c697ef745bb4d8e6ecbee97a727
[ "BSD-3-Clause" ]
14
2015-12-17T08:02:18.000Z
2022-01-30T15:15:38.000Z
evennia/utils/utils.py
frnknstn/evennia
db637941af2e6c697ef745bb4d8e6ecbee97a727
[ "BSD-3-Clause" ]
54
2015-06-23T07:27:45.000Z
2022-02-22T01:46:05.000Z
# -*- encoding: utf-8 -*- """ General helper functions that don't fit neatly under any given category. They provide some useful string and conversion methods that might be of use when designing your own game. """ import os import gc import sys import types import math import re import textwrap import random import in...
32.106383
102
0.598572
941b2d55b5c9f12b3736e0ccdfed67e0ca26c0c7
54
py
Python
project/utils/answers.py
mvshalamov/tornado_tpl
62795706b6c1064748fda4547225644d9acee9ac
[ "MIT" ]
null
null
null
project/utils/answers.py
mvshalamov/tornado_tpl
62795706b6c1064748fda4547225644d9acee9ac
[ "MIT" ]
null
null
null
project/utils/answers.py
mvshalamov/tornado_tpl
62795706b6c1064748fda4547225644d9acee9ac
[ "MIT" ]
null
null
null
STANDART_ANSWER = {'result': 'done', 'error': 'None'}
27
53
0.62963
642ab9629c9e65a1f71b2dba704c9459622aa6b0
821
py
Python
windyer_auth/admin.py
windyer/windyer_blog
8868aaf154ecb7e406a026f4ce2dd64818d1cc94
[ "BSD-3-Clause" ]
null
null
null
windyer_auth/admin.py
windyer/windyer_blog
8868aaf154ecb7e406a026f4ce2dd64818d1cc94
[ "BSD-3-Clause" ]
null
null
null
windyer_auth/admin.py
windyer/windyer_blog
8868aaf154ecb7e406a026f4ce2dd64818d1cc94
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin from windyer_auth.models import windyerUser from windyer_auth.forms import windyerUserCreationForm # Register your models here. class windyerUserAdmin(UserAdmin): ...
30.407407
71
0.649208
08790d9b782aff19b1c8b9def53f5a6b609e5359
3,378
py
Python
SoftLayer/CLI/cdn/origin_add.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
126
2015-01-05T05:09:22.000Z
2021-07-02T00:16:35.000Z
SoftLayer/CLI/cdn/origin_add.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
969
2015-01-05T15:55:31.000Z
2022-03-31T19:55:20.000Z
SoftLayer/CLI/cdn/origin_add.py
dvzrv/softlayer-python
9a5f6c6981bcc370084537b4d1769383499ce90d
[ "MIT" ]
176
2015-01-22T11:23:40.000Z
2022-02-11T13:16:58.000Z
"""Create an origin pull mapping.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting @click.command() @click.argument('unique_id') @click.argument('origin') @click.argument('p...
38.827586
113
0.606868
1f7b372693e8b23ce06d93284cb812eede99d17e
1,731
py
Python
sciencebeam_parser/models/table/training_data.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
13
2021-08-04T12:11:17.000Z
2022-03-28T20:41:20.000Z
sciencebeam_parser/models/table/training_data.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
33
2021-08-05T08:37:59.000Z
2022-03-29T18:42:09.000Z
sciencebeam_parser/models/table/training_data.py
elifesciences/sciencebeam-parser
66964f283612b8d6fa8a23ad8790292c1ec07651
[ "MIT" ]
1
2022-01-05T14:53:06.000Z
2022-01-05T14:53:06.000Z
import logging from sciencebeam_parser.models.training_data import ( AbstractTeiTrainingDataGenerator ) LOGGER = logging.getLogger(__name__) # based on: # https://github.com/kermitt2/grobid/blob/0.7.0/grobid-core/src/main/java/org/grobid/core/engines/TableParser.java ROOT_TRAINING_XML_ELEMENT_PATH = ['text', ...
36.0625
114
0.71115
d36f1a4585cd98efe03c33d49856afab5d760d24
1,227
py
Python
demo/urls.py
catplane/yundjango
05a7d5ec4ca417c591a48685cfbb75f3da999946
[ "MIT" ]
null
null
null
demo/urls.py
catplane/yundjango
05a7d5ec4ca417c591a48685cfbb75f3da999946
[ "MIT" ]
null
null
null
demo/urls.py
catplane/yundjango
05a7d5ec4ca417c591a48685cfbb75f3da999946
[ "MIT" ]
null
null
null
"""demo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
35.057143
79
0.682152
c97b3bf109d0f32ba1fa5fdad62463ed212b074a
1,655
py
Python
RedBook/ch8/books/migrations/0001_initial.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
RedBook/ch8/books/migrations/0001_initial.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
RedBook/ch8/books/migrations/0001_initial.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-02-10 12:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Author', fields=[ ...
34.479167
114
0.554079
cfbdd1f1bbfb0d6799512c8873472c434e30a7e0
5,641
py
Python
invenio_rdm_records/secret_links/models.py
wgresshoff/invenio-rdm-records
91945829884ea4e46b05be26c97f11ffd045bcec
[ "MIT" ]
null
null
null
invenio_rdm_records/secret_links/models.py
wgresshoff/invenio-rdm-records
91945829884ea4e46b05be26c97f11ffd045bcec
[ "MIT" ]
null
null
null
invenio_rdm_records/secret_links/models.py
wgresshoff/invenio-rdm-records
91945829884ea4e46b05be26c97f11ffd045bcec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2021 TU Wien. # # Invenio-RDM-Records is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Secret links for sharing access to records.""" import uuid from datetime import date, datetime from in...
30.994505
79
0.622939
5d9b99a5569860507c4ae8ec63d9470f806d14e5
12,561
py
Python
nltk/classify/weka.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
4
2016-05-05T05:39:45.000Z
2019-08-14T01:39:00.000Z
nltk/classify/weka.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
1
2015-10-07T20:45:50.000Z
2015-10-07T22:26:07.000Z
nltk/classify/weka.py
tyomitch/nltk
943b7bb3181118710ea4f22e0b63ce25adfffa08
[ "Apache-2.0" ]
2
2019-02-20T22:37:18.000Z
2020-09-02T20:14:51.000Z
# Natural Language Toolkit: Interface to Weka Classsifiers # # Copyright (C) 2001-2022 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT """ Classifiers that make use of the external 'Weka' package. """ import os import re import subproce...
33.230159
88
0.572805
c1d5431f5dbcd0800efe97959e2d6c2b0b1fb08d
43,466
py
Python
src/sage/combinat/gelfand_tsetlin_patterns.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/gelfand_tsetlin_patterns.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/gelfand_tsetlin_patterns.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
r""" Gelfand-Tsetlin Patterns AUTHORS: - Travis Scrimshaw (2013-15-03): Initial version REFERENCES: .. [BBF] \B. Brubaker, D. Bump, and S. Friedberg. Weyl Group Multiple Dirichlet Series: Type A Combinatorial Theory. Ann. of Math. Stud., vol. 175, Princeton Univ. Press, New Jersey, 2011. .. [GC50] \I. M. Gel...
33.564479
155
0.493098
e8dbfc9f21380dcbf9357ec35264862ec64ed3c3
256
py
Python
fpo_mgmt/fpo_management/doctype/crop_details/crop_details.py
csaindia/fpo_mgmt_new
c6715bd2381c1e0252e49819f3c7616392a4a796
[ "MIT" ]
1
2019-07-18T05:58:31.000Z
2019-07-18T05:58:31.000Z
fpo_mgmt/fpo_management/doctype/crop_details/crop_details.py
csaindia/fpo_mgmt_new
c6715bd2381c1e0252e49819f3c7616392a4a796
[ "MIT" ]
null
null
null
fpo_mgmt/fpo_management/doctype/crop_details/crop_details.py
csaindia/fpo_mgmt_new
c6715bd2381c1e0252e49819f3c7616392a4a796
[ "MIT" ]
1
2019-05-29T06:18:37.000Z
2019-05-29T06:18:37.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Prasanna and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class CropDetails(Document): pass
23.272727
49
0.78125
ba00530ed60f4b24b2100a8b7bcb918bbcd20d53
559
py
Python
Data Structures/espiral_turtle.py
MaksonViini/Aprendendo-Python
8d8422f793e4ea9f81fa4ed0e4101bcfc2ba3c99
[ "MIT" ]
1
2020-09-20T23:18:47.000Z
2020-09-20T23:18:47.000Z
Data Structures/espiral_turtle.py
MaksonViini/Aprendendo-Python
8d8422f793e4ea9f81fa4ed0e4101bcfc2ba3c99
[ "MIT" ]
null
null
null
Data Structures/espiral_turtle.py
MaksonViini/Aprendendo-Python
8d8422f793e4ea9f81fa4ed0e4101bcfc2ba3c99
[ "MIT" ]
1
2020-09-20T23:18:49.000Z
2020-09-20T23:18:49.000Z
import turtle as tt from time import sleep tt.bgcolor('black') tt.pensize(2) tt.speed(10000) tt.shape("turtle") tt.color('blue') sleep(0.5) cores = [ 'red', 'magenta', 'blue', 'cyan', 'green', 'white', 'yellow' ] for i in range(9): for cor in cores: tt.color(cor) tt.circle(80) ...
14.333333
48
0.577818
e1d0f39f83c6bc4f34c5f8129a1f594dd63549cf
3,476
py
Python
vanilla/thread.py
adamchainz/vanilla
c9f5b86f45720a30e8840fb68b1429b919c4ca66
[ "MIT" ]
101
2015-01-12T02:44:09.000Z
2022-01-26T09:27:06.000Z
vanilla/thread.py
adamchainz/vanilla
c9f5b86f45720a30e8840fb68b1429b919c4ca66
[ "MIT" ]
14
2015-01-28T22:13:05.000Z
2016-06-13T20:05:40.000Z
vanilla/thread.py
adamchainz/vanilla
c9f5b86f45720a30e8840fb68b1429b919c4ca66
[ "MIT" ]
13
2015-01-03T23:22:50.000Z
2022-02-27T00:43:42.000Z
import collections import threading import os from Queue import Queue import vanilla from vanilla import message from vanilla.exception import Closed class Pipe(object): class Sender(object): def __init__(self, q, w): self.q = q self.w = w def send(self, item, timeout=...
24.828571
79
0.520138
f848f30b85bf66731cd41f322acf9cee01bed382
2,799
py
Python
importos.py
AlbusPeter/BackPropagation
d644245a20937f795a10b3716651c08487d571cb
[ "BSD-2-Clause" ]
null
null
null
importos.py
AlbusPeter/BackPropagation
d644245a20937f795a10b3716651c08487d571cb
[ "BSD-2-Clause" ]
null
null
null
importos.py
AlbusPeter/BackPropagation
d644245a20937f795a10b3716651c08487d571cb
[ "BSD-2-Clause" ]
null
null
null
import os import struct import numpy as np """ Loosely inspired by http://abel.ee.ucla.edu/cvxopt/_downloads/mnist.py which is GPL licensed. """ def read(dataset = "training", path = "."): """ Python function for importing the MNIST data set. It returns an iterator of 2-tuples with the first element bein...
38.342466
91
0.678099
7ac6c4dfc336c6d24ba26ae2b640a154fd5914d7
1,476
py
Python
common/py_utils/py_utils/modules_util.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
1,894
2015-04-17T18:29:53.000Z
2022-03-28T22:41:06.000Z
common/py_utils/py_utils/modules_util.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
common/py_utils/py_utils/modules_util.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import absolute_import from distutils import version # pylint: disable=no-name-in-module def RequireVersion(module, min_version, max_versio...
39.891892
79
0.74729
88e79db9be5222251be2116e8f6bc5ccf5a7bd06
8,002
py
Python
ffthompy/projections.py
song2001/FFTHomPy
2a3af3f2e310a9383b5402e2e521f6d4d4700c71
[ "MIT" ]
2
2019-05-27T00:19:56.000Z
2019-05-27T00:28:34.000Z
ffthompy/projections.py
song2001/FFTHomPy
2a3af3f2e310a9383b5402e2e521f6d4d4700c71
[ "MIT" ]
null
null
null
ffthompy/projections.py
song2001/FFTHomPy
2a3af3f2e310a9383b5402e2e521f6d4d4700c71
[ "MIT" ]
1
2019-05-27T00:28:36.000Z
2019-05-27T00:28:36.000Z
import numpy as np import scipy as sp from ffthompy.matvec_fun import Grid, get_Nodd from ffthompy.matvec import Matrix def scalar(N, Y, centered=True, NyqNul=True): """ Assembly of discrete kernels in Fourier space for scalar elliptic problems. Parameters ---------- N : numpy.ndarray no....
32.266129
79
0.507123
c64801eaa4c7a6ab25305d403f3bd33ce87c3054
659
py
Python
multisim/std_parts.py
JoElfner/multisim
2ca3ff9b116b528c279b5941e6bdbe002cf23852
[ "BSD-3-Clause" ]
1
2020-08-25T10:26:17.000Z
2020-08-25T10:26:17.000Z
multisim/std_parts.py
JoElfner/multisim
2ca3ff9b116b528c279b5941e6bdbe002cf23852
[ "BSD-3-Clause" ]
6
2021-08-29T11:15:54.000Z
2021-09-01T09:57:49.000Z
multisim/std_parts.py
JoElfner/multisim
2ca3ff9b116b528c279b5941e6bdbe002cf23852
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Johannes Elfner <johannes.elfner@googlemail.com> Date: Dec 2017 """ from .parts.controllers import PID, BangBang, TwoSensors from .parts.pipe import Pipe from .parts.tes import Tes from .parts.pump import Pump from .parts.mixingvalve import MixingValve from .parts.connector_3w imp...
21.258065
57
0.707132
342865641accde5f7a0fb8eedd43e7ae766a491a
2,504
py
Python
datasets/two_dim/data_augmentation.py
lucasforever24/unet_hippocampus
9ca9fc39b45d5baf0fe9084b9c7302645c1fd01e
[ "Apache-2.0" ]
null
null
null
datasets/two_dim/data_augmentation.py
lucasforever24/unet_hippocampus
9ca9fc39b45d5baf0fe9084b9c7302645c1fd01e
[ "Apache-2.0" ]
null
null
null
datasets/two_dim/data_augmentation.py
lucasforever24/unet_hippocampus
9ca9fc39b45d5baf0fe9084b9c7302645c1fd01e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ) # # 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 # # ...
46.37037
103
0.626997
49bef55ce4626c5dfaf49dc897efe4ac126e8c1b
2,141
py
Python
venv/lib/python3.7/site-packages/foundation/models/base.py
Ljuka/iwen
6aee69bf46c14e301002d0465a8a2b7e74e02953
[ "MIT" ]
1
2019-03-14T17:02:46.000Z
2019-03-14T17:02:46.000Z
venv/lib/python3.7/site-packages/foundation/models/base.py
Ljuka/iwen
6aee69bf46c14e301002d0465a8a2b7e74e02953
[ "MIT" ]
null
null
null
venv/lib/python3.7/site-packages/foundation/models/base.py
Ljuka/iwen
6aee69bf46c14e301002d0465a8a2b7e74e02953
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from django.db import models from functools import partial from .manager import Manager __all__ = 'Model', RE_MODE_URL = re.compile('get_(?P<mode>\w+)_url') class ControllerView(object): @property def controller(self): if ...
28.546667
79
0.632882
994764e3ffda867409f563614617e33f3afe60df
14,175
py
Python
tests.py
EnigmaCurry/curlbomb
d0a60e5720c25c636999d5fe50b24200d0c25e7a
[ "MIT" ]
30
2016-03-25T12:23:03.000Z
2020-06-25T20:37:40.000Z
tests.py
EnigmaCurry/curlbomb
d0a60e5720c25c636999d5fe50b24200d0c25e7a
[ "MIT" ]
1
2016-05-03T14:43:31.000Z
2016-05-03T14:58:55.000Z
tests.py
EnigmaCurry/curlbomb
d0a60e5720c25c636999d5fe50b24200d0c25e7a
[ "MIT" ]
5
2016-04-24T20:11:46.000Z
2021-03-20T06:24:59.000Z
import threading import subprocess import re import os import shlex import time import curlbomb import sys from io import TextIOWrapper, BytesIO from tempfile import NamedTemporaryFile import logging import socket import unittest import tornado import tempfile import hashlib import shutil log = logging.getLogger("curl...
41.326531
105
0.606984
87fb789167ad0a0b1b485552a87aae87ef2ebda7
21,177
py
Python
code/tests/test_nuvlabox_common.py
nuvlabox/agent
f7d740b8dcc519f8cb154051cd44585656064905
[ "Apache-2.0" ]
1
2019-04-27T19:53:24.000Z
2019-04-27T19:53:24.000Z
code/tests/test_nuvlabox_common.py
nuvlabox/agent
f7d740b8dcc519f8cb154051cd44585656064905
[ "Apache-2.0" ]
65
2019-05-02T14:19:48.000Z
2022-03-30T12:20:18.000Z
code/tests/test_nuvlabox_common.py
nuvlabox/agent
f7d740b8dcc519f8cb154051cd44585656064905
[ "Apache-2.0" ]
2
2019-06-14T13:13:08.000Z
2021-05-07T13:48:18.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os import logging import mock import nuvla.api import unittest import tests.utils.fake as fake import agent.common.NuvlaBoxCommon as NuvlaBoxCommon class NuvlaBoxCommonTestCase(unittest.TestCase): agent_nuvlabox_common_open = 'agent.common.NuvlaB...
52.810474
120
0.648581
dca9ce5f21d2bc0948503d5077ec93d04b0bac60
2,333
py
Python
test/modules/http2/test_711_load_post_cgi.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
2,529
2015-01-02T11:52:53.000Z
2022-03-30T19:54:27.000Z
test/modules/http2/test_711_load_post_cgi.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
133
2015-04-21T05:50:45.000Z
2022-03-30T14:23:40.000Z
test/modules/http2/test_711_load_post_cgi.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
1,113
2015-01-01T14:47:02.000Z
2022-03-29T16:47:18.000Z
import pytest import os from .env import H2Conf class TestLoadCgi: @pytest.fixture(autouse=True, scope='class') def _class_scope(self, env): H2Conf(env).add_vhost_cgi(proxy_self=True, h2proxy_self=True).install() assert env.apache_restart() == 0 def check_h2load_ok(self, env, r, n): ...
33.328571
79
0.525075
18b90b94e90e896f4d653b3d36462571167e3b6b
4,967
py
Python
fundosbr/fundosbrlib.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
7
2020-12-23T17:01:14.000Z
2021-05-31T12:20:10.000Z
fundosbr/fundosbrlib.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
4
2020-12-18T17:18:08.000Z
2021-05-24T17:36:37.000Z
fundosbr/fundosbrlib.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
2
2021-05-31T12:20:11.000Z
2022-02-07T14:38:59.000Z
# -*- coding: utf-8 -*- """Biblioteca com funcoes do fundobr.""" import logging import os import shutil import sys import requests log = logging.getLogger(__name__) def msg(color, msg_text, exitcode=0, *, end="\n", flush=True, output=None): """ Print colored text. Arguments: color (s...
29.921687
86
0.536743
bcd84af2080a7d14416ca9f45bce5528678ad4fb
6,445
py
Python
.venv/lib/python2.7/site-packages/formtools/preview.py
junhua/forth.ai.homepage
8f0af0e8112461412ab4f6533017a44eed768349
[ "BSD-3-Clause" ]
1
2017-10-31T03:06:12.000Z
2017-10-31T03:06:12.000Z
env/Lib/site-packages/formtools/preview.py
htwenhe/whoa
3c2d384a983e42dedfd72561353ecf9370a02115
[ "MIT" ]
1
2017-10-31T01:56:58.000Z
2017-10-31T01:57:03.000Z
env/Lib/site-packages/formtools/preview.py
htwenhe/whoa
3c2d384a983e42dedfd72561353ecf9370a02115
[ "MIT" ]
null
null
null
""" Formtools Preview application. """ from django.http import Http404 from django.shortcuts import render_to_response from django.template.context import RequestContext from django.utils.crypto import constant_time_compare from .utils import form_hmac AUTO_ID = 'formtools_%s' # Each form here uses this as its auto_...
36.619318
79
0.59969
ca7365005ecf04643ea4ce59c901574c803bdf02
6,504
py
Python
PyOFS/__init__.py
zacharyburnettNOAA/PyOFS
b534495fafd3d37f1104eb87a7c17e8c134e1923
[ "MIT" ]
1
2019-05-03T20:54:36.000Z
2019-05-03T20:54:36.000Z
PyOFS/__init__.py
zacharyburnett/PyOFS
b534495fafd3d37f1104eb87a7c17e8c134e1923
[ "CC0-1.0" ]
null
null
null
PyOFS/__init__.py
zacharyburnett/PyOFS
b534495fafd3d37f1104eb87a7c17e8c134e1923
[ "CC0-1.0" ]
null
null
null
from datetime import datetime, timedelta import logging import os from os import PathLike from pathlib import Path import sys from typing import Union import numpy CRS_EPSG = 4326 DATA_DIRECTORY = Path(os.getenv('OFS_DATA', r'C:\data\OFS')) AZURE_CREDENTIALS_FILENAME = Path(os.getenv('AZURE_CRED', r'D:\data\azure_c...
30.971429
101
0.664514
fe9f7ac68a6e832369bc7e3e00c12954e2fe898b
1,621
py
Python
rpa-client/airtest/aircv/cal_confidence.py
yihleego/robotic-process-automation
8684b37ce6961de8b6cad60a959bd7f0eb6b7595
[ "MIT" ]
3
2022-03-26T14:13:23.000Z
2022-03-26T14:24:01.000Z
rpa-client/airtest/aircv/cal_confidence.py
yihleego/robotic-process-automation
8684b37ce6961de8b6cad60a959bd7f0eb6b7595
[ "MIT" ]
null
null
null
rpa-client/airtest/aircv/cal_confidence.py
yihleego/robotic-process-automation
8684b37ce6961de8b6cad60a959bd7f0eb6b7595
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """These functions calculate the similarity of two images of the same size.""" import cv2 import numpy as np from .utils import img_mat_rgb_2_gray def cal_ccoeff_confidence(im_source, im_search): """求取两张图片的可信度,使用TM_CCOEFF_NORMED方法.""" # 扩展置信度计算区域 im_source ...
31.784314
87
0.710672
ad975833f440923427c19216798c5485cbea771d
4,112
py
Python
tools/demo_net.py
Staniwnl/SlowFast
fb332bc02a69244fe69794c70e28d9fb8aeae741
[ "Apache-2.0" ]
null
null
null
tools/demo_net.py
Staniwnl/SlowFast
fb332bc02a69244fe69794c70e28d9fb8aeae741
[ "Apache-2.0" ]
null
null
null
tools/demo_net.py
Staniwnl/SlowFast
fb332bc02a69244fe69794c70e28d9fb8aeae741
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import numpy as np import time import torch import tqdm from slowfast.utils import logging from slowfast.visualization.async_predictor import AsyncDemo, AsyncVis from slowfast.visualization.ava_demo_precomputed_bo...
31.630769
94
0.64251
4feed5932bdc33a34a8525aedd590db16ab688dd
3,716
py
Python
devilry/devilry_superadmin/management/commands/devilry_usermod.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
29
2015-01-18T22:56:23.000Z
2020-11-10T21:28:27.000Z
devilry/devilry_superadmin/management/commands/devilry_usermod.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
786
2015-01-06T16:10:18.000Z
2022-03-16T11:10:50.000Z
devilry/devilry_superadmin/management/commands/devilry_usermod.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
15
2015-04-06T06:18:43.000Z
2021-02-24T12:28:30.000Z
from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand, CommandError from devilry.devilry_account.models import UserEmail from devilry.utils.management import add_input_encoding_argument cl...
37.16
114
0.567815
4120827dda7731f42aa28a8f05cfcefd35042de8
10,736
py
Python
Asap-3.8.4/Python/asap3/analysis/rdf.py
auag92/n2dm
03403ef8da303b79478580ae76466e374ec9da60
[ "MIT" ]
1
2021-10-19T11:35:34.000Z
2021-10-19T11:35:34.000Z
Asap-3.8.4/Python/asap3/analysis/rdf.py
auag92/n2dm
03403ef8da303b79478580ae76466e374ec9da60
[ "MIT" ]
null
null
null
Asap-3.8.4/Python/asap3/analysis/rdf.py
auag92/n2dm
03403ef8da303b79478580ae76466e374ec9da60
[ "MIT" ]
3
2016-07-18T19:22:48.000Z
2021-07-06T03:06:42.000Z
"""A radial distribution function observer.""" import numpy import asap3 from asap3.Internal.Subject import Subject from asap3.Internal.ListOfElements import ListOfElements import cPickle import new import sys class RadialDistributionFunction(Subject): def __init__(self, atoms, rMax, nBins, groups=None, interval=...
37.802817
80
0.556352
0131bc02e2a110510ea9a410c1dcf10e578d6e82
15,266
py
Python
spyder/plugins/completion/manager/plugin.py
TediaN97/spyder
5e24ca0da696dfb8f854aa54a8a174bd01e1eaff
[ "MIT" ]
null
null
null
spyder/plugins/completion/manager/plugin.py
TediaN97/spyder
5e24ca0da696dfb8f854aa54a8a174bd01e1eaff
[ "MIT" ]
1
2022-02-19T06:57:12.000Z
2022-02-19T06:57:12.000Z
spyder/plugins/completion/manager/plugin.py
TediaN97/spyder
5e24ca0da696dfb8f854aa54a8a174bd01e1eaff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Backend plugin to manage multiple code completion and introspection clients. """ # Standard library imports from collections import defaultdict import logging im...
38.260652
78
0.623018
8914d8e7e4b5bcc3c6de8272ec9f423d3faf425f
71,131
py
Python
.v/lib/python3.6/site-packages/ansible/modules/cloud/amazon/ec2_instance.py
binRick/ansible-callback-concise
fd7b05596b30872af3f79a32f223a0458bffbedd
[ "MIT" ]
1
2020-03-22T01:04:39.000Z
2020-03-22T01:04:39.000Z
.v/lib/python3.6/site-packages/ansible/modules/cloud/amazon/ec2_instance.py
binRick/ansible-callback-concise
fd7b05596b30872af3f79a32f223a0458bffbedd
[ "MIT" ]
null
null
null
.v/lib/python3.6/site-packages/ansible/modules/cloud/amazon/ec2_instance.py
binRick/ansible-callback-concise
fd7b05596b30872af3f79a32f223a0458bffbedd
[ "MIT" ]
1
2020-03-22T01:04:48.000Z
2020-03-22T01:04:48.000Z
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
41.42749
160
0.591233
f843232c254ed1f2ad92ec2558d8e58e74100215
1,427
py
Python
setup.py
kenjyco/settings-helper
e1a47672620ec72ac575d8bc6f98c98e7b5e2679
[ "MIT" ]
null
null
null
setup.py
kenjyco/settings-helper
e1a47672620ec72ac575d8bc6f98c98e7b5e2679
[ "MIT" ]
null
null
null
setup.py
kenjyco/settings-helper
e1a47672620ec72ac575d8bc6f98c98e7b5e2679
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.rst', 'r') as fp: long_description = fp.read() with open('requirements.txt', 'r') as fp: requirements = fp.read().splitlines() setup( name='settings-helper', version='0.0.11', description='Helpers to get specific settings from a parti...
33.186047
114
0.630694
3974dca2bfd42724edb7c26aaf37c0298aa0cf32
234
py
Python
projects/codecs/Python/src/rlglue/versions.py
sakaimiho/rl-glue-ext
914b039849544a042f138cea2aa28c2b4af1b049
[ "Apache-2.0" ]
1
2017-05-26T03:21:24.000Z
2017-05-26T03:21:24.000Z
projects/codecs/Python/src/rlglue/versions.py
cameron-upright/rl-glue-ext
914b039849544a042f138cea2aa28c2b4af1b049
[ "Apache-2.0" ]
null
null
null
projects/codecs/Python/src/rlglue/versions.py
cameron-upright/rl-glue-ext
914b039849544a042f138cea2aa28c2b4af1b049
[ "Apache-2.0" ]
null
null
null
# # $Revision$ # $Date$ # $Author$ # $HeadURL$ def get_svn_codec_version(): SVN_GLUE_VERSION="$Revision$" justTheNumber=SVN_GLUE_VERSION[11:len(SVN_GLUE_VERSION)-2] return justTheNumber def get_codec_version(): return "2.02"
18
59
0.735043
b7a6c8fdd40a0dd3dea3240213bf31c15116af3c
4,250
py
Python
core/dbt/adapters/base/query_headers.py
beckjake/dbt
b691a73dba6bd5fe44174917cb62b2ad76ec4679
[ "Apache-2.0" ]
null
null
null
core/dbt/adapters/base/query_headers.py
beckjake/dbt
b691a73dba6bd5fe44174917cb62b2ad76ec4679
[ "Apache-2.0" ]
null
null
null
core/dbt/adapters/base/query_headers.py
beckjake/dbt
b691a73dba6bd5fe44174917cb62b2ad76ec4679
[ "Apache-2.0" ]
null
null
null
from threading import local from typing import Optional, Callable, Dict, Any from dbt.clients.jinja import QueryStringGenerator # this generates an import cycle, as usual from dbt.context.base import QueryHeaderContext from dbt.contracts.connection import AdapterRequiredConfig from dbt.contracts.graph.compiled import...
32.19697
79
0.647294
47360fee91aa520dade46365e781e711fdd154b5
7,308
py
Python
abel/hansenlaw.py
MikhailRyazanov/PyAbel
38728a6ef2321d1325ad96597f56a835de8423be
[ "MIT" ]
2
2020-01-28T00:34:40.000Z
2021-06-28T14:27:43.000Z
abel/hansenlaw.py
MikhailRyazanov/PyAbel
38728a6ef2321d1325ad96597f56a835de8423be
[ "MIT" ]
1
2020-01-28T00:34:42.000Z
2020-01-28T00:35:13.000Z
abel/hansenlaw.py
MikhailRyazanov/PyAbel
38728a6ef2321d1325ad96597f56a835de8423be
[ "MIT" ]
2
2020-10-26T13:29:02.000Z
2021-06-28T14:27:46.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np ############################################################################# # hansenlaw - a recursive method forward/inverse...
34.8
86
0.569376
6276280958d8a69cc1f8443ec4a829ff5453191c
10,491
py
Python
test/mitmproxy/addons/test_script.py
drzax/mitmproxy
a3007aa223b045385a2a4efcdbc0e87006164efa
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_script.py
drzax/mitmproxy
a3007aa223b045385a2a4efcdbc0e87006164efa
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_script.py
drzax/mitmproxy
a3007aa223b045385a2a4efcdbc0e87006164efa
[ "MIT" ]
null
null
null
import asyncio import os import sys import traceback import pytest from mitmproxy import addonmanager from mitmproxy import exceptions from mitmproxy.addons import script from mitmproxy.test import taddons from mitmproxy.test import tflow # We want this to be speedy for testing script.ReloadInterval = 0.1 @pytest...
31.504505
93
0.531122
c561123b69e6f745b3cbf9bcaf8f3c7ea5c44cae
88
py
Python
lesson_1/homework_1.py
vvpwork/goit-python
e2cf5216811863aac423b4781eb27c07c0dbe9e0
[ "MIT" ]
null
null
null
lesson_1/homework_1.py
vvpwork/goit-python
e2cf5216811863aac423b4781eb27c07c0dbe9e0
[ "MIT" ]
null
null
null
lesson_1/homework_1.py
vvpwork/goit-python
e2cf5216811863aac423b4781eb27c07c0dbe9e0
[ "MIT" ]
null
null
null
input_name = input('Please enter your name: ') name = f"Hello {input_name}" print(name)
22
46
0.715909
79f17883281fcd48c883edf454a7e16b4db0f169
214
py
Python
custom/hello_world.py
InEdited/Jarvis
68dbefde455e363bb88020409715032722302769
[ "MIT" ]
null
null
null
custom/hello_world.py
InEdited/Jarvis
68dbefde455e363bb88020409715032722302769
[ "MIT" ]
null
null
null
custom/hello_world.py
InEdited/Jarvis
68dbefde455e363bb88020409715032722302769
[ "MIT" ]
null
null
null
from plugin import plugin @plugin() def helloworld(jarvis, s): """Prints \"hello world!\"""" jarvis.say("Hello World!") @plugin() def repeat(jarvis, s): """Repeats what you type""" jarvis.say(s)
16.461538
33
0.621495
fdc38c35b076e2d3bc7032d5f669cc6415a888b3
290
py
Python
hacker_rank/30_days_challenge/day_7/arrays.py
alefeans/python_exercises
d7f8ea8dfd993f070d201202d12a526bb8105cc5
[ "MIT" ]
1
2021-06-11T18:29:26.000Z
2021-06-11T18:29:26.000Z
hacker_rank/30_days_challenge/day_7/arrays.py
alefeans/learning_python
d7f8ea8dfd993f070d201202d12a526bb8105cc5
[ "MIT" ]
null
null
null
hacker_rank/30_days_challenge/day_7/arrays.py
alefeans/learning_python
d7f8ea8dfd993f070d201202d12a526bb8105cc5
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys n = int(input().strip()) if (n < 0) and (n > 1000): sys.exit(1) else: arr = [int(t) for t in input().strip().split(' ')] for i in range(len(arr)): if (arr[i] < 0 ) and (arr[i] > 10000): sys.exit(1) arr.reverse() print(*arr)
17.058824
54
0.517241
b2bc060d5de6e3fdb3e0ec8ac070e395f60863d0
2,028
py
Python
tools/SHACLDefs.py
philotymic/shacled.czc
6ee5a8b37aea54a68d85483c80b2e596a4ab09bb
[ "MIT" ]
null
null
null
tools/SHACLDefs.py
philotymic/shacled.czc
6ee5a8b37aea54a68d85483c80b2e596a4ab09bb
[ "MIT" ]
null
null
null
tools/SHACLDefs.py
philotymic/shacled.czc
6ee5a8b37aea54a68d85483c80b2e596a4ab09bb
[ "MIT" ]
null
null
null
import sys sys.path.append("/home/asmirnov/pyjenautils") from pyjenautils import fuseki, jenagraph as j class SHACLClass: def __init__(self, class_uri): self.class_uri = class_uri self.members = {} def load_details(self, fuseki_con): rq = """select ?class_uri ?mpath ?mdt ?mclass ...
33.245902
81
0.597633
b20b33d8a3ca50e4d213f2ac06b218acc5ae4f67
7,514
py
Python
data/p3BR/R2/benchmark/startQiskit_Class394.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class394.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_Class394.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=78 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
32.387931
140
0.639739
c593936c053b4d218829db644ed116ade15f9f1f
3,904
py
Python
smc/routing/prefix_list.py
kobaan/fp-NGFW-SMC-python
7be57bdde954e4115a887c0140054c87cc0b53a0
[ "Apache-2.0" ]
17
2019-11-19T07:25:09.000Z
2022-02-16T16:43:51.000Z
smc/routing/prefix_list.py
kobaan/fp-NGFW-SMC-python
7be57bdde954e4115a887c0140054c87cc0b53a0
[ "Apache-2.0" ]
25
2020-05-20T12:27:35.000Z
2022-02-21T05:27:10.000Z
smc/routing/prefix_list.py
kobaan/fp-NGFW-SMC-python
7be57bdde954e4115a887c0140054c87cc0b53a0
[ "Apache-2.0" ]
7
2020-02-04T12:16:50.000Z
2022-02-18T14:01:04.000Z
""" IP Prefix module represents prefix lists that can be used to filter networks for OSPF routing. """ import collections from smc.base.model import Element from smc.routing.access_list import AccessList PrefixListEntry = collections.namedtuple( "PrefixListEntry", "subnet action min_prefix_length max_prefix_lengt...
36.485981
88
0.644723
1522f33719fe60c5b8c7b3632bf685932c5e4f48
14,555
py
Python
BFI_reg_landmarks.py
BlakeZim/working_code
ebdd8f6854b9d342a483592c81146d89021d688e
[ "MIT" ]
null
null
null
BFI_reg_landmarks.py
BlakeZim/working_code
ebdd8f6854b9d342a483592c81146d89021d688e
[ "MIT" ]
null
null
null
BFI_reg_landmarks.py
BlakeZim/working_code
ebdd8f6854b9d342a483592c81146d89021d688e
[ "MIT" ]
null
null
null
'''code for finding the correct corresponding landmarks given BFI and MRI - not run by itself, ''' import numpy as np import pickle # for loading rigid reg affine def orig_to_reg(landmark): '''takes a set of original landmarks in original pixel coordinates (i.e. [pixel HR BFI, voxel MRI]) an...
52.735507
105
0.496462
7bfdcaf1038564afe6f3f27b51cd1964ff9d611b
5,499
py
Python
helper_scripts/dedup.py
ebiiim/mov-dedup
c4dc947b29a5fa5d2ae550b8a2e30341334fac9e
[ "MIT" ]
10
2018-09-22T08:39:29.000Z
2020-07-08T03:05:11.000Z
helper_scripts/dedup.py
ebiiim/anime2x
c4dc947b29a5fa5d2ae550b8a2e30341334fac9e
[ "MIT" ]
5
2018-09-17T15:17:26.000Z
2019-02-09T07:26:50.000Z
helper_scripts/dedup.py
ebiiim/anime2x
c4dc947b29a5fa5d2ae550b8a2e30341334fac9e
[ "MIT" ]
4
2018-09-15T13:34:20.000Z
2019-08-10T06:17:02.000Z
import sys import shutil from pathlib import Path import csv import numpy as np import matplotlib.pyplot as plt import pandas as pd import datetime from logging import getLogger logger = getLogger(__name__) class MovDeDup(object): # /path/to/project_root/bin/ffmpeg/bin/ffmpeg.exe FFMPEG_PATH = Path(__file__+'...
39.561151
106
0.608474
241f866da79c4693051503d3563920aacb71235a
7,061
py
Python
tests/test_device_merging.py
OpenEarthDemo/Stethoscope
4ad041e81c0dbcfbd7cd78a72c95d3eeaf3cf3a3
[ "Apache-2.0" ]
null
null
null
tests/test_device_merging.py
OpenEarthDemo/Stethoscope
4ad041e81c0dbcfbd7cd78a72c95d3eeaf3cf3a3
[ "Apache-2.0" ]
1
2021-02-08T20:25:00.000Z
2021-02-08T20:25:00.000Z
tests/test_device_merging.py
OpenEarthDemo/Stethoscope
4ad041e81c0dbcfbd7cd78a72c95d3eeaf3cf3a3
[ "Apache-2.0" ]
null
null
null
# vim: set fileencoding=utf-8 : from __future__ import absolute_import, print_function, unicode_literals import arrow import pytest import stethoscope.api.devices DECAFBAD = '00:DE:CA:FB:AD:00' DEADBEEF = '00:DE:AD:BE:EF:00' LOCALMAC = '02:00:00:00:00:00' GROUPMAC = '01:00:00:00:00:00' ZERODMAC = '00:00:00:00:00:0...
28.244
78
0.65359
a58ac3573faddf31e6bc61c820f95268cbb494ec
4,227
py
Python
jenkins/urllib_kerb.py
klmitch/python-jenkins
f6f26ec481c97928d344df080e62a76be1302224
[ "BSD-3-Clause" ]
null
null
null
jenkins/urllib_kerb.py
klmitch/python-jenkins
f6f26ec481c97928d344df080e62a76be1302224
[ "BSD-3-Clause" ]
null
null
null
jenkins/urllib_kerb.py
klmitch/python-jenkins
f6f26ec481c97928d344df080e62a76be1302224
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
34.647541
79
0.587414
de5bb242535ec78b3abfc7d1941dcd9b23bdb344
13,308
py
Python
mmdet/models/detectors/base.py
nithinksath96/Small_object_detection
b2ccd29d128487909f92e4fc796f72a0a4458e32
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/base.py
nithinksath96/Small_object_detection
b2ccd29d128487909f92e4fc796f72a0a4458e32
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/base.py
nithinksath96/Small_object_detection
b2ccd29d128487909f92e4fc796f72a0a4458e32
[ "Apache-2.0" ]
null
null
null
from abc import ABCMeta, abstractmethod from collections import OrderedDict import mmcv import numpy as np import torch import torch.distributed as dist import torch.nn as nn from mmcv.runner import auto_fp16 from mmcv.utils import print_log from mmdet.utils import get_root_logger class BaseDetector(nn.Module, meta...
38.798834
79
0.573339
5852bb89879b1fc6642a4f619b0576aba6bcba35
20,297
py
Python
toontown/ai/ToontownAIRepository.py
mghost99/open-toontown-py3
072c3f5c06e1aab2bf4186681a247319b5d25e80
[ "BSD-3-Clause" ]
null
null
null
toontown/ai/ToontownAIRepository.py
mghost99/open-toontown-py3
072c3f5c06e1aab2bf4186681a247319b5d25e80
[ "BSD-3-Clause" ]
null
null
null
toontown/ai/ToontownAIRepository.py
mghost99/open-toontown-py3
072c3f5c06e1aab2bf4186681a247319b5d25e80
[ "BSD-3-Clause" ]
null
null
null
from direct.directnotify import DirectNotifyGlobal from panda3d.core import * from panda3d.toontown import * from otp.ai.AIZoneData import AIZoneDataStore from otp.ai.TimeManagerAI import TimeManagerAI from otp.distributed.OtpDoGlobals import * from toontown.ai.HolidayManagerAI import HolidayManagerAI from toontown.ai...
41.507157
120
0.688328
dba0316c83b3968dd5359f65a4a5ad50c696461f
8,510
py
Python
hypernets/tests/tabular/tb_dask/feature_generator_dask_test.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
3
2022-03-25T23:27:44.000Z
2022-03-27T01:32:28.000Z
hypernets/tests/tabular/tb_dask/feature_generator_dask_test.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
null
null
null
hypernets/tests/tabular/tb_dask/feature_generator_dask_test.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """ """ import math from datetime import datetime import pandas as pd import pytest from sklearn.pipeline import Pipeline from hypernets.tabular import get_tool_box from hypernets.tabular.datasets import dsutils from hypernets.utils import logging from . import if_dask_ready, is_dask_installed...
41.111111
120
0.605405
72ff448177469206345c650a75164fdc8da5a260
9,428
py
Python
looker_client_31/api/data_action_api.py
ContrastingSounds/looker_sdk_31
f973434049fff1b605b10086ab8b84f2f62e3489
[ "MIT" ]
null
null
null
looker_client_31/api/data_action_api.py
ContrastingSounds/looker_sdk_31
f973434049fff1b605b10086ab8b84f2f62e3489
[ "MIT" ]
null
null
null
looker_client_31/api/data_action_api.py
ContrastingSounds/looker_sdk_31
f973434049fff1b605b10086ab8b84f2f62e3489
[ "MIT" ]
null
null
null
# coding: utf-8 """ Experimental Looker API 3.1 Preview This API 3.1 is in active development. Breaking changes are likely to occur to some API functions in future Looker releases until API 3.1 is officially launched and upgraded to beta status. If you have time and interest to experiment with new or modifie...
40.463519
518
0.631947
a826df45c326f5458b894f23646e0d216580921d
1,218
py
Python
molecule/default/tests/test_default.py
bodsch/ansible-sane
5888dde32925afcfb5e86612d531ec4475eaf533
[ "Apache-2.0" ]
1
2021-04-13T18:51:47.000Z
2021-04-13T18:51:47.000Z
molecule/default/tests/test_default.py
bodsch/ansible-sane
5888dde32925afcfb5e86612d531ec4475eaf533
[ "Apache-2.0" ]
null
null
null
molecule/default/tests/test_default.py
bodsch/ansible-sane
5888dde32925afcfb5e86612d531ec4475eaf533
[ "Apache-2.0" ]
null
null
null
import pytest import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.fixture() def get_vars(host): defaults_files = "file=../../defaults/main.yml name=role_defaults" vars_files = "file...
25.375
70
0.674877
8f245fa9a5deca7da0452bcfc704188e8beb659b
865
py
Python
squash/templatetags/squash_extras.py
craigotis/Squash
f2b487bf729808c33594772414732d9679e49066
[ "MIT" ]
1
2017-11-20T02:38:25.000Z
2017-11-20T02:38:25.000Z
squash/templatetags/squash_extras.py
craigotis/Squash
f2b487bf729808c33594772414732d9679e49066
[ "MIT" ]
null
null
null
squash/templatetags/squash_extras.py
craigotis/Squash
f2b487bf729808c33594772414732d9679e49066
[ "MIT" ]
null
null
null
from django import template from django.template import RequestContext from django.template import context register = template.Library() ########## START FILTERS ########## @register.filter def user_has_perm(obj, perm): return obj.has_perm(perm) @register.filter def is_not_None(val): return val is not N...
21.625
68
0.649711
f00a17a11512f512fb2d1283b60327ebe1c22d8a
4,794
py
Python
analyze/tests/test_boxes.py
moshes7/odeval
9b9f7f84740a2974af9bf42aecbc732970cdd444
[ "MIT" ]
1
2020-12-02T07:00:49.000Z
2020-12-02T07:00:49.000Z
analyze/tests/test_boxes.py
moshes7/odeval
9b9f7f84740a2974af9bf42aecbc732970cdd444
[ "MIT" ]
1
2021-09-02T06:01:50.000Z
2021-12-23T07:03:02.000Z
analyze/tests/test_boxes.py
moshes7/odeval
9b9f7f84740a2974af9bf42aecbc732970cdd444
[ "MIT" ]
3
2020-12-01T10:08:16.000Z
2022-01-02T09:17:31.000Z
import pytest import numpy as np import matplotlib.pyplot as plt from analyze.bounding_box import Box import analyze.visualize as vis def test_boxes_iou(): # N = 3 bbox1 = np.array([[0, 0, 9, 9], # [left, top, right, bottom] [0, 0, 4, 9], [100, 100, 109, 109], ...
36.318182
154
0.520651
692a531855e24a6163b9db1b4f6de423d5252be8
2,532
py
Python
_todo/programme/td11_trie.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_todo/programme/td11_trie.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
_todo/programme/td11_trie.py
mohamedelkansouli/Ensae_py
8bc867bd2081c259c793fadfa8be5dcc7bd1400b
[ "MIT" ]
null
null
null
import random, time def mot_alea (l) : l = [ chr(97+random.randint(0,25)) for i in range(l) ] return "".join(l) for N in [100,200,500,1000,2000,5000,10000,20000,50000,100000,200000] : for taille in [5,10,20,50,100] : n = 1000 mots = [ mot_alea(10) for _ in range (N) ] ...
30.142857
86
0.364534
0fb7611ce4c2bfc67594632bf7736e032762f3f7
23,812
py
Python
magenta/models/shared/events_rnn_model.py
wsyjwps1983/magenta-CreateYourMusic
824119850984c6768faa59d5221a1c825a2b46af
[ "Apache-2.0" ]
null
null
null
magenta/models/shared/events_rnn_model.py
wsyjwps1983/magenta-CreateYourMusic
824119850984c6768faa59d5221a1c825a2b46af
[ "Apache-2.0" ]
null
null
null
magenta/models/shared/events_rnn_model.py
wsyjwps1983/magenta-CreateYourMusic
824119850984c6768faa59d5221a1c825a2b46af
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
44.096296
80
0.703679
3e81aa2fba239d74f3d4ae888e13ee724802a71a
4,093
py
Python
dtspec/specs.py
mdesmet/dtspec
d1b73bc505359e46e0489c004eaed21e6ba498c0
[ "MIT" ]
null
null
null
dtspec/specs.py
mdesmet/dtspec
d1b73bc505359e46e0489c004eaed21e6ba498c0
[ "MIT" ]
null
null
null
dtspec/specs.py
mdesmet/dtspec
d1b73bc505359e46e0489c004eaed21e6ba498c0
[ "MIT" ]
null
null
null
import os import re import datetime import jinja2 import yaml from dateutil.relativedelta import relativedelta def str_presenter(dumper, data): if len(data.splitlines()) > 1: # check for multiline string return dumper.represent_scalar("tag:yaml.org,2002:str", data, style="|") return dumper.represent...
31.007576
88
0.620572
6bcd852424bf8cf535dc939b2c4d25d2d006e2ce
4,033
py
Python
tests/python/contrib/test_hexagon/test_cache_read_write.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
1
2022-03-06T04:01:26.000Z
2022-03-06T04:01:26.000Z
tests/python/contrib/test_hexagon/test_cache_read_write.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
null
null
null
tests/python/contrib/test_hexagon/test_cache_read_write.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
31.755906
95
0.671956
5160646c17719384207d18cb5fe1ab84843c2380
2,070
py
Python
wemo.py
tristiyadi/Python-Filter-Konten
21e3daa4f30182b911b8d71405fbc89b1d45c215
[ "MIT" ]
2
2016-04-19T08:03:40.000Z
2016-04-19T08:05:57.000Z
wemo.py
tristiyadi/Python-Filter-Konten
21e3daa4f30182b911b8d71405fbc89b1d45c215
[ "MIT" ]
null
null
null
wemo.py
tristiyadi/Python-Filter-Konten
21e3daa4f30182b911b8d71405fbc89b1d45c215
[ "MIT" ]
null
null
null
from miranda import upnp, msearch conn = upnp() msearch(0, 0, conn, 2) SWITCHES = [] # populate all the host info, for every upnp device on the network for index in conn.ENUM_HOSTS: hostInfo = conn.ENUM_HOSTS[index] if hostInfo['dataComplete'] == False: xmlHeaders, xmlData = conn.getXML(hostInfo['xml...
28.75
93
0.641063
409b88a13c94061386e2a6c7eb9d10e93e4d6270
1,181
py
Python
python/py.py
kettlewell/bashisms
c6222424984264c7c6488f20ea5591ff5078d040
[ "MIT" ]
null
null
null
python/py.py
kettlewell/bashisms
c6222424984264c7c6488f20ea5591ff5078d040
[ "MIT" ]
null
null
null
python/py.py
kettlewell/bashisms
c6222424984264c7c6488f20ea5591ff5078d040
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' Its time to start writing things in python3 only now. These are snippets of code I've found while studying or an example in a book They are by no means complete examples. ''' ## System Modules import os import sys ## Third Party Modules from urllib.parse import parse_qs ## My Modules # c...
22.711538
76
0.64945
ac56f5eb59f458ff546808372cf05ca384430a0b
6,117
py
Python
tests/transform_tests/transform_test.py
alueschow/polymatheia
e46a38b3686139bbab3a2fcfaa914d4ca938654e
[ "MIT" ]
3
2020-09-15T15:15:34.000Z
2021-06-15T10:35:07.000Z
tests/transform_tests/transform_test.py
alueschow/polymatheia
e46a38b3686139bbab3a2fcfaa914d4ca938654e
[ "MIT" ]
7
2020-09-03T12:53:34.000Z
2020-10-05T09:14:29.000Z
tests/transform_tests/transform_test.py
alueschow/polymatheia
e46a38b3686139bbab3a2fcfaa914d4ca938654e
[ "MIT" ]
2
2020-10-13T09:12:21.000Z
2021-04-15T14:19:06.000Z
"""Tests for the :class:`~polymatheia.transform.Transform`.""" from polymatheia.data import NavigableDict from polymatheia.transform import Transform def test_copy_transform(): """Test the copy transformation.""" record = NavigableDict({'a': {'one': {'_text': '1'}}, 'b': {'two': {'_text': '2'}}}) transfor...
38.471698
115
0.556645
95506228ebb43e8f2ab1ee172558c74fe69d1446
371
py
Python
glue_wwt/viewer/image_style_editor.py
dhomeier/glue-wwt
1e86d98af08fcaf702b6efe4972fb4dac19fe47a
[ "BSD-3-Clause" ]
1
2020-03-24T08:20:20.000Z
2020-03-24T08:20:20.000Z
glue_wwt/viewer/image_style_editor.py
dhomeier/glue-wwt
1e86d98af08fcaf702b6efe4972fb4dac19fe47a
[ "BSD-3-Clause" ]
66
2016-06-07T15:11:11.000Z
2022-03-25T20:55:31.000Z
glue_wwt/viewer/image_style_editor.py
dhomeier/glue-wwt
1e86d98af08fcaf702b6efe4972fb4dac19fe47a
[ "BSD-3-Clause" ]
5
2016-06-08T09:44:15.000Z
2021-06-23T16:18:14.000Z
from __future__ import absolute_import, division, print_function import os from qtpy import QtWidgets from glue.utils.qt import load_ui class WWTImageStyleEditor(QtWidgets.QWidget): def __init__(self, layer_artist): super(WWTImageStyleEditor, self).__init__() self.ui = load_ui('image_style_edit...
26.5
93
0.770889
1631dbd95855cde01def66a569cc7a6f254cd2ee
354
py
Python
search/info/utils/count_time.py
aircov/-
2e306b846dcdd3c57f1dba4493dc3d2babb036a7
[ "Apache-2.0" ]
null
null
null
search/info/utils/count_time.py
aircov/-
2e306b846dcdd3c57f1dba4493dc3d2babb036a7
[ "Apache-2.0" ]
null
null
null
search/info/utils/count_time.py
aircov/-
2e306b846dcdd3c57f1dba4493dc3d2babb036a7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import time def count_time(func): def int_time(*args, **kwargs): start_time = time.time() # 程序开始时间 ret = func(*args, **kwargs) over_time = time.time() # 程序结束时间 total_time = (over_time - start_time) print("%s程序共计%.6f秒" % (func, total_time)) ...
20.823529
49
0.567797
b79338b50342611848f3c4068d7199662ec3d2fa
4,988
py
Python
arelle/ViewWinRoleTypes.py
GuoHuiChen/Arelle
76b3c720e55348fd91b7be091040d2207f85400c
[ "Apache-2.0" ]
1
2018-07-18T04:56:38.000Z
2018-07-18T04:56:38.000Z
arelle/ViewWinRoleTypes.py
GuoHuiChen/Arelle
76b3c720e55348fd91b7be091040d2207f85400c
[ "Apache-2.0" ]
null
null
null
arelle/ViewWinRoleTypes.py
GuoHuiChen/Arelle
76b3c720e55348fd91b7be091040d2207f85400c
[ "Apache-2.0" ]
null
null
null
''' Created on Aug 8, 2013 @author: Mark V Systems Limited (c) Copyright 2013 Mark V Systems Limited, All rights reserved. ''' from collections import defaultdict from arelle import ViewWinTree, ModelDtsObject, XbrlConst, XmlUtil, Locale def viewRoleTypes(modelXbrl, tabWin, isArcrole=False, lang=None): modelXbrl....
44.535714
147
0.598436
9b2d862233053c83f2d54094806d2add7cf2876f
1,326
py
Python
setup.py
mickkn/stockfish
95846fa57f1635d009804a4560abe0625ff0e6d1
[ "MIT" ]
null
null
null
setup.py
mickkn/stockfish
95846fa57f1635d009804a4560abe0625ff0e6d1
[ "MIT" ]
null
null
null
setup.py
mickkn/stockfish
95846fa57f1635d009804a4560abe0625ff0e6d1
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("README.md", "r") as readme: long_description = readme.read() setup( name="stockfish", author="Ilya Zhelyabuzhsky", author_email="zhelyabuzhsky@icloud.com", version="3.13.0", license="MIT", keywords="chess stockfish", python_require...
36.833333
97
0.652338
fd3d5910e1bfda069a5510c3c1a95efcc932c4e3
2,628
py
Python
pyriad/swarms.py
RamanKishoreSingh/pyriad
056d13e476724887f2bdc1ead9a5690ee12fbaf5
[ "MIT" ]
1
2021-06-09T15:35:44.000Z
2021-06-09T15:35:44.000Z
pyriad/swarms.py
RamanKishoreSingh/pyriad
056d13e476724887f2bdc1ead9a5690ee12fbaf5
[ "MIT" ]
null
null
null
pyriad/swarms.py
RamanKishoreSingh/pyriad
056d13e476724887f2bdc1ead9a5690ee12fbaf5
[ "MIT" ]
3
2021-02-19T10:21:45.000Z
2022-03-18T05:47:43.000Z
from collections import deque from typing import Tuple import copy import torch import random from .memories import Memory class Swarm: def __init__(self, memory_size: int = 1, ): self.memory = Memory(memory_size=memory_size) self.agents = [] self.episode...
27.663158
105
0.516743
a8a1630e5d4d1f66940818b53142521b4e7ba0a6
2,355
py
Python
tests/common/test_run/ascend/matrix_diag_part_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
tests/common/test_run/ascend/matrix_diag_part_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
tests/common/test_run/ascend/matrix_diag_part_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2020-2021 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 agre...
42.818182
101
0.729087
fd77e1c0bb2c7e6a5d603b2470d4da9b43f248b6
725
py
Python
Terry_toolkit/SearchBaidu.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
null
null
null
Terry_toolkit/SearchBaidu.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
14
2019-11-15T14:28:22.000Z
2022-02-10T00:24:28.000Z
Terry_toolkit/SearchBaidu.py
napoler/Terry-toolkit
8b1a607fb6d27801b0441b67f7eb0962794a728a
[ "MIT" ]
1
2020-04-15T12:58:00.000Z
2020-04-15T12:58:00.000Z
from MagicBaidu import MagicBaidu import pprint class SearchBaidu: """SearchBaidu 百度搜索结果抓取 使用https://github.com/napoler/MagicBaidu """ def __init__(self): print('kaishi') # self.text = text # self.salary = salary # Employee.empCount += 1 # """ 你的 APPID AK ...
22.65625
54
0.503448
f94fdbe8a72b193fabd8d516e5f2e5cc61065ce3
370
py
Python
hvac/tests/integration_tests/api/system_backend/test_init.py
CiscoM31/hvac
d7133ac8af76d0c5a9f9626af640af0e2be65e77
[ "Apache-2.0" ]
null
null
null
hvac/tests/integration_tests/api/system_backend/test_init.py
CiscoM31/hvac
d7133ac8af76d0c5a9f9626af640af0e2be65e77
[ "Apache-2.0" ]
null
null
null
hvac/tests/integration_tests/api/system_backend/test_init.py
CiscoM31/hvac
d7133ac8af76d0c5a9f9626af640af0e2be65e77
[ "Apache-2.0" ]
null
null
null
import logging from unittest import TestCase from hvac.tests import utils class TestInit(utils.HvacIntegrationTestCase, TestCase): def test_read_init_status(self): read_response = self.client.sys.read_init_status() logging.debug('read_response: %s' % read_response) self.assertTrue( ...
26.428571
58
0.710811
542b0603c7b06fda117670ef5c8687c2e1cd0ac3
12,218
py
Python
models_gan_pytorch.py
gtesei/facial_unpaired_i2i_translation_SA_C_CC_GAN
3ca99e741ed408a45995e702e74da1ef758ffb6e
[ "MIT" ]
2
2019-11-19T18:55:14.000Z
2019-11-19T20:19:50.000Z
models_gan_pytorch.py
gtesei/facial_unpaired_i2i_translation_SA_C_CC_GAN
3ca99e741ed408a45995e702e74da1ef758ffb6e
[ "MIT" ]
null
null
null
models_gan_pytorch.py
gtesei/facial_unpaired_i2i_translation_SA_C_CC_GAN
3ca99e741ed408a45995e702e74da1ef758ffb6e
[ "MIT" ]
1
2019-12-21T13:49:40.000Z
2019-12-21T13:49:40.000Z
import torch.nn as nn import torch.nn.functional as F import torch import functools class ModuleBase(nn.Module): def __init__(self): super(ModuleBase, self).__init__() self._name = 'BaseNetwork' @property def name(self): return self._name def init_weights(self): self....
39.035144
164
0.618596
300c1180c9359647edf7e9cec5537790901a8efa
2,708
py
Python
fixture/group.py
popovsn777/python_training_2
b27147303f4f83621410e3d0bd55bad1a2135a57
[ "Apache-2.0" ]
null
null
null
fixture/group.py
popovsn777/python_training_2
b27147303f4f83621410e3d0bd55bad1a2135a57
[ "Apache-2.0" ]
null
null
null
fixture/group.py
popovsn777/python_training_2
b27147303f4f83621410e3d0bd55bad1a2135a57
[ "Apache-2.0" ]
null
null
null
__author__ = 'popov.sn' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def return_to_groups_page(self): # return to group page wd = self.app.wd wd.find_element_by_link_text("group page").click() def create(self, group): ...
29.11828
101
0.632939
f8b68975061c4cb187bcd6f4820be81a9bcd5e76
1,109
py
Python
sgmdxfparser/codepage.py
sigmoe/GeofoncierEditeurRFU
cdc3a6a40c46a2327ed6e598319a71179217e54e
[ "CC-BY-3.0" ]
2
2020-06-19T10:26:09.000Z
2020-06-19T11:55:48.000Z
sgmdxfparser/codepage.py
sigmoe/GeofoncierEditeurRFU
cdc3a6a40c46a2327ed6e598319a71179217e54e
[ "CC-BY-3.0" ]
11
2015-06-16T09:22:14.000Z
2015-09-17T10:26:18.000Z
sgmdxfparser/codepage.py
sigmoe/GeofoncierEditeurRFU
cdc3a6a40c46a2327ed6e598319a71179217e54e
[ "CC-BY-3.0" ]
3
2016-04-28T07:45:31.000Z
2021-11-19T22:49:12.000Z
# sgmdxfparser - copyright (C) 2017, Etienne MORO # and copyright (C) 2012, Manfred Moitzi (mozman) # Purpose: codepage handling # Created: 2012-07-21 # Updated: 2017-02-06 # License: MIT License from __future__ import unicode_literals __author__ = "emoro - mozman" codepages = { '874': 'cp874', # Tha...
27.04878
52
0.597836
2ae8915b5161343e06434dd33ed9361cdd4766d1
358
py
Python
project/editorial/migrations/0032_remove_event_description.py
cojennin/facet
230e65316134b3399a35d40034728e61ba63cb2a
[ "MIT" ]
25
2015-07-13T22:16:36.000Z
2021-11-11T02:45:32.000Z
project/editorial/migrations/0032_remove_event_description.py
cojennin/facet
230e65316134b3399a35d40034728e61ba63cb2a
[ "MIT" ]
74
2015-12-01T18:57:47.000Z
2022-03-11T23:25:47.000Z
project/editorial/migrations/0032_remove_event_description.py
cojennin/facet
230e65316134b3399a35d40034728e61ba63cb2a
[ "MIT" ]
6
2016-01-08T21:12:43.000Z
2019-05-20T16:07:56.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('editorial', '0031_auto_20171021_2146'), ] operations = [ migrations.RemoveField( model_name='event', ...
18.842105
49
0.608939
d895fdb61ceace79e8332b6190d78d6771bcc754
68
py
Python
convlab2/dst/sumbt/multiwoz/__init__.py
audier/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
1
2021-06-03T08:39:58.000Z
2021-06-03T08:39:58.000Z
convlab2/dst/sumbt/multiwoz/__init__.py
haojiepan1/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
null
null
null
convlab2/dst/sumbt/multiwoz/__init__.py
haojiepan1/CrossWOZ
6d7b4c4cfb73a528b76074764687906abecc90b6
[ "Apache-2.0" ]
null
null
null
from convlab2.dst.sumbt.multiwoz.sumbt import MultiWozSUMBT as SUMBT
68
68
0.867647
f4f05403a4f7414f6da77bfbfa1e61e82ffe6e84
1,980
py
Python
tests/test_rotate.py
UBC-MDS/MDSPyGram
a21c40f6984b529acc5987827d4bee8d987fc206
[ "MIT" ]
null
null
null
tests/test_rotate.py
UBC-MDS/MDSPyGram
a21c40f6984b529acc5987827d4bee8d987fc206
[ "MIT" ]
7
2021-02-25T00:02:56.000Z
2021-02-26T12:02:01.000Z
tests/test_rotate.py
UBC-MDS/MDSPyGram
a21c40f6984b529acc5987827d4bee8d987fc206
[ "MIT" ]
1
2021-02-25T03:32:27.000Z
2021-02-25T03:32:27.000Z
import os import sys import numpy as np # import matplotlib.pyplot as plt import skimage.io from imageprocessor.rotate import rotate import pytest currentdir = os.path.dirname(os.path.realpath(__file__)) parentdir = os.path.dirname(currentdir) sys.path.append(parentdir) def test_rotate1(): ''' Check if the ro...
27.5
75
0.70303
49fc0cdb16d7f64adc7c7d5741ce2a0cbb5e9df1
7,698
py
Python
optimizers.py
umutto/Hill-Climbing-IRL
5b494f375f51d56ca8408ca8c8cd2ec1132ba586
[ "MIT" ]
3
2020-04-23T08:17:45.000Z
2021-07-29T11:55:56.000Z
optimizers.py
umutto/Hill-Climbing-IRL
5b494f375f51d56ca8408ca8c8cd2ec1132ba586
[ "MIT" ]
null
null
null
optimizers.py
umutto/Hill-Climbing-IRL
5b494f375f51d56ca8408ca8c8cd2ec1132ba586
[ "MIT" ]
null
null
null
import random import numpy as np def get_step_costs(rmap, steps): return [rmap.get_cost(*s) for s in steps] def get_possible_steps(theta, n_points=100, step_size=.002): # smaller stepsize since there is no learning_rate param # for traditional hill climbing algorithms, evening the playfield c_s = 2 ...
28.511111
84
0.600805
05b3d0f073943b3a39f608af56576996c883900f
981
py
Python
core/core/su_index.py
WallaceLiu/distributed-realtime-capfaiss
3346f540b6c9d17a6be446fefa8c9b79164929d9
[ "Apache-2.0" ]
null
null
null
core/core/su_index.py
WallaceLiu/distributed-realtime-capfaiss
3346f540b6c9d17a6be446fefa8c9b79164929d9
[ "Apache-2.0" ]
null
null
null
core/core/su_index.py
WallaceLiu/distributed-realtime-capfaiss
3346f540b6c9d17a6be446fefa8c9b79164929d9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import faiss from core.core.base_index import IndexBase from core.utils.io_utils import is_exist, mkdir PROCESS_COUNT = 4 faiss.omp_set_num_threads(PROCESS_COUNT) class SimpleFlatIndex(IndexBase): def __init__(self, rc_id, params): IndexBase.__init__(self, rc_id, params) def...
29.727273
87
0.687054
396c55c94aeb5809ce652e95d9aa3eb1ced009ca
1,109
py
Python
cdk/lib/app.py
ClinicalTrialsTeam/CTFrontier
d7e2558f314f6bbd9964667e12ee5655bc64215b
[ "Apache-2.0" ]
4
2021-03-07T02:16:22.000Z
2022-03-13T03:22:42.000Z
cdk/lib/app.py
ClinicalTrialsTeam/CTFrontier
d7e2558f314f6bbd9964667e12ee5655bc64215b
[ "Apache-2.0" ]
8
2021-03-14T22:14:07.000Z
2021-04-26T17:20:56.000Z
cdk/lib/app.py
ClinicalTrialsTeam/CTFrontier
d7e2558f314f6bbd9964667e12ee5655bc64215b
[ "Apache-2.0" ]
1
2021-03-07T02:16:39.000Z
2021-03-07T02:16:39.000Z
#!/usr/bin/env python3 from aws_cdk import core import click from .environment import Param from .stack import CtStack from . import names, aws stack_props = { "site_domain": Param("site_domain").get_value(), "django_secret": Param("django_secret").get_value(decrypt=True), "db_host": Param("db_host").get...
25.790698
76
0.695221
a31bf5e9e10faa7aa52130210c9b8ace931cb6ed
12,350
py
Python
segmentation/main.py
wangyihuan123/ESPNetv2
d04fafd73c3747f4430ada07333948ed4bca047e
[ "MIT" ]
null
null
null
segmentation/main.py
wangyihuan123/ESPNetv2
d04fafd73c3747f4430ada07333948ed4bca047e
[ "MIT" ]
null
null
null
segmentation/main.py
wangyihuan123/ESPNetv2
d04fafd73c3747f4430ada07333948ed4bca047e
[ "MIT" ]
null
null
null
import loadData as ld import os import torch import pickle from cnn import SegmentationModel as net import torch.backends.cudnn as cudnn import Transforms as myTransforms import DataSet as myDataLoader import time from argparse import ArgumentParser from train_utils import train, val, netParams, save_checkpoint, poly_l...
42.294521
186
0.659028
ea2f5432269155d2c2cfa7cb30f07b17b47bab5b
1,338
py
Python
selectreverse/tests/models.py
idonethis/django-selectreverse
13535028aaccb9e2a784dd798a188d88776a5dad
[ "BSD-2-Clause" ]
null
null
null
selectreverse/tests/models.py
idonethis/django-selectreverse
13535028aaccb9e2a784dd798a188d88776a5dad
[ "BSD-2-Clause" ]
null
null
null
selectreverse/tests/models.py
idonethis/django-selectreverse
13535028aaccb9e2a784dd798a188d88776a5dad
[ "BSD-2-Clause" ]
null
null
null
from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from selectreverse.utils import ReverseManager class Building(models.Model): number = models.IntegerField() owners = models.ManyToManyField('Owner') objects = models....
31.116279
118
0.72571
f14d31a229cc513e42749f67abf2adb4049dd061
212
py
Python
lingobarter/ext/babel.py
LeightonStreet/LingoBarter
3fffd95c38973ca9b9ce284070522ba758efe489
[ "Apache-2.0" ]
7
2016-01-22T05:01:52.000Z
2019-02-07T10:23:12.000Z
lingobarter/ext/babel.py
LeightonStreet/LeightonStreet
3fffd95c38973ca9b9ce284070522ba758efe489
[ "Apache-2.0" ]
6
2016-03-26T23:32:47.000Z
2016-04-01T07:10:42.000Z
lingobarter/ext/babel.py
LeightonStreet/LeightonStreet
3fffd95c38973ca9b9ce284070522ba758efe489
[ "Apache-2.0" ]
1
2016-03-26T23:31:00.000Z
2016-03-26T23:31:00.000Z
# coding: utf-8 # from flask import request, session from flask.ext.babelex import Babel babel = Babel() def configure(app): """ init babel :param app: :return: """ babel.init_app(app)
14.133333
36
0.627358
b8118b8d5f18dc133582b8741f5944288a17f83c
4,939
py
Python
fitness_guide/menu/forms.py
tunsmm/fitness_guide
42df50c9f35a4345c72e9c7e3868867fc8dfd563
[ "MIT" ]
1
2022-03-19T13:07:05.000Z
2022-03-19T13:07:05.000Z
fitness_guide/menu/forms.py
tunsmm/fitness_guide
42df50c9f35a4345c72e9c7e3868867fc8dfd563
[ "MIT" ]
null
null
null
fitness_guide/menu/forms.py
tunsmm/fitness_guide
42df50c9f35a4345c72e9c7e3868867fc8dfd563
[ "MIT" ]
null
null
null
from django.forms import ModelForm, NumberInput, TextInput from .models import Client, Day, DaysOfMenu, Dish, DishesOfMeal, Ingredient, LovedProduct from .models import Meal, MealsOfDay, Menu, Product, RestrictedProduct, Result, Template class ClientForm(ModelForm): class Meta: model = Client fie...
26.553763
90
0.489168
c6aca0ba89501b6da70dae60add8e66cbaf427dd
818
py
Python
raylab/policy/losses/__init__.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
29
2020-05-05T13:25:33.000Z
2022-01-03T14:12:29.000Z
raylab/policy/losses/__init__.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
215
2019-11-26T12:59:39.000Z
2022-02-01T12:38:31.000Z
raylab/policy/losses/__init__.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
7
2020-06-12T01:42:02.000Z
2021-05-27T03:40:42.000Z
"""Modularized losses/procedures for RL algorithms.""" from .abstract import Loss from .dyna import DynaQLearning from .isfv_iteration import ISFittedVIteration, ISSoftVIteration from .mage import MAGE from .maximum_entropy import MaximumEntropyDual from .mle import MaximumLikelihood from .policy_gradient import ( ...
25.5625
64
0.749389
a6f5095fe28e8c2bad87a79603f20b3b0895dbf6
6,790
py
Python
prodconpattern/__init__.py
mmmaaaggg/ProducerConsumerPattern
8fc0903b7f437ec11a6938310eebbcee25719812
[ "MIT" ]
null
null
null
prodconpattern/__init__.py
mmmaaaggg/ProducerConsumerPattern
8fc0903b7f437ec11a6938310eebbcee25719812
[ "MIT" ]
null
null
null
prodconpattern/__init__.py
mmmaaaggg/ProducerConsumerPattern
8fc0903b7f437ec11a6938310eebbcee25719812
[ "MIT" ]
4
2019-05-26T16:39:39.000Z
2020-08-15T17:03:51.000Z
#! /usr/bin/env python # -*- coding:utf-8 -*- """ @author : MG @Time : 2018/6/14 15:26 @File : __init__.py.py @contact : mmmaaaggg@163.com @desc : """ from queue import Queue, Empty from threading import Thread, Lock from datetime import datetime class ProducerConsumer(Thread): """ 实现生产者-消费者模式,被装饰...
43.248408
120
0.483947