hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
4
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
4
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
f71e77d479a5c19a10183f4785ab075fdd327612
380
py
Python
vfio_isolate/action/action.py
spheenik/vfio-isolate
6d6a1f0d5e5d84a5ad9911c635a81b86710d12d5
[ "MIT" ]
44
2020-05-03T15:03:32.000Z
2022-03-23T19:03:23.000Z
vfio_isolate/action/action.py
darkguy2008/vfio-isolate
6c16cf363a627f02202586a17df58522e097ef10
[ "MIT" ]
7
2020-08-18T10:17:14.000Z
2022-01-14T14:18:47.000Z
vfio_isolate/action/action.py
darkguy2008/vfio-isolate
6c16cf363a627f02202586a17df58522e097ef10
[ "MIT" ]
6
2020-06-02T05:29:34.000Z
2022-02-04T17:12:40.000Z
from dataclasses import dataclass from typing import Generator @dataclass class Execution: action: type params: object class Action: @classmethod def can_execute(cls, p): return True @classmethod def execute(cls, p): pass @classmethod def record_undo(cls, p) -> Gene...
15.2
64
0.644737
f71eacb0cebaf99c989c8497d1bdf211436cdebe
774
py
Python
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
python_zabbix/client.py
zhenghuaHe/stu_python
e0937070248269527661ccf32e5bea048170ac17
[ "Apache-2.0" ]
null
null
null
# -*- coding=utf-8 -*- import socket import psutil import json # 创建链接 # 生成一个socket对象 sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = socket.gethostname() port = 8888 # 请求连接服务端 sk.connect((host, port)) #获取信息 #获取主机名 hostname = socket.getfqdn(socket.gethostname()) #获取主机IP地址 host_ip = socket.gethostbyname...
16.125
107
0.719638
f71eb4e7d27b7bafa25c7ecc98bfe686ddc35042
6,389
py
Python
app/service/send_notification.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
app/service/send_notification.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
app/service/send_notification.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
from flask import current_app from notifications_utils.s3 import S3ObjectNotFound from notifications_utils.s3 import s3download as utils_s3download from sqlalchemy.orm.exc import NoResultFound from app import create_random_identifier from app.dao.notifications_dao import _update_notification_status from app.dao.servic...
34.722826
114
0.728283
f71ec8c0f4f79e7b5d54635479768ae036e669e3
251
py
Python
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
2
2020-06-25T21:10:32.000Z
2020-12-10T06:53:45.000Z
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
null
null
null
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
3
2020-05-15T14:17:09.000Z
2021-07-25T13:18:20.000Z
if __name__ == '__main__': for t in range(int(input())): ts = int(input()) count = 0 while ts%2 == 0: ts //= 2 if ts: print(ts//2) else: print(0)
13.944444
33
0.346614
f71eca6b3f158fdbe0a1271729c857c9ffafb3c5
4,565
py
Python
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
48
2016-04-13T10:22:53.000Z
2022-03-21T16:31:41.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
14
2018-10-25T21:15:20.000Z
2021-11-26T16:55:55.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
21
2017-09-12T08:20:36.000Z
2021-10-30T02:22:11.000Z
""" collection of functions that are useful for several classes but non-specific to any """ import slicer import logging def getBinaryLabelmapRepresentation(segmentationNode, segmentID: str): segmentLabelmap = slicer.vtkOrientedImageData() segmentationNode.GetBinaryLabelmapRepresentation(segmentID, segmentLabelm...
35.664063
103
0.806134
f71ecd5b355fa5a6dd0a436c34d7ff7e754d15d2
1,464
py
Python
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
import unittest import json import requests from pystexchapi.response import StockExchangeResponseParser, APIResponse from pystexchapi.exc import APIDataException, APIResponseParsingException from tests import TICKER_RESPONSE, GENERIC_ERROR_RESPONSE def raise_value_error(): raise ValueError() class TestStockEx...
31.826087
94
0.729508
f71f26b91d28f2fac45042a51478207f81d2160f
2,660
py
Python
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
2
2020-01-02T12:59:44.000Z
2020-01-04T19:21:31.000Z
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
null
null
null
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
null
null
null
import re import math from collections import defaultdict def parse(content): return list(map(parse_line, content.strip().split("\n"))) def parse_line(row): matches = re.findall(r"\s?(\d+) ([A-Z]+),? ", row.strip()) inputs = [(int(item[0]), item[1]) for item in matches] output = re.match(r".+ => (\...
27.142857
86
0.616917
f71f38c1c62e7b6318d6a1664ac6ee8c0936729a
8,714
py
Python
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
43
2021-07-26T13:13:12.000Z
2022-03-27T13:06:44.000Z
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
5
2021-08-08T03:06:44.000Z
2022-02-15T06:34:57.000Z
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
7
2021-11-07T10:16:32.000Z
2022-03-28T08:51:06.000Z
''' Code taken from https://github.com/WilhelmT/ClassMix Slightly modified ''' import kornia import torch import random import torch.nn as nn def normalize_rgb(data, dataset): """ Args: data: data to normalize BxCxWxH dataset: name of the dataset to normalize Returns: normalized...
34.442688
192
0.61843
f71f63419874a18aec03723ca69a1e11494c93fe
27
py
Python
btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/LatencyMeasurements/StatsExtensions/stats_extensions.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/LatencyMeasurements/StatsExtensions/stats_extensions.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/LatencyMeasurements/StatsExtensions/stats_extensions.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
class StatsExtensions: pass
27
27
0.888889
f71f9baff849e1b3e85a4e00a676e11b093d2eb9
7,777
py
Python
examples/vae.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
222
2019-02-13T07:56:28.000Z
2022-03-28T07:07:54.000Z
examples/vae.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
107
2019-02-12T21:56:39.000Z
2022-03-12T01:08:03.000Z
examples/vae.py
strint/myia
3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a
[ "MIT" ]
27
2017-11-14T17:58:15.000Z
2019-01-14T01:36:09.000Z
"""Example of an MLP in Myia. Myia is still a work in progress, and this example may change in the future. """ import time from dataclasses import dataclass import numpy import torch from numpy.random import RandomState from torchvision import datasets, transforms import myia.public_api as pub from myia import Arit...
26.542662
80
0.626077
f71fa3db4ff531443af2a92cd1b1a2d567ddaf8d
188
py
Python
lightningrun.py
justteen/BUZZ-USERBOT
55651cce150e1d04d2c61efb2565ef9f46b42933
[ "BSL-1.0" ]
null
null
null
lightningrun.py
justteen/BUZZ-USERBOT
55651cce150e1d04d2c61efb2565ef9f46b42933
[ "BSL-1.0" ]
null
null
null
lightningrun.py
justteen/BUZZ-USERBOT
55651cce150e1d04d2c61efb2565ef9f46b42933
[ "BSL-1.0" ]
null
null
null
import os os.system("git clone https://github.com/justteen/BUZZ-USERBOT /root/userbot && mkdir /root/userbot/bin/ && cd /root/userbot/ && chmod +x /usr/local/bin/* && python3 -m userbot")
62.666667
177
0.702128
f71fcd8293089c972b431387d1197b53dd7b564d
516
py
Python
src/event_representations.py
ATTPC/VAE-event-classification
aae331d44bffffec2ca8a6cdef71208899db0052
[ "MIT" ]
null
null
null
src/event_representations.py
ATTPC/VAE-event-classification
aae331d44bffffec2ca8a6cdef71208899db0052
[ "MIT" ]
2
2018-12-20T20:10:52.000Z
2019-02-04T17:44:01.000Z
src/event_representations.py
ATTPC/VAE-event-classification
aae331d44bffffec2ca8a6cdef71208899db0052
[ "MIT" ]
null
null
null
import numpy as np def make_histograms(x, bins=40, interval=[1e-1, 1]): intervals = np.linspace(interval[0], interval[1], bins) flat_x = x.reshape((x.shape[0], -1)) hist_x = np.zeros((x.shape[0], bins)) for i in range(1, bins): mask = flat_x <= intervals[i] mask = np.logical_and(mask, f...
28.666667
60
0.604651
f71fd21c199e5a31cb8e95fea4d6ad447b4eb6cf
2,082
py
Python
adsputils/tests/test_init.py
adsabs/ADSPipelineUtils
eb8cc988f57c19a256ebc8802cc2a812d5279d12
[ "MIT" ]
null
null
null
adsputils/tests/test_init.py
adsabs/ADSPipelineUtils
eb8cc988f57c19a256ebc8802cc2a812d5279d12
[ "MIT" ]
36
2017-06-23T20:29:22.000Z
2020-03-18T15:04:27.000Z
adsputils/tests/test_init.py
adsabs/ADSPipelineUtils
eb8cc988f57c19a256ebc8802cc2a812d5279d12
[ "MIT" ]
12
2017-06-21T18:10:57.000Z
2021-11-01T19:13:32.000Z
# -*- coding: utf-8 -*- import adsputils import unittest import os import json import time from inspect import currentframe, getframeinfo from adsputils.exceptions import UnicodeHandlerError def _read_file(fpath): with open(fpath, 'r') as fi: return fi.read() class TestInit(unittest.TestCase): def t...
28.135135
87
0.604707
f71fdbd179d815f56f9c409701685cd66a7005c3
23,154
py
Python
yuu/ext/abematv.py
soltia48/yuu
30d2fcf9427cbbea930d01baef337b64ad7fb05b
[ "BSD-3-Clause" ]
null
null
null
yuu/ext/abematv.py
soltia48/yuu
30d2fcf9427cbbea930d01baef337b64ad7fb05b
[ "BSD-3-Clause" ]
null
null
null
yuu/ext/abematv.py
soltia48/yuu
30d2fcf9427cbbea930d01baef337b64ad7fb05b
[ "BSD-3-Clause" ]
null
null
null
import hashlib import hmac import json import logging import os import re import struct import tempfile import time import uuid from base64 import urlsafe_b64encode from binascii import unhexlify import m3u8 from Crypto.Cipher import AES from tqdm import tqdm def is_channel(url): url = re.findall('(slot)', url) ...
38.914286
170
0.556319
f71fed6c463f4fb9305f4215a3d3f237674e9c98
6,399
py
Python
Graph-based/processor/recognition.py
EnTimeMent/Group-Behavior-Recognition
d6606e9e7bef836a9ccc5b4ada66933a4770171c
[ "MIT" ]
3
2020-12-29T04:07:58.000Z
2022-01-11T14:47:16.000Z
Graph-based/processor/recognition.py
EnTimeMent/Group-Behavior-Recognition
d6606e9e7bef836a9ccc5b4ada66933a4770171c
[ "MIT" ]
1
2021-01-02T10:28:07.000Z
2021-01-04T18:01:42.000Z
Graph-based/processor/recognition.py
EnTimeMent/Group-Behavior-Recognition
d6606e9e7bef836a9ccc5b4ada66933a4770171c
[ "MIT" ]
1
2022-01-09T12:55:41.000Z
2022-01-09T12:55:41.000Z
#!/usr/bin/env python # pylint: disable=W0201 import sys import argparse import yaml import numpy as np # torch import torch import torch.nn as nn import torch.optim as optim # torchlight import torchlight from torchlight import str2bool from torchlight import DictAction from torchlight import import_class from .pro...
32.482234
94
0.556493
f72005233f11455f1e95662ff8e8514dc68a23af
3,738
py
Python
letsencrypt/configuration.py
meehow/letsencrypt
64073b234a6b87a574d873599a8d4dbf11729d5c
[ "Apache-2.0" ]
1
2021-09-05T14:18:00.000Z
2021-09-05T14:18:00.000Z
letsencrypt/configuration.py
meehow/letsencrypt
64073b234a6b87a574d873599a8d4dbf11729d5c
[ "Apache-2.0" ]
null
null
null
letsencrypt/configuration.py
meehow/letsencrypt
64073b234a6b87a574d873599a8d4dbf11729d5c
[ "Apache-2.0" ]
null
null
null
"""Let's Encrypt user-supplied configuration.""" import os import urlparse import zope.interface from acme import challenges from letsencrypt import constants from letsencrypt import errors from letsencrypt import interfaces class NamespaceConfig(object): """Configuration wrapper around :class:`argparse.Namesp...
32.789474
80
0.697164
f720323103b02c71f2a9840e6439b99bbd9ea402
42,611
py
Python
nidmresults/objects/inference.py
mih/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
1
2018-12-04T16:53:45.000Z
2018-12-04T16:53:45.000Z
nidmresults/objects/inference.py
mih/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
2
2018-04-11T14:01:38.000Z
2019-05-29T15:14:49.000Z
nidmresults/objects/inference.py
cmaumet/nidmresults
438f7cce6abc4a4379b629bd76f4d427891e033f
[ "MIT" ]
null
null
null
""" Objects describing the Inference activity, its inputs and outputs as specified in NIDM-Results. Specification: http://nidm.nidash.org/specs/nidm-results.html @author: Camille Maumet <c.m.j.maumet@warwick.ac.uk> @copyright: University of Warwick 2013-2014 """ from nidmresults.objects.constants import * from nidmre...
34.308374
109
0.594518
f7204379766eb4e6ae9bd5b9297cae2841d80760
8,607
py
Python
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
"""General tools for gpx data processing based on gpxpy.""" import numpy as np import pandas as pd import matplotlib.pyplot as plt import gpxpy from vincenty import vincenty import mplleaflet from .general import smooth, closest_pt # =============================== Misc. Config =============================== # s...
31.412409
88
0.562449
f7211163c547410a5d37c79cba8d58a47a6c46de
7,205
py
Python
final-exam/tic_toc_toe_messy.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
final-exam/tic_toc_toe_messy.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
final-exam/tic_toc_toe_messy.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
""" Tic Tac Toe Reference: With modification from http://inventwithpython.com/chapter10.html. # TODOs: # 1. Find all TODO items and see whether you can improve the code. # In most cases (if not all), you can make them more readable/modular. # 2. Add/fix function's docstrings """ import random # I didn't refactor ...
36.025
98
0.624427
f7212251e63dcb5ce319603d8ff0812abad4359b
1,095
py
Python
synapse/resources/packages-plugin/yum-pkg.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
1
2016-06-23T05:56:53.000Z
2016-06-23T05:56:53.000Z
synapse/resources/packages-plugin/yum-pkg.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
null
null
null
synapse/resources/packages-plugin/yum-pkg.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
null
null
null
from synapse.syncmd import exec_cmd from synapse.synapse_exceptions import ResourceException from synapse.logger import logger log = logger('yum-pkg') def install(name): ret = exec_cmd("/usr/bin/yum -q -y install {0}".format(name)) if ret['returncode'] != 0: raise ResourceException(ret['stderr']) d...
28.076923
79
0.663014
f721236e30c2bc62859814934c24d2d0a6124a36
1,534
py
Python
tests/ecr/data_generator/test_vessel_parser.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
tests/ecr/data_generator/test_vessel_parser.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
tests/ecr/data_generator/test_vessel_parser.py
zhawan/maro
d8c98deea4296cdcb90efd1fb59bc571cec3a2ef
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import unittest import yaml from maro.data_lib.ecr.vessel_parser import VesselsParser from maro.data_lib.ecr.entities import VesselSetting conf_str = """ vessels: rt1_vessel_001: capacity: 92400 parking: duration: 1 noise...
25.566667
75
0.666232
f72133aff214d90410fb19b8ccb50eafa1390f3b
12,732
py
Python
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
1
2021-06-11T19:54:19.000Z
2021-06-11T19:54:19.000Z
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
1
2019-08-30T14:45:33.000Z
2019-08-30T14:45:33.000Z
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
37.011628
116
0.654807
f72142e5ac00cf950ce98fbca8180f0dd514c5e9
1,671
py
Python
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
from socket import socket, AF_INET, SOCK_DGRAM, inet_aton, inet_ntoa import time sockets = {} network = ('127.0.0.1', 12345) def bytes_to_addr(bytes): return inet_ntoa(bytes[:4]), int.from_bytes(bytes[4:8], 'big') def addr_to_bytes(addr): return inet_aton(addr[0]) + addr[1].to_bytes(4, 'big') def get_sen...
26.109375
75
0.618791
f7217194f4c19697a8e59fe9babfa90a23edf214
2,031
py
Python
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
null
null
null
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
4
2022-02-04T15:18:31.000Z
2022-02-07T15:07:43.000Z
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
null
null
null
import pytest import pathlib import sys import requests import io import zipfile import tempfile import pandas as pd import os HERE = pathlib.Path(__file__).resolve().parent # insert at 1, 0 is the script path (or '' in REPL) # temporary hack until package is published and we can inherit from there: sys.path.inser...
30.313433
148
0.65485
f7218963b535569939ecb7f8ec24da1fd34de53b
8,127
py
Python
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
3
2019-08-28T17:10:29.000Z
2020-11-22T14:06:45.000Z
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
1
2019-11-03T12:02:43.000Z
2019-11-20T02:04:36.000Z
Pytorch/class_wrapper.py
BensonRen/idlm_Ben
0d83780232d6341575daf88792959542aef82132
[ "MIT" ]
2
2019-08-29T02:32:56.000Z
2019-12-22T17:44:26.000Z
""" The class wrapper for the networks """ # Built-in import os import time # Torch import torch from torch import nn from torch.utils.tensorboard import SummaryWriter from torchsummary import summary # Libs import numpy as np # Own module class Network(object): def __init__(self, model_fn, flags, train_loader...
47.526316
135
0.556909
f7218c5841c78da8df7b09b9049a325f9cfeaba6
8,968
py
Python
custom_admin/views.py
samuira/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
1
2019-11-09T17:18:10.000Z
2019-11-09T17:18:10.000Z
custom_admin/views.py
abhisek11/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
19
2019-12-05T00:13:31.000Z
2022-03-11T23:58:13.000Z
custom_admin/views.py
abhisek11/TutionMastor
5b6d89efc90a9ebb54766530554d7dc9d5ee8298
[ "MIT" ]
1
2020-02-29T07:35:25.000Z
2020-02-29T07:35:25.000Z
from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.core.exceptions import ValidationError from django.shortcuts import render from django.http import JsonResponse, HttpResponse, HttpResponseRedirect from django.urls import reverse_lazy, reverse from django.utils....
33.092251
126
0.748104
f721c578750ba0a7105c0bada589a4631a8b372e
1,845
py
Python
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
2
2019-12-22T13:05:08.000Z
2020-02-02T13:05:31.000Z
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
71
2016-10-31T15:41:10.000Z
2022-03-21T14:26:22.000Z
pili/email.py
pilosus/pili
8eb51e79420b7a2e4148f3b819e787cf6711e8cd
[ "MIT" ]
null
null
null
from threading import Thread from flask import current_app, render_template from flask_mail import Message from pili.app import celery, mail def send_email(to, subject, template, **kwargs): """Send email using either Celery, or Thread. Selection depends on CELERY_INSTEAD_THREADING config variable. """ ...
30.75
74
0.688347
f722029155968a27b82e4ff0a96fce5c6afb335d
1,571
py
Python
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
1
2022-03-10T03:56:49.000Z
2022-03-10T03:56:49.000Z
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
null
null
null
siliconcompiler/tools/openfpgaloader/openfpgaloader.py
hohe/siliconcompiler
497f272c87c8f247dcd29db76c8d6ed0c0939e50
[ "Apache-2.0" ]
null
null
null
import os import subprocess import re import sys import shutil import siliconcompiler #################################################################### # Make Docs #################################################################### def make_docs(): ''' The OpenFPGALoader is a universal utility for program...
27.086207
68
0.574793
f7220c584b0c5c0a472d032b76d41c1b9f1c37f5
63,818
py
Python
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
gunicorn/config.py
Alexa3001/gunicorn
c0d05dad3d759f8cbbc465ba4698e1e94ed67cd7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. # Please remember to run "make -C docs html" after update "desc" attributes. import argparse import copy import grp import inspect import os import pwd import re import shlex import ssl impor...
28.225564
144
0.597684
f7221873d9ecbf77edfe45ec72ecc412e695cb21
11,169
py
Python
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
rmgweb/database/forms.py
sean-v8/RMG-website
db6c70670c83b3fbe71b02b0874613823c982c9b
[ "X11", "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # RMG Website - A Django-powered website for Reaction Mechanism Generator # # Copyright (c) 2011 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission ...
45.218623
179
0.637031
f7222f402986219a0e09068b7d7e002f2a798ee8
6,931
py
Python
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
154
2019-08-29T16:53:24.000Z
2022-02-25T00:29:56.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
101
2019-08-30T17:34:51.000Z
2022-03-02T18:46:22.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
56
2019-09-08T17:47:22.000Z
2022-02-23T17:35:11.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.848341
87
0.664118
f722364d6824f270c535f653164145ae812490d3
2,405
py
Python
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
2
2018-02-03T13:43:25.000Z
2021-12-03T16:13:49.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
8
2017-08-16T08:34:59.000Z
2018-02-05T18:30:44.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
1
2018-02-05T18:26:20.000Z
2018-02-05T18:26:20.000Z
"""Binary class.""" import os from subprocess import CalledProcessError from subprocess import check_output from subprocess import STDOUT class Binary(object): # pylint: disable=too-few-public-methods """Represent Binary structure.""" def __init__(self, path): # type: (str) -> None """Binary...
32.945205
79
0.565489
f72278214081544cda312e677f9ea50f74607e24
834
py
Python
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class FinUserInfo(object): def __init__(self): self._user_id = None @property def user_id(self): return self._user_id @user_id.setter def user_id(self, value): ...
20.341463
65
0.565947
f7227c7ba9bcd083859d4202044f6b22b7cbd5d6
3,260
py
Python
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
6
2020-12-28T07:05:52.000Z
2022-01-16T04:44:02.000Z
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
56
2021-02-02T02:21:52.000Z
2022-03-13T02:39:05.000Z
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
3
2021-01-28T17:52:58.000Z
2021-12-17T17:42:42.000Z
from typing import TYPE_CHECKING, List, Optional, Type from uuid import UUID from sqlalchemy import event from sqlalchemy.schema import Column, ForeignKey, UniqueConstraint from sqlmodel import Field, Relationship from sqlmodel.sql.sqltypes import GUID from joj.horse.models.base import DomainURLORMModel, url_pre_save...
33.608247
86
0.677914
f722827390cb58b1a6cd72a02b31a1dfb88f2244
17,043
py
Python
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
""" ORY Hydra Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 The version of the OpenAPI document: v1.10.5 Generated by: https://openapi-generator.tech """ import copy import logging import multiprocessing import sys import urllib3 ...
35.88
118
0.619022
f7228f888e0c1319b41e87dce8b0a43b5bb32b32
6,784
py
Python
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorrt as trt import pycuda.driver as cuda import pycuda.autoinit import sys, os TRT_LOGGER = trt.Logger() def get_engine(onnx_file_path, engine_file_path=""): """Attempts to load a serialized engine if available, otherwise builds a new TensorRT engine and saves it.""" def build_eng...
49.882353
186
0.664652
f7229fecc8abcfa996481e7128a83b81f606b917
1,314
py
Python
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
from pathlib import Path from setuptools import find_namespace_packages, setup from sys import platform as _platform import sys VERSION="0.3.0" current_dir = Path(__file__).resolve().parent with open(current_dir.joinpath('README.md'), encoding='utf-8') as f: long_description = f.read() if _platform not in ["lin...
29.2
68
0.619482
f722b3e29e34689cf05526ca96e5fb3e45c1cb35
318
py
Python
gym_jiminy/gym_jiminy/__init__.py
matthieuvigne/jiminy
f893b2254a9e695a4154b941b599536756ea3d8b
[ "MIT" ]
null
null
null
gym_jiminy/gym_jiminy/__init__.py
matthieuvigne/jiminy
f893b2254a9e695a4154b941b599536756ea3d8b
[ "MIT" ]
null
null
null
gym_jiminy/gym_jiminy/__init__.py
matthieuvigne/jiminy
f893b2254a9e695a4154b941b599536756ea3d8b
[ "MIT" ]
null
null
null
from gym.envs.registration import register register( id='jiminy-cartpole-v0', entry_point='gym_jiminy.envs:JiminyCartPoleEnv', reward_threshold=10000.0, ) register( id='jiminy-acrobot-v0', entry_point='gym_jiminy.envs:JiminyAcrobotEnv', max_episode_steps=12000, reward_threshold=-3000.0 )
22.714286
52
0.742138
f722b84767f8fa5c57fce1563a9d9b91a26ec9ed
270
py
Python
Python/String Validators.py
shivendra90/HackerRank_Solutions
0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6
[ "MIT" ]
null
null
null
Python/String Validators.py
shivendra90/HackerRank_Solutions
0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6
[ "MIT" ]
null
null
null
Python/String Validators.py
shivendra90/HackerRank_Solutions
0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6
[ "MIT" ]
null
null
null
if __name__ == '__main__': string = str(input()) methods = [".isalnum()", ".isalpha()", ".isdigit()", ".islower()", ".isupper()"] for i, method in enumerate(methods): print(eval("any(alpha{0} for alpha in string)".format(method)))
27
71
0.548148
f722f183360b21031a113892752701feb5e37dee
2,189
py
Python
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
11
2021-05-25T07:42:27.000Z
2022-01-03T07:46:38.000Z
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
18
2021-05-25T17:42:46.000Z
2021-09-13T15:14:38.000Z
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
5
2021-06-23T17:38:51.000Z
2022-03-03T12:40:53.000Z
""" Handle chain info request if chain info request is initiated the handler will execute those steps: 1. validate message 2. get chain info and summery 3. publish chain info and get cid 4. send the cid and summery """ from typing import Tuple from blockchain import Blockchain from network.ipfs import Node, Message f...
33.676923
94
0.664687
f7230d9cc74110fcd7eacb880b7388d767c4d9d2
13,781
py
Python
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
115
2019-11-23T02:31:30.000Z
2022-03-29T12:58:30.000Z
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
207
2019-11-21T13:21:22.000Z
2022-03-31T23:36:09.000Z
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
21
2020-01-28T13:13:39.000Z
2022-02-02T13:46:33.000Z
#!/usr/bin/env python import os import h5netcdf from PIL import Image import scipy.spatial import scipy.ndimage from veros import VerosSetup, veros_routine, veros_kernel, KernelOutput from veros.variables import Variable from veros.core.operators import numpy as npx, update, at import veros.tools BASE_PATH = os.pat...
38.387187
118
0.550468
f72338223fcd579b0d8eab318317428813bb0d97
2,216
py
Python
tests/common/test_run/sqrt_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/sqrt_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/sqrt_run.py
tianjiashuo/akg
a9cbf642063fb1086a93e8bc6be6feb145689817
[ "Apache-2.0" ]
30
2020-07-17T01:04:14.000Z
2021-12-27T14:05:19.000Z
# Copyright 2019-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...
43.45098
105
0.704874
f7236d3fcab67683773e445ba66effeb0a887648
7,422
py
Python
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
src/client.py
Shandilya21/oratio
53a77404df35a6b2b73c6a74a0e40d3f8747c408
[ "BSD-3-Clause" ]
null
null
null
import enum import json from target_voice import create_voice, gender_string import api.stt.util class Provider(enum.Enum): GCLOUD = 1 AWS = 2 AWS_DEEPL = 3 class Client: def __init__( self, upload_filename, stt_provider=Provider.GCLOUD, translate_provider=Provider.GC...
34.202765
92
0.597683
f72391e581e5477cb6c44e276c56fea7cf53fa01
479
py
Python
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayFundJointaccountOperationApproveResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayFundJointaccountOperationApproveResponse(AlipayResponse): def __init__(self): super(AlipayFundJointaccountOperationApproveResponse, self).__init__() def parse_res...
29.9375
119
0.797495
f723bb3a1ed4cb91e25d960a0f850160a5553547
112,619
py
Python
pygsti/models/modelconstruction.py
maij/pyGSTi
70e83e05fa689f53550feb3914c4fac40ca4a943
[ "Apache-2.0" ]
73
2016-01-28T05:02:05.000Z
2022-03-30T07:46:33.000Z
pygsti/models/modelconstruction.py
00mjk/pyGSTi
4f8bf5337b01b7afcb7b0580b717b5d1fe281be4
[ "Apache-2.0" ]
113
2016-02-25T15:32:18.000Z
2022-03-31T13:18:13.000Z
pygsti/models/modelconstruction.py
00mjk/pyGSTi
4f8bf5337b01b7afcb7b0580b717b5d1fe281be4
[ "Apache-2.0" ]
41
2016-03-15T19:32:07.000Z
2022-02-16T10:22:05.000Z
""" Functions for the construction of new models. """ #*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government...
53.577069
120
0.64688
f723e84d3365845116c25dda9340902ab173b6cd
799
py
Python
core/data/dataloader/__init__.py
HareshKarnan/awesome-semantic-segmentation-pytorch
3c53fc004973abcb88882dcc8be899570c3053cf
[ "Apache-2.0" ]
null
null
null
core/data/dataloader/__init__.py
HareshKarnan/awesome-semantic-segmentation-pytorch
3c53fc004973abcb88882dcc8be899570c3053cf
[ "Apache-2.0" ]
null
null
null
core/data/dataloader/__init__.py
HareshKarnan/awesome-semantic-segmentation-pytorch
3c53fc004973abcb88882dcc8be899570c3053cf
[ "Apache-2.0" ]
null
null
null
""" This module provides data loaders and transformers for popular vision datasets. """ from .mscoco import COCOSegmentation from .cityscapes import CitySegmentation from .ade import ADE20KSegmentation from .pascal_voc import VOCSegmentation from .pascal_aug import VOCAugSegmentation from .sbu_shadow import SBUSegmenta...
28.535714
79
0.767209
f724061c6d8dbec2acb290ec23c12a1f23882924
2,260
py
Python
scripts/quickstart_tooling_dpg/template/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
scripts/quickstart_tooling_dpg/template/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
scripts/quickstart_tooling_dpg/template/setup.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------...
35.3125
109
0.592035
f724310ed89a048b1602d1084baca21f8eecd141
1,427
py
Python
examples/PsyNeuLink/SimpleLinear-conditional.reconstructed.py
singular-value/MDF
227216ffb2c9beea8539829b0b891196787d33ee
[ "Apache-2.0" ]
12
2021-01-18T20:38:21.000Z
2022-03-29T15:01:10.000Z
examples/PsyNeuLink/SimpleLinear-conditional.reconstructed.py
singular-value/MDF
227216ffb2c9beea8539829b0b891196787d33ee
[ "Apache-2.0" ]
101
2020-12-14T15:23:07.000Z
2022-03-31T17:06:19.000Z
examples/PsyNeuLink/SimpleLinear-conditional.reconstructed.py
singular-value/MDF
227216ffb2c9beea8539829b0b891196787d33ee
[ "Apache-2.0" ]
15
2020-12-04T22:37:14.000Z
2022-03-31T09:48:03.000Z
import psyneulink as pnl comp = pnl.Composition(name="comp") A = pnl.TransferMechanism( name="A", function=pnl.Linear(default_variable=[[0]]), termination_measure=pnl.Distance( metric=pnl.MAX_ABS_DIFF, default_variable=[[[0]], [[0]]] ), ) B = pnl.TransferMechanism( name="B", function=p...
25.482143
66
0.669236
f72442631484d92c7dcede95d1d98e464d00507c
3,779
py
Python
Fancy_aggregations/moderate_deviations.py
iosurodri/Fancy_aggregations
647019452a074767706893ecdd431a3ee503b554
[ "MIT" ]
1
2021-03-25T11:48:20.000Z
2021-03-25T11:48:20.000Z
Fancy_aggregations/moderate_deviations.py
iosurodri/Fancy_aggregations
647019452a074767706893ecdd431a3ee503b554
[ "MIT" ]
null
null
null
Fancy_aggregations/moderate_deviations.py
iosurodri/Fancy_aggregations
647019452a074767706893ecdd431a3ee503b554
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ File containing different functions to aggregate data using Moderate Deviations. The expressions have been obtained from the following paper: A.H. Altalhi, J.I. Forcén, M. Pagola, E. Barrenechea, H. Bustince, Zdenko Takáč, Moderate deviation and restricted equivalence functions for measurin...
24.861842
141
0.546705
f7244e9d2237fe01ddaeb6e8e95ca04552be563e
3,688
py
Python
airiam/terraform/entity_terraformers/IAMPolicyDocumentTransformer.py
metahertz/AirIAM
212f84e1b1a51c7a614384f91b220e7f2a57a079
[ "Apache-2.0" ]
501
2020-03-04T16:00:54.000Z
2022-03-30T17:31:10.000Z
airiam/terraform/entity_terraformers/IAMPolicyDocumentTransformer.py
rckasa/AirIAM
5a99dc25354c1bc6525dbaf25a3afcd472f71b2f
[ "Apache-2.0" ]
34
2020-03-23T08:12:18.000Z
2022-02-13T08:50:39.000Z
airiam/terraform/entity_terraformers/IAMPolicyDocumentTransformer.py
rckasa/AirIAM
5a99dc25354c1bc6525dbaf25a3afcd472f71b2f
[ "Apache-2.0" ]
51
2020-04-16T06:43:29.000Z
2022-03-20T14:20:24.000Z
import json from airiam.terraform.entity_terraformers.BaseEntityTransformer import BaseEntityTransformer class IAMPolicyDocumentTransformer(BaseEntityTransformer): def __init__(self, entity_json: dict, policy_name, principal_name=None): policy_document_name = f"{policy_name}_document" if principa...
38.821053
138
0.632863
f7245440fe7dba32ffeb3a85b4b83af243aba25b
290
py
Python
ceuclid.py
jprzywoski/faster-python
44252bf0a746dd862d752efbe2012a8a404ec7bf
[ "MIT" ]
null
null
null
ceuclid.py
jprzywoski/faster-python
44252bf0a746dd862d752efbe2012a8a404ec7bf
[ "MIT" ]
null
null
null
ceuclid.py
jprzywoski/faster-python
44252bf0a746dd862d752efbe2012a8a404ec7bf
[ "MIT" ]
null
null
null
import ctypes from numpy.ctypeslib import ndpointer lib = ctypes.cdll.LoadLibrary('./libdist.so') fn = lib.dist fn.restype = ctypes.c_double fn.argtypes = [ ndpointer(ctypes.c_double), ndpointer(ctypes.c_double), ctypes.c_size_t ] def dist(x, y): return fn(x, y, len(x))
18.125
45
0.7
f7247128248055fc8b3fc7e0f99d36f794357c24
5,958
py
Python
utils/evaluation.py
lippman1125/pytorch_FAN
ffc9c968478d55cb0c75c062bb8774923f961110
[ "BSD-3-Clause" ]
58
2019-03-14T20:13:10.000Z
2022-03-17T07:59:34.000Z
utils/evaluation.py
lippman1125/pytorch_FAN
ffc9c968478d55cb0c75c062bb8774923f961110
[ "BSD-3-Clause" ]
7
2019-03-29T05:13:39.000Z
2021-02-08T23:00:32.000Z
utils/evaluation.py
lippman1125/pytorch_FAN
ffc9c968478d55cb0c75c062bb8774923f961110
[ "BSD-3-Clause" ]
8
2019-05-29T09:05:32.000Z
2022-03-12T17:00:02.000Z
from __future__ import absolute_import, print_function import math import numpy as np import matplotlib.pyplot as plt from random import randint from .misc import * from .transforms import transform, transform_preds __all__ = ['accuracy', 'AverageMeter'] def get_preds(scores): ''' get predictions from score ma...
31.193717
100
0.553206
f72476bf2e961b26c53e96e9358bb4c0a54239b7
8,355
py
Python
tron/Vocab/hubCommands.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
tron/Vocab/hubCommands.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
tron/Vocab/hubCommands.py
sdss/tron
886c5c5fb6341ad85e4a9f5d6f5ecb6bbc0d8322
[ "BSD-3-Clause" ]
null
null
null
__all__ = ['hubCommands'] import sys import Vocab.InternalCmd as InternalCmd from tron import Misc, g, hub from tron.Hub.KV.KVDict import kvAsASCII class hubCommands(InternalCmd.InternalCmd): """ All the commands that the "hub" package provides. The user executes these from the command window: hub st...
30.830258
95
0.518971
f72480521f1fad6394a1656241b51fbd1c7d3230
14,939
py
Python
Lib/site-packages/wx-3.0-msw/wx/lib/gridmovers.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2021-02-13T22:40:50.000Z
2021-02-13T22:40:50.000Z
Lib/site-packages/wx-3.0-msw/wx/lib/gridmovers.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
1
2018-07-28T20:07:04.000Z
2018-07-30T18:28:34.000Z
Lib/site-packages/wx-3.0-msw/wx/lib/gridmovers.py
jickieduan/python27
c752b552396bbed68d8555080d475718cea2edd0
[ "bzip2-1.0.6" ]
2
2019-12-02T01:39:10.000Z
2021-02-13T22:41:00.000Z
#---------------------------------------------------------------------------- # Name: GridColMover.py # Purpose: Grid Column Mover Extension # # Author: Gerrit van Dyk (email: gerritvd@decillion.net) # # Version 0.1 # Date: Nov 19, 2002 # RCS-ID: $Id$ # Licence: wxWindows lic...
30.240891
77
0.522391
f7248af32f72c111effbd60171246b9815ed3cb7
368
py
Python
sol_runner.py
Square789/AoC
041aecb9e1a06b5417bdef0eb0ab70a542be04b5
[ "MIT" ]
3
2020-12-05T17:43:51.000Z
2020-12-06T10:37:29.000Z
sol_runner.py
Square789/AoC
041aecb9e1a06b5417bdef0eb0ab70a542be04b5
[ "MIT" ]
null
null
null
sol_runner.py
Square789/AoC
041aecb9e1a06b5417bdef0eb0ab70a542be04b5
[ "MIT" ]
null
null
null
import importlib import sys from aoc_input import get_input if __name__ == "__main__": if len(sys.argv) < 3: print("Specify which file to run! [year, day]") sys.exit() try: year = int(sys.argv[1]) day = int(sys.argv[2]) except ValueError: print("Integer required!") sys.exit() module = importlib.impo...
18.4
56
0.673913
f7248ee621042e30291d461ffdf3dcab8f265bba
106,231
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_virtual_machines_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_virtual_machines_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_virtual_machines_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.167319
873
0.668468
f724bec965759ccd317b2b385268f2ab47cb4ab2
1,838
py
Python
scripts/convert_protocols_to_exams.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
null
null
null
scripts/convert_protocols_to_exams.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
1
2022-02-17T20:28:19.000Z
2022-02-17T20:28:19.000Z
scripts/convert_protocols_to_exams.py
timptner/farafmb.de
2b154278d8b44ea3adecafcb8554c1b0b0055e01
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json from pathlib import Path def get_valid_file_path(file_path: str) -> Path: """Check if file exists and return valid Path object""" path = Path(file_path).resolve() if not path.is_file(): raise Exception("No file found! Please check your path and try again.") ...
31.689655
107
0.654516
f724c9e936f9b464bc9ef938bd84202c5c01e1e8
6,935
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/operations/__init__.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.858108
94
0.839366
f724ded074f8fa3a1a1d5041388c8593fb112856
924
py
Python
cogs/slashes.py
mallusrgreatv2/PyHDISCORD
e414976441cbdb3a57b2c545ab164810bebe2e4b
[ "MIT" ]
2
2021-07-05T12:00:39.000Z
2021-07-05T12:00:49.000Z
cogs/slashes.py
mallusrgreatv2/PyHDISCORD
e414976441cbdb3a57b2c545ab164810bebe2e4b
[ "MIT" ]
null
null
null
cogs/slashes.py
mallusrgreatv2/PyHDISCORD
e414976441cbdb3a57b2c545ab164810bebe2e4b
[ "MIT" ]
null
null
null
import discord from discord.ext import commands from discord.ext.commands import cog import discord_slash from discord_slash import cog_ext class Slashes(commands.Cog): def __init__(self, client) -> None: self.client: commands.Bot = client @commands.Cog.listener() async def on_ready(self): ...
35.538462
108
0.676407
f7254891c728997635a95c7943f2f2e7d783a797
14,518
py
Python
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/syncrep/test_basic.py
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
#!/usr/bin/env python """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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...
44.533742
131
0.564403
f7256728eb65c78928992820c0d53c79800f694d
483
py
Python
app/api/migrations/0002_auto_20210201_1602.py
ingjavierpinilla/magentrack-test
4b5ee34aafbe85c4f536ceafd5efdc9271a26008
[ "MIT" ]
null
null
null
app/api/migrations/0002_auto_20210201_1602.py
ingjavierpinilla/magentrack-test
4b5ee34aafbe85c4f536ceafd5efdc9271a26008
[ "MIT" ]
null
null
null
app/api/migrations/0002_auto_20210201_1602.py
ingjavierpinilla/magentrack-test
4b5ee34aafbe85c4f536ceafd5efdc9271a26008
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2021-02-01 16:02 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ] operations = [ migrations.AlterField( model_name=...
23
109
0.625259
f7257ab79e200ce2c0c75e0ae6d7b38cf586e521
4,649
py
Python
ee/clickhouse/queries/paths/path_event_query.py
thinhnguyenuit/posthog
4758e66790485587d29a617174158d07341342f8
[ "MIT" ]
null
null
null
ee/clickhouse/queries/paths/path_event_query.py
thinhnguyenuit/posthog
4758e66790485587d29a617174158d07341342f8
[ "MIT" ]
null
null
null
ee/clickhouse/queries/paths/path_event_query.py
thinhnguyenuit/posthog
4758e66790485587d29a617174158d07341342f8
[ "MIT" ]
null
null
null
from typing import Any, Dict, Tuple from ee.clickhouse.models.property import get_property_string_expr from ee.clickhouse.queries.event_query import ClickhouseEventQuery from posthog.constants import AUTOCAPTURE_EVENT, PAGEVIEW_EVENT, SCREEN_EVENT from posthog.models.filters.path_filter import PathFilter class PathE...
39.735043
151
0.655195
f7259ef31d09ee215158684c34454fabb4e5926d
614
py
Python
aws-auth0-auth/helloWorld.py
skarlekar/ms-auth-tutorials
0de172817e54533be93700de19028cfa8757861f
[ "MIT" ]
null
null
null
aws-auth0-auth/helloWorld.py
skarlekar/ms-auth-tutorials
0de172817e54533be93700de19028cfa8757861f
[ "MIT" ]
1
2021-06-01T21:41:36.000Z
2021-06-01T21:41:36.000Z
aws-auth0-auth/helloWorld.py
skarlekar/ms-auth-tutorials
0de172817e54533be93700de19028cfa8757861f
[ "MIT" ]
1
2017-10-26T15:08:40.000Z
2017-10-26T15:08:40.000Z
"""Simple helloWorld service.""" import json def sayHello(event, context): """Return a message in the response body.""" print('Event is: {}'.format(json.dumps(event))) body = { "message": "Hello! Your Auth0 authorized function executed successfully!" } response = { "statusCode": 2...
22.740741
81
0.599349
f725d191d7ee26a6a4fe4a6ea65ea74b004d9957
531
py
Python
contest/pythonist3/validating-credit-card-number/validating-credit-card-number.py
zeyuanxy/HackerRank
5194a4af780ece396501c215996685d1be529e73
[ "MIT" ]
4
2017-01-18T17:51:58.000Z
2019-10-20T12:14:37.000Z
contest/pythonist3/validating-credit-card-number/validating-credit-card-number.py
zeyuanxy/HackerRank
5194a4af780ece396501c215996685d1be529e73
[ "MIT" ]
null
null
null
contest/pythonist3/validating-credit-card-number/validating-credit-card-number.py
zeyuanxy/HackerRank
5194a4af780ece396501c215996685d1be529e73
[ "MIT" ]
8
2016-03-14T17:16:59.000Z
2021-06-26T10:11:33.000Z
# -*- coding: utf-8 -*- # @Author: Zeyuan Shang # @Date: 2016-05-13 12:50:43 # @Last Modified by: Zeyuan Shang # @Last Modified time: 2016-05-13 12:50:54 import re for i in range(int(raw_input())): S = raw_input().strip() pre_match = re.search(r'^[456]\d{3}(-?)\d{4}\1\d{4}\1\d{4}$',S) if pre_match: ...
35.4
67
0.59887
f7260ece4a1e3fc3b43d89b2b456333299b82c9d
2,817
py
Python
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
477
2015-01-07T18:22:27.000Z
2017-07-17T15:05:48.000Z
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from djan...
34.777778
115
0.611999
f7262a2f0da63f591723f9cdf91c2bae40d81f7d
19,587
py
Python
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2019-03-08T19:59:05.000Z
2020-09-27T03:18:37.000Z
import os import pytest import numpy as np from pandas.compat import zip from pandas import (Series, isna, to_datetime, DatetimeIndex, Timestamp, Interval, IntervalIndex, Categorical, cut, qcut, date_range) import pandas.util.testing as tm from pandas.api.types import Categoric...
37.026465
78
0.56512
f7263b5df5fb3177603ae56acb9d953605d88e9b
1,670
py
Python
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
2
2015-08-25T02:51:47.000Z
2019-11-03T20:00:16.000Z
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
9
2015-09-19T20:51:14.000Z
2015-09-28T07:06:50.000Z
dtypes/radix_sort.py
jay-tyler/data-structures
b4f4bcb091cf4be4c4cc29d8a687af3d063090f5
[ "MIT" ]
1
2020-04-22T21:24:36.000Z
2020-04-22T21:24:36.000Z
def radsort(unslist): """Returns a sorted list. Accepts only a list containing positive integers.""" # find max for iterative solution maxval = max(unslist) ntimes = len(str(maxval)) slist = unslist[:] for n in range(ntimes): # Making radix bins bins = [[] for _ in range(10...
27.377049
77
0.58982
f7264b4fcfd7aafc1c81e31c2b3afdfb0672a9ba
1,144
py
Python
code/nn.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
17
2019-03-29T18:30:36.000Z
2021-10-17T15:38:22.000Z
code/nn.py
arjunchandra/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
1
2019-04-22T22:40:30.000Z
2019-04-24T21:45:07.000Z
code/nn.py
ctallec/continuous-rl
8f3c655c6a4b2e9d15a6b052e5466c0a75191a08
[ "MIT" ]
5
2019-04-29T16:26:18.000Z
2020-01-23T07:17:49.000Z
"""Some nn utilities.""" import torch from abstract import ParametricFunction def copy_buffer(net: ParametricFunction, target_net: ParametricFunction): """Copy all buffers from net to target_net.""" with torch.no_grad(): for target_buf, buf in zip(target_net.buffers(), net.buffers()): # type: ignore ...
40.857143
87
0.701049
f7265d7477ff3fba1b5e7f80d15d88b7c11ed07e
1,092
py
Python
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2020-04-12T01:23:25.000Z
2021-05-22T13:46:00.000Z
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
null
null
null
examples/finalterm-shell-integration.py
davidbrochart/python-prompt-toolkit
8498692b31671fee7c5a426300a9df2ee290eae2
[ "BSD-3-Clause" ]
2
2016-12-30T23:57:44.000Z
2021-05-22T13:50:21.000Z
#!/usr/bin/env python """ Mark the start and end of the prompt with Final term (iterm2) escape sequences. See: https://iterm2.com/finalterm.html """ from __future__ import unicode_literals from prompt_toolkit import prompt from prompt_toolkit.token import Token import sys BEFORE_PROMPT = '\033]133;A\a' AFTER_PROMPT ...
29.513514
92
0.701465
f726841edd23cffe106d88311ba375ae4ca2b996
7,722
py
Python
cornac/models/hft/recom_hft.py
redhat6/cornac
856cf0f546a0dc6b46f407128d89ef2534994c60
[ "Apache-2.0" ]
null
null
null
cornac/models/hft/recom_hft.py
redhat6/cornac
856cf0f546a0dc6b46f407128d89ef2534994c60
[ "Apache-2.0" ]
null
null
null
cornac/models/hft/recom_hft.py
redhat6/cornac
856cf0f546a0dc6b46f407128d89ef2534994c60
[ "Apache-2.0" ]
1
2020-03-19T13:58:33.000Z
2020-03-19T13:58:33.000Z
# Copyright 2018 The Cornac Authors. 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 ...
38.41791
119
0.642191
f726902376e280ba863a7c19c43b900218daf48a
4,130
py
Python
alipay/aop/api/request/AlipayMarketingCampaignPromotionactivityCustomerReceiveRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/request/AlipayMarketingCampaignPromotionactivityCustomerReceiveRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/request/AlipayMarketingCampaignPromotionactivityCustomerReceiveRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayMarketingCampaignPromotionactivityCustomerReceiveModel import AlipayMarketingCampaignPromotionactivityCustomerReceiveModel cla...
28.482759
155
0.658111
f72693b16d34b944f5bb4a1349f76575267e7ffa
1,136
py
Python
examples/hacker_news/hacker_news/resources/s3_notebook_io_manager.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
examples/hacker_news/hacker_news/resources/s3_notebook_io_manager.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
examples/hacker_news/hacker_news/resources/s3_notebook_io_manager.py
kstennettlull/dagster
dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6
[ "Apache-2.0" ]
null
null
null
from dagstermill.io_managers import OutputNotebookIOManager from dagster import io_manager from .fixed_s3_pickle_io_manager import s3_client class S3OutputNotebookIOManager(OutputNotebookIOManager): """Defines an IOManager that will store dagstermill output notebooks on s3""" def _get_key(self, context) ->...
37.866667
82
0.727113
f726991caedc24166bb6ed9a085571aa0555465e
4,333
py
Python
sdks/python/appcenter_sdk/models/InternalHockeyAppCutoverStatusResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
null
null
null
sdks/python/appcenter_sdk/models/InternalHockeyAppCutoverStatusResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
6
2019-10-23T06:38:53.000Z
2022-01-22T07:57:58.000Z
sdks/python/appcenter_sdk/models/InternalHockeyAppCutoverStatusResponse.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
2
2019-10-23T06:31:05.000Z
2021-08-21T17:32:47.000Z
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: benedetto.abbenanti@gmail.com Project Repository: https://github.com/b3nab/appcenter-sdks """ import pprint import re # noqa: F401 import six class InternalHockey...
29.080537
95
0.587122
f7269969627b886f2d9ff179c1f78a4abf30f3d0
1,426
py
Python
Python/DataStructures/Trie.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
3
2021-03-22T14:13:56.000Z
2022-03-01T03:06:22.000Z
Python/DataStructures/Trie.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
null
null
null
Python/DataStructures/Trie.py
AndrewMcShane/DevMakingSource
fe58fa093e0ce2d2748cb3826d27be6b0ac34149
[ "MIT" ]
null
null
null
class TrieNode: def __init__(self): self.children = {} self.isWord = False class Trie: def __init__(self): self.root = TrieNode() def put(self, word): current = self.root for i in range(0, len(word)): child = word[i] tmp = None ...
26.90566
80
0.497896
f726a169158c8afc5ef59a42f7606019f51270fd
7,006
py
Python
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_14/exp1_oracle_pygame_latent_reward_1ob.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_14/exp1_oracle_pygame_latent_reward_1ob.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_14/exp1_oracle_pygame_latent_reward_1ob.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
import rlkit.misc.hyperparameter as hyp from multiworld.envs.pygame import PickAndPlaceEnv from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.sets.rl_launcher import disco_experiment if __name__ == "__main__": variant = dict( env_class=PickAndPlaceEnv, env_kwargs=dict( ...
32.137615
148
0.529403
f726b366c9cf2b7cd4cfde6038b4f205fcd52e43
1,036
py
Python
vyperlogix/zlib/zlibCompressor.py
raychorn/chrome_gui
f1fade70b61af12ee43c55c075aa9cfd32caa962
[ "CC0-1.0" ]
1
2020-09-29T01:36:33.000Z
2020-09-29T01:36:33.000Z
vyperlogix/zlib/zlibCompressor.py
raychorn/chrome_gui
f1fade70b61af12ee43c55c075aa9cfd32caa962
[ "CC0-1.0" ]
null
null
null
vyperlogix/zlib/zlibCompressor.py
raychorn/chrome_gui
f1fade70b61af12ee43c55c075aa9cfd32caa962
[ "CC0-1.0" ]
null
null
null
import gzip, zlib, base64 try: from cStringIO import StringIO except ImportError: from StringIO import StringIO __copyright__ = """\ (c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved. Published under Creative Commons License (http://creativecommons.org/licenses/by-nc/3.0/) restricted to non-...
31.393939
70
0.779923
f726da9544773e11f11ee7b9f04bc69fd7f46c4b
8,615
py
Python
EOD_api/test_EOD_api.py
webclinic017/time-series-pipeline
5ac418b91e395a48cba397f95d25d221adfff9bd
[ "MIT" ]
3
2021-08-28T10:55:12.000Z
2021-12-01T20:42:38.000Z
EOD_api/test_EOD_api.py
webclinic017/time-series-pipeline
5ac418b91e395a48cba397f95d25d221adfff9bd
[ "MIT" ]
null
null
null
EOD_api/test_EOD_api.py
webclinic017/time-series-pipeline
5ac418b91e395a48cba397f95d25d221adfff9bd
[ "MIT" ]
1
2021-09-26T16:07:24.000Z
2021-09-26T16:07:24.000Z
import os import re import datetime import unittest from io import StringIO from unittest.mock import patch import pandas as pd import EOD_api as eod TOKEN = os.environ["EOD_TOKEN"] def date_parser(string): date_pattern = re.compile("([0-9]{4}-[0-9]{2}-[0-9]{2})[ ]", re.VERBOSE) return date_pattern.sub(r"\...
43.075
165
0.51863
f727619381755861c088ab5d8fb34a9eb7540f17
341
py
Python
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
2
2018-02-24T17:20:02.000Z
2018-02-24T17:25:43.000Z
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
null
null
null
LC/27.py
szhu3210/LeetCode_Solutions
64747eb172c2ecb3c889830246f3282669516e10
[ "MIT" ]
null
null
null
class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ a=0 x=0 while(x<len(nums)): if nums[x]==val: nums.pop(x) x-=1 x+=1 ...
21.3125
39
0.384164
f727cc1948a85ac6d72771c8c995e728612019c7
4,358
py
Python
src/tequila/quantumchemistry/__init__.py
naomicurnow/tequila
739a76222005558d348a428cf2ce7cb5dfe290de
[ "MIT" ]
1
2021-01-11T18:40:47.000Z
2021-01-11T18:40:47.000Z
src/tequila/quantumchemistry/__init__.py
kiminh/tequila
464085265e125222c63e65446861e9c0a2428bab
[ "MIT" ]
null
null
null
src/tequila/quantumchemistry/__init__.py
kiminh/tequila
464085265e125222c63e65446861e9c0a2428bab
[ "MIT" ]
null
null
null
import typing from .qc_base import ParametersQC, QuantumChemistryBase SUPPORTED_QCHEMISTRY_BACKENDS = ["base", "psi4"] INSTALLED_QCHEMISTRY_BACKENDS = {"base": QuantumChemistryBase} try: from .psi4_interface import QuantumChemistryPsi4 INSTALLED_QCHEMISTRY_BACKENDS["psi4"] = QuantumChemistryPsi4 except Impo...
37.568966
149
0.652593
f72814a675df3867ed79d00435689d65ca7e9ffb
1,041
py
Python
autoio-interfaces/chemkin_io/tests/test__species_write_read.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
null
null
null
autoio-interfaces/chemkin_io/tests/test__species_write_read.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
1
2022-02-15T19:35:14.000Z
2022-02-15T19:35:14.000Z
autoio-interfaces/chemkin_io/tests/test__species_write_read.py
lpratalimaffei/autoio
57be6e4882af1841153c19e7353e2531e64ce47f
[ "Apache-2.0" ]
13
2020-06-24T05:21:11.000Z
2021-05-05T19:58:30.000Z
""" tests chemkin_io.writer.mechanism.species_block """ from chemkin_io.writer.mechanism import species_block as writer from chemkin_io.parser.species import names as parser SPC_IDENT_DCT = { 'O': {'smiles': 'smiles_1', 'inchi': 'inchi_1', 'charge': '', 'mult': '', 'sens': ...
26.025
63
0.588857
f72839c01680fa5e8dca84f89e02ed7c86a3f02b
6,728
py
Python
hw4/p2_Parsons_Ross.py
rp779/Python-COP-4045
2feabafef4a3ee04d593a35aa77f45b5d25d3754
[ "MIT" ]
null
null
null
hw4/p2_Parsons_Ross.py
rp779/Python-COP-4045
2feabafef4a3ee04d593a35aa77f45b5d25d3754
[ "MIT" ]
null
null
null
hw4/p2_Parsons_Ross.py
rp779/Python-COP-4045
2feabafef4a3ee04d593a35aa77f45b5d25d3754
[ "MIT" ]
null
null
null
# Problem 2 # @author: Ross import sys # sys.exit() import testif # testif module import turtle # Part A def draw_leaf_straight(length, level): """PART A: The draw_leaf_straight() function takes two arguments (length and level) and returns a graphic that depicts a leaf drawn in turtle graphics. """ if ...
50.969697
410
0.609394
f728659e152b0ab0ac0b69c92e35428aa12d16bd
1,546
py
Python
scripts/practice/FB/DiameterofBinaryTree.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
null
null
null
scripts/practice/FB/DiameterofBinaryTree.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
8
2020-09-05T16:04:31.000Z
2022-02-27T09:57:51.000Z
scripts/practice/FB/DiameterofBinaryTree.py
bhimeshchauhan/competitive_programming
e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5
[ "MIT" ]
null
null
null
""" Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. The length of a path between two nodes is represented by the number of edges between th...
25.766667
97
0.641656
f728735a0a2cd2a637b30db6ca8659076398b7a8
4,417
py
Python
examples/sac.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
examples/sac.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
examples/sac.py
vincentlui/unsupervised-goal-conditioned-rl
4f2e6938e072cb52f8ee779a939fe7bf6a980d45
[ "MIT" ]
null
null
null
from gym.envs.mujoco import HalfCheetahEnv import argparse import gym import rlkit.torch.pytorch_util as ptu from rlkit.data_management.env_replay_buffer import EnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.launchers.launcher_util import setup_logger from rlkit.samplers.data_collector impo...
32.962687
127
0.672628
f7289065c4d52fe80d6531156b36dfd941d57e04
2,152
py
Python
migrations/versions/0004_notification_stats_date.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
migrations/versions/0004_notification_stats_date.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
migrations/versions/0004_notification_stats_date.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
"""empty message Revision ID: 0004_notification_stats_date Revises: 0003_add_service_history Create Date: 2016-04-20 13:59:01.132535 """ # revision identifiers, used by Alembic. revision = "0004_notification_stats_date" down_revision = "0003_add_service_history" import sqlalchemy as sa from alembic import op def ...
36.474576
152
0.72816
f728c2249a621aec123829f2600362674d968847
2,941
py
Python
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
23
2021-01-19T11:50:57.000Z
2021-12-12T17:20:22.000Z
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
1
2021-04-06T14:35:03.000Z
2021-06-20T08:56:15.000Z
experiments/utils.py
chandar-lab/IIRC
ae6ffcfc0a42274bcda66e2288e09118604620e4
[ "MIT" ]
8
2021-01-05T10:49:19.000Z
2021-12-12T17:20:38.000Z
import numpy as np import torch.nn as nn import json def log(epoch, task_id, log_dict, logbook): log_dict["message"] = f"task_{task_id}_metrics" log_dict["task_id"] = task_id log_dict["task_epoch"] = epoch log_dict["step"] = epoch logbook.write_metric(log_dict) def log_task(task_id, log_dict, lo...
36.7625
98
0.652159
f728c391f0d3f70e7cfa1e9837dfcc22ca3a34d2
3,369
py
Python
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
15
2017-09-19T05:40:42.000Z
2021-04-23T00:59:24.000Z
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
null
null
null
tests/PyPoE/poe/test_patchserver.py
Openarl/PyPoE
ab5377e3b16f1920d4d9ada443e1e9059715f0fb
[ "MIT" ]
3
2018-02-14T00:02:09.000Z
2020-07-26T15:18:55.000Z
""" Tests for PyPoE.poe.patchserver Overview =============================================================================== +----------+------------------------------------------------------------------+ | Path | tests/PyPoE/poe/test_patchserver.py | +----------+---------------------...
33.356436
122
0.344613
f728d6871fb41255044213a71f7eb015371377f1
4,096
py
Python
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/admin/test_security_groups.py
vmahuli/tempest
f70319f5eda72b8c8a913ae1002ec531324e4116
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 NTT Data # 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 appl...
42.666667
79
0.654541
f728fdc393576c7d300b95276d9f3b1aeee7cd65
16,567
py
Python
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
94
2016-02-15T11:32:36.000Z
2022-02-14T12:31:42.000Z
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
225
2016-03-18T16:14:21.000Z
2022-03-30T10:21:26.000Z
toolium/driver_wrapper.py
Telefonica/toolium
3921cf94164ae1a2cd27d94197f0b145f2498541
[ "Apache-2.0" ]
65
2016-05-12T13:23:56.000Z
2022-02-16T08:33:18.000Z
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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/lic...
46.536517
120
0.669584
f72945b47d67acc2ed74ec645c6eaf015a73bd05
4,214
py
Python
nicos_mlz/sans1/setups/tisane_multifg.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/sans1/setups/tisane_multifg.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_mlz/sans1/setups/tisane_multifg.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
description = 'frequency counter, fg1 and fg2' excludes = ['frequency'] # group = 'lowlevel' tango_base = 'tango://sans1hw.sans1.frm2:10000/sans1/tisane' ARMING_STRING_FC = ( ':FUNC "FREQ";' ':CALC:AVER 1;' ':CALC:SMO:RESP FAST;' ':CALC:SMO 1;' ...
32.921875
71
0.44803
f72951655290a417050aa4a7bd1e7df075ef3d8e
2,724
py
Python
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
2
2017-03-08T21:44:54.000Z
2019-01-16T06:00:16.000Z
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
3
2017-01-26T13:26:31.000Z
2017-02-03T14:51:45.000Z
cloudify_nsx/security/group_dynamic_member.py
cloudify-cosmo/cloudify-nsx-plugin
d7b2abbe384e55aaf47b2c8474ab07f622eb83b5
[ "Apache-2.0" ]
5
2016-12-28T15:26:02.000Z
2017-01-30T08:46:10.000Z
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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...
29.608696
79
0.694934
f7295938f7a5c8eb813df1e080d84cb28c749497
1,628
py
Python
rally/cli/commands/info.py
LorenzoBianconi/rally
2bbd7ee590cca048fb4ad6a8eefc484989979ff8
[ "Apache-2.0" ]
1
2021-09-29T02:16:09.000Z
2021-09-29T02:16:09.000Z
rally/cli/commands/info.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-14T11:29:31.000Z
2020-07-14T11:29:31.000Z
rally/cli/commands/info.py
noah8713/rally-ovs
2434787c2cf4ca267108966c4ddc55ded3c333d9
[ "Apache-2.0" ]
1
2020-07-02T01:33:48.000Z
2020-07-02T01:33:48.000Z
# Copyright 2014: Mirantis 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 b...
33.22449
79
0.675676
f7297e07cf922dfa791b82c22a538dc4f2b6e22c
1,588
py
Python
misc/zkbreaker.py
hubo1016/vlcp
61c4c2595b610675ac0cbc4dbc46f70ec40090d3
[ "Apache-2.0" ]
252
2015-11-17T14:21:50.000Z
2022-03-11T10:19:47.000Z
misc/zkbreaker.py
SarahZarei/vlcp
61c4c2595b610675ac0cbc4dbc46f70ec40090d3
[ "Apache-2.0" ]
23
2018-01-09T13:28:52.000Z
2019-12-12T06:11:44.000Z
misc/zkbreaker.py
SarahZarei/vlcp
61c4c2595b610675ac0cbc4dbc46f70ec40090d3
[ "Apache-2.0" ]
37
2016-08-03T04:42:22.000Z
2021-12-30T16:57:10.000Z
''' Created on 2016/10/25 :author: hubo ''' from vlcp.config import config from vlcp.protocol.zookeeper import ZooKeeper import vlcp.protocol.zookeeper from random import random from vlcp.event.core import syscall_clearqueue from logging import getLogger _logger = getLogger(__name__) @config('protocol.zookeeper')...
34.521739
139
0.707809
f729b7bba4aa0803df14326f38b9ee5b1d94ee72
287
py
Python
dev/ideas/cython/conversion.py
achilleas-k/brian2
906563b6b1321585b082f79f74f1b4ab386347ec
[ "BSD-2-Clause" ]
null
null
null
dev/ideas/cython/conversion.py
achilleas-k/brian2
906563b6b1321585b082f79f74f1b4ab386347ec
[ "BSD-2-Clause" ]
null
null
null
dev/ideas/cython/conversion.py
achilleas-k/brian2
906563b6b1321585b082f79f74f1b4ab386347ec
[ "BSD-2-Clause" ]
null
null
null
from brian2.codegen.runtime.cython_rt.extension_manager import cython_extension_manager code = ''' def f(ns): #cdef int n = <int> ns['n'] cdef int n = ns['n'] print n ''' ns = { 'n':3, } mod = cython_extension_manager.create_extension(code) mod.f(ns)
19.133333
88
0.620209
f729beec659e8400f9ebf74b21ae35139ed63557
6,042
py
Python
Pyrex/Distutils/build_ext.py
jwilk/Pyrex
83dfbae1261788933472e3f9c501ad74c61a37c5
[ "Apache-2.0" ]
5
2019-05-26T20:48:36.000Z
2021-07-09T01:38:38.000Z
Pyrex/Distutils/build_ext.py
jwilk/Pyrex
83dfbae1261788933472e3f9c501ad74c61a37c5
[ "Apache-2.0" ]
null
null
null
Pyrex/Distutils/build_ext.py
jwilk/Pyrex
83dfbae1261788933472e3f9c501ad74c61a37c5
[ "Apache-2.0" ]
1
2022-02-10T07:14:58.000Z
2022-02-10T07:14:58.000Z
"""Pyrex.Distutils.build_ext Implements a version of the Distutils 'build_ext' command, for building Pyrex extension modules.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id:$" import sys, os, string, re from types import * from distutils.core import Command from distutils.errors imp...
30.984615
83
0.721119
f729ef60b68c40e555be435faed97dbc1fd4116d
12,824
py
Python
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
owtf/plugin/plugin_params.py
alienus/owtf
b6d81fac83c324c2b8c6fe2a974c036881c1fcd0
[ "BSD-3-Clause" ]
null
null
null
""" owtf.plugin.plugin_params.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Manage parameters to the plugins """ import logging from collections import defaultdict from owtf.config import config_handler from owtf.db.database import get_scoped_session from owtf.managers.error import add_error from owtf.utils.error import abort_fram...
37.497076
122
0.592171
f729f12176ee792d4c983261f3ac3717876984d3
1,212
py
Python
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
eta/t/test_parser.py
lewismj/eta
a07a9c078f8e2c9e166febea0ee61351c25caaa8
[ "BSD-2-Clause" ]
null
null
null
""" Basic unit tests for the parser class. """ import unittest from eta.parser import parser from eta.types import Symbol from lark.visitors import VisitError class ParserTest(unittest.TestCase): def test_basic_expressions(self): try: parser.parse("(defun (foo x y) (+ x y))") pars...
27.545455
59
0.584158
f72a1413848ce1eae8308309d1a389688e408204
7,059
py
Python
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
tests/test_util.py
sthagen/pantsbuild-pex
bffe6c3641b809cd3b20adbc7fdb2cf7e5f54309
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import subprocess from hashlib import sha1 from textwrap import dedent from pex.common import safe_mkdir, safe_open, temporary_dir, touch from pex.compatibility import to_bytes ...
35.832487
93
0.632243
f72a14cfa2d25b558ea211b3bf08c71152c5cdcc
8,959
py
Python
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
src/sage/knots/knot.py
saraedum/sage-renamed
d2da67b14da2ad766a5906425d60d43a3b3e1270
[ "BSL-1.0" ]
null
null
null
r""" Knots AUTHORS: - Miguel Angel Marco Buzunariz - Amit Jamadagni """ #***************************************************************************** # Copyright (C) 2014 Travis Scrimshaw <tscrim at ucdavis.edu> # # This program is free software: you can redistribute it and/or modify # it under the terms of...
30.063758
136
0.480076
f72a14f414a54cde57d44cf0105f7d6ea3a142f8
3,674
py
Python
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
1
2021-05-25T20:47:41.000Z
2021-05-25T20:47:41.000Z
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
null
null
null
matplotlib2tikz/patch.py
jameshensman/matplotlib2tikz
53cd52529c13b08221f962f1a338d33c055132ee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # import matplotlib as mpl from . import path as mypath def draw_patch(data, obj): """Return the PGFPlots code for patches. """ # Gather the draw options. data, draw_options = mypath.get_draw_options( data, obj.get_edgecolor(), obj.get_facecolor() ) if isinsta...
28.929134
115
0.60724
f72a1694183b61ee3827e0b4a3909cca8c657eca
32,592
py
Python
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/console/console_io.py
ianel20/google-cloud-sdk
36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3
[ "Apache-2.0" ]
1
2020-07-25T12:23:41.000Z
2020-07-25T12:23:41.000Z
# Copyright 2013 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...
34.020877
80
0.665777