hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
ed58b3e938f78591c8eb769c53b5c6fe7f3ad615
4,435
py
Python
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_device_detail_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_device_detail_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_device_detail_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class ShowDeviceDetailRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the ...
27.042683
84
0.580834
ca7e01d52a54225465c4be0c0ccc45e69defff7b
2,145
py
Python
tests/handlers/test_widgets.py
pkuyangchao/redash
1640b1e927a4d10ce9ae5c24b2d015734c696b08
[ "BSD-2-Clause" ]
null
null
null
tests/handlers/test_widgets.py
pkuyangchao/redash
1640b1e927a4d10ce9ae5c24b2d015734c696b08
[ "BSD-2-Clause" ]
4
2020-06-18T15:31:02.000Z
2021-03-25T23:31:41.000Z
tests/handlers/test_widgets.py
pkuyangchao/redash
1640b1e927a4d10ce9ae5c24b2d015734c696b08
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from tests import BaseTestCase from redash import models class WidgetAPITest(BaseTestCase): def create_widget(self, dashboard, visualization, width=1): data = { 'visualization_id': visualization.id, 'dashboard_id': dashboard.id, ...
31.086957
101
0.616783
0bd5a33a4c97287b15afdb330c80677ee4aaee97
7,395
py
Python
ComputerVision/CrossSections/most_recent/Measusre.python3.py
DelinLi/Phenotyping
b4c13fbfcc363d06bc58c2483bd6aca979681cc3
[ "MIT" ]
null
null
null
ComputerVision/CrossSections/most_recent/Measusre.python3.py
DelinLi/Phenotyping
b4c13fbfcc363d06bc58c2483bd6aca979681cc3
[ "MIT" ]
null
null
null
ComputerVision/CrossSections/most_recent/Measusre.python3.py
DelinLi/Phenotyping
b4c13fbfcc363d06bc58c2483bd6aca979681cc3
[ "MIT" ]
null
null
null
#using python3 #Write by Delin Li, Schnable Lab @ CAU #delin.bio@gmail.com #Start 8:00 PM Jan 05, 2018 #updated 9:30 PM Jan 18, 2018 get rid of effect of white starch #updated 6:30 PM Jan 30, 2018 adjust unit import matplotlib matplotlib.use('Agg') from scipy.spatial import distance as dist from imutils import perspect...
32.721239
104
0.703989
935083c70402133eefecb16717f57860ea1ab87e
4,679
py
Python
alab_mutations.py
AlaaALatif/bjorn
3bc4c2b5b5f6b18c93513721f5df96c47ba68ec8
[ "MIT" ]
null
null
null
alab_mutations.py
AlaaALatif/bjorn
3bc4c2b5b5f6b18c93513721f5df96c47ba68ec8
[ "MIT" ]
null
null
null
alab_mutations.py
AlaaALatif/bjorn
3bc4c2b5b5f6b18c93513721f5df96c47ba68ec8
[ "MIT" ]
null
null
null
from path import Path import pandas as pd import bjorn_support as bs import mutations as bm import subprocess import shlex date = '13-01-2021' out_dir = Path(f'/home/al/analysis/alab_mutations_{date}') if not Path.isdir(out_dir): Path.mkdir(out_dir) print(f"Created results directory: {out_dir}") else: pri...
55.047059
134
0.767258
3c464e25fb35f21f9c3c6110e1d400e81a5fdb08
1,467
py
Python
shlibvischeck/analysis/header.py
yugr/ShlibVisibilityChecker
da0c3ba6d67bbf67085205be76985efe0af19e38
[ "MIT" ]
27
2018-05-15T11:55:44.000Z
2022-03-02T21:10:25.000Z
shlibvischeck/analysis/header.py
yugr/ShlibVisibilityChecker
da0c3ba6d67bbf67085205be76985efe0af19e38
[ "MIT" ]
3
2018-05-21T10:49:28.000Z
2022-01-11T18:53:21.000Z
shlibvischeck/analysis/header.py
yugr/ShlibVisibilityChecker
da0c3ba6d67bbf67085205be76985efe0af19e38
[ "MIT" ]
3
2018-05-21T10:31:46.000Z
2022-01-27T21:54:07.000Z
# The MIT License (MIT) # # Copyright 2020-2022 Yury Gribov # # Use of this source code is governed by MIT license that can be # found in the LICENSE.txt file. """ APIs for analyzing C headers """ import os import os.path import re from shlibvischeck.common.process import * from shlibvischeck.common.error import e...
24.45
80
0.625085
2ec8136353ae8fd5d69657fcc24d471a76ff0602
4,359
py
Python
tests/test_configs.py
q0w/aiodocker
08e8cd97cbe0fb7e38c97ac91df189e99879f885
[ "Apache-2.0" ]
330
2017-04-12T19:36:03.000Z
2022-03-29T09:24:53.000Z
tests/test_configs.py
q0w/aiodocker
08e8cd97cbe0fb7e38c97ac91df189e99879f885
[ "Apache-2.0" ]
623
2017-04-13T02:49:16.000Z
2022-03-29T12:21:48.000Z
tests/test_configs.py
romasku/aiodocker
daf32e791efea97a87744e5e66a90e478e0a8c2f
[ "Apache-2.0" ]
76
2017-04-22T08:00:18.000Z
2021-11-23T04:34:06.000Z
import pytest from aiodocker.exceptions import DockerError @pytest.fixture def tmp_config(event_loop, swarm, random_name): config = event_loop.run_until_complete( swarm.configs.create(name="config-" + random_name(), data=random_name()) ) yield config["ID"] event_loop.run_until_complete(swarm....
31.817518
80
0.690525
e7bc87d179881312f29567b73095edc9ccbc392d
1,392
py
Python
jrecommengine/random_ratings.py
joesonitaly/jrecommengine
f4ff432ae41bee89ad63341be6100ca1dd7ba6b5
[ "BSD-3-Clause" ]
null
null
null
jrecommengine/random_ratings.py
joesonitaly/jrecommengine
f4ff432ae41bee89ad63341be6100ca1dd7ba6b5
[ "BSD-3-Clause" ]
null
null
null
jrecommengine/random_ratings.py
joesonitaly/jrecommengine
f4ff432ae41bee89ad63341be6100ca1dd7ba6b5
[ "BSD-3-Clause" ]
null
null
null
from random import seed, randint from .config import * from .engine import * from .models import Like, Dislike, Similarity, Suggestion def setRandomRatings(): print("***** Starting *****\n") items = Item.objects.all() itemsLength = len(items) users = User.objects.all() engine = Engine() Like.ob...
24.421053
86
0.589799
27f67f66ff6ded739eb4bc0acc19efa43e7c9709
14,250
py
Python
src/utils.py
gtk-rs/release
7e7b65477145600b69c68557e9bf7827f46d3e2d
[ "MIT" ]
1
2020-07-05T14:41:31.000Z
2020-07-05T14:41:31.000Z
src/utils.py
gtk-rs/release
7e7b65477145600b69c68557e9bf7827f46d3e2d
[ "MIT" ]
80
2017-06-11T16:34:16.000Z
2022-02-11T09:02:12.000Z
src/utils.py
gtk-rs/release
7e7b65477145600b69c68557e9bf7827f46d3e2d
[ "MIT" ]
6
2017-05-07T20:33:04.000Z
2022-03-25T10:26:42.000Z
from os.path import join import json import subprocess import sys import time # pip3 install requests import requests # local import import consts from globals import PULL_REQUESTS from my_toml import TomlHandler def write_error(error_msg): sys.stderr.write('{}\n'.format(error_msg)) def write_msg(msg): sys....
38
100
0.580982
51192872a8a5c546544ff76518e70c7314d90391
6,923
py
Python
Adversarial-Playground-Text-viz/virt/lib/python3.6/site-packages/ebcli/core/abstractcontroller.py
AnupKumarGupta/deepWordBug
c6513e6421fa5204b07652fc3f619b1018696df2
[ "Apache-2.0" ]
72
2018-07-02T07:47:15.000Z
2022-03-29T10:02:14.000Z
Adversarial-Playground-Text-viz/virt/lib/python3.6/site-packages/ebcli/core/abstractcontroller.py
AnupKumarGupta/deepWordBug
c6513e6421fa5204b07652fc3f619b1018696df2
[ "Apache-2.0" ]
5
2018-07-12T10:55:46.000Z
2018-10-25T20:33:13.000Z
virtual_env/Lib/site-packages/ebcli/core/abstractcontroller.py
laubnyc/DommesticWebsite
ea4f00ae6998fbe3a8a264d528ad13e59be1fc5b
[ "MIT" ]
29
2018-09-17T06:10:32.000Z
2022-03-19T13:15:30.000Z
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
32.65566
101
0.602484
f505d3da3ebdecc63e3c211dbf9479e1ae473853
1,060
py
Python
corehq/apps/export/migrations/0011_defaultexportsettings_usecouchfiletypes.py
omari-funzone/commcare-hq
5edb462c891fc08e51c4babd7acdf12c0006a602
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/export/migrations/0011_defaultexportsettings_usecouchfiletypes.py
omari-funzone/commcare-hq
5edb462c891fc08e51c4babd7acdf12c0006a602
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/export/migrations/0011_defaultexportsettings_usecouchfiletypes.py
omari-funzone/commcare-hq
5edb462c891fc08e51c4babd7acdf12c0006a602
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
# Generated by Django 2.2.16 on 2021-01-12 17:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('export', '0010_defaultexportsettings'), ] operations = [ migrations.AlterField( model_name='defaultexportsettings', ...
35.333333
79
0.460377
0b6c14457bdc9c0916932d5f0e984ddaca2588a8
2,320
py
Python
CI/CA/CA.py
PiscesDream/Ideas
9ba710e62472f183ae4525f35659cd265c71392e
[ "Apache-2.0" ]
null
null
null
CI/CA/CA.py
PiscesDream/Ideas
9ba710e62472f183ae4525f35659cd265c71392e
[ "Apache-2.0" ]
null
null
null
CI/CA/CA.py
PiscesDream/Ideas
9ba710e62472f183ae4525f35659cd265c71392e
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy from numpy import ones_like, array, zeros import matplotlib.pyplot as plt class CA(object): ''' Cellular Automata with: Numerical grid Circular/Null boundary Moore neighbourhood ''' def __init__(self, init, radius, rule, circular = ...
35.692308
112
0.474569
5450e632b49e22219f280e4ba7d22a7767c25d54
33,394
py
Python
storm_analysis/sa_library/dao_fit_c.py
KimLab-SNU/storm-analysis-kimlab
31944769cdaa82a9ea5779b66c75d1d651852dc7
[ "CNRI-Python" ]
null
null
null
storm_analysis/sa_library/dao_fit_c.py
KimLab-SNU/storm-analysis-kimlab
31944769cdaa82a9ea5779b66c75d1d651852dc7
[ "CNRI-Python" ]
null
null
null
storm_analysis/sa_library/dao_fit_c.py
KimLab-SNU/storm-analysis-kimlab
31944769cdaa82a9ea5779b66c75d1d651852dc7
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/env python """ Python interface to the dao_fit C library. Hazen """ import ctypes import math import numpy from numpy.ctypeslib import ndpointer import os import sys import storm_analysis.sa_library.ia_utilities_c as utilC import storm_analysis.sa_library.loadclib as loadclib # # The Python definitions ...
39.011682
111
0.576301
8ca47055aafd0b0723958da7dab151cfb8b33fb5
8,481
py
Python
src/backend/AdcpTerminal.py
rowetechinc/River_electron
3897a8cae56241a64ea7167b3f3699fb5d392429
[ "MIT" ]
null
null
null
src/backend/AdcpTerminal.py
rowetechinc/River_electron
3897a8cae56241a64ea7167b3f3699fb5d392429
[ "MIT" ]
null
null
null
src/backend/AdcpTerminal.py
rowetechinc/River_electron
3897a8cae56241a64ea7167b3f3699fb5d392429
[ "MIT" ]
1
2020-12-22T16:57:23.000Z
2020-12-22T16:57:23.000Z
import rti_python.Comm.adcp_serial_port as adcp_serial import rti_python.Writer.rti_binary as RtiBinaryWriter import threading import time import serial import logging from obsub import event from threading import Lock from rti_python.Utilities.config import RtiConfig class AdcpTerminalVM: """ Setup a view to...
29.757895
124
0.570687
7051380b739a3624583e0f99bd2dd4cb5788bd66
7,579
py
Python
tests/pytorch_pfn_extras_tests/training_tests/extensions_tests/test_evaluator.py
sergeant-wizard/pytorch-pfn-extras
221c07aedb9d88e4b96b55da49f6c104f631e01a
[ "MIT" ]
null
null
null
tests/pytorch_pfn_extras_tests/training_tests/extensions_tests/test_evaluator.py
sergeant-wizard/pytorch-pfn-extras
221c07aedb9d88e4b96b55da49f6c104f631e01a
[ "MIT" ]
null
null
null
tests/pytorch_pfn_extras_tests/training_tests/extensions_tests/test_evaluator.py
sergeant-wizard/pytorch-pfn-extras
221c07aedb9d88e4b96b55da49f6c104f631e01a
[ "MIT" ]
null
null
null
import numpy import pytest import torch import pytorch_pfn_extras as ppe class DummyModel(torch.nn.Module): def __init__(self): super().__init__() self.args = [] def forward(self, x): self.args.append(x) ppe.reporting.report({'loss': x.sum()}, self) class DummyModelTwoArgs...
30.560484
77
0.663808
b55331658a85a14959a5fa89815535f16352bcf6
380
py
Python
tern/utils/metadata.py
ManishaTripathy/tern
bf3da704d2731417fd070bab888be7b9685080c9
[ "BSD-2-Clause" ]
null
null
null
tern/utils/metadata.py
ManishaTripathy/tern
bf3da704d2731417fd070bab888be7b9685080c9
[ "BSD-2-Clause" ]
null
null
null
tern/utils/metadata.py
ManishaTripathy/tern
bf3da704d2731417fd070bab888be7b9685080c9
[ "BSD-2-Clause" ]
null
null
null
# # Copyright (c) 2017-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause # """ Container metadata operations """ import os import shutil from tern.utils.constants import temp_folder def clean_temp(): '''Remove the temp directory''' temp_path = os.path.abspath(temp_folder) if ...
20
59
0.718421
cecde9bd0ea13020125e0f8902020e808a6de15b
6,536
py
Python
bin/Python27/Lib/site-packages/sphinx/pycode/nodes.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2021-11-06T17:09:04.000Z
2021-11-06T17:09:04.000Z
bin/Python27/Lib/site-packages/sphinx/pycode/nodes.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2019-02-10T23:52:09.000Z
2019-02-10T23:52:09.000Z
bin/Python27/Lib/site-packages/sphinx/pycode/nodes.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2021-11-06T17:08:54.000Z
2021-11-06T17:08:54.000Z
# -*- coding: utf-8 -*- """ sphinx.pycode.nodes ~~~~~~~~~~~~~~~~~~~ Parse tree node implementations. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ if False: # For type annotation from typing import Callable # NOQA class Bas...
30.685446
77
0.575428
d6b5c58097c5f56f9a1a2bebd5d0cad47370af01
7,447
py
Python
zerver/webhooks/gogs/view.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
2
2020-11-12T12:28:46.000Z
2020-11-16T11:17:46.000Z
zerver/webhooks/gogs/view.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
1
2021-03-24T12:50:52.000Z
2021-03-24T13:11:42.000Z
zerver/webhooks/gogs/view.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
1
2021-07-22T10:14:08.000Z
2021-07-22T10:14:08.000Z
# vim:fenc=utf-8 from typing import Any, Dict, Optional from django.http import HttpRequest, HttpResponse from typing_extensions import Protocol from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_variables from zerver...
32.099138
93
0.639452
83c5fe7199ad62eaca066e134245195804caca9c
10,117
py
Python
tutorials/setup-gcp/rdbox-gui/flask_rdbox/views/entries.py
hamstick/rdbox
780928388a5e31a3180c1bea1e2c96ab15e4357c
[ "MIT" ]
278
2019-03-09T02:11:50.000Z
2022-03-30T14:54:23.000Z
tutorials/setup-gcp/rdbox-gui/flask_rdbox/views/entries.py
horacezh/rdbox
4eaefc7719283982117212b529c234ec9c5267d4
[ "MIT" ]
24
2020-05-08T00:39:23.000Z
2022-02-27T02:47:42.000Z
tutorials/setup-gcp/rdbox-gui/flask_rdbox/views/entries.py
horacezh/rdbox
4eaefc7719283982117212b529c234ec9c5267d4
[ "MIT" ]
39
2019-03-22T07:30:31.000Z
2022-03-15T07:07:37.000Z
#!/usr/bin/env python3 from flask import request, Response from flask_rdbox import app from flask_rdbox.views.utils import Utils from flask_rdbox.views.g_cloud_setupper import GCloudSetupper from googleapiclient import discovery from oauth2client.client import GoogleCredentials from os.path import expanduser import os ...
45.165179
123
0.54868
7f6a958627dfe113f67e5c361f173187a3608c59
652
py
Python
py/226. Invert Binary Tree.py
longwangjhu/LeetCode
a5c33e8d67e67aedcd439953d96ac7f443e2817b
[ "MIT" ]
3
2021-08-07T07:01:34.000Z
2021-08-07T07:03:02.000Z
py/226. Invert Binary Tree.py
longwangjhu/LeetCode
a5c33e8d67e67aedcd439953d96ac7f443e2817b
[ "MIT" ]
null
null
null
py/226. Invert Binary Tree.py
longwangjhu/LeetCode
a5c33e8d67e67aedcd439953d96ac7f443e2817b
[ "MIT" ]
null
null
null
# https://leetcode.com/problems/invert-binary-tree/ # Given the root of a binary tree, invert the tree, and return its root. ################################################################################ # divide and conquer # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, le...
29.636364
87
0.558282
4b6bd0b949eafe7e684cead09c5d35eb7ce93cf8
402
py
Python
EN1/experiment 1/analyse a1.py
jvdoorn/EN
4ca3ec37ebff4d277677cfaea2b77daa60a54d82
[ "MIT" ]
null
null
null
EN1/experiment 1/analyse a1.py
jvdoorn/EN
4ca3ec37ebff4d277677cfaea2b77daa60a54d82
[ "MIT" ]
2
2022-01-13T03:44:55.000Z
2022-03-12T00:56:18.000Z
EN1/experiment 1/analyse a1.py
jvdoorn/EN
4ca3ec37ebff4d277677cfaea2b77daa60a54d82
[ "MIT" ]
null
null
null
from math import sqrt V = 1.06304 # Volts I = 9.3900 * 10 ** -3 # Amps Vf = 0.00015 * V + 0.00003 * 2 # Volts If = 0.00055 * I + 0.00005 * 2 * 10 ** -3 # Amps R = V / I # Ohms Rf = sqrt((Vf / V) ** 2 + (If / I) ** 2) # Ohms T = 30.84 + (2.232 * R) + (2.43 * 10 ** -3 * R ** 2) - (5.33 * 10 ** -6 * R ** 3) # K...
28.714286
91
0.430348
393ed855e5010cec8c3240d711d663701c459fa0
10,128
py
Python
chrome/common/extensions/docs/server2/new_github_file_system_test.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
chrome/common/extensions/docs/server2/new_github_file_system_test.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
chrome/common/extensions/docs/server2/new_github_file_system_test.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json from copy import deepcopy from cStringIO import StringIO from functools import partial from hashlib import sha1 from random...
36.042705
79
0.678219
feaf39bbc3e4e738d1e62ba113f2f7dd2c0f48c9
2,957
py
Python
investments/src/event-profiling/eventProfiler.py
suggitpe/python
27ccc033d13774e8ea4355849374152246b3f4a4
[ "Apache-2.0" ]
null
null
null
investments/src/event-profiling/eventProfiler.py
suggitpe/python
27ccc033d13774e8ea4355849374152246b3f4a4
[ "Apache-2.0" ]
null
null
null
investments/src/event-profiling/eventProfiler.py
suggitpe/python
27ccc033d13774e8ea4355849374152246b3f4a4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import copy import datetime as dt import QSTK.qstkstudy.EventProfiler as ep import QSTK.qstkutil.DataAccess as da import QSTK.qstkutil.qsdateutil as du import numpy as np def get_data_from_market(start_of_period, end_of_period, symbols_from): daysOfMarketOpen = du.getNYSEdays(start_of_peri...
35.626506
97
0.725736
040239884f342924698073f5b3547d54965bd2a3
1,988
py
Python
logo/test.py
greschd/PhaseMap
d70586cdfd13956ff4c0073a1c26b214295dc7fc
[ "Apache-2.0" ]
2
2020-11-06T12:14:44.000Z
2021-05-24T16:41:33.000Z
logo/test.py
greschd/PhaseMap
d70586cdfd13956ff4c0073a1c26b214295dc7fc
[ "Apache-2.0" ]
1
2020-10-06T09:28:36.000Z
2020-10-06T09:28:36.000Z
logo/test.py
greschd/PhaseMap
d70586cdfd13956ff4c0073a1c26b214295dc7fc
[ "Apache-2.0" ]
1
2019-11-08T00:58:51.000Z
2019-11-08T00:58:51.000Z
#!/usr/bin/env python # © 2015-2018, ETH Zurich, Institut für Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> import numpy as np import scipy.misc import phasemap2 as pm import matplotlib.pyplot as plt # ~ def circle(x, y): # ~ return 1 if x**2 + y**2 < 1 else 0 # ~ def wedge(x, y): # ~ return 1 if (...
25.164557
82
0.512575
dc4cc12385f3e8f89cbda5eb2991736f51741197
5,750
py
Python
selfdrive/controls/lib/longitudinal_planner.py
fallen8angel/forNEXO-YONG
5661ae0fb2fefc41fda9e474e094d4b5440ecb8e
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
fallen8angel/forNEXO-YONG
5661ae0fb2fefc41fda9e474e094d4b5440ecb8e
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
fallen8angel/forNEXO-YONG
5661ae0fb2fefc41fda9e474e094d4b5440ecb8e
[ "MIT" ]
2
2022-02-25T03:36:09.000Z
2022-03-13T12:24:37.000Z
#!/usr/bin/env python3 import math import numpy as np from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdr...
40.20979
108
0.749217
a0b5566b55b57f707f0f974fe105c9d22a413beb
301
py
Python
config/cfg.py
lucasxlu/CRNet
17d27e39a77181921cc2bd5a5a8866a25282b4de
[ "MIT" ]
13
2018-06-26T07:13:39.000Z
2021-11-30T02:12:38.000Z
config/cfg.py
lucasxlu/CRNet
17d27e39a77181921cc2bd5a5a8866a25282b4de
[ "MIT" ]
null
null
null
config/cfg.py
lucasxlu/CRNet
17d27e39a77181921cc2bd5a5a8866a25282b4de
[ "MIT" ]
null
null
null
from collections import OrderedDict cfg = OrderedDict() cfg['use_gpu'] = False cfg['scut_fbp_dir'] = 'E:/DataSet/Face/SCUT-FBP/Crop' cfg['batch_size'] = 16 cfg['hotornot_dir'] = 'E:/DataSet/Face/eccv2010_beauty_data_v1.0/eccv2010_beauty_data/hotornot_face' cfg['jaffe_dir'] = 'E:/DataSet/Face/jaffe'
33.444444
100
0.754153
cef5fc6d60a94799dbd665d796fbfbbed6f0c0f4
2,196
py
Python
modules/utils.py
inconvergent/differential-mesh-3d
cfa52b21d8524410c0ae2e98a6456c6520ae9ae6
[ "MIT" ]
51
2015-08-27T16:05:17.000Z
2022-03-12T21:05:21.000Z
modules/utils.py
inconvergent/differential-mesh-3d
cfa52b21d8524410c0ae2e98a6456c6520ae9ae6
[ "MIT" ]
1
2015-11-25T18:50:23.000Z
2015-11-26T22:21:10.000Z
modules/utils.py
inconvergent/differential-mesh-3d
cfa52b21d8524410c0ae2e98a6456c6520ae9ae6
[ "MIT" ]
5
2016-09-12T12:58:49.000Z
2021-05-28T23:59:11.000Z
# -*- coding: utf-8 -*- def make_info_str(args): s = '' for k in vars(args): s += '# ' + str(k) + ': ' + str(getattr(args,k)) + '\n' return s def print_stats(steps,dm, meta=False): from time import strftime from time import time if isinstance(meta, str): meta = ' | {:s}'.format(meta) else: ...
21.742574
64
0.561931
8baa85b9e03ac5c53ebc26c6ca72de35977dbed3
1,697
py
Python
WeightController/weight/tests.py
williamHuang5468/WeightController
146673d543ed7d6a20a642a7a9203aa55cf1a935
[ "MIT" ]
null
null
null
WeightController/weight/tests.py
williamHuang5468/WeightController
146673d543ed7d6a20a642a7a9203aa55cf1a935
[ "MIT" ]
null
null
null
WeightController/weight/tests.py
williamHuang5468/WeightController
146673d543ed7d6a20a642a7a9203aa55cf1a935
[ "MIT" ]
null
null
null
from django.core.urlresolvers import resolve from django.test import TestCase from django.http import HttpRequest from django.template.loader import render_to_string from django.utils import timezone from weight.views import editorWeight from weight.models import Weight class EditorWeightTest(TestCase): def tes...
28.283333
66
0.668827
31f6ddc74203078749bf4bc12e4d45d6e885991a
10,001
py
Python
mesonbuild/linkers/detect.py
jpakkane/meson
ee7a7fec10298e8dabc423f6163e866d19473e7f
[ "Apache-2.0" ]
64
2015-01-09T13:45:23.000Z
2015-06-13T20:16:01.000Z
mesonbuild/linkers/detect.py
jpakkane/meson
ee7a7fec10298e8dabc423f6163e866d19473e7f
[ "Apache-2.0" ]
110
2015-01-09T01:35:56.000Z
2015-06-14T11:26:04.000Z
mesonbuild/linkers/detect.py
jpakkane/meson
ee7a7fec10298e8dabc423f6163e866d19473e7f
[ "Apache-2.0" ]
13
2015-01-05T09:08:37.000Z
2015-06-04T08:34:45.000Z
# Copyright 2012-2022 The Meson development 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 agree...
44.057269
114
0.656734
1e379d2843866791bef92c399963d5d15b9dc6d3
2,850
py
Python
db/country.py
testsibirtsv/opncrt
c9780696e6e3849f8711ee2c6a9c997c4ac66b41
[ "Apache-2.0" ]
null
null
null
db/country.py
testsibirtsv/opncrt
c9780696e6e3849f8711ee2c6a9c997c4ac66b41
[ "Apache-2.0" ]
null
null
null
db/country.py
testsibirtsv/opncrt
c9780696e6e3849f8711ee2c6a9c997c4ac66b41
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy import Column, String, Integer from sqlalchemy.orm import relationship from models.personaldetails import PersonalDetails engine = create_engine('mysql://root@localhost/o...
25
80
0.627018
f24f8e08b77411d6befe18236cc241505fa6537b
1,745
py
Python
tests/tf/block/test_mlp.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
415
2021-09-20T20:47:34.000Z
2022-03-31T16:51:03.000Z
tests/tf/block/test_mlp.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
128
2021-09-21T07:19:38.000Z
2022-03-31T15:08:27.000Z
tests/tf/block/test_mlp.py
Jwmc999/Transformers4Rec
e6cdf13a7c0102303c0258120274f88b2d42c9c2
[ "Apache-2.0" ]
44
2021-09-23T07:25:36.000Z
2022-03-29T04:17:53.000Z
# # Copyright (c) 2021, NVIDIA CORPORATION. # # 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 ...
35.612245
97
0.72894
2be20bb8fdbb83ef3270917ffdc80981158547e1
2,556
py
Python
azure-servicefabric/azure/servicefabric/models/node_deactivation_info.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-servicefabric/azure/servicefabric/models/node_deactivation_info.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-servicefabric/azure/servicefabric/models/node_deactivation_info.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.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 ...
50.117647
142
0.710876
659b30042a389e6d196cc39ceae16e142e1fab05
774
py
Python
graphgallery/gallery/utils/bvat_utils.py
Aria461863631/GraphGallery
7b62f80ab36b29013bea2538a6581fc696a80201
[ "MIT" ]
null
null
null
graphgallery/gallery/utils/bvat_utils.py
Aria461863631/GraphGallery
7b62f80ab36b29013bea2538a6581fc696a80201
[ "MIT" ]
null
null
null
graphgallery/gallery/utils/bvat_utils.py
Aria461863631/GraphGallery
7b62f80ab36b29013bea2538a6581fc696a80201
[ "MIT" ]
null
null
null
""" util functions for 'Batch Virtual Adversarial Training' (BVAT) """ import tensorflow as tf def get_normalized_vector(d): d /= (1e-12 + tf.reduce_max(tf.abs(d))) d /= tf.sqrt(1e-6 + tf.reduce_sum(tf.pow(d, 2.0), 1, keepdims=True)) return d def kl_divergence_with_logit(q_logit, p_logit, ...
27.642857
89
0.640827
10c12946e5d2536aaca438bbdedb2473ef972577
4,203
py
Python
src/DenseCellPrint.py
KasparMatas/MLontoFPGAs
084633459dfc03c694cc0a849e883913985f4dbe
[ "Apache-2.0" ]
null
null
null
src/DenseCellPrint.py
KasparMatas/MLontoFPGAs
084633459dfc03c694cc0a849e883913985f4dbe
[ "Apache-2.0" ]
27
2018-09-27T20:35:22.000Z
2019-03-22T11:43:52.000Z
src/DenseCellPrint.py
KasparMatas/MLontoFPGAs
084633459dfc03c694cc0a849e883913985f4dbe
[ "Apache-2.0" ]
1
2022-01-22T02:51:34.000Z
2022-01-22T02:51:34.000Z
import numpy as np class DenseCellPrinter: def printWires(self, wire_widths, output_wire_names, output_file): output_file.write("wire [{}-1:0] {};\n".format(wire_widths[0], output_wire_names[0])) output_file.write("wire [{}-1:0] {};\n".format(wire_widths[1], output_wire_names[1])) output_file.write("wir...
53.884615
116
0.707828
d3b298ff37455c0023b0de9adb43c559af64d15f
3,772
py
Python
python_experiments/cnn_model_lookback.py
AniruddhaDas1998/jelly-bean-world
c1ae093e851260c47a65794a1fab484372518a96
[ "Apache-2.0" ]
null
null
null
python_experiments/cnn_model_lookback.py
AniruddhaDas1998/jelly-bean-world
c1ae093e851260c47a65794a1fab484372518a96
[ "Apache-2.0" ]
null
null
null
python_experiments/cnn_model_lookback.py
AniruddhaDas1998/jelly-bean-world
c1ae093e851260c47a65794a1fab484372518a96
[ "Apache-2.0" ]
null
null
null
import gym import math import random import numpy as np import matplotlib import matplotlib.pyplot as plt from collections import namedtuple from itertools import count from PIL import Image import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision.transforms as ...
34.290909
82
0.65562
9c693774e8ddca9ebe050f20abe3b9bb3d4c9148
5,314
py
Python
dbas/helper/tests/test_relation.py
tbsschroeder/dbas
9c86eccde65cd64bc5719573b3b8449d8f333e08
[ "MIT" ]
null
null
null
dbas/helper/tests/test_relation.py
tbsschroeder/dbas
9c86eccde65cd64bc5719573b3b8449d8f333e08
[ "MIT" ]
null
null
null
dbas/helper/tests/test_relation.py
tbsschroeder/dbas
9c86eccde65cd64bc5719573b3b8449d8f333e08
[ "MIT" ]
null
null
null
import transaction from dbas.database import DBDiscussionSession from dbas.database.discussion_model import Argument, Premise, ClickedArgument, SeenArgument from dbas.helper.relation import get_undermines_for_argument_uid, get_undercuts_for_argument_uid, \ get_rebuts_for_argument_uid, get_supports_for_argument_uid...
43.557377
120
0.695898
d7f9d21085897795b247f1d610170d15a7a39799
2,126
py
Python
setup.py
jcaberio/Murmur
ceb93292cde7ca431b4d850f50126fa5e69e433e
[ "MIT" ]
null
null
null
setup.py
jcaberio/Murmur
ceb93292cde7ca431b4d850f50126fa5e69e433e
[ "MIT" ]
null
null
null
setup.py
jcaberio/Murmur
ceb93292cde7ca431b4d850f50126fa5e69e433e
[ "MIT" ]
2
2017-05-21T17:00:29.000Z
2019-01-29T15:06:47.000Z
# -*- coding: utf-8 -*- """ Murmur Hash Library =================== Murmur Hash Library is a simple c level implementation developed for high speed hashing of in memory strings, on disk files, and the contents of zip files. As the name implies the hashes are generated via an implementation of `MurmurHash 2.0`_. A fe...
29.123288
95
0.682973
3cb24255d1569c254e4e912b700c6012c55fe142
81,690
py
Python
tensorflow/python/keras/engine/training_test.py
Mainframed69/tensorflow
f8b5c95a7882efd58b123aeb308dfb173658a9e6
[ "Apache-2.0" ]
1
2019-07-22T02:37:51.000Z
2019-07-22T02:37:51.000Z
tensorflow/python/keras/engine/training_test.py
Mainframed69/tensorflow
f8b5c95a7882efd58b123aeb308dfb173658a9e6
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/engine/training_test.py
Mainframed69/tensorflow
f8b5c95a7882efd58b123aeb308dfb173658a9e6
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The TensorFlow 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 applica...
36.226164
83
0.634031
6ae3e08d1649ebf34bec8054b39dec03ed2134de
5,953
py
Python
src/elevator_pitch/story.py
JnyJny/elevator-pitch-faker
4ff5015b61c2eb9fe87feab3ae72995772f43796
[ "Apache-2.0" ]
1
2019-05-01T22:41:49.000Z
2019-05-01T22:41:49.000Z
src/elevator_pitch/story.py
JnyJny/elevator-pitch-faker
4ff5015b61c2eb9fe87feab3ae72995772f43796
[ "Apache-2.0" ]
null
null
null
src/elevator_pitch/story.py
JnyJny/elevator-pitch-faker
4ff5015b61c2eb9fe87feab3ae72995772f43796
[ "Apache-2.0" ]
null
null
null
''' ''' from faker.providers import BaseProvider class StoryPitchProvider(BaseProvider): _superlatives = [ "edge-of-your-seat", "keenly observed", "lyrical", "profound", "erotic", "inspiring", "razor-sharp", "heartrending", "dream-like", ...
22.212687
72
0.478582
fa867fa04cb04002171db2da4130e77504065501
5,242
py
Python
spacy/cli/convert.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
spacy/cli/convert.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
4
2021-06-02T00:49:27.000Z
2022-01-13T01:59:34.000Z
spacy/cli/convert.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
2
2021-12-09T07:23:21.000Z
2022-03-31T06:13:10.000Z
# coding: utf8 from __future__ import unicode_literals import plac from pathlib import Path from wasabi import Printer import srsly import re from .converters import conllu2json, iob2json, conll_ner2json from .converters import ner_jsonl2json # Converters are matched by file extension except for ner/iob, which are ...
35.90411
121
0.620183
816743d6042a7922263bf8fc7db0641861082ff2
6,071
py
Python
infrastructure/jtgltext.py
kyapp69/GCodeViewer
1f5b15083580896a3c5de8294c60c9654953b82b
[ "Apache-2.0" ]
3
2017-03-08T02:48:59.000Z
2018-04-22T17:59:24.000Z
infrastructure/jtgltext.py
kyapp69/GCodeViewer
1f5b15083580896a3c5de8294c60c9654953b82b
[ "Apache-2.0" ]
4
2019-11-23T01:40:22.000Z
2021-02-26T01:30:39.000Z
infrastructure/jtgltext.py
kyapp69/GCodeViewer
1f5b15083580896a3c5de8294c60c9654953b82b
[ "Apache-2.0" ]
10
2016-05-12T01:15:12.000Z
2020-02-15T09:54:48.000Z
from __future__ import division import OpenGL OpenGL.FORWARD_COMPATIBLE_ONLY = True # ^ See http://pyopengl.sourceforge.net/documentation/deprecations.html import OpenGL.GL as gl import numpy as np import ctypes import os import logging try: from shader_loader import ShaderLoader except ModuleNotFoundError: fr...
41.582192
130
0.662659
084691bdf06b9dd6b1b3831187c4f0075270bbfd
28,960
py
Python
research/slim/nets/mobilenet_v1_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
1
2021-05-17T01:42:29.000Z
2021-05-17T01:42:29.000Z
research/slim/nets/mobilenet_v1_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
research/slim/nets/mobilenet_v1_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow 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 ...
54.029851
85
0.580421
9f62fc44d1f222eea6357aea9206807922f94831
5,197
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/python/training/adadelta.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/python/training/adadelta.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/python/training/adadelta.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2015 The TensorFlow 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...
38.783582
81
0.676159
81ff15f0f77cc9d8494374946f86caa83e391afe
222,054
py
Python
awx/api/serializers.py
chris93111/awx
cd49213924f1cd451e5c17390b9c2b237085d1be
[ "Apache-2.0" ]
null
null
null
awx/api/serializers.py
chris93111/awx
cd49213924f1cd451e5c17390b9c2b237085d1be
[ "Apache-2.0" ]
1
2020-11-05T16:07:07.000Z
2020-11-05T16:07:07.000Z
awx/api/serializers.py
Mattlk13/awx
cd49213924f1cd451e5c17390b9c2b237085d1be
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import copy import json import logging import re from collections import OrderedDict from datetime import timedelta # OAuth2 from oauthlib import oauth2 from oauthlib.common import generate_token # Jinja from jinja2 import sandbox, StrictUndefined fr...
44.950202
150
0.629779
c2a6b1c657acf2cc8ea87e3d5bcd4e1aa8479590
1,198
py
Python
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
from selenium import webdriver # github change # git change chrome_driver_path = r"C:\Users\Francis\Desktop\chromedriver_win32\chromedriver.exe" driver_long_lower_shadow = webdriver.Chrome(chrome_driver_path) driver_hammer = webdriver.Chrome(chrome_driver_path) driver_dragon = webdriver.Chrome(chrome_driver_path) driv...
85.571429
216
0.868114
ca35f8320b6a88dba634b2c3f1faf4671c2f131e
1,556
py
Python
tests/test_data_containers/test_data.py
Rory-Sullivan/yrlocationforecast
26b66834cac4569704daf0009a9d2bba39dbfb75
[ "MIT" ]
13
2020-07-28T17:47:42.000Z
2022-03-30T13:35:12.000Z
tests/test_data_containers/test_data.py
Rory-Sullivan/yrlocationforecast
26b66834cac4569704daf0009a9d2bba39dbfb75
[ "MIT" ]
5
2020-10-14T11:10:13.000Z
2022-01-01T17:35:19.000Z
tests/test_data_containers/test_data.py
Rory-Sullivan/yrlocationforecast
26b66834cac4569704daf0009a9d2bba39dbfb75
[ "MIT" ]
6
2020-10-16T12:30:07.000Z
2022-02-18T07:13:21.000Z
"""Tests for the Data class.""" import datetime as dt import pytest from metno_locationforecast.data_containers import Place from metno_locationforecast.forecast import Forecast USER_AGENT = "testing/0.1 https://github.com/Rory-Sullivan/yrlocationforecast" SAVE_LOCATION = "./tests/test_data/" @pytest.fixture def ...
25.096774
80
0.722365
2cc0268dfc638088baed7b4e0d21de82f35864c5
3,546
py
Python
tests/unit/test_models/test_submodels/test_interface/test_lead_acid.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_submodels/test_interface/test_lead_acid.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
tests/unit/test_models/test_submodels/test_interface/test_lead_acid.py
tobykirk/PyBaMM
c16b7df76c597468ecac1c40e768d94005f79145
[ "BSD-3-Clause" ]
null
null
null
# # Test lead acid butler volmer submodel # import pybamm import tests import unittest class TestLeadAcid(unittest.TestCase): def test_public_functions(self): param = pybamm.LeadAcidParameters() a_n = pybamm.FullBroadcast( pybamm.Scalar(0.5), ["negative electrode"], "current collecto...
38.543478
84
0.604343
29f68205d6c1d06711cb5d5f6e1aa839f6133c7d
541
py
Python
blender/arm/logicnode/scene/LN_scene.py
niacdoial/armory
3f9b633fbf772017c576a3f77695a6c28d9956e1
[ "Zlib" ]
null
null
null
blender/arm/logicnode/scene/LN_scene.py
niacdoial/armory
3f9b633fbf772017c576a3f77695a6c28d9956e1
[ "Zlib" ]
null
null
null
blender/arm/logicnode/scene/LN_scene.py
niacdoial/armory
3f9b633fbf772017c576a3f77695a6c28d9956e1
[ "Zlib" ]
null
null
null
import bpy from arm.logicnode.arm_nodes import * class SceneNode(ArmLogicTreeNode): """Stores the given scene as a variable.""" bl_idname = 'LNSceneNode' bl_label = 'Scene' arm_version = 1 property0_get: PointerProperty(name='', type=bpy.types.Scene) def init(self, context): super(S...
27.05
91
0.678373
2b7793053bdd348799f51d9f22020a406bf4a05e
49
py
Python
real_estate/src/errors.py
gutessitore/real-estate-scrapper
1ea62d71230b6a21c7e32322b0e02b67a6163849
[ "MIT" ]
1
2021-09-20T13:51:21.000Z
2021-09-20T13:51:21.000Z
real_estate/src/errors.py
gutessitore/real-estate-scrapper
1ea62d71230b6a21c7e32322b0e02b67a6163849
[ "MIT" ]
null
null
null
real_estate/src/errors.py
gutessitore/real-estate-scrapper
1ea62d71230b6a21c7e32322b0e02b67a6163849
[ "MIT" ]
5
2021-09-06T15:08:04.000Z
2021-12-05T15:43:36.000Z
class InvalidDataFrameError(Exception): pass
16.333333
39
0.795918
89c97dfef1d9556ae35ab13a5ef5bc96b336feb6
944
py
Python
tests/test_result/test_result_base.py
ksurta/returns
9746e569303f214d035462ae3dffe5c49abdcfa7
[ "BSD-2-Clause" ]
null
null
null
tests/test_result/test_result_base.py
ksurta/returns
9746e569303f214d035462ae3dffe5c49abdcfa7
[ "BSD-2-Clause" ]
null
null
null
tests/test_result/test_result_base.py
ksurta/returns
9746e569303f214d035462ae3dffe5c49abdcfa7
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from returns.result import Result @pytest.mark.parametrize('method_name', [ 'bind', 'unify', 'map', 'rescue', 'fix', 'alt', 'value_or', ]) def test_result_abstract_method(method_name): """Checks that Result itself contains abstract methods.""" ...
24.205128
62
0.691737
98234e85d4b1f5d091e20748be957a7cec3eafd2
3,484
py
Python
lvsfunc/mask.py
petzku/lvsfunc
5d49bfbdd3863636be4263382f23091b9ee20bfe
[ "MIT" ]
null
null
null
lvsfunc/mask.py
petzku/lvsfunc
5d49bfbdd3863636be4263382f23091b9ee20bfe
[ "MIT" ]
null
null
null
lvsfunc/mask.py
petzku/lvsfunc
5d49bfbdd3863636be4263382f23091b9ee20bfe
[ "MIT" ]
null
null
null
""" Wrappers and masks for denoising. """ from functools import partial from typing import Optional import vapoursynth as vs from vsutil import depth, get_depth, get_y, scale_value from . import util try: from cytoolz import functoolz except ModuleNotFoundError: try: from toolz import functoolz ...
35.55102
110
0.677669
136037b852887597bd16d3f56881598455db2199
892
py
Python
coordinates/test_coordinates.py
ThorsHamster/find_new_hometown
862231bb1f3a0a1505d02b452adca2b45a6fc850
[ "MIT" ]
2
2020-01-07T07:28:17.000Z
2020-01-07T10:21:41.000Z
coordinates/test_coordinates.py
ThorsHamster/find_new_hometown
862231bb1f3a0a1505d02b452adca2b45a6fc850
[ "MIT" ]
30
2021-03-19T15:46:29.000Z
2021-12-21T12:22:50.000Z
coordinates/test_coordinates.py
ThorsHamster/find_new_hometown
862231bb1f3a0a1505d02b452adca2b45a6fc850
[ "MIT" ]
null
null
null
import pytest from coordinates import Coordinates @pytest.fixture def unit_under_test(): return Coordinates() class TestCoordinates: def test_longitude(self, unit_under_test): unit_under_test.longitude = 3 assert unit_under_test.longitude == 3 def test_latitude(self, unit_under_test): ...
27.030303
63
0.702915
6507cc7a6bad8fb9aed262beaf0b810977b1ba49
2,174
py
Python
sheepdog/transactions/submission/__init__.py
jacquayj/sheepdog
6d6d98a17cab9bcc8881079ced9065036c757eee
[ "Apache-2.0" ]
null
null
null
sheepdog/transactions/submission/__init__.py
jacquayj/sheepdog
6d6d98a17cab9bcc8881079ced9065036c757eee
[ "Apache-2.0" ]
null
null
null
sheepdog/transactions/submission/__init__.py
jacquayj/sheepdog
6d6d98a17cab9bcc8881079ced9065036c757eee
[ "Apache-2.0" ]
null
null
null
import flask from sheepdog import utils from sheepdog.errors import UserError from sheepdog.globals import FLAG_IS_ASYNC from sheepdog.transactions.submission.transaction import SubmissionTransaction def handle_submission_transaction(program, project, *doc_args, **tx_kwargs): """ Create and execute a single ...
31.970588
78
0.671573
b73c5e4dbe02531a255424caab0a95abe2d774a7
2,853
py
Python
ed2d/material.py
explosiveduck/cubix
16e7a298a83fe53174bda8ec77dfcf6869ed5336
[ "BSD-2-Clause" ]
1
2015-11-02T02:11:18.000Z
2015-11-02T02:11:18.000Z
ed2d/material.py
explosiveduck/cubix
16e7a298a83fe53174bda8ec77dfcf6869ed5336
[ "BSD-2-Clause" ]
29
2015-06-09T19:27:49.000Z
2016-03-08T06:13:24.000Z
ed2d/material.py
explosiveduck/cubix
16e7a298a83fe53174bda8ec77dfcf6869ed5336
[ "BSD-2-Clause" ]
null
null
null
# Cook-Torance for diffuseType and Blinn-Phong # Figure out specular and frensel stuff # Emission? # Need to setup so it can send outputs to a shader # Inputs need to be defined a lot better from ed2d import texture from ed2d import files class Material(object): def __init__(self): self.diffuse = None ...
35.222222
108
0.594812
55c4e485c5af0d5904eb295e997cc95e12104d1b
3,406
py
Python
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
3
2018-10-01T20:46:17.000Z
2019-12-17T19:39:50.000Z
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
null
null
null
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
4
2018-05-17T16:34:54.000Z
2020-09-24T02:12:40.000Z
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines class :class:`mdecl_wrapper_t` that allows to work on set of declarations, as it was one declaration. T...
29.617391
79
0.612449
d698b8624bf0eb5203f5ea25c009d9993d3f53f3
2,273
py
Python
auth.py
shamspias/Raspberry-Web-UI
af956a805c32cf5045b4e6e08af5d16992e88079
[ "MIT" ]
1
2019-05-03T17:09:12.000Z
2019-05-03T17:09:12.000Z
auth.py
shamspias/Raspberry-Web-UI
af956a805c32cf5045b4e6e08af5d16992e88079
[ "MIT" ]
2
2021-05-02T11:25:09.000Z
2021-05-02T11:25:48.000Z
auth.py
shamspias/Raspberry-Web-UI
af956a805c32cf5045b4e6e08af5d16992e88079
[ "MIT" ]
null
null
null
# auth.py from flask import Blueprint, render_template, redirect, url_for, request, flash from werkzeug.security import generate_password_hash, check_password_hash from flask_login import login_user, logout_user, login_required from .models import User from . import db auth = Blueprint(name='auth', import_name=__name...
32.014085
109
0.714034
9ad9b8541a5c5ca06aacdc50b2e83e1204ec0cd9
11,142
py
Python
sdl2/sdlmixer.py
namelivia/py-sdl2
c1bdf43501224d5f0a125dbce70198100ec7be82
[ "CC0-1.0" ]
222
2017-08-19T00:51:59.000Z
2022-02-05T19:39:33.000Z
sdl2/sdlmixer.py
namelivia/py-sdl2
c1bdf43501224d5f0a125dbce70198100ec7be82
[ "CC0-1.0" ]
103
2017-08-20T17:13:05.000Z
2022-02-05T20:20:01.000Z
sdl2/sdlmixer.py
namelivia/py-sdl2
c1bdf43501224d5f0a125dbce70198100ec7be82
[ "CC0-1.0" ]
54
2017-08-20T17:13:00.000Z
2022-01-14T23:51:13.000Z
import os from ctypes import Structure, POINTER, CFUNCTYPE, c_int, c_char_p, c_void_p, \ c_double from .dll import DLL from .version import SDL_version, SDL_VERSIONNUM from .audio import AUDIO_S16LSB, AUDIO_S16MSB, SDL_MIX_MAXVOLUME from .stdinc import Uint8, Uint16, Uint32, Sint16, SDL_bool from .endian import SDL...
45.851852
120
0.764315
10ef1fd4675cc6bfaccfdf1fd0f0370037027cc8
709
py
Python
Array/Medium_FindFirstandLastpositionofElementinSortedArray_34_WYH.py
LinkWoong/LC-Solutions
98b2ce55f05f6acb672f20519f79ca9f4248961d
[ "MIT" ]
4
2019-05-15T10:40:34.000Z
2020-07-27T03:05:39.000Z
Array/Medium_FindFirstandLastpositionofElementinSortedArray_34_WYH.py
LinkWoong/LC-Solutions
98b2ce55f05f6acb672f20519f79ca9f4248961d
[ "MIT" ]
2
2019-08-20T15:34:33.000Z
2019-09-20T19:41:27.000Z
Array/Medium_FindFirstandLastpositionofElementinSortedArray_34_WYH.py
LinkWoong/LC-Solutions
98b2ce55f05f6acb672f20519f79ca9f4248961d
[ "MIT" ]
null
null
null
# coding: utf-8 # In[ ]: class Solution: def searchRange(self, nums, target): #算法思路: #首先写下一个可以找到第一个出现的target的indice的binary search的方程 #在这个方程里,如果mid的大小大于或等于target,则hi变成现在的mid #如果mid的大小小于了target了,则lo变为现在的mid+1 #可以注意的是,因为我们在一个sorted list nums寻找,当这个方程的target变为target+1后 #这个方程会返回在nums中最后一个的target的indice+1 def ...
25.321429
96
0.561354
91f1d2b0a65e1f72ade4e3331f1a5becce9fe7fc
1,527
py
Python
md2ebook/md2ebook.py
brunobord/md2ebook
31e0d06b77f2d986e6af1115c9e613dfec0591a9
[ "MIT" ]
8
2015-01-14T22:15:27.000Z
2022-03-17T16:24:38.000Z
md2ebook/md2ebook.py
brunobord/md2ebook
31e0d06b77f2d986e6af1115c9e613dfec0591a9
[ "MIT" ]
1
2018-01-04T14:35:09.000Z
2018-01-04T14:35:09.000Z
md2ebook/md2ebook.py
brunobord/md2ebook
31e0d06b77f2d986e6af1115c9e613dfec0591a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- coding: utf-8 -*- """Markdown to Book. Usage: md2ebook start [<name>] [--overwrite] [--bookname=<bookname>] md2ebook build [--with-pdf] [--verbose] [--cover=<cover>] [--generator=<generator>] md2ebook check md2ebook --version Commands: start Start a blank proj...
32.489362
79
0.629339
481ad428dd1bcfece63c5037ed0ff91800fbc4e1
754
py
Python
data_management/Excel Work/Melting DataFrames.py
TheRockerfly/JRocker-Portfolio
f1272970eb5c52e9928b72a101526adafbd77d4f
[ "MIT" ]
null
null
null
data_management/Excel Work/Melting DataFrames.py
TheRockerfly/JRocker-Portfolio
f1272970eb5c52e9928b72a101526adafbd77d4f
[ "MIT" ]
7
2021-07-03T14:41:03.000Z
2022-03-12T00:59:26.000Z
data_management/Excel Work/Melting DataFrames.py
TheRockerfly/JRocker-Python-Portfolio
be8be23195df56d8c76c59f03d1eb9d06e7a93b7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Mar 17 06:59:31 2018 @author: James """ import pandas as pd def single_melt_csv_df(file_name: str, melt_col: str, val_col: str): df = pd.read_csv(file_name) # Reset the index df_reset = df.reset_index() # Melt visitors_by_city_weekday: visitors df_melt...
22.176471
71
0.685676
98b887173ea2da940adff8696d56f78e7ab87f83
6,626
py
Python
Detectron2Fire/testfirepanotic.py
lkk688/CustomDetectron2
f55a7ea41b067cfc182f994a479bf5f64b4b01a3
[ "MIT" ]
null
null
null
Detectron2Fire/testfirepanotic.py
lkk688/CustomDetectron2
f55a7ea41b067cfc182f994a479bf5f64b4b01a3
[ "MIT" ]
null
null
null
Detectron2Fire/testfirepanotic.py
lkk688/CustomDetectron2
f55a7ea41b067cfc182f994a479bf5f64b4b01a3
[ "MIT" ]
null
null
null
import torch print(torch.__version__) #1.8.0+cu111 import torchvision print(torchvision.__version__) #0.9.0+cu111 # check if CUDA is available train_on_gpu = torch.cuda.is_available() if not train_on_gpu: print('CUDA is not available. Training on CPU ...') else: print('CUDA is available! Training on GPU ...'...
42.474359
156
0.715666
f235e9a92a235f9ca68ea374ffb93efcd01376c7
2,610
py
Python
docassemble_webapp/docassemble/webapp/screenreader.py
patrickr81/docassemble
651653f6d3ab4c4c95d1defbc547ab8e15e460cc
[ "MIT" ]
1
2020-06-01T15:46:11.000Z
2020-06-01T15:46:11.000Z
docassemble_webapp/docassemble/webapp/screenreader.py
ttamg/docassemble
1429fbbddfeb60b9f8fe74c928a479236d6a6113
[ "MIT" ]
6
2021-02-08T20:44:14.000Z
2022-01-13T02:42:41.000Z
docassemble_webapp/docassemble/webapp/screenreader.py
ttamg/docassemble
1429fbbddfeb60b9f8fe74c928a479236d6a6113
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup from docassemble.base.functions import word import re __all__ = ['to_text'] def to_text(html_doc): #logmessage("Starting to_text") output = str() soup = BeautifulSoup(html_doc, 'html.parser') [s.extract() for s in soup(['style', 'script', '[document]', 'head', 'title', 'a...
35.753425
123
0.563218
0a0b9d70a707bffe8fb51de20e81ac099d504a82
472
py
Python
Chapter1/1.4.2-Default-Argument-Values.py
pankace/SICP-robably
765f516f253e96ae2c8e433722ea7cefd31b2f04
[ "MIT" ]
null
null
null
Chapter1/1.4.2-Default-Argument-Values.py
pankace/SICP-robably
765f516f253e96ae2c8e433722ea7cefd31b2f04
[ "MIT" ]
null
null
null
Chapter1/1.4.2-Default-Argument-Values.py
pankace/SICP-robably
765f516f253e96ae2c8e433722ea7cefd31b2f04
[ "MIT" ]
null
null
null
k_b = 1.38e-23 # Boltzmann's constant def pressure(v, t, n=6.022e23): """Compute the pressure in pascals of an ideal gas. v -- volume of gas, in cubic meters t -- absolute temperature in degrees kelvin n -- particles of gas (default: one mole) """ return n * k_b * t / v v, t = map(float, i...
23.6
55
0.612288
48e7623a62fdc2b842fd89213c5c79fe482eada8
7,699
py
Python
aiobotocore/paginate.py
Jastor11/aiobotocore
40427e6c45dd6b8fb75072f13cfb076cf6c4d10b
[ "Apache-2.0" ]
772
2016-02-12T13:20:26.000Z
2022-03-29T20:51:37.000Z
aiobotocore/paginate.py
Jastor11/aiobotocore
40427e6c45dd6b8fb75072f13cfb076cf6c4d10b
[ "Apache-2.0" ]
826
2016-02-14T11:31:25.000Z
2022-03-31T20:41:31.000Z
aiobotocore/paginate.py
Jastor11/aiobotocore
40427e6c45dd6b8fb75072f13cfb076cf6c4d10b
[ "Apache-2.0" ]
154
2016-04-28T16:27:33.000Z
2022-03-05T19:41:52.000Z
from botocore.exceptions import PaginationError from botocore.paginate import Paginator, PageIterator from botocore.utils import set_value_from_jmespath, merge_dicts from botocore.compat import six import jmespath import aioitertools class AioPageIterator(PageIterator): def __aiter__(self): return self._...
43.744318
79
0.598649
74b2630b74739282d248a2e4f8b67ac66b76f158
23,705
py
Python
ansible/lib/ansible/modules/core/database/postgresql/postgresql_privs.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/database/postgresql/postgresql_privs.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/database/postgresql/postgresql_privs.py
kiv-box/kafka
debec1c4bc8c43776070ee447a53b55fef42bd52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible 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, either version 3 of the License, or # (at your option) any later version. #...
36.923676
104
0.608057
7d32348501868062da1d383183f7205b82304039
35,339
py
Python
commandlineCW_ipuz.py
LSowrabbi/CWPuzzleReader
d144da9ce48a75413be2b21f8bf828cf4dbf191f
[ "BSD-3-Clause" ]
null
null
null
commandlineCW_ipuz.py
LSowrabbi/CWPuzzleReader
d144da9ce48a75413be2b21f8bf828cf4dbf191f
[ "BSD-3-Clause" ]
2
2015-12-29T17:06:38.000Z
2016-09-16T13:03:53.000Z
commandlineCW_ipuz.py
LSowrabbi/CWPuzzleReader
d144da9ce48a75413be2b21f8bf828cf4dbf191f
[ "BSD-3-Clause" ]
null
null
null
import ipuz import ipuz_Helper import json import sys unlock_state="disabled" notes_state="disabled" is_puz_rebus=False Encoding_2 = "ISO-8859-1" class File(): title=None author=None cpyrt=None notes=None width=0 height=0 solnblock=[] cellblock=[] acc=0 dwn=0 across=[] d...
35.659939
411
0.520728
65999305203d3d2680af5ebe52efe2f85a197696
1,843
py
Python
ants/contrib/downloadermiddleware/robotstxt.py
wcong/scale-crawl
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
18
2015-01-16T02:25:03.000Z
2018-11-18T03:47:07.000Z
ants/contrib/downloadermiddleware/robotstxt.py
wcong/ants
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
15
2015-01-12T02:28:23.000Z
2015-02-03T03:41:07.000Z
ants/contrib/downloadermiddleware/robotstxt.py
wcong/scale-crawl
52918d18c94a9a69c3b2495286e3384ba57ad6f8
[ "BSD-3-Clause" ]
5
2015-01-22T12:38:38.000Z
2019-06-07T14:35:07.000Z
""" This is a middleware to respect robots.txt policies. To activate it you must enable this middleware and enable the ROBOTSTXT_OBEY setting. """ import robotparser from ants.utils import log from ants.utils.exceptions import NotConfigured, IgnoreRequest from ants.http import Request from ants.utils.httpobj import ...
33.509091
76
0.668475
0d6620cb94fa427f4e13aeeb6f3f58590c26aebe
48
py
Python
src/synpp/__init__.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
6
2020-04-01T12:06:20.000Z
2021-11-02T19:10:27.000Z
src/synpp/__init__.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
26
2019-12-08T12:25:39.000Z
2022-02-28T07:24:56.000Z
src/synpp/__init__.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
8
2020-06-19T15:49:46.000Z
2021-07-06T10:15:37.000Z
from .pipeline import * from .parallel import *
16
23
0.75
e3c2608f7e0f3c8385f9c53bc261be6e2e352e43
35,913
py
Python
EMS/scoreManagement/views.py
jlbbj111/2019-Software-Engineering-Curriculum-Design
a55deabaf00220c5ffb531c6e40ed9edb8063062
[ "MIT" ]
45
2019-03-22T23:01:45.000Z
2021-11-09T01:32:12.000Z
EMS/scoreManagement/views.py
LHMdanchaofan/2019-Software-Engineering-Curriculum-Design
a55deabaf00220c5ffb531c6e40ed9edb8063062
[ "MIT" ]
9
2019-03-25T03:27:57.000Z
2021-06-10T21:27:21.000Z
EMS/scoreManagement/views.py
LHMdanchaofan/2019-Software-Engineering-Curriculum-Design
a55deabaf00220c5ffb531c6e40ed9edb8063062
[ "MIT" ]
13
2019-03-28T13:44:05.000Z
2021-05-23T06:45:03.000Z
from django.shortcuts import render, redirect, Http404 from django.utils.datastructures import MultiValueDictKeyError from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse, HttpResponseRedirect from django.db.models import Q from datetime import datetime import pandas as pd from ba...
38.699353
119
0.605408
760cd1e6d299c97d3889f21718bdfb6fbe4793fe
102
py
Python
skyjump/__main__.py
Akida31/skyjump
d51270ae9c67e213761a9bd294b2643912a205d5
[ "MIT" ]
null
null
null
skyjump/__main__.py
Akida31/skyjump
d51270ae9c67e213761a9bd294b2643912a205d5
[ "MIT" ]
null
null
null
skyjump/__main__.py
Akida31/skyjump
d51270ae9c67e213761a9bd294b2643912a205d5
[ "MIT" ]
null
null
null
""" entrypoint of the simple skyjump game """ from skyjump.game import Game game = Game() game.run()
12.75
37
0.705882
9b601b1abd013c3a71b7bf2ca36358c2010630b2
1,305
py
Python
create_plugin/create_plugin.py
you0708/volatility
f7f41705c015ee1bd92c729508e627118130953e
[ "Apache-2.0" ]
7
2018-05-19T00:27:11.000Z
2021-06-07T15:36:49.000Z
create_plugin/create_plugin.py
you0708/volatility
f7f41705c015ee1bd92c729508e627118130953e
[ "Apache-2.0" ]
null
null
null
create_plugin/create_plugin.py
you0708/volatility
f7f41705c015ee1bd92c729508e627118130953e
[ "Apache-2.0" ]
1
2021-06-07T15:36:50.000Z
2021-06-07T15:36:50.000Z
#!/usr/bin/env python import subprocess import os, sys import glob import argparse from collections import namedtuple PLUGIN_DIR = None TEMPLATE_FILE = 'malware_template.py' parser = argparse.ArgumentParser(description='Create initial Volatiliy plugin script for malware detection') parser.add_argument('MALWARE_NAME'...
31.829268
115
0.689655
2df7784e18309b2f63c791a1f11b08e20ddfaae5
184
py
Python
FileOpt.py
zhongguohb2018/dytt_spider88
c85c14f5d274cfe585ecb9efa06e69446ea8d354
[ "Apache-2.0" ]
null
null
null
FileOpt.py
zhongguohb2018/dytt_spider88
c85c14f5d274cfe585ecb9efa06e69446ea8d354
[ "Apache-2.0" ]
null
null
null
FileOpt.py
zhongguohb2018/dytt_spider88
c85c14f5d274cfe585ecb9efa06e69446ea8d354
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- #FileOpt.py #文件操作 class FileOptBase: def __init__(self): print("FileOptBase_init") def FileOptPrint(self): print("FileOptBase")
15.333333
29
0.663043
53b33d122706f6d48844b0d787032374cddcc8ae
1,403
py
Python
tripleo_ansible/roles/tripleo_nvdimm/molecule/default/tests/test_default.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
22
2018-08-29T12:33:15.000Z
2022-03-30T00:17:25.000Z
tripleo_ansible/roles/tripleo_nvdimm/molecule/default/tests/test_default.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
1
2020-02-07T20:54:34.000Z
2020-02-07T20:54:34.000Z
tripleo_ansible/roles/tripleo_nvdimm/molecule/default/tests/test_default.py
smolar/tripleo-ansible
7bd37f019870c032bea71f22b305832932d81424
[ "Apache-2.0" ]
19
2019-07-16T04:42:00.000Z
2022-03-30T00:17:29.000Z
# Copyright 2020 Red Hat, 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 ...
34.219512
75
0.741269
724078238973707bd28bdf9f28779811754ff571
709
py
Python
contrib/seeds/makeseeds.py
BulcoinProject/BULC
3be8ab73cc1d7ba8dfd6190648ba462f34ffde9c
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
BulcoinProject/BULC
3be8ab73cc1d7ba8dfd6190648ba462f34ffde9c
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
BulcoinProject/BULC
3be8ab73cc1d7ba8dfd6190648ba462f34ffde9c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Generate pnSeed[] from Pieter's DNS seeder # NSEEDS=600 import re import sys from subprocess import check_output def main(): lines = sys.stdin.readlines() ips = [] pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):50307") for line in lines: m = patt...
21.484848
78
0.509168
0c8671094dc4082f803cd673e34660a1b6b77dea
70
py
Python
samples/basic/hello.py
tsdking/pythonnote
197ef8f989ee8e880bd7f891b546b19ba1c6106d
[ "Apache-2.0" ]
null
null
null
samples/basic/hello.py
tsdking/pythonnote
197ef8f989ee8e880bd7f891b546b19ba1c6106d
[ "Apache-2.0" ]
null
null
null
samples/basic/hello.py
tsdking/pythonnote
197ef8f989ee8e880bd7f891b546b19ba1c6106d
[ "Apache-2.0" ]
1
2022-01-14T13:18:51.000Z
2022-01-14T13:18:51.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- print('Hello, world')
14
23
0.585714
7fd3d7dfb293f85eba82ba9fc3bfaffd9c316bf1
2,778
py
Python
setup.py
emedgene/smart_open
5f730f2e3b2167c9f00e6767c71b31de95af027f
[ "MIT" ]
null
null
null
setup.py
emedgene/smart_open
5f730f2e3b2167c9f00e6767c71b31de95af027f
[ "MIT" ]
null
null
null
setup.py
emedgene/smart_open
5f730f2e3b2167c9f00e6767c71b31de95af027f
[ "MIT" ]
1
2020-02-16T11:32:33.000Z
2020-02-16T11:32:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). import io import os import sys from setuptools import setup, find_packages def read(fname): return io.open(os.path.j...
27.50495
115
0.651908
013440d89aa4768fef4e9b046491f19071c90238
1,331
py
Python
python/subscribe-to-send-grid/main.py
paarthchhabra/demos-for-functions
1794614ae22c11603ac4db3a76751d5d89b464cb
[ "MIT" ]
1
2022-01-31T18:17:56.000Z
2022-01-31T18:17:56.000Z
python/subscribe-to-send-grid/main.py
paarthchhabra/demos-for-functions
1794614ae22c11603ac4db3a76751d5d89b464cb
[ "MIT" ]
2
2022-03-11T08:32:38.000Z
2022-03-11T14:42:33.000Z
python/subscribe-to-send-grid/main.py
paarthchhabra/demos-for-functions
1794614ae22c11603ac4db3a76751d5d89b464cb
[ "MIT" ]
null
null
null
#Importing the required libraries import os import json import requests from appwrite.client import Client #Initialise the Appwrite Client SDK for Python client = Client() (client .set_endpoint(os.environ.get('APPWRITE_ENDPOINT')) #Your API Endpoint .set_project(os.environ.get('APPWRITE_FUNCTION_PROJECT_ID'))...
25.596154
102
0.724267
70ecf56e2f208a8bd6c3126d0caf58a9e26725be
4,260
py
Python
dvc/utils/collections.py
Sayanta66/dvc
0d484d45f710b39c6baf541ac4d23aa983792aae
[ "Apache-2.0" ]
1
2021-07-20T05:33:18.000Z
2021-07-20T05:33:18.000Z
dvc/utils/collections.py
Sayanta66/dvc
0d484d45f710b39c6baf541ac4d23aa983792aae
[ "Apache-2.0" ]
null
null
null
dvc/utils/collections.py
Sayanta66/dvc
0d484d45f710b39c6baf541ac4d23aa983792aae
[ "Apache-2.0" ]
1
2021-08-05T07:15:30.000Z
2021-08-05T07:15:30.000Z
import inspect import os from collections.abc import Mapping from functools import wraps from typing import Callable, Dict, Iterable, List, TypeVar, Union from pygtrie import StringTrie as _StringTrie class PathStringTrie(_StringTrie): """Trie based on platform-dependent separator for pathname components.""" ...
28.783784
77
0.585681
c75da67ca0c4ed0be023582392d5e5cbfb5bfe03
5,997
py
Python
extensions/information/user.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
7
2022-01-26T13:31:17.000Z
2022-03-11T16:34:07.000Z
extensions/information/user.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
null
null
null
extensions/information/user.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
2
2022-01-26T06:05:44.000Z
2022-03-07T18:48:32.000Z
from datetime import datetime from lightbulb.ext import filament import hikari import lightbulb user_plugin = lightbulb.Plugin("user", "User lookup commands") @user_plugin.command @lightbulb.option("target", "The member to get information about.", hikari.Member, required=False) @lightbulb.command("memberinfo", "Get i...
36.791411
131
0.653327
a37dd584f8b3ad912e49fc84a98c4a958da3054a
4,844
py
Python
RecoTauTag/TauTagTools/test/training/training_control_plots.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
RecoTauTag/TauTagTools/test/training/training_control_plots.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
RecoTauTag/TauTagTools/test/training/training_control_plots.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys import re import os input_file = sys.argv[1] output_dir = sys.argv[2] sys.argv[:] = [] if not os.path.exists(output_dir): os.makedirs(output_dir) import ROOT ROOT.gROOT.SetBatch(True) ROOT.gROOT.SetStyle("Plain") ROOT.gStyle.SetPalette(1) def get_by_type(directory, type): ...
36.69697
79
0.655656
e2a929c10517315c0dc12d94a7c27f71db0d5e6b
1,602
py
Python
content_bruter.py
n1cfury/BlackHatPython
26f6e9bce7e13879f0c2d9760d210c222d5e9e3a
[ "MIT" ]
10
2018-08-14T22:28:07.000Z
2020-10-23T16:21:48.000Z
content_bruter.py
n1cfury/BlackHatPython
26f6e9bce7e13879f0c2d9760d210c222d5e9e3a
[ "MIT" ]
1
2018-08-01T05:45:53.000Z
2018-08-01T05:47:45.000Z
content_bruter.py
n1cfury/BlackHatPython
26f6e9bce7e13879f0c2d9760d210c222d5e9e3a
[ "MIT" ]
4
2018-05-18T08:46:29.000Z
2020-05-07T03:28:03.000Z
import urllib2, threading, Queue, urllib threads = 50 target_url = "http://testphp.vulnweb.com" wordlist_file = "/tmp/all.txt" #from SVNDigger resume = None user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/ 20100101 Firefox/19.0" def banner(): print "[***] Directory Brute Force p67 [***]" def build...
26.262295
84
0.654806
5adc86a52bcf2b64cb53e0bf9d1951cec1b54bde
175
py
Python
turbustat/tests/setup_package.py
CFD-UTSA/Turbulence-stars
354d02e38d15e3b0d1f751b43f430dbd3a14c250
[ "MIT" ]
42
2016-04-07T20:49:59.000Z
2022-03-28T12:54:13.000Z
turbustat/tests/setup_package.py
CFD-UTSA/Turbulence-stars
354d02e38d15e3b0d1f751b43f430dbd3a14c250
[ "MIT" ]
131
2015-03-05T21:42:27.000Z
2021-07-22T14:59:04.000Z
turbustat/tests/setup_package.py
CFD-UTSA/Turbulence-stars
354d02e38d15e3b0d1f751b43f430dbd3a14c250
[ "MIT" ]
21
2015-06-10T17:10:06.000Z
2022-02-28T15:59:42.000Z
def get_package_data(): return { _ASTROPY_PACKAGE_NAME_ + '.tests': ['data/*.fits', 'data/*.npz', 'coveragerc'] }
25
72
0.44
de6b16cc981079b5bbfe45ba3d44ce5f61318ece
33,782
py
Python
fairseq/data/multilingual/multilingual_data_manager.py
ypsoh/fairseq
578ee3d456034f12af13e446bba9447844374356
[ "MIT" ]
651
2015-03-14T23:18:44.000Z
2022-01-19T14:08:28.000Z
fairseq/data/multilingual/multilingual_data_manager.py
ypsoh/fairseq
578ee3d456034f12af13e446bba9447844374356
[ "MIT" ]
362
2015-01-26T16:20:28.000Z
2022-01-26T06:19:23.000Z
fairseq/data/multilingual/multilingual_data_manager.py
ypsoh/fairseq
578ee3d456034f12af13e446bba9447844374356
[ "MIT" ]
169
2015-09-28T17:06:28.000Z
2021-12-18T16:02:49.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import logging import os import numpy as np from collections import OrderedDict import json from fairseq import options fro...
44.803714
125
0.596146
8d1026852d02d44189001ca0094c6536d918dfbd
811
py
Python
data_types_continued.py
KennethBui/astr-119-session-3
b66417d2c68e56f54d8cafba318284f6f147e0be
[ "MIT" ]
null
null
null
data_types_continued.py
KennethBui/astr-119-session-3
b66417d2c68e56f54d8cafba318284f6f147e0be
[ "MIT" ]
1
2018-10-10T22:33:34.000Z
2018-10-10T22:33:34.000Z
data_types_continued.py
KennethBui/astr-119-session-3
b66417d2c68e56f54d8cafba318284f6f147e0be
[ "MIT" ]
1
2018-10-18T01:42:03.000Z
2018-10-18T01:42:03.000Z
#string s = "I am a string." print(type(s)) #will say str #Boolean yes = True #Booleaan True print(type(yes)) no = False #Boolean False print(type(no)) # List -- ordered and changeable alpha_list = ["a", "b", "c"] #list initialization print(type(alpha_list)) #will say list print(type(alpha_list[0]...
26.16129
62
0.686806
74127d2936cfd1b9570a617f6456b639db78de5c
1,998
py
Python
tests/step_defs/events/test_event_delete_cancel.py
pbraiders/pomponne-test-bdd
7f2973936318221f54e65e0f8bd839cad7216fa4
[ "MIT" ]
1
2021-03-30T14:41:29.000Z
2021-03-30T14:41:29.000Z
tests/step_defs/events/test_event_delete_cancel.py
pbraiders/pomponne-test-bdd
7f2973936318221f54e65e0f8bd839cad7216fa4
[ "MIT" ]
null
null
null
tests/step_defs/events/test_event_delete_cancel.py
pbraiders/pomponne-test-bdd
7f2973936318221f54e65e0f8bd839cad7216fa4
[ "MIT" ]
null
null
null
# coding=utf-8 """Event deletion, cancel cases.""" from functools import partial from pytest_bdd import ( given, scenario, then, when, ) from pbraiders.contact import ContactFakerFactory # pylint: disable=import-error from pbraiders.event import EventFakerFactory # pylint: disable=import-error from p...
35.052632
109
0.720721
9a7982eb4aea23a4e077c9cd9038a141322318d3
225
py
Python
Beecrowd/Python/ex1052.py
yurifalves/Exercises
a4e84ac76b9432f6c2efdeef6e5e2a093c39882d
[ "MIT" ]
null
null
null
Beecrowd/Python/ex1052.py
yurifalves/Exercises
a4e84ac76b9432f6c2efdeef6e5e2a093c39882d
[ "MIT" ]
null
null
null
Beecrowd/Python/ex1052.py
yurifalves/Exercises
a4e84ac76b9432f6c2efdeef6e5e2a093c39882d
[ "MIT" ]
null
null
null
meses = {1: 'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'July', 8: 'August', 9: 'September', 10: 'October', 11: 'November', 12: 'December'} mes = int(input()) print(meses[mes])
37.5
71
0.524444
c3f07b5a2242cd236396071ab999f8226205519c
11,398
py
Python
pylot/control/mpc/utils.py
alvkao58/pylot
ab49647236fcbc8aa08ec9650e0596e778e9ef85
[ "Apache-2.0" ]
null
null
null
pylot/control/mpc/utils.py
alvkao58/pylot
ab49647236fcbc8aa08ec9650e0596e778e9ef85
[ "Apache-2.0" ]
null
null
null
pylot/control/mpc/utils.py
alvkao58/pylot
ab49647236fcbc8aa08ec9650e0596e778e9ef85
[ "Apache-2.0" ]
null
null
null
import numpy as np import bisect global_config = { 'vehicle': { # configured for lincoln mkz 'length': 4.93, 'width': 1.86, 'offset': 1.0, 'wheel_length': 0.3, 'wheel_width': 0.2, 'track': 0.7, 'wheelbase': 2.85, 'max_steer': np.deg2rad(37.5), ...
30.31383
110
0.514038
b163b1a2e3e2ccbe768741b38d78254078171083
7,153
py
Python
test/azure/AcceptanceTests/test_paging.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/azure/AcceptanceTests/test_paging.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
test/azure/AcceptanceTests/test_paging.py
tasherif-msft/autorest.python
5b0121bcfa802aedaeda36990e8bcaa2b7e26b14
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
38.875
136
0.691598
d9a739e3665ea89c2643020d55818e6fdcbe8066
1,140
py
Python
tests/period/test_add_subtract.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
5,049
2016-07-04T07:16:34.000Z
2022-03-31T07:41:48.000Z
tests/period/test_add_subtract.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
536
2016-07-05T22:46:29.000Z
2022-03-22T12:41:54.000Z
tests/period/test_add_subtract.py
shammellee/pendulum
bb179c8fb6ef92b7bfc471a46338abbfac9fafca
[ "MIT" ]
373
2016-07-05T19:51:51.000Z
2022-03-23T16:57:46.000Z
# -*- coding: utf-8 -*- import pendulum def test_dst_add(): start = pendulum.datetime(2017, 3, 7, tz="America/Toronto") end = start.add(days=6) period = end - start new_end = start + period assert new_end == end def test_dst_add_non_variable_units(): start = pendulum.datetime(2013, 3, 31, ...
21.509434
68
0.635088
de8d1e6cd2d374fc0cf0b5ca9dd5474e02cf4423
4,765
py
Python
applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_mechanical.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_mechanical.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/DamApplication/python_scripts/check_and_prepare_model_process_dam_mechanical.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
import KratosMultiphysics def Factory(settings, Model): if not isinstance(settings, Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return CheckAndPrepareModelProcessDamMechanical(Model, settings["Parameters"]) ## All the processes python should...
56.72619
132
0.729906
d074e1506989e513f365df6336cc7359802542be
1,462
py
Python
src/ikea_api/endpoints/item/item_ingka.py
sqr/ikea-api-client
687cbb532b3e59001437373b9c44af504c8c4baf
[ "MIT" ]
null
null
null
src/ikea_api/endpoints/item/item_ingka.py
sqr/ikea-api-client
687cbb532b3e59001437373b9c44af504c8c4baf
[ "MIT" ]
null
null
null
src/ikea_api/endpoints/item/item_ingka.py
sqr/ikea-api-client
687cbb532b3e59001437373b9c44af504c8c4baf
[ "MIT" ]
null
null
null
from __future__ import annotations from requests import Session from ikea_api.constants import Constants, Secrets from ikea_api.endpoints.item import generic_item_fetcher from ikea_api.errors import ItemFetchError def _fetch_items_specs(session: Session, items: list[str]): url = ( "https://api.ingka.ike...
31.782609
110
0.610807
b78cac078e3f40e2d39ee8077dd56d77d4b01178
29,253
py
Python
ignite_trainer/_trainer.py
jinczing/AudioCLIP
b080fc946599290c91f9d3b203295e5968af1bf6
[ "MIT" ]
304
2021-06-28T09:59:13.000Z
2022-03-30T17:33:52.000Z
ignite_trainer/_trainer.py
AK391/AudioCLIP
45327aa203839bfeb58681dd36c04fd493ee72f4
[ "MIT" ]
5
2021-07-07T06:12:34.000Z
2021-07-23T15:44:06.000Z
ignite_trainer/_trainer.py
AK391/AudioCLIP
45327aa203839bfeb58681dd36c04fd493ee72f4
[ "MIT" ]
34
2021-06-29T11:50:19.000Z
2022-03-02T12:01:36.000Z
import io import os import glob import json import time import tqdm import signal import argparse import numpy as np import torch import torch.utils.data import torchvision as tv import ignite.engine as ieng import ignite.metrics as imet import ignite.handlers as ihan from typing import Any from typing import Dict...
38.289267
125
0.534919
b0971c2dafa16c01eaa3e3bfd01d9066ecf3379c
837
py
Python
watch/urls.py
MachokaDaisy/py-go
0c280b84a52aee23c36cc8387ff4fa466077aa62
[ "MIT" ]
1
2020-10-11T23:58:36.000Z
2020-10-11T23:58:36.000Z
watch/urls.py
MachokaDaisy/py-go
0c280b84a52aee23c36cc8387ff4fa466077aa62
[ "MIT" ]
null
null
null
watch/urls.py
MachokaDaisy/py-go
0c280b84a52aee23c36cc8387ff4fa466077aa62
[ "MIT" ]
null
null
null
"""watch URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based v...
34.875
77
0.698925
b7aa422747d2a9f29daa0d2d90fc8e86ad1d2748
260
py
Python
test/test_del_contact.py
k0Bas/python_training
80d0bb6f91376f7e90052a2d0619419cbf27f9d9
[ "Apache-2.0" ]
null
null
null
test/test_del_contact.py
k0Bas/python_training
80d0bb6f91376f7e90052a2d0619419cbf27f9d9
[ "Apache-2.0" ]
null
null
null
test/test_del_contact.py
k0Bas/python_training
80d0bb6f91376f7e90052a2d0619419cbf27f9d9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.group_contact import GroupContact def test_delete_first_contact(app): if app.contact.count(app) == 0: app.contact.create(GroupContact(firstname="first", lastname="last")) app.contact.delete_first_contact(app)
37.142857
76
0.726923
95ae67f522cd186caf90f0e00dc72bb148bf7aa8
570
py
Python
setup.py
gsgoncalves/tfrecord
b5d0bddf0cbe14e6aea9a1585d186e36a847248a
[ "MIT" ]
9
2020-12-30T02:05:58.000Z
2022-03-31T02:05:06.000Z
setup.py
gsgoncalves/tfrecord
b5d0bddf0cbe14e6aea9a1585d186e36a847248a
[ "MIT" ]
null
null
null
setup.py
gsgoncalves/tfrecord
b5d0bddf0cbe14e6aea9a1585d186e36a847248a
[ "MIT" ]
2
2021-06-20T04:56:49.000Z
2022-03-10T01:35:24.000Z
import sys from distutils.core import setup from setuptools import find_packages # List of runtime dependencies required by this built package install_requires = [] if sys.version_info <= (2, 7): install_requires += ['future', 'typing'] install_requires += ["numpy", "protobuf"] setup( name="tfrecord", v...
23.75
61
0.707018
6277363797a60096da5285c39ded74900d4f61ae
559
py
Python
extract_layers.py
bmtgoncalves/TorinoCourse
7c365dcd1211817a8b4d85e178dcb20a84d142d9
[ "MIT" ]
5
2017-05-03T14:33:27.000Z
2020-05-26T20:43:26.000Z
extract_layers.py
bmtgoncalves/TorinoCourse
7c365dcd1211817a8b4d85e178dcb20a84d142d9
[ "MIT" ]
null
null
null
extract_layers.py
bmtgoncalves/TorinoCourse
7c365dcd1211817a8b4d85e178dcb20a84d142d9
[ "MIT" ]
2
2019-03-21T03:41:20.000Z
2019-11-17T07:58:51.000Z
import json import sys data = json.load(open('GeoJSON/NUTS_RG_20M_2013.geojson')) encoder = json.JSONEncoder() for layer in range(0, 5): countries = {} countries["crs"] = data["crs"] countries["type"] = data["type"] countries["features"] = [] for feat in data["features"]: if feat["properties"]["STA...
22.36
58
0.642218
f371aae739291aa9e510fa3911c3df784746e7a1
239
py
Python
application/admin/tasks.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
application/admin/tasks.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
application/admin/tasks.py
oceanio/flask-boot
df115a7591218d69b4d5b71617e922a516b88df9
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from application import celery, mail from . import security @celery.task def send_security_email(msg): mail.send(msg) @security.send_mail_task def delay_security_email(msg): send_security_email.delay(msg)
18.384615
36
0.753138
9b5b1c845746b2cbe247a9e9e8f65f9bea1fc9cd
1,503
py
Python
qas_experimental_evaluation_project/utils.py
andreportela/qas_intrusion_detection
3daed80e075991185c814de5ef95f50686fc626b
[ "MIT" ]
null
null
null
qas_experimental_evaluation_project/utils.py
andreportela/qas_intrusion_detection
3daed80e075991185c814de5ef95f50686fc626b
[ "MIT" ]
null
null
null
qas_experimental_evaluation_project/utils.py
andreportela/qas_intrusion_detection
3daed80e075991185c814de5ef95f50686fc626b
[ "MIT" ]
null
null
null
import os, time, datetime, subprocess, signal def log_info(task, pid): print(f"{task} pid({pid}) at {datetime.datetime.now()}") def get_total_time_str(minutes=0, seconds=0): seconds_waited_str = f"{seconds} seconds" minutes_waited_str = f"{minutes} minutes" if minutes and seconds: return "". ...
35.785714
89
0.701264
03533b261e0fa400c87687e1e00807eb27533aec
2,008
py
Python
model/gumbel_masks.py
slachapelle/anon_disentanglement_via_mechanism_sparsity
677f7e160f3532e1357a3c7f35f9f8f8529b389a
[ "Apache-2.0" ]
6
2021-11-23T17:23:25.000Z
2022-03-22T21:15:01.000Z
model/gumbel_masks.py
slachapelle/anon_disentanglement_via_mechanism_sparsity
677f7e160f3532e1357a3c7f35f9f8f8529b389a
[ "Apache-2.0" ]
null
null
null
model/gumbel_masks.py
slachapelle/anon_disentanglement_via_mechanism_sparsity
677f7e160f3532e1357a3c7f35f9f8f8529b389a
[ "Apache-2.0" ]
null
null
null
import math import torch class GumbelSigmoid(torch.nn.Module): def __init__(self, shape, freeze=False, drawhard=True, tau=1): super(GumbelSigmoid, self).__init__() self.shape = shape self.freeze=freeze self.drawhard = drawhard self.log_alpha = torch.nn.Parameter(torch.zeros...
34.033898
110
0.592629
4b328b421fb9c09622f3eb53a7b30a1093d3e18c
91,859
py
Python
pika/connection.py
hugovk/pika
03542ef616a2a849e8bfb0845427f50e741ea0c6
[ "BSD-3-Clause" ]
null
null
null
pika/connection.py
hugovk/pika
03542ef616a2a849e8bfb0845427f50e741ea0c6
[ "BSD-3-Clause" ]
null
null
null
pika/connection.py
hugovk/pika
03542ef616a2a849e8bfb0845427f50e741ea0c6
[ "BSD-3-Clause" ]
null
null
null
"""Core connection objects""" # disable too-many-lines # pylint: disable=C0302 import abc import ast import copy import functools import logging import math import numbers import platform import socket import warnings import ssl from pika import __version__ from pika import callback as pika_callback import pika.chann...
37.973956
95
0.628039
b5f8055db652d9af9b348c5374a593a428c9675d
2,059
py
Python
05 Supervised/BurstyBTM/script/eta.py
Cal-Fang/Defund-the-Police-Survey-Project
209ad907cddd2c3b3616f5dd2fc2e06f5449b2c7
[ "MIT" ]
null
null
null
05 Supervised/BurstyBTM/script/eta.py
Cal-Fang/Defund-the-Police-Survey-Project
209ad907cddd2c3b3616f5dd2fc2e06f5449b2c7
[ "MIT" ]
null
null
null
05 Supervised/BurstyBTM/script/eta.py
Cal-Fang/Defund-the-Police-Survey-Project
209ad907cddd2c3b3616f5dd2fc2e06f5449b2c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # compute eta(the bursty probability) for each biterm in each day import sys # read the day frequency for each biterm # Input format: w1 w2 freq # compute and output the etas in a day def proc_day(bdf_pt, day, res_pt): etas = {} for l in open(bdf_pt): ...
36.122807
132
0.558038