hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
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
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
a86ff074f930327b91a153053887f4bb5215431e
278
py
Python
gcamp_analysis_files_finished/171129-02-bottom-experiment/src/delta_video_config.py
eleanorlutz/aedes-aegypti-gcamp6s-larval-behavior
f8773525124a4138278b56f6de4fc5a9910a6319
[ "MIT" ]
null
null
null
gcamp_analysis_files_finished/171129-02-bottom-experiment/src/delta_video_config.py
eleanorlutz/aedes-aegypti-gcamp6s-larval-behavior
f8773525124a4138278b56f6de4fc5a9910a6319
[ "MIT" ]
null
null
null
gcamp_analysis_files_finished/171129-02-bottom-experiment/src/delta_video_config.py
eleanorlutz/aedes-aegypti-gcamp6s-larval-behavior
f8773525124a4138278b56f6de4fc5a9910a6319
[ "MIT" ]
null
null
null
class Config: def __init__(self): self.basename = 'delta_video' self.directory = '/home/eleanor/Documents/gcamp_analysis_files_temp/171129-02-bottom-experiment/data' self.topics = ['/multi_tracker/1/delta_video',] self.record_length_hours = 1
46.333333
109
0.697842
d6f58ed732a42ad100871446c837daf79b88a537
83,867
py
Python
solarforecastarbiter/io/tests/test_api.py
dplarson/solarforecastarbiter-core
d4d85a344ef38024eb47c7daaa557d4fe17730ff
[ "MIT" ]
null
null
null
solarforecastarbiter/io/tests/test_api.py
dplarson/solarforecastarbiter-core
d4d85a344ef38024eb47c7daaa557d4fe17730ff
[ "MIT" ]
null
null
null
solarforecastarbiter/io/tests/test_api.py
dplarson/solarforecastarbiter-core
d4d85a344ef38024eb47c7daaa557d4fe17730ff
[ "MIT" ]
null
null
null
import json from random import randint import re import copy from urllib.parse import parse_qs import numpy as np import pandas as pd import pandas.testing as pdt import pytest import requests from solarforecastarbiter.io import api, utils from solarforecastarbiter import datamodel def test_request_cli_access_tok...
41.39536
466
0.657124
13bc15d532918b479eeadf2338b83d1e2adac7c6
1,529
py
Python
configs/mix_bn/deeplabv3plus_512x512_4k_mixbn_rs2_to_gf3_0_attach_backbone.py
yoyoyoohh/SAR_build_extract_v2
7e2d21ead8e65b263d18d1059e5ce8ff2df4fbe6
[ "Apache-2.0" ]
null
null
null
configs/mix_bn/deeplabv3plus_512x512_4k_mixbn_rs2_to_gf3_0_attach_backbone.py
yoyoyoohh/SAR_build_extract_v2
7e2d21ead8e65b263d18d1059e5ce8ff2df4fbe6
[ "Apache-2.0" ]
null
null
null
configs/mix_bn/deeplabv3plus_512x512_4k_mixbn_rs2_to_gf3_0_attach_backbone.py
yoyoyoohh/SAR_build_extract_v2
7e2d21ead8e65b263d18d1059e5ce8ff2df4fbe6
[ "Apache-2.0" ]
null
null
null
''' Author: Shuailin Chen Created Date: 2021-07-11 Last Modified: 2021-08-14 content: ''' _base_ = [ '../_base_/models/deeplabv3plus_r50-d8.py', '../_base_/datasets/mix_bn_rs2_to_gf3.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_20k.py' ] # norm_cfg = dict(type='BN', requires_grad=True...
29.980392
90
0.686723
cfbba77b1ac5fee1182e87a839627400724e3911
894
py
Python
Panther/Instruction/Declaration.py
pablorocad/S2OLC2-C
a452e4de83f315802ad8237d44c477ebf04881f0
[ "MIT" ]
null
null
null
Panther/Instruction/Declaration.py
pablorocad/S2OLC2-C
a452e4de83f315802ad8237d44c477ebf04881f0
[ "MIT" ]
null
null
null
Panther/Instruction/Declaration.py
pablorocad/S2OLC2-C
a452e4de83f315802ad8237d44c477ebf04881f0
[ "MIT" ]
1
2021-09-11T14:43:07.000Z
2021-09-11T14:43:07.000Z
from Expression.Primitive import Primitive from Abstract.Instruction import Instruction from Environment.Environment import Environment from Abstract.Expression import Expression from Enum.typeExpression import typeExpression class Declaration(Instruction): def __init__(self, id: str, type: typeExpression, value:...
37.25
124
0.715884
d076e6596486a72c33344d8904c4192733dcac7f
383
py
Python
imageManager/gallery.py
mlvander/montasola
c5f30ee049dfb0f04c3847a42a92352d1fd65ed6
[ "MIT" ]
null
null
null
imageManager/gallery.py
mlvander/montasola
c5f30ee049dfb0f04c3847a42a92352d1fd65ed6
[ "MIT" ]
null
null
null
imageManager/gallery.py
mlvander/montasola
c5f30ee049dfb0f04c3847a42a92352d1fd65ed6
[ "MIT" ]
null
null
null
from models import Images class Gallery: gallery = [] def __init__ (self,galleryID): images = Images.objects.all() for thisImage in images: image['file'] = image.image image['caption'] = image.imageDescription self.gallery.append(im...
23.9375
53
0.561358
25836f29cc085659a2fdb581d2ddb3f37c0549f5
9,504
py
Python
sfrmaker/gis.py
aleaf/SFRmaker
4b87d29f5486f283fecc024be36cf81d429bdcca
[ "CC0-1.0" ]
17
2015-08-15T02:20:04.000Z
2020-04-30T17:36:21.000Z
sfrmaker/gis.py
aleaf/SFRmaker
4b87d29f5486f283fecc024be36cf81d429bdcca
[ "CC0-1.0" ]
15
2015-03-04T16:57:13.000Z
2020-01-14T16:29:18.000Z
sfrmaker/gis.py
aleaf/SFRmaker
4b87d29f5486f283fecc024be36cf81d429bdcca
[ "CC0-1.0" ]
9
2015-08-18T14:15:07.000Z
2020-04-28T18:45:21.000Z
from collections.abc import Iterable import os from packaging import version import warnings import time import traceback import fiona import numpy as np import pyproj from shapely.geometry import shape, Polygon, box from shapely.ops import unary_union import gisutils from gisutils import df2shp, shp2df, project, get_s...
34.686131
102
0.626999
b0414ff1d08818a2c0f7a9dd8f4c68637ffbda70
8,616
py
Python
noval/project/executor.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
noval/project/executor.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
noval/project/executor.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- from tkinter import messagebox from noval import GetApp,_ import sys import threading import noval.process as process import noval.util.strutils as strutils import os import noval.util.utils as utils import time import noval.terminal as terminal EVT_UPDATE_STDTEXT = "UpdateOutputTex...
39.705069
184
0.586467
b51239bd55f5abf84878c1e45f09208607645f30
241
py
Python
HackerRank/Strange_Counter.py
harryd0311/Competitive-programing
6268e4a586759d3bea8e80b87fc5915e381b30fc
[ "Unlicense" ]
12
2021-06-05T09:40:10.000Z
2021-10-07T17:59:51.000Z
HackerRank/Strange_Counter.py
harryd0311/Competitive-programing
6268e4a586759d3bea8e80b87fc5915e381b30fc
[ "Unlicense" ]
21
2021-09-30T22:25:03.000Z
2021-10-05T18:23:25.000Z
HackerRank/Strange_Counter.py
harryd0311/Competitive-programing
6268e4a586759d3bea8e80b87fc5915e381b30fc
[ "Unlicense" ]
67
2021-08-01T10:04:52.000Z
2021-10-10T00:25:04.000Z
# Link to question: https://www.hackerrank.com/challenges/strange-code/problem # Solution t=int(input()) v=3 f=3 for i in range(1,t): if(f<t): i=i+v v=v*2 f=f+v else: v=f+1-t break print(v)
14.176471
78
0.53527
142d4d218e66b1073d595239f41a02e5d73b5fa8
11,937
py
Python
sdk/python/pulumi_azure_native/compute/v20180930/snapshot.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/compute/v20180930/snapshot.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/compute/v20180930/snapshot.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
50.795745
1,629
0.674039
dd73d092fef4a5b6e0076b62aca2b8f58915d824
5,319
py
Python
tests/test_task.py
ejfitzgerald/agents-aea
6411fcba8af2cdf55a3005939ae8129df92e8c3e
[ "Apache-2.0" ]
null
null
null
tests/test_task.py
ejfitzgerald/agents-aea
6411fcba8af2cdf55a3005939ae8129df92e8c3e
[ "Apache-2.0" ]
null
null
null
tests/test_task.py
ejfitzgerald/agents-aea
6411fcba8af2cdf55a3005939ae8129df92e8c3e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
38.824818
88
0.665727
04f40ca4fd1fdd85f458acce439db60254bef76b
228
py
Python
tests/test_dates.py
agaev1/kobra
d4c6ee0883fea53b4667524adac2e5d4cce20be2
[ "MIT" ]
null
null
null
tests/test_dates.py
agaev1/kobra
d4c6ee0883fea53b4667524adac2e5d4cce20be2
[ "MIT" ]
null
null
null
tests/test_dates.py
agaev1/kobra
d4c6ee0883fea53b4667524adac2e5d4cce20be2
[ "MIT" ]
null
null
null
from kobra import Date_custom import QuantLib as ql def test_date_returns_quantlib(): result = Date_custom('2019-10-01') result = result.quantlib compare_to = ql.Date(1, 10, 2019) assert result == compare_to
19
38
0.714912
a5337aeb5508b327934f534fdd9b8bdb37151e4f
47,132
py
Python
ai_economist/foundation/base/base_env.py
mhelabd/ai-ethicist
ac3efad32c2ec34df949c8facf139e33d250db87
[ "MIT", "BSD-3-Clause" ]
null
null
null
ai_economist/foundation/base/base_env.py
mhelabd/ai-ethicist
ac3efad32c2ec34df949c8facf139e33d250db87
[ "MIT", "BSD-3-Clause" ]
null
null
null
ai_economist/foundation/base/base_env.py
mhelabd/ai-ethicist
ac3efad32c2ec34df949c8facf139e33d250db87
[ "MIT", "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: BSD-3-Clause # For full license text, see the LICENSE file in the repo root # or https://opensource.org/licenses/BSD-3-Clause import random from abc import ABC, abstractmethod from copy import deepcopy import numpy as np fro...
40.526225
88
0.604557
45f7fb8b37131103f3b8c148259dea2f6afda963
7,840
py
Python
cnns.py
xmax1/cwvae-pytorch
9d9c91cdb23eb356575855b9d2d0ec2c63aa3c98
[ "MIT" ]
1
2022-03-07T10:57:37.000Z
2022-03-07T10:57:37.000Z
cnns.py
xmax1/cwvae-pytorch
9d9c91cdb23eb356575855b9d2d0ec2c63aa3c98
[ "MIT" ]
null
null
null
cnns.py
xmax1/cwvae-pytorch
9d9c91cdb23eb356575855b9d2d0ec2c63aa3c98
[ "MIT" ]
null
null
null
import torch as tc from torch import nn from config import Config leaky_relu = nn.LeakyReLU(negative_slope=0.2) # TF default apparently class Encoder(nn.Module): def __init__(self, cfg): super(Encoder, self).__init__() # padding = VALID?? tf1, tf2, tf3, tf4 = cfg.total_filters, cfg.to...
41.263158
153
0.58074
7eb1a3892172c78050cecd94bc6d6f8445bbc4d2
544
py
Python
manage.py
mai-platform/backend
724591e5c4e1dffca22564fe2e539dc48f8fef7e
[ "MIT" ]
1
2018-03-20T07:45:13.000Z
2018-03-20T07:45:13.000Z
manage.py
mai-platform/backend
724591e5c4e1dffca22564fe2e539dc48f8fef7e
[ "MIT" ]
4
2018-03-12T19:06:49.000Z
2018-03-25T17:23:49.000Z
manage.py
mai-platform/backend
724591e5c4e1dffca22564fe2e539dc48f8fef7e
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mai_platform.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django....
34
76
0.689338
fe672e964dcf55c7c154fef816a696db667c5f53
1,460
py
Python
robowflex_visualization/scripts/robowflex.py
aorthey/robowflex
09eeb3a380344500508f53cf8469e9878e746c39
[ "BSD-3-Clause" ]
null
null
null
robowflex_visualization/scripts/robowflex.py
aorthey/robowflex
09eeb3a380344500508f53cf8469e9878e746c39
[ "BSD-3-Clause" ]
null
null
null
robowflex_visualization/scripts/robowflex.py
aorthey/robowflex
09eeb3a380344500508f53cf8469e9878e746c39
[ "BSD-3-Clause" ]
null
null
null
import importlib import robowflex_visualization as rv # reload modules, as Blender likes to keep things around. importlib.reload(rv) importlib.reload(rv.robot) importlib.reload(rv.scene) importlib.reload(rv.primitives) importlib.reload(rv.utils) # Load a Fetch robot. fetch = rv.robot.Robot("Fetch", "package://fetch_d...
29.2
80
0.742466
6dedbd37df9ca77864342f1537ce3e5470384d42
2,862
py
Python
nodenet/python/nodenet/utilities/commons.py
NOOXY-research/NodeNet
8bf7e0c2fd0e4fae4a51b2900014004728f3c935
[ "Apache-2.0" ]
2
2018-01-31T05:52:23.000Z
2020-08-07T19:14:18.000Z
nodenet/python/nodenet/utilities/commons.py
NOOXY-research/NodeNet
8bf7e0c2fd0e4fae4a51b2900014004728f3c935
[ "Apache-2.0" ]
1
2017-11-22T09:39:50.000Z
2017-11-22T09:39:50.000Z
nodenet/python/nodenet/utilities/commons.py
magneticchen/NodeNet
8bf7e0c2fd0e4fae4a51b2900014004728f3c935
[ "Apache-2.0" ]
null
null
null
# nodenet/utilities/commons.py # Description: # "commons.py" provide commons utilities that can be use widely. # Copyright 2018 NOOXY. All Rights Reserved. from nodenet.imports.commons import * import numpy as np2 # np2 for cupy compabable def cut_dataset_by_ratio_ramdom(datasets, cut_ratio = 0.1): dimension = le...
46.16129
118
0.720126
2f79bbd4b0a0564713543216313b836b45d48a80
915
py
Python
python/topics_of_interest_python_asyncio/aecho.py
Lovecanon/mooc_documents
e26e42d2f53cae05a9ed3f8d0a23cc127ad0feab
[ "MIT" ]
null
null
null
python/topics_of_interest_python_asyncio/aecho.py
Lovecanon/mooc_documents
e26e42d2f53cae05a9ed3f8d0a23cc127ad0feab
[ "MIT" ]
null
null
null
python/topics_of_interest_python_asyncio/aecho.py
Lovecanon/mooc_documents
e26e42d2f53cae05a9ed3f8d0a23cc127ad0feab
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ # start server python3 aecho.py # connect and send data to server nc localhost 25000 """ from socket import * import asyncio loop = asyncio.get_event_loop() async def echo_server(address): sock = socket(AF_INET, SOCK_STREAM) sock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) sock....
21.785714
60
0.653552
be60807620430ad6d2b09526be77b7dab915b10c
23,652
py
Python
python/ccxt/okcoinusd.py
hippylover/ccxt
db304e95b699c1971ad37b9053ae71fcb5dc3b03
[ "MIT" ]
2
2018-02-28T02:51:59.000Z
2018-02-28T03:25:51.000Z
python/ccxt/okcoinusd.py
hippylover/ccxt
db304e95b699c1971ad37b9053ae71fcb5dc3b03
[ "MIT" ]
null
null
null
python/ccxt/okcoinusd.py
hippylover/ccxt
db304e95b699c1971ad37b9053ae71fcb5dc3b03
[ "MIT" ]
9
2018-02-20T18:24:00.000Z
2019-06-18T14:23:11.000Z
# -*- coding: utf-8 -*- from ccxt.base.exchange import Exchange import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound class...
38.647059
179
0.482961
0c92f970fc78b265011511e8e694b016e2350f55
2,664
py
Python
src/spaceone/notification/interface/grpc/v1/protocol.py
xellos00/notification
e091c1eaeaf54d2669ac204c027aacddabad382a
[ "Apache-2.0" ]
null
null
null
src/spaceone/notification/interface/grpc/v1/protocol.py
xellos00/notification
e091c1eaeaf54d2669ac204c027aacddabad382a
[ "Apache-2.0" ]
null
null
null
src/spaceone/notification/interface/grpc/v1/protocol.py
xellos00/notification
e091c1eaeaf54d2669ac204c027aacddabad382a
[ "Apache-2.0" ]
null
null
null
from spaceone.api.notification.v1 import protocol_pb2, protocol_pb2_grpc from spaceone.core.pygrpc import BaseAPI class Protocol(BaseAPI, protocol_pb2_grpc.ProtocolServicer): pb2 = protocol_pb2 pb2_grpc = protocol_pb2_grpc def create(self, request, context): params, metadata = self.parse_request...
42.967742
86
0.683934
f117dcc3d6f96cc98b7d3a36a688621f0fa582d0
242
py
Python
bibliopixel/animation/remote/trigger_process.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
253
2015-01-03T23:17:57.000Z
2021-12-14T02:31:08.000Z
bibliopixel/animation/remote/trigger_process.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
879
2015-01-11T16:07:25.000Z
2021-12-10T16:24:31.000Z
bibliopixel/animation/remote/trigger_process.py
rec/leds
ed5fd11ed155e7008d4ef6d5b3d82cd7f8b3ed6a
[ "MIT" ]
71
2015-01-04T01:02:47.000Z
2022-03-25T18:30:10.000Z
from ... project import load def run_trigger(typename, q, events, kwargs): trigger_class = load.code(typename) trigger = trigger_class(q, events, **kwargs) try: trigger.start() except KeyboardInterrupt: pass
22
48
0.661157
401b291042d416f9b15e39f9c5951712df200d47
2,731
py
Python
setup.py
cguccione/comad
ac14f36dfbbb3d8e69d09971a95996e4d56fcf36
[ "BSD-3-Clause" ]
null
null
null
setup.py
cguccione/comad
ac14f36dfbbb3d8e69d09971a95996e4d56fcf36
[ "BSD-3-Clause" ]
null
null
null
setup.py
cguccione/comad
ac14f36dfbbb3d8e69d09971a95996e4d56fcf36
[ "BSD-3-Clause" ]
null
null
null
from setuptools.command.egg_info import egg_info from setuptools.command.develop import develop from setuptools.command.install import install import re import ast import os from setuptools import find_packages, setup # Dealing with Cython USE_CYTHON = os.environ.get('USE_CYTHON', False) ext = '.pyx' if USE_CYTHON els...
27.31
63
0.657268
10376343c71d4b7ad9b38d2f9f9f3086d98c436c
3,254
py
Python
kornia/augmentation/random_generator/base.py
YanivHollander/kornia
ccd258d0956da89b1feca96448eff8e4969d405a
[ "ECL-2.0", "Apache-2.0" ]
131
2019-01-16T18:33:10.000Z
2019-05-23T02:09:18.000Z
kornia/augmentation/random_generator/base.py
YanivHollander/kornia
ccd258d0956da89b1feca96448eff8e4969d405a
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
kornia/augmentation/random_generator/base.py
admariner/kornia
8a4c586b620b3e37f637c0235970838d45193d03
[ "ECL-2.0", "Apache-2.0" ]
18
2019-02-01T07:10:13.000Z
2019-05-21T14:52:03.000Z
from typing import Callable, Dict, Optional import torch import torch.nn as nn from torch.distributions import Distribution class _PostInitInjectionMetaClass(type): """To inject the ``__post_init__`` function after the creation of each instance.""" def __call__(cls, *args, **kwargs): obj = type.__ca...
34.252632
118
0.637677
d558565d6161187f5e0dd665b39b1ed6c4bc2efe
4,049
py
Python
pycloud/pycloud/model/app.py
SEI-AMS/pycloud
62764e9d2aae280e019306e3b151b7218bf82f4d
[ "MIT" ]
14
2015-08-20T11:54:56.000Z
2018-05-23T21:07:44.000Z
pycloud/pycloud/model/app.py
SEI-TAS/pycloud
62764e9d2aae280e019306e3b151b7218bf82f4d
[ "MIT" ]
10
2015-10-17T07:33:54.000Z
2018-04-27T20:50:52.000Z
pycloud/pycloud/model/app.py
SEI-AMS/pycloud
62764e9d2aae280e019306e3b151b7218bf82f4d
[ "MIT" ]
8
2016-03-31T07:04:26.000Z
2018-04-09T18:08:10.000Z
# KVM-based Discoverable Cloudlet (KD-Cloudlet) # Copyright (c) 2015 Carnegie Mellon University. # All Rights Reserved. # # THIS SOFTWARE IS PROVIDED "AS IS," WITH NO WARRANTIES WHATSOEVER. CARNEGIE MELLON UNIVERSITY EXPRESSLY DISCLAIMS TO THE FULLEST EXTENT PERMITTEDBY LAW ALL EXPRESS, IMPLIED, AND STATUTORY WARRANT...
44.988889
344
0.484811
ce98a9f066cfb9dff217c07d55d151436bccce43
2,093
py
Python
flask/blog/app/forms/user.py
mrg1995/my_note
df3c80b048718320b389b4ca8bd8a6b97b838b5a
[ "Apache-2.0" ]
1
2019-10-19T10:59:56.000Z
2019-10-19T10:59:56.000Z
flask/blog/app/forms/user.py
mrg1995/my_note
df3c80b048718320b389b4ca8bd8a6b97b838b5a
[ "Apache-2.0" ]
null
null
null
flask/blog/app/forms/user.py
mrg1995/my_note
df3c80b048718320b389b4ca8bd8a6b97b838b5a
[ "Apache-2.0" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import SubmitField, StringField, PasswordField, ValidationError, BooleanField,FileField from wtforms.validators import DataRequired, Email, Length, EqualTo from flask_wtf.file import FileAllowed, FileRequired from app.models import User from app.extensions import file clas...
45.5
159
0.654085
44e2eb3da2e4dfeb9ac6ccff2b3ac9fc6518eb39
1,142
py
Python
docs/support/plot_example_6.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
6
2015-12-15T04:09:08.000Z
2020-02-21T01:40:57.000Z
docs/support/plot_example_6.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
null
null
null
docs/support/plot_example_6.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
2
2016-01-21T23:29:17.000Z
2020-02-21T01:41:05.000Z
# plot_example_6.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,C0410 from __future__ import print_function import numpy, putil.plot def panel_iterator_example(no_print): source1 = putil.plot.BasicSource( indep_var=numpy.array([1, 2, 3, 4]), de...
26.55814
52
0.594571
c53d48da3a2f45e20efb2e802e3970327dbf4991
16,383
py
Python
camps/actors.py
AdamSchnapp/mycamps
c5c158fdcdc41890c06598bf7c2329b1b981f259
[ "MIT" ]
null
null
null
camps/actors.py
AdamSchnapp/mycamps
c5c158fdcdc41890c06598bf7c2329b1b981f259
[ "MIT" ]
null
null
null
camps/actors.py
AdamSchnapp/mycamps
c5c158fdcdc41890c06598bf7c2329b1b981f259
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from functools import wraps, partial import numpy as np import pandas as pd import xarray as xr import dask.delayed from itertools import product from scipy import signal from copy import copy import metpy from metpy.plots.mapping import CFProjection from pyproj import Proj from scipy.spatial imp...
37.489703
172
0.663248
3f91d4878d5dcbdbd848091b7342af27cba7dc78
255
py
Python
tests/client/.template.py
CWKevo/pyflarum
bdf162a6c94e3051843ec7299a4302054927498a
[ "MIT" ]
9
2021-06-23T21:26:29.000Z
2021-11-16T13:25:34.000Z
tests/client/.template.py
CWKevo/pyflarum
bdf162a6c94e3051843ec7299a4302054927498a
[ "MIT" ]
3
2021-09-11T00:08:14.000Z
2022-02-07T15:34:27.000Z
tests/client/.template.py
CWKevo/pyflarum
bdf162a6c94e3051843ec7299a4302054927498a
[ "MIT" ]
1
2021-08-18T12:45:14.000Z
2021-08-18T12:45:14.000Z
from dotenv import load_dotenv load_dotenv() import os from pyflarum.client import FlarumUser USER = FlarumUser(forum_url=os.environ['forum_url'], username_or_email='test', password=os.environ['account_password']) if __name__ == "__main__": ...
18.214286
119
0.756863
00a9ff2ce34e4cc738426dbb29dfcd58a0a74e9d
342
py
Python
exercicios curso em video/ex086.py
Nilton-Miguel/Prog_Python3
4cabcb1a30dde6ababce3cb8d1fbb7d417cb1d8b
[ "MIT" ]
null
null
null
exercicios curso em video/ex086.py
Nilton-Miguel/Prog_Python3
4cabcb1a30dde6ababce3cb8d1fbb7d417cb1d8b
[ "MIT" ]
null
null
null
exercicios curso em video/ex086.py
Nilton-Miguel/Prog_Python3
4cabcb1a30dde6ababce3cb8d1fbb7d417cb1d8b
[ "MIT" ]
null
null
null
valores = [] for linha in range(0, 3): for coluna in range(0, 3): valores.append(int(input(f'Digite um valor para [{linha + 1}, {coluna + 1}]: '))) cont = 0 print('') for linha in range(0, 3): for coluna in range(0, 3): print(f'[ {valores[cont]} ]',end=' ') cont += 1 ...
21.375
90
0.508772
1fed998bdeac616ed6d4945428d52e8fd91c2467
6,786
py
Python
cw07.py
chapman-phys220-2018f/cw07-another-team-name
e9c7e31dd4b4ca8e1d47f3bec8599f551d33208a
[ "MIT" ]
null
null
null
cw07.py
chapman-phys220-2018f/cw07-another-team-name
e9c7e31dd4b4ca8e1d47f3bec8599f551d33208a
[ "MIT" ]
null
null
null
cw07.py
chapman-phys220-2018f/cw07-another-team-name
e9c7e31dd4b4ca8e1d47f3bec8599f551d33208a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ### # Name: Grady Lynch, Jacob Anabi # Student ID: 02297574, 2294644 # Email: grlynch@chapman.edu, anabi@chapman.edu # Course: PHYS220/MATH220/CPSC220 Fall 2018 # Assignment: CW07 ### """Classwork 07 This classwork introduces numpy arrays and compares their performance t...
34.446701
95
0.567345
6fa8ddf5b6da53323576329eeda8d9adceef7464
568
py
Python
jesse/store/state_positions.py
noenfugler/jesse
217a3168620a755c1a9576d9deb27105db7dccf8
[ "MIT" ]
3,999
2018-11-09T10:38:51.000Z
2022-03-31T12:29:12.000Z
jesse/store/state_positions.py
noenfugler/jesse
217a3168620a755c1a9576d9deb27105db7dccf8
[ "MIT" ]
172
2020-04-16T16:19:08.000Z
2022-03-28T13:28:55.000Z
jesse/store/state_positions.py
noenfugler/jesse
217a3168620a755c1a9576d9deb27105db7dccf8
[ "MIT" ]
495
2019-03-01T21:48:53.000Z
2022-03-30T15:35:19.000Z
from jesse.config import config from jesse.models import Position class PositionsState: def __init__(self) -> None: self.storage = {} for exchange in config['app']['trading_exchanges']: for symbol in config['app']['trading_symbols']: key = f'{exchange}-{symbol}' ...
27.047619
62
0.559859
cef34b7635656724ad2b04ad3e6880ae4d02e3b9
3,076
py
Python
docs/conf.py
hnakamur/marshmallow-deb
9be3295acee1fea5d9b317b9ebbb76c49cb75da8
[ "MIT" ]
null
null
null
docs/conf.py
hnakamur/marshmallow-deb
9be3295acee1fea5d9b317b9ebbb76c49cb75da8
[ "MIT" ]
null
null
null
docs/conf.py
hnakamur/marshmallow-deb
9be3295acee1fea5d9b317b9ebbb76c49cb75da8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # marshmallow documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are co...
30.156863
87
0.692458
e764e9976604590398903d1e3bd274d4385a882c
2,818
py
Python
data/data-pipeline/data_pipeline/etl/sources/doe_energy_burden/etl.py
fromzeroedu/justice40-tool
7b87e0ec99f624175efef6f0f2619f4b5bc3b5ea
[ "CC0-1.0" ]
null
null
null
data/data-pipeline/data_pipeline/etl/sources/doe_energy_burden/etl.py
fromzeroedu/justice40-tool
7b87e0ec99f624175efef6f0f2619f4b5bc3b5ea
[ "CC0-1.0" ]
null
null
null
data/data-pipeline/data_pipeline/etl/sources/doe_energy_burden/etl.py
fromzeroedu/justice40-tool
7b87e0ec99f624175efef6f0f2619f4b5bc3b5ea
[ "CC0-1.0" ]
null
null
null
from pathlib import Path import pandas as pd from data_pipeline.config import settings from data_pipeline.etl.base import ExtractTransformLoad from data_pipeline.utils import get_module_logger, unzip_file_from_url logger = get_module_logger(__name__) class DOEEnergyBurden(ExtractTransformLoad): def __init__(sel...
30.967033
108
0.632718
88664d44b9630560db2571a714c279b78d8b42ec
579
py
Python
Router Exercise/MyTopo.py
khooi8913/openflow-tutorial
ddd51765def656392f21cfe58a251b895acea56a
[ "Apache-2.0" ]
4
2020-05-12T12:30:57.000Z
2021-12-10T16:24:36.000Z
Router Exercise/MyTopo.py
khooi8913/openflow-tutorial
ddd51765def656392f21cfe58a251b895acea56a
[ "Apache-2.0" ]
null
null
null
Router Exercise/MyTopo.py
khooi8913/openflow-tutorial
ddd51765def656392f21cfe58a251b895acea56a
[ "Apache-2.0" ]
8
2018-04-30T17:48:16.000Z
2021-02-08T18:55:44.000Z
from mininet.topo import Topo class MyTopo( Topo ): def __init__(self): Topo.__init__(self) #Add switch switchOne = self.addSwitch('s1') #Add hosts firstHost = self.addHost('h1', ip='10.0.1.100/24', defaultRoute='via 10.0.1.1') secondHost = self.addHost('h2', ip='10.0.2.100/24', defaultRoute='via 10....
26.318182
82
0.675302
e9c15fcf0222255e4b86e2d20a736e9aa085eaf4
2,499
py
Python
myproject/models/mymodel.py
Lkruitwagen/tf-tb-sacred
7a047a6a32896176d89dcd12716e00193a703601
[ "MIT" ]
null
null
null
myproject/models/mymodel.py
Lkruitwagen/tf-tb-sacred
7a047a6a32896176d89dcd12716e00193a703601
[ "MIT" ]
null
null
null
myproject/models/mymodel.py
Lkruitwagen/tf-tb-sacred
7a047a6a32896176d89dcd12716e00193a703601
[ "MIT" ]
null
null
null
import tensorflow as tf def UpBlock(n_filters, n_blocks): # make a function to build our upblocks flexible to the number of filters block_layers = [] for _ in range(n_blocks): block_layers.append(tf.keras.layers.Activation('relu')) block_layers.append(tf.keras.layers.Conv2DTranspo...
44.625
95
0.67587
d7cd2568f067d85c698951f6b78c88dac96c04c1
12,837
py
Python
YOLO/.history/pytorch-yolo-v3/video_demo_v1_20201106003217.py
jphacks/D_2003
60a5684d549862e85bdf758069518702d9925a48
[ "MIT" ]
1
2020-11-07T07:58:13.000Z
2020-11-07T07:58:13.000Z
YOLO/.history/pytorch-yolo-v3/video_demo_v1_20201106003217.py
jphacks/D_2003
60a5684d549862e85bdf758069518702d9925a48
[ "MIT" ]
null
null
null
YOLO/.history/pytorch-yolo-v3/video_demo_v1_20201106003217.py
jphacks/D_2003
60a5684d549862e85bdf758069518702d9925a48
[ "MIT" ]
4
2020-11-02T02:51:45.000Z
2020-11-07T02:54:47.000Z
from __future__ import division import time import torch import torch.nn as nn from torch.autograd import Variable import numpy as np import cv2 from util import * from darknet import Darknet from preprocess import prep_image, inp_to_image import pandas as pd import random import argparse import pickle as pkl import r...
33.781579
126
0.533302
ff1ae0c87de39dd62b4f3204daebfc9762d8c8c1
5,762
py
Python
gbpservice/neutron/tests/unit/nfp/lib/test_transport.py
ansao-aci/group-based-policy
d80a94dcb51bfce6994cd18339d3c79a7cb54bfe
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/tests/unit/nfp/lib/test_transport.py
ansao-aci/group-based-policy
d80a94dcb51bfce6994cd18339d3c79a7cb54bfe
[ "Apache-2.0" ]
null
null
null
gbpservice/neutron/tests/unit/nfp/lib/test_transport.py
ansao-aci/group-based-policy
d80a94dcb51bfce6994cd18339d3c79a7cb54bfe
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
31.145946
79
0.602742
b71d54a541d13b7c23b6202fb5216e25acbe1f3e
15,928
py
Python
src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
1
2021-02-03T23:06:06.000Z
2021-02-03T23:06:06.000Z
src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
null
null
null
src/vmware/azext_vmware/vendored_sdks/avs_client/aio/operations/_hcx_enterprise_sites_operations.py
ConnectionMaster/azure-cli-extensions
08d184f4efeac397c1ffcd21a83d651f4fad2782
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------...
50.08805
225
0.674535
8afa3acfaf3fc1347cc87cdecc772443037974d6
8,305
py
Python
bdbc/lib/python3.5/site-packages/bigchaindb_driver/driver.py
entropyx/fiduchain-blockchain-interface
07336a5eebfaa9cddb148edb94461a8fd57562b1
[ "MIT" ]
null
null
null
bdbc/lib/python3.5/site-packages/bigchaindb_driver/driver.py
entropyx/fiduchain-blockchain-interface
07336a5eebfaa9cddb148edb94461a8fd57562b1
[ "MIT" ]
null
null
null
bdbc/lib/python3.5/site-packages/bigchaindb_driver/driver.py
entropyx/fiduchain-blockchain-interface
07336a5eebfaa9cddb148edb94461a8fd57562b1
[ "MIT" ]
null
null
null
from bigchaindb.common.transaction import Asset, Transaction from .crypto import generate_keypair from .exceptions import InvalidVerifyingKey, InvalidSigningKey from .transport import Transport DEFAULT_NODE = 'http://localhost:9984/api/v1' class BigchainDB: """BigchainDB driver class. A :class:`~bigchaind...
34.604167
79
0.632511
5f50a8861a78b037895f0a14ace09498b9f8af97
1,393
py
Python
Code/model_struct.py
Turgibot/TensorPlay
055d23027e7825c6180f34e3118824d1edbc046f
[ "MIT" ]
null
null
null
Code/model_struct.py
Turgibot/TensorPlay
055d23027e7825c6180f34e3118824d1edbc046f
[ "MIT" ]
null
null
null
Code/model_struct.py
Turgibot/TensorPlay
055d23027e7825c6180f34e3118824d1edbc046f
[ "MIT" ]
null
null
null
''' Created by Guy Tordjman (turgibot@gmail.com) March 25th 2018 Please always use your code for the benefit of humanity. ''' import tensorflow as tf class Model: def __init__(self, data, target): self.data = data self.target = target self._predicition = None self._optimize = Non...
30.955556
94
0.629576
2a59872ecb8e3c4ebff683d3307f2f3c51798d9f
840
py
Python
tests/test_load.py
luiscape/hdxscraper-opennepal
723a0906d762c753caa1db3d806a3671da6debc8
[ "MIT" ]
null
null
null
tests/test_load.py
luiscape/hdxscraper-opennepal
723a0906d762c753caa1db3d806a3671da6debc8
[ "MIT" ]
12
2015-10-12T13:55:34.000Z
2015-10-21T20:27:01.000Z
tests/test_load.py
luiscape/hdxscraper-opennepal
723a0906d762c753caa1db3d806a3671da6debc8
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # system import os import sys dir = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] sys.path.append(os.path.join(dir, 'app')) # testing import mock import unittest from mock import patch # program import app.utilities.load as Load # # Constant. # _split = os....
22.105263
85
0.694048
bcbf976cd131679912ceb18465afa5aa0eb9c815
11,108
py
Python
userbot/modules/chatinfo.py
ratumelda/ratumelda
73cc41062ccd10cdae3b964eaa41ff3068fcb4c3
[ "Naumen", "Condor-1.1", "MS-PL" ]
28
2020-09-03T08:53:36.000Z
2022-03-31T02:51:05.000Z
userbot/modules/chatinfo.py
PerU-MoNsteR/ProjectAlf
c846dfddcb0d4266badd2b0ccfff398fceb121e9
[ "Naumen", "Condor-1.1", "MS-PL" ]
13
2020-08-27T07:46:08.000Z
2021-12-19T22:48:56.000Z
userbot/modules/chatinfo.py
PerU-MoNsteR/ProjectAlf
c846dfddcb0d4266badd2b0ccfff398fceb121e9
[ "Naumen", "Condor-1.1", "MS-PL" ]
259
2020-08-06T13:59:30.000Z
2022-01-02T06:16:30.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # # Credits to Hitalo-Sama and FTG Modules from datetime import datetime from math import sqrt from emoji import emojiz...
36.781457
138
0.629006
3ac7f60bdc5711814c5604f0f96ed95801a371ab
3,355
py
Python
pychron/pyscripts/commands/valve.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/pyscripts/commands/valve.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/pyscripts/commands/valve.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
31.952381
85
0.536215
1ee0a05431504cf7a789b148bd81a5623c638ba1
8,752
py
Python
2D-Burgers-SWAG/post/plotBARContour.py
tailintalent/ar-pde-cnn
88c130d7296af4ef7c13ec28a287fec4af3639f7
[ "MIT" ]
51
2019-06-18T20:56:01.000Z
2022-03-08T05:39:57.000Z
2D-Burgers-SWAG/post/plotBARContour.py
tailintalent/ar-pde-cnn
88c130d7296af4ef7c13ec28a287fec4af3639f7
[ "MIT" ]
5
2019-11-08T02:55:52.000Z
2021-06-11T14:19:07.000Z
2D-Burgers-SWAG/post/plotBARContour.py
tailintalent/ar-pde-cnn
88c130d7296af4ef7c13ec28a287fec4af3639f7
[ "MIT" ]
28
2019-10-26T00:44:58.000Z
2021-11-09T02:40:35.000Z
''' This script plots the four test predictions of the predictive expectation and variance of BAR-DenseED seen in Figure 23 and 24 of the paper. === Distributed by: Notre Dame CICS (MIT Liscense) - Associated publication: url: http://www.sciencedirect.com/science/article/pii/S0021999119307612 doi: https://doi.org/10.10...
40.331797
156
0.607861
50af48438bae297240394d991fa8da9fe2e6279e
13,347
py
Python
ravens/agents/transporter_6dof.py
wx-b/ravens
249c316301d84fda10e0ce4ca99519d9a37a5059
[ "Apache-2.0" ]
294
2020-12-14T22:35:18.000Z
2022-03-26T19:06:00.000Z
ravens/agents/transporter_6dof.py
wx-b/ravens
249c316301d84fda10e0ce4ca99519d9a37a5059
[ "Apache-2.0" ]
18
2020-12-18T03:54:50.000Z
2021-11-30T22:22:26.000Z
ravens/agents/transporter_6dof.py
wx-b/ravens
249c316301d84fda10e0ce4ca99519d9a37a5059
[ "Apache-2.0" ]
68
2020-12-15T21:19:49.000Z
2022-02-25T05:03:33.000Z
# coding=utf-8 # Copyright 2021 The Ravens Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
36.269022
92
0.645388
0912c1aa9c1ce375a8e828a5cb190ae9951e7b0a
21,751
py
Python
server/text/views.py
zackszhu/hack_sjtu_2017
8855beb72785da11164e6215f3a432f54c71d262
[ "MIT" ]
5
2017-05-07T03:36:25.000Z
2017-05-14T03:15:54.000Z
server/text/views.py
zackszhu/hack_sjtu_2017
8855beb72785da11164e6215f3a432f54c71d262
[ "MIT" ]
null
null
null
server/text/views.py
zackszhu/hack_sjtu_2017
8855beb72785da11164e6215f3a432f54c71d262
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.http import HttpResponse from django.http import HttpRequest from text.models import * from main.models import * import sys import json, re def articleUpload(request): # 0: article 1: points if r...
48.228381
185
0.594272
4eb71af0ec1747d8ac2b5286638294f50ea8371c
273
py
Python
src/comments/behaviors.py
Dmitry-Ship/django-social
3a4c0e8f803e7021a06787247f4b67475d5c5ce0
[ "MIT" ]
null
null
null
src/comments/behaviors.py
Dmitry-Ship/django-social
3a4c0e8f803e7021a06787247f4b67475d5c5ce0
[ "MIT" ]
null
null
null
src/comments/behaviors.py
Dmitry-Ship/django-social
3a4c0e8f803e7021a06787247f4b67475d5c5ce0
[ "MIT" ]
null
null
null
def commentable(model): class Commentable: def __init__(self): self.comment_model = model @property def comments(self): qs = self.comment_model.active.filter(target=self.id) return qs return Commentable
22.75
65
0.59707
5ec8bc8ea08df1172037d926b05b343004c47a04
5,189
py
Python
testing/directrunner.py
jweinraub/hippyvm
09c7643aaa1c4ade566e8681abd2543f12bf874c
[ "MIT" ]
289
2015-01-01T15:36:55.000Z
2022-03-27T00:22:27.000Z
testing/directrunner.py
jweinraub/hippyvm
09c7643aaa1c4ade566e8681abd2543f12bf874c
[ "MIT" ]
26
2015-01-21T16:34:41.000Z
2020-08-26T15:12:54.000Z
testing/directrunner.py
jweinraub/hippyvm
09c7643aaa1c4ade566e8681abd2543f12bf874c
[ "MIT" ]
35
2015-01-05T12:09:41.000Z
2022-03-16T09:30:16.000Z
import py import subprocess import re import tempfile from hippy.objects.instanceobject import W_InstanceObject from hippy.mapdict import Terminator from testing.runner import MockEngine class FakeClass(object): def __init__(self, name): self.name = name self.base_map = Terminator(self) r = re....
32.841772
80
0.571594
d9b2404b7633006be653eaa3fd2b5d0f7ed165fe
19,080
py
Python
iono_w1.py
SchizzoNational16/arpa_ionopi
3a44ea24361a4b2f9340450953cbccd7977dc43b
[ "MIT" ]
1
2018-12-12T17:45:13.000Z
2018-12-12T17:45:13.000Z
iono_w1.py
SchizzoNational16/arpa_ionopi
3a44ea24361a4b2f9340450953cbccd7977dc43b
[ "MIT" ]
null
null
null
iono_w1.py
SchizzoNational16/arpa_ionopi
3a44ea24361a4b2f9340450953cbccd7977dc43b
[ "MIT" ]
1
2020-08-17T10:07:36.000Z
2020-08-17T10:07:36.000Z
#!/usr/bin/python3 # pylint: disable=broad-except, line-too-long # -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright (c) 1995-2018, Ecometer s.n.c. # Author: Paolo Saudin. # # Desc : Sferalabs Iono Pi Custom Class # File : iono.py # # Date : 2020-02-06 11:30...
37.192982
109
0.487421
253f77910550830f012e2483647f0ba1b12958d8
8,079
py
Python
sunpy/util/util.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
sunpy/util/util.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
sunpy/util/util.py
s0nskar/sunpy
60ca4792ded4c3938a78da7055cf2c20e0e8ccfd
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import os import types import warnings from itertools import count import numpy as np from sunpy.extern import six from sunpy.extern.six.moves import map, zip __all__ = ['to_signed', 'unique', 'print_table', 'replacement_filename', 'merge',...
26.06129
86
0.549449
e728eb4e6fc6b5692d48ca844066489a68216462
13,023
py
Python
coffea/nanoevents/schemas/delphes.py
David-Simonetti-ND/coffea
ee0275272f9fbe137453bc37907a2308099f2947
[ "BSD-3-Clause" ]
77
2019-06-09T14:23:33.000Z
2022-03-22T21:34:01.000Z
coffea/nanoevents/schemas/delphes.py
David-Simonetti-ND/coffea
ee0275272f9fbe137453bc37907a2308099f2947
[ "BSD-3-Clause" ]
353
2019-06-05T23:54:39.000Z
2022-03-31T21:21:47.000Z
coffea/nanoevents/schemas/delphes.py
David-Simonetti-ND/coffea
ee0275272f9fbe137453bc37907a2308099f2947
[ "BSD-3-Clause" ]
71
2019-06-07T02:04:11.000Z
2022-03-05T21:03:45.000Z
from coffea.nanoevents import transforms from coffea.nanoevents.schemas.base import BaseSchema, zip_forms class DelphesSchema(BaseSchema): """Delphes schema builder The Delphes schema is built from all branches found in the supplied file, based on the naming pattern of the branches. The following additio...
43.848485
142
0.574138
e5f05381cdf9c486c234b62c3998fa514578d633
12,249
py
Python
docs/source/conf.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
docs/source/conf.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
4
2021-06-08T20:20:08.000Z
2022-03-11T23:30:22.000Z
docs/source/conf.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Cloudmesh Plan documentation build configuration file, created by # sphinx-quickstart on Wed Jun 12 14:38:11 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
30.931818
80
0.696628
b1d81b88b6834ea41a0767922ed1b29a68bbc530
3,117
py
Python
CIM14/CPSM/Equipment/LoadModel/SeasonDayTypeSchedule.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
58
2015-04-22T10:41:03.000Z
2022-03-29T16:04:34.000Z
CIM14/CPSM/Equipment/LoadModel/SeasonDayTypeSchedule.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
12
2015-08-26T03:57:23.000Z
2020-12-11T20:14:42.000Z
CIM14/CPSM/Equipment/LoadModel/SeasonDayTypeSchedule.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
35
2015-01-10T12:21:03.000Z
2020-09-09T08:18:16.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
38.012195
174
0.695541
d99057785617e1d3eb3693a396ada7e013063c44
315
py
Python
system/info.py
thinkstack-co/ConnectPyse
ded8b426250aee352598f33ad08b7bcc3c6a3017
[ "MIT" ]
23
2017-01-24T05:44:05.000Z
2021-11-26T17:08:01.000Z
system/info.py
thinkstack-co/ConnectPyse
ded8b426250aee352598f33ad08b7bcc3c6a3017
[ "MIT" ]
10
2017-01-14T21:11:10.000Z
2019-06-16T21:10:29.000Z
system/info.py
thinkstack-co/ConnectPyse
ded8b426250aee352598f33ad08b7bcc3c6a3017
[ "MIT" ]
16
2017-01-24T02:28:19.000Z
2021-07-13T17:23:22.000Z
from ..cw_model import CWModel class Info(CWModel): def __init__(self, json_dict=None): self.version = None # (String) self.isCloud = None # (Boolean) self.serverTimeZone = None # (String) # initialize object with json dict super().__init__(json_dict)
24.230769
47
0.603175
7fdb93883c08bd2bee2589080b8d741960f277e3
184
py
Python
imgresizer/__init__.py
Tumurtogtokh/ImgSizer
efe809d8df36cbdecd5cd53abb222777b0d5123e
[ "MIT" ]
1
2021-09-10T16:36:59.000Z
2021-09-10T16:36:59.000Z
imgresizer/__init__.py
Tumurtogtokh/ImgSizer
efe809d8df36cbdecd5cd53abb222777b0d5123e
[ "MIT" ]
9
2020-03-24T16:46:24.000Z
2022-03-11T23:42:37.000Z
imgresizer/__init__.py
Tumurtogtokh/ImgSizer
efe809d8df36cbdecd5cd53abb222777b0d5123e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # IMPORT local from .controller.image_sizer_controller import ImageSizerController from .model.image import Img from .view.cli_image_resizer import CommandLine
30.666667
67
0.804348
0601a96b380d6c58d1b2a1820a9ef74b57800dfe
425
py
Python
LeetCode/Dynamic Programming/560. Subarray Sum Equals K/solution.py
Ceruleanacg/Crack-Interview
994dc0eee2f576fc543c90b82398dc8d957cdf09
[ "MIT" ]
17
2018-09-04T15:51:30.000Z
2021-06-04T08:47:07.000Z
LeetCode/Dynamic Programming/560. Subarray Sum Equals K/solution.py
Ceruleanacg/Crack-Interview
994dc0eee2f576fc543c90b82398dc8d957cdf09
[ "MIT" ]
null
null
null
LeetCode/Dynamic Programming/560. Subarray Sum Equals K/solution.py
Ceruleanacg/Crack-Interview
994dc0eee2f576fc543c90b82398dc8d957cdf09
[ "MIT" ]
6
2018-11-03T09:36:25.000Z
2020-05-27T17:51:08.000Z
class Solution: def subarraySum(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ res = 0 num_nums = len(nums) dp = [sum(nums[:i + 1]) for i in range(num_nums)] for i in range(num_nums): if dp[i] == k: ...
19.318182
57
0.447059
69dc102f48db8916da642bc8d57fbd7c341a8615
2,556
py
Python
packages/w3af/w3af/core/data/kb/vuln_templates/utils.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
tools/w3af/w3af/core/data/kb/vuln_templates/utils.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
tools/w3af/w3af/core/data/kb/vuln_templates/utils.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
""" utils.py Copyright 2013 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hope that it wi...
29.72093
74
0.663146
c6b4f67463ddbf3331e866ea1fd28a8bfedaeb99
706
py
Python
galaxycloudrunner/rules/cloudlaunch_pulsar.py
CloudVE/wip-bursting-misc
b31879081136f9aca042a3926008bcee0ab71ca5
[ "MIT" ]
2
2019-05-09T16:28:52.000Z
2019-11-19T12:07:31.000Z
galaxycloudrunner/rules/cloudlaunch_pulsar.py
CloudVE/wip-bursting-misc
b31879081136f9aca042a3926008bcee0ab71ca5
[ "MIT" ]
1
2019-01-16T18:44:53.000Z
2019-01-16T18:44:53.000Z
galaxycloudrunner/rules/cloudlaunch_pulsar.py
CloudVE/wip-bursting-misc
b31879081136f9aca042a3926008bcee0ab71ca5
[ "MIT" ]
1
2019-01-16T18:31:58.000Z
2019-01-16T18:31:58.000Z
from galaxycloudrunner.runners.cl_pulsar_burst import get_destination def cloudlaunch_pulsar_burst(app, referrer, cloudlaunch_api_endpoint=None, cloudlaunch_api_token=None, pulsar_runner_id="pulsar", pu...
44.125
69
0.529745
d847556aac7d6bc5ea1fba65d5509bc78dd6ce21
580
py
Python
rlberry/agents/features/feature_map.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
86
2020-11-20T21:02:27.000Z
2022-03-07T14:57:40.000Z
rlberry/agents/features/feature_map.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
103
2020-11-17T12:31:21.000Z
2022-03-28T13:46:16.000Z
rlberry/agents/features/feature_map.py
riccardodv/rlberry
8bb03772cda1e13c57de0e1da7bc7356a3014cfb
[ "MIT" ]
20
2020-11-23T01:47:50.000Z
2022-03-25T07:45:24.000Z
from abc import ABC, abstractmethod class FeatureMap(ABC): """ Class representing a feature map, from (observation, action) pairs to numpy arrays. Attributes ---------- shape : tuple Shape of feature array. Methods -------- map() Maps a (observation, action) pair ...
19.333333
70
0.562069
929bc7a1e67bc661078fd95e2badd3f2727d7a58
6,910
py
Python
fuzzers/030-iob/process_rdb.py
cuijialang/prjxray
7ddd5f88e60c9876a6d7171b343c1c855239dc85
[ "ISC" ]
1
2020-05-15T03:26:22.000Z
2020-05-15T03:26:22.000Z
fuzzers/030-iob/process_rdb.py
cuijialang/prjxray
7ddd5f88e60c9876a6d7171b343c1c855239dc85
[ "ISC" ]
null
null
null
fuzzers/030-iob/process_rdb.py
cuijialang/prjxray
7ddd5f88e60c9876a6d7171b343c1c855239dc85
[ "ISC" ]
null
null
null
""" IOB bits are more complicated than can be easily expressed to segmaker. There are couple cases that need to be handled here: - There are some bits that are always set for IN-only ports, but are cleared selectively for OUT and INOUT ports. - There are bits per each IOSTANDARD, in addition to drive patterns. The...
32.139535
82
0.517656
aaac4f0baa5327cc28358b3b0babdebf56b337d3
227
py
Python
__init__.py
braxtonj/pylogprim
0b2accc629a7135cd19e5a4587addb4b37e3f996
[ "MIT" ]
1
2021-06-27T18:55:27.000Z
2021-06-27T18:55:27.000Z
__init__.py
braxtonj/pylogprim
0b2accc629a7135cd19e5a4587addb4b37e3f996
[ "MIT" ]
3
2021-06-28T03:50:49.000Z
2021-11-17T08:14:29.000Z
__init__.py
braxtonj/pylogprim
0b2accc629a7135cd19e5a4587addb4b37e3f996
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Set up developer logging using the environment variable PYLOGPRIM_DEV. May be overkill for such a small code base but why not. """ import os _DEV = True if 'PYLOGPRIM_DEV' in os.environ else False
25.222222
127
0.753304
bc7938e2c2ed20abd470966521d0a49cd5e92c91
4,979
py
Python
thumt/layers/rnn_cell.py
whr94621/THUMT
7a90191b74286f6fe4d6753d8cd5a9376fdadd62
[ "BSD-3-Clause" ]
145
2018-12-03T05:47:26.000Z
2022-02-25T07:55:52.000Z
THUMT-master/thumt/layers/rnn_cell.py
shawnkx/Fast-MoS
af54093c7368da34d6b709ab8aaf4fd2218348d8
[ "MIT" ]
11
2018-12-03T06:03:25.000Z
2021-11-16T12:18:59.000Z
THUMT-master/thumt/layers/rnn_cell.py
shawnkx/Fast-MoS
af54093c7368da34d6b709ab8aaf4fd2218348d8
[ "MIT" ]
24
2018-12-16T08:42:38.000Z
2021-07-13T04:08:47.000Z
# coding=utf-8 # Copyright 2018 The THUMT Authors from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from .nn import linear class LegacyGRUCell(tf.nn.rnn_cell.RNNCell): """ Groundhog's implementation of GRUCell :param num_un...
34.337931
79
0.650733
4df3f2a855f233023b9587fd00cc954d53a69705
8,577
py
Python
test/functional/wallet_labels.py
SecureChainFinance/SecureChainFinance
16f52929e302efec672e9357921209fa7fbe0aab
[ "MIT" ]
null
null
null
test/functional/wallet_labels.py
SecureChainFinance/SecureChainFinance
16f52929e302efec672e9357921209fa7fbe0aab
[ "MIT" ]
null
null
null
test/functional/wallet_labels.py
SecureChainFinance/SecureChainFinance
16f52929e302efec672e9357921209fa7fbe0aab
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test label RPCs. RPCs tested are: - getaddressesbylabel - listaddressgroupings - setlabel ...
41.434783
111
0.657106
40fe88b193ce5fbcf1cb77f95aef561379e91027
5,990
py
Python
caffe2/python/operator_test/cudnn_recurrent_test.py
shigengtian/caffe2
e19489d6acd17fea8ca98cd8e4b5b680e23a93c5
[ "Apache-2.0" ]
4
2020-09-17T11:50:17.000Z
2021-08-25T06:14:10.000Z
caffe2/python/operator_test/cudnn_recurrent_test.py
shigengtian/caffe2
e19489d6acd17fea8ca98cd8e4b5b680e23a93c5
[ "Apache-2.0" ]
null
null
null
caffe2/python/operator_test/cudnn_recurrent_test.py
shigengtian/caffe2
e19489d6acd17fea8ca98cd8e4b5b680e23a93c5
[ "Apache-2.0" ]
6
2020-10-16T13:28:31.000Z
2021-08-25T12:08:34.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import model_helper, workspace, core, rnn_cell from caffe2.proto import caffe2_pb2 from future.utils import viewitems import numpy as np import unitte...
38.896104
99
0.580134
46fb9e044e372cd66dc8298a50ba4b29d36a0879
666
py
Python
tests/utils/test_nice_path.py
rlynch-ironnet/mypy_boto3_builder
0904704ddc4c53078e69282d4a75be619ee2c8a1
[ "MIT" ]
null
null
null
tests/utils/test_nice_path.py
rlynch-ironnet/mypy_boto3_builder
0904704ddc4c53078e69282d4a75be619ee2c8a1
[ "MIT" ]
null
null
null
tests/utils/test_nice_path.py
rlynch-ironnet/mypy_boto3_builder
0904704ddc4c53078e69282d4a75be619ee2c8a1
[ "MIT" ]
null
null
null
from unittest.mock import MagicMock, patch from mypy_boto3_builder.utils.nice_path import NicePath class TestNicePath: @patch("mypy_boto3_builder.utils.nice_path.Path") def test_init(self, PathMock: MagicMock) -> None: path_mock = MagicMock() path_mock.as_posix.return_value = "absolute" ...
37
66
0.717718
199c4e492ab51d2cdafa59f44af452349ed98e6f
625
py
Python
RevVowelsOfString.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
14
2020-10-15T21:47:18.000Z
2021-12-01T06:06:51.000Z
RevVowelsOfString.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
null
null
null
RevVowelsOfString.py
vanigupta20024/Programming-Challenges
578dba33e9f6b04052a503bcb5de9b32f33494a5
[ "MIT" ]
4
2020-06-15T14:40:45.000Z
2021-06-15T06:22:03.000Z
''' Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both cases. Example 1: Input: s = "hello" Output: "holle" ''' class Solution: def reverseVowels(self, s: str) -> str: vowels = ['a', 'e', 'i', 'o', 'u', 'A', '...
26.041667
78
0.44
c49fe9d46d1e0e8a9234b635af696e30b2e3a8b6
30,011
py
Python
corehq/apps/linked_domain/tests/test_linked_apps.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/linked_domain/tests/test_linked_apps.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/apps/linked_domain/tests/test_linked_apps.py
satyaakam/commcare-hq
233f255ff20ab3a16013e9fdfdb9c1dcf632e415
[ "BSD-3-Clause" ]
null
null
null
import os import uuid from django.test.testcases import TestCase from couchdbkit.exceptions import ResourceNotFound from lxml import etree from mock import patch from corehq.apps.app_manager.exceptions import AppEditingError from corehq.apps.app_manager.models import ( Application, LinkedApplication, Mod...
47.712242
120
0.717604
52c259344feb4e1e630e8eb4afca609aca58c5c4
806
py
Python
gitlabform/gitlab/__init__.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
gitlabform/gitlab/__init__.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
gitlabform/gitlab/__init__.py
rbartuzel/gitlabform
4027ef4d6bbbef7313ed6fcf07cef8fd1ad76d18
[ "MIT" ]
null
null
null
from gitlabform.gitlab.branches import GitLabBranches from gitlabform.gitlab.commits import GitLabCommits from gitlabform.gitlab.groups import GitLabGroups from gitlabform.gitlab.merge_requests import GitLabMergeRequests from gitlabform.gitlab.projects import GitLabProjects from gitlabform.gitlab.repositories import Gi...
47.411765
116
0.862283
458618f602a81f4fe5452c0f155401b983a3e5a1
11,341
py
Python
GANs/pix2pixHD/models.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
GANs/pix2pixHD/models.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
null
null
null
GANs/pix2pixHD/models.py
shikisawamura/nnabla-examples
baf4e4cc620dedbf4368683325c0fb868676850d
[ "Apache-2.0" ]
1
2020-04-25T06:11:28.000Z
2020-04-25T06:11:28.000Z
# Copyright (c) 2019 Sony Corporation. 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 applicabl...
36.349359
108
0.608765
36560007f95e32ecd7db2c6f0671bb4eb4a7398b
2,072
py
Python
examples/run_ba.py
kivancguckiran/NiaPy
06d3699c1466bfc54c4220a4aabe97cad50f75e4
[ "MIT" ]
2
2018-10-07T08:41:44.000Z
2019-04-05T15:30:56.000Z
examples/run_ba.py
kivancguckiran/NiaPy
06d3699c1466bfc54c4220a4aabe97cad50f75e4
[ "MIT" ]
null
null
null
examples/run_ba.py
kivancguckiran/NiaPy
06d3699c1466bfc54c4220a4aabe97cad50f75e4
[ "MIT" ]
null
null
null
# This is temporary fix to import module from parent folder # It will be removed when package is published on PyPI import sys sys.path.append('../') # End of fix import random import logging from NiaPy import Runner from NiaPy.benchmarks import Griewank logging.basicConfig() logger = logging.getLogger('examples') log...
28.383562
125
0.67471
4b6dfe318840cbe2c4d496971d025742b945933e
1,271
py
Python
test/helpers/test_mac.py
NexSabre/scapy_helper
8c239bad4e081e3f2f47ec2c152a689a10ff78d0
[ "MIT" ]
1
2020-12-30T09:21:33.000Z
2020-12-30T09:21:33.000Z
test/helpers/test_mac.py
NexSabre/scapy_helper
8c239bad4e081e3f2f47ec2c152a689a10ff78d0
[ "MIT" ]
4
2021-01-13T18:23:41.000Z
2021-10-19T19:40:41.000Z
test/helpers/test_mac.py
NexSabre/scapy_helper
8c239bad4e081e3f2f47ec2c152a689a10ff78d0
[ "MIT" ]
null
null
null
from unittest import TestCase from scapy_helper.helpers.mac import int2mac, mac2int MAX_VALUE_FOR_MAC = 281474976710655 TOO_BIG_INT_FOR_MAC = 281474976710657 TOO_SMALL_INT_FOR_MAC = -1 class TestMac(TestCase): def setUp(self): self.int_mac = 73596036829 self.str_mac = "00:11:22:AA:66:DD" de...
30.261905
87
0.688434
aeb6fdaf5e9d0116248ecd48469a0540d3fcbbfc
3,253
py
Python
src/training/zero_shot.py
jplasser/cloob
8a16009440f8e8eb9acba8fbb046180719003b28
[ "MIT" ]
44
2021-10-30T06:20:59.000Z
2022-03-29T10:26:11.000Z
src/training/zero_shot.py
afiaka87/cloob
d1c0fa166f4e8c42eba3fcd133caa2477b331860
[ "MIT" ]
9
2021-11-03T04:23:49.000Z
2022-03-31T15:48:17.000Z
src/training/zero_shot.py
afiaka87/cloob
d1c0fa166f4e8c42eba3fcd133caa2477b331860
[ "MIT" ]
3
2021-12-29T22:08:25.000Z
2022-02-10T19:27:45.000Z
from tqdm import tqdm import torch import clip.clip as clip from .zeroshot_data import imagenet_classnames, imagenet_templates import logging def zero_shot_classifier(model, classnames, templates, args): with torch.no_grad(): zeroshot_weights = [] for classname in tqdm(classnames): te...
35.358696
100
0.624039
e65454ed5bb500b78802bbfe09b733bb28662bec
1,621
py
Python
src/sentry/api/serializers/models/sentry_app.py
kinghuang/sentry
5c22673994a62f54a782d1c595852986ccc51ae9
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
src/sentry/api/serializers/models/sentry_app.py
kinghuang/sentry
5c22673994a62f54a782d1c595852986ccc51ae9
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/serializers/models/sentry_app.py
kinghuang/sentry
5c22673994a62f54a782d1c595852986ccc51ae9
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry.app import env from sentry.auth.superuser import is_active_superuser from sentry.api.serializers import Serializer, register from sentry.models import SentryApp from sentry.models.sentryapp import MASKED_VALUE @register(SentryApp) class SentryAppSerializer(Serialize...
34.489362
93
0.592227
6c0663db0386c5169fc33eba93496483ec1bb657
844
py
Python
tests/integration/preprocessing/test_param_cleaner.py
andreamalhera/perfSky
f0f02647a1a35ea7faf3bdb414ddf68b6e0ac00f
[ "MIT" ]
null
null
null
tests/integration/preprocessing/test_param_cleaner.py
andreamalhera/perfSky
f0f02647a1a35ea7faf3bdb414ddf68b6e0ac00f
[ "MIT" ]
null
null
null
tests/integration/preprocessing/test_param_cleaner.py
andreamalhera/perfSky
f0f02647a1a35ea7faf3bdb414ddf68b6e0ac00f
[ "MIT" ]
null
null
null
import pandas as pd from perfSky.preprocessing.param_cleaner import run_param_cleaner # TODO: Move this path to a config file LUIGI_LOG_PATH = './tests/data/input_test_param_cleaner.csv' def test_run_param_cleaner(): df = pd.read_csv(LUIGI_LOG_PATH, index_col=0) df['activity_before'] = df['activity'] df['...
52.75
143
0.735782
534966efce2d8774ecff18e1e31f27c4b700247b
9,225
py
Python
spade-caos/options/fcn_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
54
2020-09-09T09:07:48.000Z
2022-03-15T12:19:56.000Z
spade-caos/options/fcn_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
12
2020-10-27T17:40:40.000Z
2021-09-06T21:10:32.000Z
spade-caos/options/fcn_options.py
DaBaiTuuu/SynthCP
42b6e6185f572dd1bf82bba2878014f5283dbe27
[ "MIT" ]
8
2020-10-12T09:28:01.000Z
2021-04-21T14:43:28.000Z
""" Copyright (C) 2019 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). """ import sys import argparse import os from util import util import torch import models import data import pickle class BaseOptions(): def _...
51.536313
283
0.647913
bb32d2a71b552bc22ac6a5f73052347db4bb7c93
3,321
py
Python
flash/text/seq2seq/summarization/model.py
zlapp/lightning-flash
d0e6ee65419e140ea7894f1c03a5955919d66310
[ "Apache-2.0" ]
2
2021-04-23T11:02:21.000Z
2021-04-23T11:22:19.000Z
flash/text/seq2seq/summarization/model.py
zlapp/lightning-flash
d0e6ee65419e140ea7894f1c03a5955919d66310
[ "Apache-2.0" ]
null
null
null
flash/text/seq2seq/summarization/model.py
zlapp/lightning-flash
d0e6ee65419e140ea7894f1c03a5955919d66310
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
41
105
0.68925
fb684cde66c80c6e91dee7787f5d5f8052648c5c
3,306
py
Python
lyrebird/utils.py
tomoyachen/lyrebird
15bbab19a8666d7d9dc347df19065d9a99d6ccdc
[ "MIT" ]
1
2021-11-21T09:46:27.000Z
2021-11-21T09:46:27.000Z
lyrebird/utils.py
tomoyachen/lyrebird
15bbab19a8666d7d9dc347df19065d9a99d6ccdc
[ "MIT" ]
null
null
null
lyrebird/utils.py
tomoyachen/lyrebird
15bbab19a8666d7d9dc347df19065d9a99d6ccdc
[ "MIT" ]
null
null
null
import re import os import math import time import socket import tarfile import requests from pathlib import Path from contextlib import closing def convert_size(size_bytes): if size_bytes == 0: return "0B" size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") i = int(math.floor(math.l...
27.781513
92
0.645493
12828bd8d88db08d4f2d36dc3c3406c925685b92
1,037
py
Python
jdcloud_sdk/services/ydsms/client/YdsmsClient.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
null
null
null
jdcloud_sdk/services/ydsms/client/YdsmsClient.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
null
null
null
jdcloud_sdk/services/ydsms/client/YdsmsClient.py
Tanc009/jdcloud-sdk-python
8b045c99bc5b73ca7348e950b6f01e03a27982f5
[ "Apache-2.0" ]
null
null
null
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
34.566667
87
0.745419
9085918773142cf7023016696c8781834069e2be
1,071
py
Python
horizon/openstack_dashboard/dashboards/network/routers/panel.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/network/routers/panel.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
horizon/openstack_dashboard/dashboards/network/routers/panel.py
yianjiajia/openstack_horizon
9e36a4c3648ef29d0df6912d990465f51d6124a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2012, Nachi Ueno, NTT MCL, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
34.548387
78
0.741363
08838814b6ffef08b0b634dbe285631f4437b3c1
10,003
py
Python
gmssl/sm2.py
KyrinCode/python-sdk
57dd02388d6b8552ad346d72838c2fd8177fec65
[ "MIT" ]
61
2019-07-03T07:40:17.000Z
2022-03-06T13:30:53.000Z
gmssl/sm2.py
KyrinCode/python-sdk
57dd02388d6b8552ad346d72838c2fd8177fec65
[ "MIT" ]
105
2019-07-25T08:48:59.000Z
2022-03-23T03:47:34.000Z
gmssl/sm2.py
KyrinCode/python-sdk
57dd02388d6b8552ad346d72838c2fd8177fec65
[ "MIT" ]
61
2019-07-03T06:58:42.000Z
2022-02-16T08:50:14.000Z
import binascii from random import choice from . import sm3, func # 选择素域,设置椭圆曲线参数 default_ecc_table = { 'n': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123', 'p': 'FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF', 'g': '32c4ae2c1f1981195f9904466a39c9948fe30bbff2660be17...
37.890152
98
0.497451
e1998f7fc058d64a9348f94daf10c63c8e330a2a
32,535
py
Python
forte/data/multi_pack.py
KGerring/forte
7dc6e6c7d62d9a4126bdfc5ca02d15be3ffd61ca
[ "Apache-2.0" ]
null
null
null
forte/data/multi_pack.py
KGerring/forte
7dc6e6c7d62d9a4126bdfc5ca02d15be3ffd61ca
[ "Apache-2.0" ]
1
2022-02-23T23:21:03.000Z
2022-02-23T23:21:03.000Z
forte/data/multi_pack.py
KGerring/forte
7dc6e6c7d62d9a4126bdfc5ca02d15be3ffd61ca
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Forte 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 ...
35.211039
97
0.609805
1be0ce5fb74a2f06d95efc39be7d466067a6affd
269
py
Python
filprofiler/tests/test_utils.py
whalesalad/filprofiler
9c12cbe62ad1fed5d59d923013739bb3377bc24c
[ "Apache-2.0" ]
521
2020-06-18T14:27:22.000Z
2022-03-30T08:29:10.000Z
filprofiler/tests/test_utils.py
whalesalad/filprofiler
9c12cbe62ad1fed5d59d923013739bb3377bc24c
[ "Apache-2.0" ]
277
2020-06-18T14:11:36.000Z
2022-03-28T09:51:11.000Z
filprofiler/tests/test_utils.py
sthagen/python-filprofiler
5efe9fcca539d31f5423bbfa39a3f49176925350
[ "Apache-2.0" ]
17
2020-06-26T05:29:43.000Z
2022-03-28T09:57:08.000Z
"""Tests for filprofiler._utils.""" import os from .._utils import library_path def test_library_path(): """The library is found and has the right suffix.""" path = library_path("_filpreload") assert os.path.exists(path) assert path.endswith(".so")
20.692308
56
0.695167
4e3369cd563c854f712e38af5c45a759d8b51545
9,710
py
Python
pyevr/openapi_client/models/sales_contract.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
3
2020-04-18T19:45:51.000Z
2022-03-01T19:48:11.000Z
pyevr/openapi_client/models/sales_contract.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
39
2019-11-16T01:35:35.000Z
2021-11-18T12:58:41.000Z
pyevr/openapi_client/models/sales_contract.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
null
null
null
# coding: utf-8 """ EVR API OpenAPI Generator'i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501 The version of the OpenAPI document: 1.8.0 Generated by: https://openapi-generator.tech """ impor...
34.928058
195
0.637384
97cfece1ab758f16deffc407e062cee3e3b58e09
24,678
py
Python
lockss_poller/api_client.py
lockss/lockss-poller-python
bb9aa4c9425a77a17b3ae17b51207da28ece7727
[ "BSD-3-Clause" ]
null
null
null
lockss_poller/api_client.py
lockss/lockss-poller-python
bb9aa4c9425a77a17b3ae17b51207da28ece7727
[ "BSD-3-Clause" ]
null
null
null
lockss_poller/api_client.py
lockss/lockss-poller-python
bb9aa4c9425a77a17b3ae17b51207da28ece7727
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ LOCKSS Poller Service REST API API of the LOCKSS Poller REST Service # noqa: E501 OpenAPI spec version: 1.0.0 Contact: lockss-support@lockss.org Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import datetime import...
39.296178
96
0.550531
3cbd7fdd515cac0dab67d021b61cf780a0dae63b
2,156
py
Python
sandbox/gkahn/gcg/utils/utils.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
120
2017-10-02T07:16:40.000Z
2022-02-16T15:37:43.000Z
sandbox/gkahn/gcg/utils/utils.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
7
2018-06-06T11:24:46.000Z
2020-01-27T11:56:47.000Z
sandbox/gkahn/gcg/utils/utils.py
ICRA-2018/gcg
b1027f7e65660d3782f927119f6a75394c30cc47
[ "MIT" ]
40
2017-11-14T20:21:23.000Z
2021-03-09T14:49:30.000Z
import time from collections import defaultdict import scipy import numpy as np ############## ### Timing ### ############## class TimeIt(object): def __init__(self, prefix=''): self.prefix = prefix self.start_times = dict() self.elapsed_times = defaultdict(int) def start(self, name):...
26.617284
97
0.538497
230769d0a5cbdb54e1aaef0ef8580280f49d13e2
2,853
py
Python
sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2020-03-03T23:11:13.000Z
2020-03-30T18:50:55.000Z
sdk/hybridcompute/azure-mgmt-hybridcompute/setup.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-05-19T02:55:10.000Z
2021-05-19T02:55:10.000Z
#!/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. #----------------------------------------------------------------...
32.420455
91
0.604977
09a18e07dc40e7c8544421e68224228a167128d7
862
py
Python
backend/salary_calculator/serializers.py
szypkiwonsz/Work-Hours
e125569b7f0ca0d154000fb76aa358486e3d6f4d
[ "MIT" ]
null
null
null
backend/salary_calculator/serializers.py
szypkiwonsz/Work-Hours
e125569b7f0ca0d154000fb76aa358486e3d6f4d
[ "MIT" ]
null
null
null
backend/salary_calculator/serializers.py
szypkiwonsz/Work-Hours
e125569b7f0ca0d154000fb76aa358486e3d6f4d
[ "MIT" ]
null
null
null
from rest_framework import serializers from salary_calculator.models import Day, Salary, Payout class DaySerializer(serializers.ModelSerializer): """Serializer for the Day model.""" user = serializers.HiddenField(default=serializers.CurrentUserDefault()) # saving the owner as the logged in user class M...
29.724138
118
0.698376
8808c47eddedfbf35e62f67e4f63b0a6cda44a2f
2,167
py
Python
Lib/test/test_sundry.py
deadsnakes/python3.3
4faaf44cd5478410ac3b977351c1965fa054b5e9
[ "PSF-2.0" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
Lib/test/test_sundry.py
deadsnakes/python3.3
4faaf44cd5478410ac3b977351c1965fa054b5e9
[ "PSF-2.0" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
check-python33-manual/samples/standard_library_337/Lib/test/test_sundry.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
"""Do a minimal test of all the modules that aren't otherwise tested.""" from test import support import sys import unittest class TestUntestedModules(unittest.TestCase): def test_at_least_import_untested_modules(self): with support.check_warnings(quiet=True): import bdb import cgi...
33.338462
72
0.620212
cd16d773403a2b3c90e5ba8e5f7c131d3b5b2813
4,816
py
Python
evaluation/kong/first_run_gear_images.py
seveirbian/gear-old
8d3529a9bf42e652a9d7475c9d14e9a6afc69a76
[ "Apache-2.0" ]
null
null
null
evaluation/kong/first_run_gear_images.py
seveirbian/gear-old
8d3529a9bf42e652a9d7475c9d14e9a6afc69a76
[ "Apache-2.0" ]
null
null
null
evaluation/kong/first_run_gear_images.py
seveirbian/gear-old
8d3529a9bf42e652a9d7475c9d14e9a6afc69a76
[ "Apache-2.0" ]
null
null
null
import sys # package need to be installed, pip install docker import docker import time import yaml import os import random import subprocess import signal import urllib2 import shutil import xlwt # package need to be installed, pip install cassandra-driver from cassandra.cluster import Cluster auto = False private_...
27.678161
109
0.538621
fa4e6e974aa6810d632015e6732a19a03506fd2f
8,993
py
Python
mrcnn/config.py
ishank26/calorie_estimation
9aeb63f57604bb0b56d511f75d28aeff94861e39
[ "MIT" ]
null
null
null
mrcnn/config.py
ishank26/calorie_estimation
9aeb63f57604bb0b56d511f75d28aeff94861e39
[ "MIT" ]
null
null
null
mrcnn/config.py
ishank26/calorie_estimation
9aeb63f57604bb0b56d511f75d28aeff94861e39
[ "MIT" ]
1
2019-11-07T18:39:14.000Z
2019-11-07T18:39:14.000Z
""" Mask R-CNN Base Configurations class. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import numpy as np # Base Configuration Class # Don't use this class directly. Instead, sub-class it and override # the configurations you need to chan...
38.930736
84
0.689314
b7e89b6044f7f7240447b664d25887c3b290298a
5,615
py
Python
design/wfg_drive_spi/testbench/test_wfg_drive_spi.py
semify-eda/waveform-generator
e8045ba78f4d9a98d4fc94f528c8a51f8ff751fb
[ "Apache-2.0" ]
3
2022-02-16T16:29:09.000Z
2022-02-16T16:29:54.000Z
design/wfg_drive_spi/testbench/test_wfg_drive_spi.py
semify-eda/waveform-generator
e8045ba78f4d9a98d4fc94f528c8a51f8ff751fb
[ "Apache-2.0" ]
null
null
null
design/wfg_drive_spi/testbench/test_wfg_drive_spi.py
semify-eda/waveform-generator
e8045ba78f4d9a98d4fc94f528c8a51f8ff751fb
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: © 2022 semify <office@semify-eda.com> # SPDX-License-Identifier: Apache-2.0 import os import cocotb from cocotb.clock import Clock from cocotb.regression import TestFactory from cocotb.triggers import Timer, RisingEdge, FallingEdge from cocotbext.wishbone.driver import WishboneMaster from coc...
34.875776
129
0.637044
b8edca5d1c3356052fb5c7e9da61b8c143c8cc90
1,182
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwIllanovelsCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwIllanovelsCom.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractWwwIllanovelsCom.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractWwwIllanovelsCom(item): ''' Parser for 'www.illanovels.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('my little happiness', 'my little happiness', 'tr...
43.777778
104
0.516074
5a838cfc805049a4a8e3c1d5118ddd412bded129
3,728
py
Python
homeassistant/auth/models.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
6
2017-08-02T19:26:39.000Z
2020-03-14T22:47:41.000Z
homeassistant/auth/models.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
56
2020-08-03T07:30:54.000Z
2022-03-31T06:02:04.000Z
homeassistant/auth/models.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Auth models.""" from datetime import datetime, timedelta import secrets from typing import Dict, List, NamedTuple, Optional import uuid import attr from homeassistant.util import dt as dt_util from . import permissions as perm_mdl from .const import GROUP_ID_ADMIN TOKEN_TYPE_NORMAL = "normal" TOKEN_TYPE_SYSTEM =...
28.899225
86
0.671674
af759d1165ac7968fd870fe431d2e751c2e197b2
271
py
Python
hiku/typedef/types.py
brabadu/hiku
02604ffa96a76d5b5254ec1b1b7895d99da0a963
[ "BSD-3-Clause" ]
58
2016-01-20T13:34:56.000Z
2021-06-08T07:27:14.000Z
hiku/typedef/types.py
evo-company/hiku
9e243a057ee96cbcc9c876463e1fbbd0b1402e96
[ "BSD-3-Clause" ]
52
2016-01-16T12:40:05.000Z
2021-07-23T17:52:44.000Z
hiku/typedef/types.py
evo-company/hiku
9e243a057ee96cbcc9c876463e1fbbd0b1402e96
[ "BSD-3-Clause" ]
14
2016-01-15T12:34:28.000Z
2021-08-11T12:57:18.000Z
from ..types import TypingMeta class TypeDefMeta(TypingMeta): def __cls_init__(cls, params): cls.__type_name__, cls.__type__ = params def accept(cls, visitor): return visitor.visit_typedef(cls) class TypeDef(metaclass=TypeDefMeta): pass
18.066667
48
0.708487
c2c03f58c467828b5764834bc89f366b2b6b840c
714
py
Python
mathgenerator/funcs/geometry/surface_area_cone.py
Sankari-K/mathgenerator
712c74fbe34fe594c4c0f7e3b3057b01d85112ba
[ "MIT" ]
40
2020-10-14T17:29:51.000Z
2020-11-01T04:41:03.000Z
mathgenerator/funcs/geometry/surface_area_cone.py
Sankari-K/mathgenerator
712c74fbe34fe594c4c0f7e3b3057b01d85112ba
[ "MIT" ]
209
2020-10-14T15:32:08.000Z
2020-11-03T19:08:19.000Z
mathgenerator/funcs/geometry/surface_area_cone.py
Sankari-K/mathgenerator
712c74fbe34fe594c4c0f7e3b3057b01d85112ba
[ "MIT" ]
179
2020-10-14T15:36:55.000Z
2020-10-29T19:26:16.000Z
from .__init__ import * def gen_func(maxRadius=20, maxHeight=50, unit='m', format='string'): a = random.randint(1, maxHeight) b = random.randint(1, maxRadius) slopingHeight = math.sqrt(a**2 + b**2) ans = int(math.pi * b * slopingHeight + math.pi * b * b) if format == 'string': problem = ...
31.043478
91
0.586835
fd84775b1da9cd6e824eab28632f915e99359afc
4,359
py
Python
Models code/Hi-MAP/onmt/encoders/rnn_encoder_hi.py
ESCM-summarization/ESCM-summary-evaluation
3780b51f0ed44cbbea3f163a871d875f1e5e9393
[ "MIT" ]
null
null
null
Models code/Hi-MAP/onmt/encoders/rnn_encoder_hi.py
ESCM-summarization/ESCM-summary-evaluation
3780b51f0ed44cbbea3f163a871d875f1e5e9393
[ "MIT" ]
null
null
null
Models code/Hi-MAP/onmt/encoders/rnn_encoder_hi.py
ESCM-summarization/ESCM-summary-evaluation
3780b51f0ed44cbbea3f163a871d875f1e5e9393
[ "MIT" ]
null
null
null
"""Define RNN-based encoders.""" from __future__ import division import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence as pack from torch.nn.utils.rnn import pad_packed_sequence as unpack from onmt.encoders.encoder import EncoderBase from onmt.utils.rnn_factory imp...
37.25641
124
0.590273
7fa4c42065dab584d57e8ee28d675f60941e9e64
11,407
py
Python
lib/spack/spack/multimethod.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
lib/spack/spack/multimethod.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
lib/spack/spack/multimethod.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """This module contains utilities for using multi-methods in spack. You can think of multi-methods like overloaded methods...
39.334483
84
0.637766
ef4e987aa816778c6cf24e06bab04194e5a307f3
1,933
py
Python
sysinv/sysinv/sysinv/sysinv/helm/rabbitmq.py
oponcea/ceph-uprev-stx-config
4225f10257238f3ba2576e2a16cc5c2a8c99ef49
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/helm/rabbitmq.py
oponcea/ceph-uprev-stx-config
4225f10257238f3ba2576e2a16cc5c2a8c99ef49
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/helm/rabbitmq.py
oponcea/ceph-uprev-stx-config
4225f10257238f3ba2576e2a16cc5c2a8c99ef49
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from sysinv.common import constants from sysinv.common import exception from sysinv.openstack.common import log as logging from sysinv.helm import common from sysinv.helm import openstack LOG = logging.getLogger(__name__) clas...
28.014493
69
0.577341
7ce7f8a2f3e3a7d5f84e703062d0f1ccdea04a44
1,014
py
Python
apps/base/tokens.py
picsldev/pyerp
e998e3e99a4e45033d54a6b1df50697f7288f67f
[ "MIT" ]
null
null
null
apps/base/tokens.py
picsldev/pyerp
e998e3e99a4e45033d54a6b1df50697f7288f67f
[ "MIT" ]
null
null
null
apps/base/tokens.py
picsldev/pyerp
e998e3e99a4e45033d54a6b1df50697f7288f67f
[ "MIT" ]
null
null
null
"""Generador del tokens para el registro de usuarios """ # Librerias Django from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.utils import six class AccountActivacionTokenGenerator(PasswordResetTokenGenerator): """Esta clase genera un token que se envía en correo para validadar el ...
31.6875
74
0.72288
223036c80a4938abaa1bd7b9983696c87ceabc1e
1,392
py
Python
vol6/integer-to-english-words/integer-to-english-words.py
zeyuanxy/LeetCode
fab1b6ea07249d7024f37a8f4bbef9d397edc3ec
[ "MIT" ]
3
2015-12-07T05:40:08.000Z
2018-12-17T18:39:15.000Z
vol6/integer-to-english-words/integer-to-english-words.py
zeyuanxy/leet-code
fab1b6ea07249d7024f37a8f4bbef9d397edc3ec
[ "MIT" ]
null
null
null
vol6/integer-to-english-words/integer-to-english-words.py
zeyuanxy/leet-code
fab1b6ea07249d7024f37a8f4bbef9d397edc3ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Zeyuan Shang # @Date: 2015-11-06 21:35:56 # @Last Modified by: Zeyuan Shang # @Last Modified time: 2015-11-06 21:36:07 class Solution(object): def numberToWords(self, num): """ :type num: int :rtype: str """ if num ...
39.771429
117
0.454741
d0baead469a225de36127bff76d605f2c780cd66
3,360
py
Python
scan_network_nodes.py
PinkNextDev/AurochsNode
affd1659a5f1eeab859ec54d843ee1c5d583d796
[ "MIT" ]
null
null
null
scan_network_nodes.py
PinkNextDev/AurochsNode
affd1659a5f1eeab859ec54d843ee1c5d583d796
[ "MIT" ]
null
null
null
scan_network_nodes.py
PinkNextDev/AurochsNode
affd1659a5f1eeab859ec54d843ee1c5d583d796
[ "MIT" ]
null
null
null
""" Program connects to list of hardcoded nodes and asks them for their peers. After that it uses these peers to repeat the process. That way it builds list of all recently seen peers in the network. """ import json from asyncio import get_event_loop, ensure_future, gather from typing import Dict from pinkcoin.networ...
33.939394
98
0.629167