hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f710e3fc0e09880ad2d7a75f9ac3339aa1d05698
3,765
py
Python
StandardDataSets/collada/library_effects/effect/image/singleImage/singleImage.py
KhronosGroup/COLLADA-CTS
61f2a560cbb2a06ee62da8025241f6b08d06bfd9
[ "MIT" ]
20
2015-03-19T08:02:57.000Z
2020-10-16T15:16:11.000Z
StandardDataSets/collada/library_effects/effect/profile_COMMON/image/oneImageDiffDir/oneImageDiffDir.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
4
2017-04-19T18:42:05.000Z
2017-06-17T03:03:28.000Z
StandardDataSets/collada/library_effects/effect/profile_COMMON/image/oneImageDiffDir/oneImageDiffDir.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
10
2015-03-26T02:52:24.000Z
2022-02-24T08:43:48.000Z
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
53.785714
467
0.728818
from StandardDataSets.scripts import JudgeAssistant tagLst = [] attrName = '' attrVal = '' dataToCheck = '' class SimpleJudgingObject: def __init__(self, _tagLst, _attrName, _attrVal, _data): self.tagList = _tagLst self.attrName = _attrName self.attrVal ...
true
true
f710e48f87b066661c04bad6f9ccc2417d946d9c
10,349
py
Python
matmul.py
peterwauligmann/sparse_mm
344c06c183854f72224c1e88ad2ced2e092d4efb
[ "BSD-3-Clause" ]
null
null
null
matmul.py
peterwauligmann/sparse_mm
344c06c183854f72224c1e88ad2ced2e092d4efb
[ "BSD-3-Clause" ]
null
null
null
matmul.py
peterwauligmann/sparse_mm
344c06c183854f72224c1e88ad2ced2e092d4efb
[ "BSD-3-Clause" ]
2
2020-12-09T12:46:58.000Z
2021-07-13T10:56:44.000Z
from typing import Tuple from codegen.ast import * from codegen.sugar import * from codegen.forms import * from codegen.precision import * import scripts.old_arm import scripts.max_bn_knl from cursors import * import architecture import numpy def decompose_pattern(k, n, pattern:Matrix[bool], bk:int, bn:int) -> Tup...
35.320819
240
0.527684
from typing import Tuple from codegen.ast import * from codegen.sugar import * from codegen.forms import * from codegen.precision import * import scripts.old_arm import scripts.max_bn_knl from cursors import * import architecture import numpy def decompose_pattern(k, n, pattern:Matrix[bool], bk:int, bn:int) -> Tup...
true
true
f710e546a33ec5507341c5a48dd231538f0e973b
3,393
py
Python
sdk/communication/azure-communication-administration/tests/test_communication_identity_client_async.py
ljos/azure-sdk-for-python
f64b1e269fc4f05a5a2ca68dda3c8f8b4ed0301e
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/communication/azure-communication-administration/tests/test_communication_identity_client_async.py
ljos/azure-sdk-for-python
f64b1e269fc4f05a5a2ca68dda3c8f8b4ed0301e
[ "MIT" ]
null
null
null
sdk/communication/azure-communication-administration/tests/test_communication_identity_client_async.py
ljos/azure-sdk-for-python
f64b1e269fc4f05a5a2ca68dda3c8f8b4ed0301e
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
44.644737
95
0.736516
import pytest from azure.communication.administration.aio import CommunicationIdentityClient from azure_devtools.scenario_tests import RecordingProcessor from devtools_testutils import ResourceGroupPreparer from _shared.helper import URIIdentityReplacer from _shared.asynctestcase import AsyncCommunicationTestCas...
true
true
f710e55ac5e0fd15213c1588668531cca7d3d44b
3,815
py
Python
dy-get.py
1A2553E/dy-get
fd66a9132e592b5c8f033e37e57ed2ad3dc9207c
[ "Apache-2.0" ]
null
null
null
dy-get.py
1A2553E/dy-get
fd66a9132e592b5c8f033e37e57ed2ad3dc9207c
[ "Apache-2.0" ]
null
null
null
dy-get.py
1A2553E/dy-get
fd66a9132e592b5c8f033e37e57ed2ad3dc9207c
[ "Apache-2.0" ]
null
null
null
from moviepy.editor import * from os import chdir, getcwd, mkdir from random import randint import sys import requests from concurrent.futures import ThreadPoolExecutor from requests import get, head import time # 自定义 THREAD_NUM=12 # 线程数,默认为12个 HEADER=" "# 请求头,默认为一个空格 class downloader: def __init__(self, url, nu...
28.470149
100
0.597641
from moviepy.editor import * from os import chdir, getcwd, mkdir from random import randint import sys import requests from concurrent.futures import ThreadPoolExecutor from requests import get, head import time THREAD_NUM=12 HEADER=" " class downloader: def __init__(self, url, num, name): self.url = u...
true
true
f710e59b79ce144a6b83f278253f4474c45ed44c
1,067
py
Python
piquasso/_math/permanent.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
12
2021-09-12T15:51:45.000Z
2022-03-05T22:25:47.000Z
piquasso/_math/permanent.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
36
2021-09-13T08:01:27.000Z
2022-03-21T11:53:30.000Z
piquasso/_math/permanent.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Budapest Quantum Computing Group # # 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...
33.34375
114
0.774133
from theboss.boson_sampling_utilities.permanent_calculators.glynn_gray_permanent_calculator import ( GlynnGrayPermanentCalculator, ) def _permanent(matrix, rows, columns, calculator_class): calculator = calculator_class(matrix, rows, columns) return calculator.compute_permanent() def ...
true
true
f710e5daa7c9cafa194bdd85305f0273e762ebd7
5,647
py
Python
pipeline/recon/helpers.py
ponderng/recon-pipeline
11d09902c54969af47731b8e235e447806246004
[ "MIT" ]
null
null
null
pipeline/recon/helpers.py
ponderng/recon-pipeline
11d09902c54969af47731b8e235e447806246004
[ "MIT" ]
null
null
null
pipeline/recon/helpers.py
ponderng/recon-pipeline
11d09902c54969af47731b8e235e447806246004
[ "MIT" ]
null
null
null
import sys import pickle import typing import inspect import pkgutil import importlib import ipaddress import json import re from pathlib import Path from cmd2.ansi import style from collections import defaultdict from ..recon.config import defaults def meets_requirements(requirements, exception): """ Determine...
38.155405
129
0.613777
import sys import pickle import typing import inspect import pkgutil import importlib import ipaddress import json import re from pathlib import Path from cmd2.ansi import style from collections import defaultdict from ..recon.config import defaults def meets_requirements(requirements, exception): tools = get_t...
true
true
f710e627aa4d7866c5fe99d277395b7e63de88da
2,126
py
Python
tests/test_decorators.py
matibek/request_limiter
56d8208d48a7d4a825de170c79b58ae5006101dc
[ "MIT" ]
1
2020-01-21T08:46:37.000Z
2020-01-21T08:46:37.000Z
tests/test_decorators.py
matibek/request_limiter
56d8208d48a7d4a825de170c79b58ae5006101dc
[ "MIT" ]
5
2020-06-05T20:29:43.000Z
2021-06-04T22:17:55.000Z
tests/test_decorators.py
matibek/request_limiter
56d8208d48a7d4a825de170c79b58ae5006101dc
[ "MIT" ]
null
null
null
import os import unittest from typing import Optional from django.http import HttpResponse from django.test import RequestFactory from request_limiter import request_limiter, LimitedIntervalStrategy, \ LimitStrategy, LimitException, django_request_limiter os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_set...
31.264706
78
0.707902
import os import unittest from typing import Optional from django.http import HttpResponse from django.test import RequestFactory from request_limiter import request_limiter, LimitedIntervalStrategy, \ LimitStrategy, LimitException, django_request_limiter os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_set...
true
true
f710e635254e2e0650c360f0940bd529576ce4a8
2,098
py
Python
siliconcompiler/targets/freepdk45_demo.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
424
2021-12-04T15:45:12.000Z
2022-03-31T20:27:55.000Z
siliconcompiler/targets/freepdk45_demo.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
105
2021-12-03T21:25:29.000Z
2022-03-31T22:36:59.000Z
siliconcompiler/targets/freepdk45_demo.py
siliconcompiler/siliconcompiler
6aa2b53441608f228bd520b68c0324fc9cf96377
[ "Apache-2.0" ]
38
2021-12-04T21:26:20.000Z
2022-03-21T02:39:29.000Z
import siliconcompiler ############################################################################ # DOCS ############################################################################ def make_docs(): ''' Demonstration target for compiling ASICs with FreePDK45 and the open-source asicflow. ''' ch...
27.973333
79
0.521926
import siliconcompiler
true
true
f710e6c669d322132e2dcb4843a6941ea5ad37e6
692
py
Python
docs/src/path_operation_configuration/tutorial005.py
kabirkhan/fastapi
9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e
[ "MIT" ]
3
2019-03-15T02:44:48.000Z
2020-03-14T15:42:52.000Z
docs/src/path_operation_configuration/tutorial005.py
kabirkhan/fastapi
9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e
[ "MIT" ]
null
null
null
docs/src/path_operation_configuration/tutorial005.py
kabirkhan/fastapi
9ca72f4ea1fc6f04b7d8d4e2f3c4d7da5f6c322e
[ "MIT" ]
null
null
null
from typing import Set from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str = None price: float tax: float = None tags: Set[str] = [] @app.post( "/items/", response_model=Item, summary="Create an item", res...
20.352941
58
0.648844
from typing import Set from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str = None price: float tax: float = None tags: Set[str] = [] @app.post( "/items/", response_model=Item, summary="Create an item", res...
true
true
f710e71139bfd217a3c3797b5fac1bf60fb7b9ba
2,446
py
Python
util/flowerapiclient.py
E-ARK-Software/earkweb
6b30abf776950bbfffcf4a5a75d10d869a386941
[ "MIT" ]
4
2019-12-19T17:17:42.000Z
2021-12-11T23:12:45.000Z
util/flowerapiclient.py
E-ARK-Software/earkweb
6b30abf776950bbfffcf4a5a75d10d869a386941
[ "MIT" ]
32
2020-03-19T15:56:05.000Z
2021-12-23T12:46:06.000Z
util/flowerapiclient.py
E-ARK-Software/earkweb
6b30abf776950bbfffcf4a5a75d10d869a386941
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=UTF-8 import requests import json import datetime from config.configuration import flower_path, flower_port, flower_server_external, verify_certificate, \ flower_server_internal def get_task_info(task_id): flower_request_url = 'http://%s:%s%sapi/tasks' % (flower_server_interna...
34.450704
109
0.650859
import requests import json import datetime from config.configuration import flower_path, flower_port, flower_server_external, verify_certificate, \ flower_server_internal def get_task_info(task_id): flower_request_url = 'http://%s:%s%sapi/tasks' % (flower_server_internal, flower_port, flower_path) pr...
true
true
f710e73434b5020f06243314999148df6c19f73a
6,783
py
Python
celery/tests/test_app/test_log.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
celery/tests/test_app/test_log.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
celery/tests/test_app/test_log.py
amplify-education/celery
3ea8824d9bdb6c5928701cf8466287d4259aa0e0
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import with_statement import sys import logging from tempfile import mktemp from celery import log from celery.log import (setup_logger, setup_task_logger, get_default_logger, get_task_logger, redirect_stdouts_to_lo...
35.7
74
0.606959
from __future__ import absolute_import from __future__ import with_statement import sys import logging from tempfile import mktemp from celery import log from celery.log import (setup_logger, setup_task_logger, get_default_logger, get_task_logger, redirect_stdouts_to_lo...
true
true
f710e7cc0a55f576ed3976d40a305404c5bb7c1a
290
py
Python
app/handlers/housekeeping/edit_group.py
jamestiotio/wthslack
4ada5e2354bfd9ffd46731abe35b65ef8a09d4f1
[ "MIT" ]
2
2020-07-10T21:06:53.000Z
2020-10-27T17:05:05.000Z
app/handlers/housekeeping/edit_group.py
wthdevelopers/wthslack
f6566e35b5455fcdfb12d9b33d65843b67aff17c
[ "MIT" ]
7
2020-02-09T12:08:00.000Z
2021-06-27T16:51:29.000Z
app/handlers/housekeeping/edit_group.py
jamestiotio/wthslack
4ada5e2354bfd9ffd46731abe35b65ef8a09d4f1
[ "MIT" ]
2
2020-02-07T15:35:24.000Z
2020-02-07T17:28:50.000Z
# coding: utf-8 # Modify a specific group entry in database # Created by James Raphael Tiovalen (2021) import slack import ast import settings import config from slackers.hooks import commands conv_db = config.conv_handler @commands.on("editgroup") def editgroup(payload): return
15.263158
43
0.772414
import slack import ast import settings import config from slackers.hooks import commands conv_db = config.conv_handler @commands.on("editgroup") def editgroup(payload): return
true
true
f710e823f2a52468b6bf8b0468de4cc58fdfd2fd
2,720
py
Python
demo_odometry.py
SimonsRoad/UnDeepVO
956598958e0dba4729a8af70ee7a4cdcc10f09ec
[ "MIT" ]
1
2018-07-16T12:15:29.000Z
2018-07-16T12:15:29.000Z
demo_odometry.py
SimonsRoad/UnDeepVO
956598958e0dba4729a8af70ee7a4cdcc10f09ec
[ "MIT" ]
null
null
null
demo_odometry.py
SimonsRoad/UnDeepVO
956598958e0dba4729a8af70ee7a4cdcc10f09ec
[ "MIT" ]
1
2018-10-15T12:39:51.000Z
2018-10-15T12:39:51.000Z
"""Example of pykitti.odometry usage.""" import itertools import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D import pykitti __author__ = "Lee Clement" __email__ = "lee.clement@robotics.utias.utoronto.ca" # Change this to the directory where you store KITTI data basedir = './d...
33.170732
77
0.711397
import itertools import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D import pykitti __author__ = "Lee Clement" __email__ = "lee.clement@robotics.utias.utoronto.ca" basedir = './data/dataset' sequence = '01' dataset = pykitti.odometry(basedir, sequence, frames=range(0, ...
true
true
f710e91c291039791cd1d0ecd77934ed50435b77
3,460
py
Python
gaussian_detection/data/dataset/CurrentDateset.py
PKQ1688/text_detection
e306b003f2e8eb9f8d07fc95d2d9def14fa8b38c
[ "Apache-2.0" ]
null
null
null
gaussian_detection/data/dataset/CurrentDateset.py
PKQ1688/text_detection
e306b003f2e8eb9f8d07fc95d2d9def14fa8b38c
[ "Apache-2.0" ]
null
null
null
gaussian_detection/data/dataset/CurrentDateset.py
PKQ1688/text_detection
e306b003f2e8eb9f8d07fc95d2d9def14fa8b38c
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # @author :adolf import os from data.data_utils import order_points_clockwise from data.data_aug import * from data.make_labels import * class CurrentOcrData(object): def __init__(self, root, pre_processes=None, transforms=None, filter_keys=None, ignore_tags=None, is_training=True): ...
34.257426
120
0.551156
import os from data.data_utils import order_points_clockwise from data.data_aug import * from data.make_labels import * class CurrentOcrData(object): def __init__(self, root, pre_processes=None, transforms=None, filter_keys=None, ignore_tags=None, is_training=True): self.is_training = is_training ...
true
true
f710e9b2e374ff122b8766f60cdbc6d0288bae13
3,156
py
Python
leetcode/117_populate_next_right_pointer_in_each_node_2.py
yatao91/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
3
2021-05-25T16:58:52.000Z
2022-02-05T09:37:17.000Z
leetcode/117_populate_next_right_pointer_in_each_node_2.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
leetcode/117_populate_next_right_pointer_in_each_node_2.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ 二叉树:填充每个节点的下一个右侧节点指针2 https://leetcode-cn.com/problems/populating-next-right-pointers-in-each-node-ii/ """ class Node: def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None): self.val = val self.left = left self.right = ...
30.057143
101
0.560837
class Node: def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None): self.val = val self.left = left self.right = right self.next = next class Solution: def processChild(self, childNode: 'Node', prev: 'Node', leftmost: 'Node') -> tupl...
true
true
f710e9f366623389796c8dc337338647dd2f4046
1,251
py
Python
tests/test_list.py
turbocat2001/tinypy
843b45b3675bc290d27cf50fedc05373ff2ae62e
[ "PSF-2.0" ]
17
2019-10-07T15:54:01.000Z
2022-01-20T06:33:16.000Z
tests/test_list.py
turbocat2001/tinypy
843b45b3675bc290d27cf50fedc05373ff2ae62e
[ "PSF-2.0" ]
24
2019-02-16T07:49:31.000Z
2021-05-31T07:16:45.000Z
tests/test_list.py
turbocat2001/tinypy
843b45b3675bc290d27cf50fedc05373ff2ae62e
[ "PSF-2.0" ]
4
2020-11-24T23:03:02.000Z
2021-05-30T03:34:02.000Z
from tinypy.runtime.testing import UnitTest class MyTest(UnitTest): def test_lessthan(self): assert [1, 2] < [2] assert [1, 2] <= [2] assert [1] < [2] assert [1] <= [2] assert [] < [1] def test_greaterthan(self): assert [2] > [1] assert [1, 2] > [1] ...
25.530612
64
0.460432
from tinypy.runtime.testing import UnitTest class MyTest(UnitTest): def test_lessthan(self): assert [1, 2] < [2] assert [1, 2] <= [2] assert [1] < [2] assert [1] <= [2] assert [] < [1] def test_greaterthan(self): assert [2] > [1] assert [1, 2] > [1] ...
true
true
f710ea07fd04d18c044bb23dbadb145eeb1689c0
420
py
Python
store/migrations/0009_alter_product_images.py
falconsoft3d/clientportal_shop
bc09eda46cb42bbc490dfc6d958250ec000073b5
[ "MIT" ]
5
2022-03-14T21:15:20.000Z
2022-03-22T10:11:58.000Z
store/migrations/0009_alter_product_images.py
falconsoft3d/clientportal_shop
bc09eda46cb42bbc490dfc6d958250ec000073b5
[ "MIT" ]
null
null
null
store/migrations/0009_alter_product_images.py
falconsoft3d/clientportal_shop
bc09eda46cb42bbc490dfc6d958250ec000073b5
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2022-03-24 15:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0008_alter_product_product_name'), ] operations = [ migrations.AlterField( model_name='product', name='imag...
22.105263
77
0.616667
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0008_alter_product_product_name'), ] operations = [ migrations.AlterField( model_name='product', name='images', field=models.ImageField(blank=...
true
true
f710eb511746bae3875a98aa7276b03dcf488041
1,523
py
Python
django_extensions/management/commands/clean_pyc.py
KazakovDenis/django-extensions
ef3b3abe3c3d6563b73633bd25e3ff3ac9716661
[ "MIT" ]
4,057
2015-01-01T17:56:25.000Z
2022-03-31T16:32:40.000Z
django_extensions/management/commands/clean_pyc.py
KazakovDenis/django-extensions
ef3b3abe3c3d6563b73633bd25e3ff3ac9716661
[ "MIT" ]
1,115
2015-01-01T14:59:38.000Z
2022-03-28T22:05:55.000Z
django_extensions/management/commands/clean_pyc.py
KazakovDenis/django-extensions
ef3b3abe3c3d6563b73633bd25e3ff3ac9716661
[ "MIT" ]
951
2015-01-02T16:57:26.000Z
2022-03-28T21:42:22.000Z
# -*- coding: utf-8 -*- import fnmatch import os from os.path import join as _j from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Removes all python bytecode compiled...
33.108696
95
0.620486
import fnmatch import os from os.path import join as _j from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django_extensions.management.utils import signalcommand class Command(BaseCommand): help = "Removes all python bytecode compiled files from the project...
true
true
f710ebce031db7b1fee12609e6116bfb2c72f855
411
py
Python
dcctools/freqs_of_matching_projs.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
null
null
null
dcctools/freqs_of_matching_projs.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
1
2021-10-01T15:13:15.000Z
2021-10-01T15:13:15.000Z
dcctools/freqs_of_matching_projs.py
NACHC-CAD/linkage-agent-tools
324299e534bc55bd652eb670feb195ce5646f13e
[ "Apache-2.0" ]
null
null
null
from config import Configuration from pymongo import MongoClient c = Configuration("config.json") client = MongoClient(c.mongo_uri) database = client.linkage_agent results = database.match_groups.aggregate( [ { "$group": { "_id": {"$size": "$run_results"}, "tota...
19.571429
49
0.564477
from config import Configuration from pymongo import MongoClient c = Configuration("config.json") client = MongoClient(c.mongo_uri) database = client.linkage_agent results = database.match_groups.aggregate( [ { "$group": { "_id": {"$size": "$run_results"}, "tota...
true
true
f710ebfe96225e5ddcad7a7dd3bcf159cbd86425
2,814
py
Python
tests/test_test_functions.py
thouska/SALib
fd64136192f00a9e3e65a8c5c05e30d93ed5e750
[ "MIT" ]
2
2019-02-01T17:24:38.000Z
2019-02-01T17:30:43.000Z
tests/test_test_functions.py
penghuz/SALib
5deeaf316ef58ea0a26295c8ad2ca57cdc739d45
[ "MIT" ]
3
2018-11-06T11:13:43.000Z
2018-11-16T15:48:44.000Z
tests/test_test_functions.py
penghuz/SALib
5deeaf316ef58ea0a26295c8ad2ca57cdc739d45
[ "MIT" ]
2
2019-09-22T05:30:21.000Z
2021-12-02T03:15:31.000Z
from nose.tools import assert_almost_equal, assert_equal, raises from numpy.testing import assert_allclose import numpy as np from SALib.test_functions.Sobol_G import evaluate, total_variance, \ partial_first_order_variance, \ sensitivity_index...
28.714286
85
0.641436
from nose.tools import assert_almost_equal, assert_equal, raises from numpy.testing import assert_allclose import numpy as np from SALib.test_functions.Sobol_G import evaluate, total_variance, \ partial_first_order_variance, \ sensitivity_index...
true
true
f710ec229ca894ca35d13cd7b05863a50af3e4d5
1,129
py
Python
azext_iot/sdk/iothub/service/models/digital_twin_interfaces_patch_interfaces_value.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
null
null
null
azext_iot/sdk/iothub/service/models/digital_twin_interfaces_patch_interfaces_value.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
null
null
null
azext_iot/sdk/iothub/service/models/digital_twin_interfaces_patch_interfaces_value.py
YingXue/azure-iot-cli-extension
efe7897b1ae1d2a9953f501abe7654b84d69372d
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
37.633333
114
0.649247
from msrest.serialization import Model class DigitalTwinInterfacesPatchInterfacesValue(Model): _attribute_map = { 'properties': {'key': 'properties', 'type': '{DigitalTwinInterfacesPatchInterfacesValuePropertiesValue}'}, } def __init__(self, **kwargs): super(DigitalTwinInterfa...
true
true
f710ee9b7dec0a3ac267c1d7e46c767a086a4ec8
1,450
py
Python
proselint/checks/consistency/spelling.py
ankita240796/proselint
50d2a482df8f467737f9c958ace98ba152bec832
[ "BSD-3-Clause" ]
4,163
2015-10-03T07:37:21.000Z
2022-03-31T03:52:32.000Z
proselint/checks/consistency/spelling.py
ankita240796/proselint
50d2a482df8f467737f9c958ace98ba152bec832
[ "BSD-3-Clause" ]
878
2015-09-30T20:03:33.000Z
2022-03-28T11:06:15.000Z
proselint/checks/consistency/spelling.py
ankita240796/proselint
50d2a482df8f467737f9c958ace98ba152bec832
[ "BSD-3-Clause" ]
249
2015-10-04T12:21:27.000Z
2022-02-28T22:13:11.000Z
"""Inconsistent spelling. --- layout: post source: Intelligent Editing Ltd. source_url: http://bit.ly/1x3hYj7 title: Inconsistent spelling date: 2014-06-10 12:31:19 categories: writing --- Intelligent Editing Ltd. says: > Some words have more than one correct spelling. American, British, Australia...
30.208333
79
0.648276
from proselint.tools import consistency_check, memoize @memoize def check(text): err = "consistency.spelling" msg = "Inconsistent spelling of '{}' (vs. '{}')." word_pairs = [ ["advisor", "adviser"], ["centre", "center"], ["colour", "color"], ["emphasise", "emphasi...
true
true
f710eef1eb36847687f68491ed5a96826bf349fb
318
py
Python
setup.py
allenai/manipulathor
4562eb8c2f67ff67e5b9ba3930da84b6023a58a4
[ "MIT" ]
55
2021-04-20T03:51:25.000Z
2022-03-30T02:30:53.000Z
setup.py
allenai/manipulathor
4562eb8c2f67ff67e5b9ba3930da84b6023a58a4
[ "MIT" ]
7
2021-04-28T17:35:02.000Z
2021-08-24T09:37:14.000Z
setup.py
allenai/manipulathor
4562eb8c2f67ff67e5b9ba3930da84b6023a58a4
[ "MIT" ]
10
2021-04-23T00:56:39.000Z
2022-02-22T08:28:33.000Z
from setuptools import find_packages, setup if __name__ == "__main__": setup( name="manipulathor", packages=find_packages(), version="0.0.1", install_requires=[ "allenact==0.2.2", "allenact_plugins[ithor]==0.2.2", "setuptools", ], )
22.714286
45
0.531447
from setuptools import find_packages, setup if __name__ == "__main__": setup( name="manipulathor", packages=find_packages(), version="0.0.1", install_requires=[ "allenact==0.2.2", "allenact_plugins[ithor]==0.2.2", "setuptools", ], )
true
true
f710efea21dad3a91fd998d1e0b0dc08ee754d47
9,973
py
Python
src/nft_analytics.py
dineshpinto/nft_analytics
99fd4adbfe786f4de6fa2a6a0c5e8a58eaaf338a
[ "MIT" ]
6
2022-01-09T05:04:07.000Z
2022-03-03T20:26:27.000Z
src/nft_analytics.py
dineshpinto/nft-analytics
99fd4adbfe786f4de6fa2a6a0c5e8a58eaaf338a
[ "MIT" ]
null
null
null
src/nft_analytics.py
dineshpinto/nft-analytics
99fd4adbfe786f4de6fa2a6a0c5e8a58eaaf338a
[ "MIT" ]
1
2022-02-09T04:58:51.000Z
2022-02-09T04:58:51.000Z
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2021 Dinesh Pinto 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, ...
39.418972
108
0.620475
import json import logging import os import sys from json import JSONDecodeError import numpy as np import pandas as pd from tqdm import tqdm from .infura_api import InfuraAPI from .opensea_api import OpenSeaAPI logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', ...
true
true
f710efff7d7574d3bc12318a869b973a6e958e4c
1,376
py
Python
07patterns/proxy_patterns.py
edgells/python-commons
38c0aa0ec10304a4147ea231c92c9e34da462052
[ "MIT" ]
null
null
null
07patterns/proxy_patterns.py
edgells/python-commons
38c0aa0ec10304a4147ea231c92c9e34da462052
[ "MIT" ]
null
null
null
07patterns/proxy_patterns.py
edgells/python-commons
38c0aa0ec10304a4147ea231c92c9e34da462052
[ "MIT" ]
null
null
null
""" proxy patterns: 代理模式 为其它对象提供一种代理以控制对这个对象的操作 要素: 一个开放的方法集(interface) 实现相应方法集的proxy 对象 实现了相应方法集的类 应用: 远程代理, 为一个对象在不同地址空间提供局部代表, 这样就可以隐藏一个对象存在于不同地址空间的事实 哪么两个进程间, 是否可以通过这样的方式实现数据共享 虚拟代理, 根据需要创建开销很大的对象, 通过它存放实例化需要很长时间的真实对象 安全代理, 用来控制真实对象访问时...
18.346667
65
0.630087
class GiveGift: def give_dolls(self): raise NotImplemented("give dolls not implementation") def give_flowers(self): raise NotImplemented("give flowers not implementation") def give_give_chocolate(self): raise NotImplemented("give chocolate not implementation") class Pursuit(Giv...
true
true
f710f0a83392d109deba5e1325e4da0add75371c
992
py
Python
miranda/templates/eccc_conversion_legacy.py
Ouranosinc/miranda
5c54767a4e6e6c3c1f638ca0fe22673ea98e2746
[ "Apache-2.0" ]
4
2019-11-07T17:45:26.000Z
2021-09-22T18:22:01.000Z
miranda/templates/eccc_conversion_legacy.py
Ouranosinc/miranda
5c54767a4e6e6c3c1f638ca0fe22673ea98e2746
[ "Apache-2.0" ]
12
2019-09-19T17:05:39.000Z
2022-03-31T20:26:16.000Z
miranda/templates/eccc_conversion_legacy.py
Ouranosinc/miranda
5c54767a4e6e6c3c1f638ca0fe22673ea98e2746
[ "Apache-2.0" ]
1
2020-02-01T01:01:22.000Z
2020-02-01T01:01:22.000Z
from datetime import date from pathlib import Path from miranda.eccc import aggregate_nc_files, convert_hourly_flat_files if __name__ == "__main__": var_names = [ "atmospheric_pressure", "wind_speed", "relative_humidity", "dry_bulb_temperature", "freezing_rain", "i...
28.342857
80
0.646169
from datetime import date from pathlib import Path from miranda.eccc import aggregate_nc_files, convert_hourly_flat_files if __name__ == "__main__": var_names = [ "atmospheric_pressure", "wind_speed", "relative_humidity", "dry_bulb_temperature", "freezing_rain", "i...
true
true
f710f131b31a6ae3297050ebf6dc9c582f0bcce4
1,207
py
Python
emails/migrations/0001_initial.py
vftens/Django-CRM
fd02e42b2e9525abcc0e14ee924e5bdf569117bb
[ "MIT" ]
null
null
null
emails/migrations/0001_initial.py
vftens/Django-CRM
fd02e42b2e9525abcc0e14ee924e5bdf569117bb
[ "MIT" ]
null
null
null
emails/migrations/0001_initial.py
vftens/Django-CRM
fd02e42b2e9525abcc0e14ee924e5bdf569117bb
[ "MIT" ]
null
null
null
# Generated by Django 2.1.2 on 2019-01-28 07:07 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Email", fields=[ ( "id", ...
32.621622
81
0.488815
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Email", fields=[ ( "id", models.AutoField( ...
true
true
f710f14079931a4defa63d5727d3ec20f1744236
1,799
py
Python
colors_from_mpl.py
smsaladi/fixthejet
b3089e6ee8cf2afbf24251de47702e0b1446eb73
[ "MIT" ]
3
2018-04-18T05:05:34.000Z
2019-04-30T01:41:10.000Z
colors_from_mpl.py
smsaladi/fixthejet
b3089e6ee8cf2afbf24251de47702e0b1446eb73
[ "MIT" ]
2
2018-03-29T16:28:23.000Z
2018-05-13T20:41:48.000Z
colors_from_mpl.py
smsaladi/fixthejet
b3089e6ee8cf2afbf24251de47702e0b1446eb73
[ "MIT" ]
null
null
null
""" Writes out hex colors from color scales provided in matplotlib into JS file python colors_from_mpl.py >> js/colorscales.js """ import itertools import json import numpy as np import matplotlib.colors import matplotlib.cm # Have colormaps separated into categories: # http://matplotlib.org/examples/color/colormap...
33.943396
74
0.595887
import itertools import json import numpy as np import matplotlib.colors import matplotlib.cm cmap_names = [ ('Perceptually Uniform Sequential', [ 'viridis', 'plasma', 'inferno', 'magma']), ('Sequential', [ 'Greys', 'Purples', 'Blues', 'Greens', 'Oranges', 'Reds', 'YlOrBr', 'YlOrRd'...
true
true
f710f3dcc85493b56211d6d60424c411329b33b7
697
py
Python
walter/common/walterWidgets/__init__.py
all-in-one-of/OpenWalter
c2034f7fac20b36ffe3e500c01d40b87e84e2b97
[ "libtiff" ]
187
2018-08-14T19:06:20.000Z
2022-03-04T06:03:25.000Z
walter/common/walterWidgets/__init__.py
all-in-one-of/OpenWalter
c2034f7fac20b36ffe3e500c01d40b87e84e2b97
[ "libtiff" ]
9
2018-08-22T15:34:48.000Z
2019-11-27T13:45:21.000Z
walter/common/walterWidgets/__init__.py
all-in-one-of/OpenWalter
c2034f7fac20b36ffe3e500c01d40b87e84e2b97
[ "libtiff" ]
41
2018-08-14T19:06:09.000Z
2021-09-04T20:01:10.000Z
# Copyright 2017 Rodeo FX. All rights reserved. from .utils import dpiScale from .utils import toPyObject from .walterBaseTreeView import ACTIONS from .walterBaseTreeView import BaseDelegate from .walterBaseTreeView import BaseItem from .walterBaseTreeView import BaseModel from .walterBaseTreeView import BaseTreeView ...
38.722222
54
0.875179
from .utils import dpiScale from .utils import toPyObject from .walterBaseTreeView import ACTIONS from .walterBaseTreeView import BaseDelegate from .walterBaseTreeView import BaseItem from .walterBaseTreeView import BaseModel from .walterBaseTreeView import BaseTreeView from .walterBaseTreeView import NODE_BAR_COLOUR...
true
true
f710f4117998ddf963e36f7ec2257386788aec0a
3,240
py
Python
examples/ssh/asyncssh-server.py
GoTodd/python-prompt-toolkit
a9488fbd2ab1dff8e736b6f15c8811a6e4702f0a
[ "BSD-3-Clause" ]
1
2021-07-09T15:46:40.000Z
2021-07-09T15:46:40.000Z
examples/ssh/asyncssh-server.py
GoTodd/python-prompt-toolkit
a9488fbd2ab1dff8e736b6f15c8811a6e4702f0a
[ "BSD-3-Clause" ]
1
2020-08-11T19:53:13.000Z
2020-08-11T19:53:13.000Z
examples/ssh/asyncssh-server.py
GoTodd/python-prompt-toolkit
a9488fbd2ab1dff8e736b6f15c8811a6e4702f0a
[ "BSD-3-Clause" ]
1
2020-10-28T01:55:03.000Z
2020-10-28T01:55:03.000Z
#!/usr/bin/env python """ Example of running a prompt_toolkit application in an asyncssh server. """ import asyncio import logging import asyncssh from pygments.lexers.html import HtmlLexer from prompt_toolkit.completion import WordCompleter from prompt_toolkit.contrib.ssh import PromptToolkitSSHServer, PromptToolkit...
26.557377
86
0.641975
import asyncio import logging import asyncssh from pygments.lexers.html import HtmlLexer from prompt_toolkit.completion import WordCompleter from prompt_toolkit.contrib.ssh import PromptToolkitSSHServer, PromptToolkitSSHSession from prompt_toolkit.lexers import PygmentsLexer from prompt_toolkit.shortcuts import Prog...
true
true
f710f43f2783402dc0325a5df802bd24de543b39
5,432
py
Python
route/login_register.py
ProductiveAndEfficient/openNAMU
af3beee5d6e486a4cf152803483e3878b3347882
[ "BSD-3-Clause" ]
null
null
null
route/login_register.py
ProductiveAndEfficient/openNAMU
af3beee5d6e486a4cf152803483e3878b3347882
[ "BSD-3-Clause" ]
null
null
null
route/login_register.py
ProductiveAndEfficient/openNAMU
af3beee5d6e486a4cf152803483e3878b3347882
[ "BSD-3-Clause" ]
null
null
null
from .tool.func import * def login_register_2(conn): curs = conn.cursor() if ban_check(None, 'login') == 1: return re_error('/ban') ip = ip_check() admin = admin_check() if admin != 1 and ip_or_user(ip) == 0: return redirect('/user') if admin != 1: curs.execute(db_cha...
41.784615
128
0.544919
from .tool.func import * def login_register_2(conn): curs = conn.cursor() if ban_check(None, 'login') == 1: return re_error('/ban') ip = ip_check() admin = admin_check() if admin != 1 and ip_or_user(ip) == 0: return redirect('/user') if admin != 1: curs.execute(db_cha...
true
true
f710f564a7de8e73147bdf29014882d066a8fb91
2,157
py
Python
src/charm.py
manadart/service-discovery-operator
aca8ee64405d549e9b03a324478d15427922e567
[ "Apache-2.0" ]
null
null
null
src/charm.py
manadart/service-discovery-operator
aca8ee64405d549e9b03a324478d15427922e567
[ "Apache-2.0" ]
null
null
null
src/charm.py
manadart/service-discovery-operator
aca8ee64405d549e9b03a324478d15427922e567
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2022 joseph # See LICENSE file for licensing details. # # Learn more at: https://juju.is/docs/sdk import logging from ops.charm import CharmBase from ops.framework import StoredState from ops.main import main from ops.model import ActiveStatus from charms.service_discovery_operator....
28.381579
83
0.713027
import logging from ops.charm import CharmBase from ops.framework import StoredState from ops.main import main from ops.model import ActiveStatus from charms.service_discovery_operator.v0.event import DiscoveryEventCharmEvents from charms.service_discovery_operator.v0.service_discovery import ServiceDiscovery l...
true
true
f710f6dafcfddb3ac08084fae91ac3551fd92098
607
py
Python
example_project/example_app/models.py
IgnisDa/django-tokens
02069ed7ea9487c4ed52af99e2d0d704c018ea79
[ "Apache-2.0" ]
null
null
null
example_project/example_app/models.py
IgnisDa/django-tokens
02069ed7ea9487c4ed52af99e2d0d704c018ea79
[ "Apache-2.0" ]
null
null
null
example_project/example_app/models.py
IgnisDa/django-tokens
02069ed7ea9487c4ed52af99e2d0d704c018ea79
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ from . import managers class CustomUser(AbstractUser): username = models.CharField( max_length=150, help_text=_("The username of the user."), unique=True ) email...
25.291667
77
0.69687
from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ from . import managers class CustomUser(AbstractUser): username = models.CharField( max_length=150, help_text=_("The username of the user."), unique=True ) email...
true
true
f710f843c30bce62ef56f5d70535c8feb9462389
85
py
Python
tests/test_reml.py
jgalar/reml
a1031e9d4a92508d8c4658dc9ad3c1ee2532788a
[ "MIT" ]
null
null
null
tests/test_reml.py
jgalar/reml
a1031e9d4a92508d8c4658dc9ad3c1ee2532788a
[ "MIT" ]
null
null
null
tests/test_reml.py
jgalar/reml
a1031e9d4a92508d8c4658dc9ad3c1ee2532788a
[ "MIT" ]
null
null
null
from reml import __version__ def test_version(): assert __version__ == "0.1.0"
14.166667
33
0.705882
from reml import __version__ def test_version(): assert __version__ == "0.1.0"
true
true
f710f93ca310a569f1514937b149a28f034cb42f
949
py
Python
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
warehouse_manager/main/migrations/0007_remove_warehousereply_files_alter_ticketimage_ticket_and_more.py
dzhigaev/warehouse_manager
3f81d2d889f3bec3cb0f9fd9c5aa053e34d4740f
[ "MIT" ]
null
null
null
# Generated by Django 4.0 on 2022-01-25 21:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_ticketimage_external_url_alter_warehousereply_files'), ] operations = [ migrations.RemoveField( model_name='warehouse...
30.612903
117
0.584826
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_ticketimage_external_url_alter_warehousereply_files'), ] operations = [ migrations.RemoveField( model_name='warehousereply', name='files', ), ...
true
true
f710f9e7c439c261ad1bf7d1d5b544451f4cc069
1,042
py
Python
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/ProgressBarStyle.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class ProgressBarStyle(Enum,IComparable,IFormattable,IConvertible): """ Specifies the style that a System.Windows.Forms.ProgressBar uses to indicate the progress of an operation. enum ProgressBarStyle,values: Blocks (0),Continuous (1),Marquee (2) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx....
29.771429
215
0.676583
class ProgressBarStyle(Enum,IComparable,IFormattable,IConvertible): pass """ __format__(formattable: IFormattable,format: str) -> str """ pass pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initial...
true
true
f710fa23050dd716d54383573b4029851899a772
2,989
py
Python
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
data_fill/banks_closest.py
hhalim/TargetBanks
8febd7300f3b01e92641e0f63355d3f66bfe674c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import config as cfg import pyodbc """ Fill in closest Police Stations within 10 miles If there is no closest PS, then ClosestPSDistance = MeanPSDistance = 10.5 miles Latitude/Longitude distance coefficients: --Miles 3958.75 --Kilometers 6367.45 --Feet 20890584 --Meters 6367450 """ def calc...
29.594059
119
0.557042
import config as cfg import pyodbc def calculate_distance(bankID, lat, lng): query = """ DECLARE @latitude float, @longitude float SELECT @latitude = ?, @longitude = ? SELECT [StationID] ,[Name] , [Address1] , [City] , [State] ...
true
true
f710fa70daba0358925a0155ad3cb8fdb4671af0
4,050
py
Python
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
train.py
Wesley-Tse/Road-Detection
c3b444287d9b41ccc4234e737e4421b5d1b3c3da
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @author: Wesley # @time: 2020-12-11 10:47 import os import time import torch from torch import nn from models.dinknet34 import DinkNet34 from loss import dice_bce_loss from models.unet import UNet from dataset import MyDataset from torch.utils.data import DataLoader im...
33.471074
114
0.564691
import os import time import torch from torch import nn from models.dinknet34 import DinkNet34 from loss import dice_bce_loss from models.unet import UNet from dataset import MyDataset from torch.utils.data import DataLoader img_path = r'E:\PyCharmProject\datasets\5k\train_set\JPEGImages' mask_path = r'E:\PyCharm...
true
true
f710fa824dd142658303167ff27d7e85e9f7eece
2,813
py
Python
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
1
2021-05-26T03:55:23.000Z
2021-05-26T03:55:23.000Z
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
null
null
null
clamm/streams/plot_big_stft.py
p5a0u9l/clamm
a41ce2526e9792ce08263bf27eb9c417608d1f5d
[ "MIT" ]
null
null
null
""" Convert a large audio wav file (album length, i.e. > 30 minutes typically) into a series of videos consisting of the audio synchronized with images of the spectrogram. """ import os import sys import multiprocessing as mp import subprocess import tqdm import numpy as np import librosa.core import librosa.display i...
27.048077
79
0.618557
import os import sys import multiprocessing as mp import subprocess import tqdm import numpy as np import librosa.core import librosa.display import librosa.feature import matplotlib.pyplot as plt plt.switch_backend("agg") SAMPLERATE = 44.1e3 WAVPATH = sys.argv[1] BASENAME = os.path.basename(WAVPATH).replace(".w...
true
true
f710fad258d902d6f03329a00440cfd3df370e4a
964
py
Python
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
10
2021-10-31T04:28:43.000Z
2022-02-27T20:10:31.000Z
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
null
null
null
quiz_data.py
ashutoshkrris/GUI-Quiz-Tkinter
4d88fa9543b52d83b398c5f4796bc7e10f6c6f33
[ "MIT" ]
2
2021-11-25T20:36:54.000Z
2021-12-26T04:26:48.000Z
import requests parameters = { "amount": 10, "type": "multiple" } response = requests.get(url="https://opentdb.com/api.php", params=parameters) question_data = response.json()["results"] """ Sample Response [ { 'category': 'Sports', 'type': 'multiple', 'difficulty': 'medium', ...
22.952381
88
0.51971
import requests parameters = { "amount": 10, "type": "multiple" } response = requests.get(url="https://opentdb.com/api.php", params=parameters) question_data = response.json()["results"]
true
true
f710fada49d8e202c88e0310925e822723cb3e6e
890
py
Python
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
51
2019-02-01T19:43:37.000Z
2022-03-16T09:07:03.000Z
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
2
2019-02-23T18:54:22.000Z
2019-11-09T01:30:32.000Z
mglearn/plot_animal_tree.py
mbooali/introduction-to-machine
3f75f9897f1f63f07bb6eace312fa35e16786623
[ "MIT" ]
35
2019-02-08T02:00:31.000Z
2022-03-01T23:17:00.000Z
from imageio import imread import matplotlib.pyplot as plt def plot_animal_tree(ax=None): import graphviz if ax is None: ax = plt.gca() mygraph = graphviz.Digraph(node_attr={'shape': 'box'}, edge_attr={'labeldistance': "10.5"}, format="...
31.785714
67
0.55618
from imageio import imread import matplotlib.pyplot as plt def plot_animal_tree(ax=None): import graphviz if ax is None: ax = plt.gca() mygraph = graphviz.Digraph(node_attr={'shape': 'box'}, edge_attr={'labeldistance': "10.5"}, format="...
true
true
f710fc68e45a37cce5c656828378d0930abb6dd0
688
py
Python
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
1
2021-10-01T18:35:46.000Z
2021-10-01T18:35:46.000Z
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
null
null
null
migrations/0002_auto_20161121_1848.py
WPRDC/property-api
980f541b07bef3c8842994cfb903b42cc2c25064
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-21 23:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('property_api', '0001_initial'), ] operations = [ migrations.RemoveField( ...
23.724138
63
0.581395
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('property_api', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='ckanresource', name='ckan_instance', ...
true
true
f710fc9750183ff8de75d9d019041bf7217e7cc6
494
py
Python
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scattercarpet/marker/_sizemode.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, p...
32.933333
82
0.645749
import _plotly_utils.basevalidators class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs ): super(SizemodeValidator, self).__init__( plotly_name=plotly_name, p...
true
true
f710fcfe271b86745020637094a542da9581bfff
3,083
py
Python
src/dispatch/team/views.py
contractshark/dispatch
32226d89b306ac2979d916c87eeba567efaac4d3
[ "Apache-2.0" ]
1
2022-02-23T02:42:10.000Z
2022-02-23T02:42:10.000Z
src/dispatch/team/views.py
contractshark/dispatch
32226d89b306ac2979d916c87eeba567efaac4d3
[ "Apache-2.0" ]
1
2021-04-08T10:03:36.000Z
2021-04-08T10:03:36.000Z
src/dispatch/team/views.py
AlexaKelley/dispatch
b46d8416a0e4ec9badb76f6f3d1765c6093203f8
[ "Apache-2.0" ]
1
2021-04-08T10:02:57.000Z
2021-04-08T10:02:57.000Z
from typing import List from fastapi import APIRouter, Depends, HTTPException, Query from sqlalchemy.orm import Session from dispatch.database import get_db, search_filter_sort_paginate from .models import ( TeamContactCreate, TeamContactRead, TeamContactUpdate, TeamPagination, ) from .service import...
31.141414
95
0.693156
from typing import List from fastapi import APIRouter, Depends, HTTPException, Query from sqlalchemy.orm import Session from dispatch.database import get_db, search_filter_sort_paginate from .models import ( TeamContactCreate, TeamContactRead, TeamContactUpdate, TeamPagination, ) from .service import...
true
true
f710fd96673d5984891916ed0869543983fb7de1
3,520
py
Python
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
4
2021-11-12T06:11:13.000Z
2022-03-30T12:10:47.000Z
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
null
null
null
controller.py
Shihao-Feng-98/RRP_Hopper_simulation
444dbcce90d5ffb6bf577ed03adc9717183e21ae
[ "MIT" ]
3
2021-12-09T02:27:38.000Z
2022-03-29T06:48:08.000Z
''' only for RRP Hopper Shihao Feng 2021.10.28 ''' import numpy as np import pybullet as p from leg_kinematics import LegKinematicsRRP import pinocchio as pin class JointPDController(object): def __init__ (self): self.kp = np.array([70, 70, 1500]) self.kd = np.array([2, 2, 10]) def solve(self...
35.2
92
0.505114
import numpy as np import pybullet as p from leg_kinematics import LegKinematicsRRP import pinocchio as pin class JointPDController(object): def __init__ (self): self.kp = np.array([70, 70, 1500]) self.kd = np.array([2, 2, 10]) def solve(self, q_d, dq_d, q_state, dq_state): q = q_stat...
true
true
f710fdc0e254ef0ce35311f43c26d937585b5b27
13,741
py
Python
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
pynucastro/networks/rate_collection.py
XinlongSBU/pynucastro
4f1547e99208ad03d8f79d748601219591a157b5
[ "BSD-3-Clause" ]
null
null
null
"""A collection of classes and methods to deal with collections of rates that together make up a network.""" # Common Imports from __future__ import print_function import functools import math from operator import mul import os from collections import OrderedDict from ipywidgets import interact import matplotlib as...
35.50646
112
0.543774
from __future__ import print_function import functools import math from operator import mul import os from collections import OrderedDict from ipywidgets import interact import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx from pynucastro.rates import Rate, Nucleus, Library mpl.rcPara...
true
true
f710fdd4366bd507e11c7c6ac41919ea1576386b
10,667
py
Python
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
notebooks/static_simulation.py
MGIMM/dynamic_balancing
74482a970996ec75f5fb3f433b8285420787ccd7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import torch import numpy as np import matplotlib.pyplot as plt # from MMDBalancing import MMDBalancing as MMDB # from OptimalTransportBalancing import OptimalTransportBalancing as OTB # from NeuralAdversarialBalancing import NeuralAdversarialBalancing as NAB #get_ipyth...
29.713092
627
0.524609
import torch import numpy as np import matplotlib.pyplot as plt import pandas as pd from utils_balancing import * def static_simulation(): n = 5000 m = 5000 d = 1 r = lambda x:(x-3).square() + (x>-2)*(x+3).square() +x.abs() def get_data(n = 500,m = 500, r = r, d = d): ...
true
true
f710fe105613de2bff1cca2a11388db455eb4ef3
6,442
py
Python
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/articles/models.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from django.db.models import Count import os from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.db.models.signals import post_save from djang...
34.265957
100
0.703043
import datetime from django.db.models import Count import os from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.db.models.signals import post_save from django.dispatch import recei...
true
true
f710fe740f06cd1ce7d6e17259b4673874db184d
315
py
Python
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
app/thumbnails/utils.py
zybex86/pics
4ae4dcc0610ac37b5dae16a15328740e78868e50
[ "MIT" ]
null
null
null
from pathlib import Path from PIL import Image, ImageOps def generate_thumbnail(file_path, max_height): size = (max_height, max_height) thumbnail = ImageOps.fit(Image.open(file_path), size, Image.ANTIALIAS) thumbnail.save(f'{Path(file_path).stem}_thumb_{max_height}.jpg', 'JPEG') return thumbnail
31.5
76
0.752381
from pathlib import Path from PIL import Image, ImageOps def generate_thumbnail(file_path, max_height): size = (max_height, max_height) thumbnail = ImageOps.fit(Image.open(file_path), size, Image.ANTIALIAS) thumbnail.save(f'{Path(file_path).stem}_thumb_{max_height}.jpg', 'JPEG') return thumbnail
true
true
f710feaab45379a8bd9c845b0521809c0d560557
2,804
py
Python
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2016-09-12T10:51:00.000Z
2016-09-12T10:51:00.000Z
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
tests/restapi/conftest.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
32.604651
93
0.617689
true
true
f710ff32c9f3aa02f5a96ffecb083dfc2a5d990b
3,884
py
Python
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
1
2019-11-02T03:00:52.000Z
2019-11-02T03:00:52.000Z
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
4
2019-11-02T06:50:08.000Z
2019-11-02T06:50:18.000Z
xuerui_stat/analysis/random_forest/plot_tree.py
Xuerui-Yang/xuerui-stat
08b9dfedac810cbad5ee5969ca554212eb989db0
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import seaborn as sns class PlotTree(): def __init__(self,tree_class): self._tree_class=tree_class self._decision_node = dict(boxstyle="sawtooth", fc="0.8") self._leaf_node = dict(boxstyle="round4", fc="0.8") self._arrow_args = dict(arrows...
37.346154
114
0.523687
import matplotlib.pyplot as plt import seaborn as sns class PlotTree(): def __init__(self,tree_class): self._tree_class=tree_class self._decision_node = dict(boxstyle="sawtooth", fc="0.8") self._leaf_node = dict(boxstyle="round4", fc="0.8") self._arrow_args = dict(arrows...
true
true
f710ffa92c65c26a8bceb22d583bbb5d86dd8d0f
955
py
Python
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
14
2021-12-07T02:40:08.000Z
2022-01-24T19:38:17.000Z
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
null
null
null
lib/coloraide/distance/delta_e_z.py
CodeByZach/sublime_color_helper
9d881e1f036c886fedd94b026735c4727b7a34d3
[ "MIT" ]
null
null
null
""" Delta E z. https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-25-13-15131&id=368272 """ from ..distance import DeltaE import math from .. import util from typing import TYPE_CHECKING, Any if TYPE_CHECKING: # pragma: no cover from ..color import Color class DEZ(DeltaE): """Delta E z class.""" NAM...
25.131579
79
0.57801
from ..distance import DeltaE import math from .. import util from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from ..color import Color class DEZ(DeltaE): NAME = "jz" @classmethod def distance(cls, color: 'Color', sample: 'Color', **kwargs: Any) -> float: jz1, az1, bz1 = util.no_...
true
true
f71100307ac314b71fd446938bf616987ca61fb0
40,965
py
Python
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
thinc/types.py
notplus/thinc
9228eba1a0af20fb0de80970791c601549b40e26
[ "MIT" ]
null
null
null
from typing import Union, Tuple, Sized, Container, Any, TypeVar, Callable from typing import Iterable, Iterator, Sequence, Dict, Generic, cast from typing import Optional, List, overload from dataclasses import dataclass import numpy import sys try: import cupy get_array_module = cupy.get_array_module except ...
41.378788
321
0.627926
from typing import Union, Tuple, Sized, Container, Any, TypeVar, Callable from typing import Iterable, Iterator, Sequence, Dict, Generic, cast from typing import Optional, List, overload from dataclasses import dataclass import numpy import sys try: import cupy get_array_module = cupy.get_array_module except ...
true
true
f711004432df38ae3c8341225cdbbae91d9826b0
10
py
Python
tasks/EPAM/python_course/foundation-python/l7/m7-19-image.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
2
2022-01-19T18:01:35.000Z
2022-02-06T06:54:38.000Z
tasks/EPAM/python_course/foundation-python/l7/m7-5-logs.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
tasks/EPAM/python_course/foundation-python/l7/m7-5-logs.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
"""Talk"""
10
10
0.4
true
true
f711004483da66e51845425fa42d359f23f0af9c
21,264
py
Python
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
319
2016-09-22T15:54:48.000Z
2022-03-18T02:36:58.000Z
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
9
2016-11-03T21:56:41.000Z
2020-08-09T19:27:37.000Z
Codes/Python32/Lib/bdb.py
eyantra/FireBird_Swiss_Knife
cac322cf28e2d690b86ba28a75e87551e5e47988
[ "MIT" ]
27
2016-10-06T16:05:32.000Z
2022-03-18T02:37:00.000Z
"""Debugger basics""" import fnmatch import sys import os __all__ = ["BdbQuit", "Bdb", "Breakpoint"] class BdbQuit(Exception): """Exception to give up completely.""" class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class should imp...
33.486614
80
0.581358
import fnmatch import sys import os __all__ = ["BdbQuit", "Bdb", "Breakpoint"] class BdbQuit(Exception): class Bdb: def __init__(self, skip=None): self.skip = set(skip) if skip else None self.breaks = {} self.fncache = {} def canonic(self, filename): if filename == "<" + f...
true
true
f71100cc93e49fc798cb8d6af96b7df25b5c0b0f
1,424
py
Python
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
terraform/terraform-swarm-inventory.py
swipswaps/hcloud_swarm
63f861c4daadc3a01fc646371cd71503353e7693
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import os ANSIBLE_SSH_PORT = '2222' def get_args(): from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--list', action='store_true') parser.add_argument('--host') return parser.parse_args() def wd_to_scrip...
28.48
72
0.64677
import json import os ANSIBLE_SSH_PORT = '2222' def get_args(): from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--list', action='store_true') parser.add_argument('--host') return parser.parse_args() def wd_to_script_dir(): import os path = os.path.abs...
true
true
f71100d20d055f23e34b99c487028c18495bced0
1,954
py
Python
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
tcex/threat_intelligence/mappings/indicator/indicator_types/address.py
kdeltared/tcex
818c0d09256764f871e42d9ca5916f92d941d882
[ "Apache-2.0" ]
null
null
null
"""ThreatConnect TI Address""" from ..indicator import Indicator class Address(Indicator): """Unique API calls for Address API Endpoints""" def __init__(self, tcex, **kwargs): """Initialize Class Properties. Args: ip (str): The value for this Indicator. active (bool, ...
35.527273
95
0.616684
from ..indicator import Indicator class Address(Indicator): def __init__(self, tcex, **kwargs): super().__init__( tcex, sub_type='Address', api_entity='address', api_branch='addresses', **kwargs ) self.unique_id = kwargs.get('unique_id', kwargs.get('ip')) self.data['ip...
true
true
f71100eca98bd65fe173f8abaf89f414cac01ae0
11,299
py
Python
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/A3COM-HUAWEI-LswIGSP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module A3COM-HUAWEI-LswIGSP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-LswIGSP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 16:51:01 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7....
125.544444
1,988
0.775113
lswCommon, = mibBuilder.importSymbols("A3COM-HUAWEI-OID-MIB", "lswCommon") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ValueSizeConstraint, ...
true
true
f71101a1784782e57cee2028ca80b2be898cb6d5
13,153
py
Python
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
libs/telegram/ext/picklepersistence.py
rocketbot-cl/Telegram
e44713f6eb15460d4609d844ed5cccbbc84d4309
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2020 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
41.755556
99
0.606402
import pickle from collections import defaultdict from copy import deepcopy from typing import Any, DefaultDict, Dict, Optional, Tuple from telegram.ext import BasePersistence from telegram.utils.types import ConversationDict class PicklePersistence(BasePersistence): def __init__( self...
true
true
f71101f5b978b56c3a06bde91ef74d4fd7739c4f
1,811
py
Python
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
main.py
arthurvergacas/lineuzinho
6505b8b576cf6b8935fba0fab979e71bd454f8c3
[ "MIT" ]
null
null
null
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from lineuzinho import Lineuzinho def main(): logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', level=logging.INFO) lineuzinho = Lineuzinho() updater = Updater(lin...
45.275
94
0.764771
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from lineuzinho import Lineuzinho def main(): logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s [%(levelname)s]: %(message)s', level=logging.INFO) lineuzinho = Lineuzinho() updater = Updater(lin...
true
true
f711029eeb4b839cbf58c517115a6b12f9456c73
1,128
py
Python
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
2
2020-02-18T08:16:45.000Z
2021-04-11T18:58:02.000Z
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
47
2019-09-30T22:26:36.000Z
2021-11-17T00:34:38.000Z
sample-viewer-api/src/static/data/exploratory_scripts/2019-06-03_bonnie_plasmasamples.py
cvisb/cvisb_data
81ebf22782f2c44f8aa8ab9437cc4fb54248c3ed
[ "MIT" ]
1
2020-07-01T21:15:18.000Z
2020-07-01T21:15:18.000Z
# Goal: get ebola/Lassa for Bonnie's plasma samples. # Simple clean and merge import pandas as pd import os os.chdir("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/") import helpers df = pd.read_excel("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/input_data/sample_...
38.896552
171
0.777482
# Simple clean and merge import pandas as pd import os os.chdir("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/") import helpers df = pd.read_excel("/Users/laurahughes/GitHub/cvisb_data/sample-viewer-api/src/static/data/input_data/sample_rosters/one_offs/CViSB Plasma Samples_Bonnie_2019-06...
true
true
f711030e9cb47d589d7ef40dd62c7ee7b174a532
27,663
py
Python
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
9,402
2019-11-25T23:26:24.000Z
2022-03-31T23:19:41.000Z
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
37,522
2019-11-25T23:30:32.000Z
2022-03-31T23:58:30.000Z
src/tests/Common/scripts/run-pmi-diffs.py
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
3,629
2019-11-25T23:29:16.000Z
2022-03-31T21:52:28.000Z
#!/usr/bin/env python # # Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the MIT license. # ## # Title :run-pmi-diffs.py # # Notes: # # TODO: Instead of downloading and extracting the dotnet CLI, can we convert # to using init-tools.cmd/...
38.420833
261
0.58468
true
true
f71103c169d8571edba137653f135725898352b3
4,523
py
Python
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-apig/huaweicloudsdkapig/v2/model/list_apis_binded_to_request_throttling_policy_v2_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListApisBindedToRequestThrottlingPolicyV2Response(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute ty...
27.412121
100
0.588547
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ListApisBindedToRequestThrottlingPolicyV2Response(SdkResponse): sensitive_list = [] openapi_types = { 'total': 'int', 'size': 'int', 'apis': 'list[ThrottleBindingApiResp]' } ...
true
true
f71103cb3e09b1d069f05d1ab89f1c850ef5a0d5
626
py
Python
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
148
2021-03-06T06:54:13.000Z
2022-03-29T19:27:21.000Z
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
10
2021-07-19T22:57:49.000Z
2022-02-04T03:12:29.000Z
datasets/RTFM/rtfm/dynamics/item/weapon/clubs.py
kapikantzari/MultiBench
44ab6ea028682040a0c04de68239ce5cdf15123f
[ "MIT" ]
18
2021-07-22T07:17:27.000Z
2022-03-27T16:11:40.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from .base_weapon import Weapon from ... import dice as D, material as M class BaseClub(Weapon): pass class Club(Ba...
24.076923
97
0.667732
from .base_weapon import Weapon from ... import dice as D, material as M class BaseClub(Weapon): pass class Club(BaseClub): def __init__(self): super().__init__('club', weight=30, damage=D.Dice.from_str('d3'), material=M.Wood, hit=0) class Aklys(BaseClub): def __init__(self): s...
true
true
f71104b9710f6705b538a9fe0341ae2f581c20b5
7,343
py
Python
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_1_1/isi_sdk_8_1_1/models/audit_progress_progress.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 6 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class AuditProgressProgress(obje...
40.125683
144
0.669617
import pprint import re import six class AuditProgressProgress(object): swagger_types = { 'protocol_audit_cee_time': 'int', 'protocol_audit_log_time': 'int', 'protocol_audit_syslog_time': 'int' } attribute_map = { 'protocol_audit_cee_time': 'protocol_audit_cee_time...
true
true
f711052633a45b9a3f3392f20a494f4bd70c01ab
11,316
py
Python
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
1
2020-09-10T14:12:07.000Z
2020-09-10T14:12:07.000Z
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
null
null
null
lorawan/lorawan_conformance/functionality/td_lorawan_fun_02.py
pablomodernell/lorawan_conformance_testing
3e6b9028ee7a6a614e52bac684e396ecd04fd10c
[ "MIT" ]
null
null
null
""" LoRaWAN Specification v1.0.2 Test Case Group: Functionality Test Name: FUN_02 """ ################################################################################# # MIT License # # Copyright (c) 2018, Pablo D. Modernell, Universitat Oberta de Catalunya (UOC), # Universidad de la Republica Oriental del Uruguay (Ude...
58.329897
99
0.514316
Pong", description=( "Checks the reception of the PONG message.\n" "- Reception from DUT: PONG message.\n" "- TAS sends: None.\n")) # -----------------------------...
true
true
f71105cea0163d953e3acd8928b9d0414789cbfb
366
py
Python
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
settings.py
anirvan90/conference_central
7379022bb31ed44cd2dbe75b40ed7808c6127bd7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """settings.py Udacity conference server-side Python App Engine app user settings $Id$ created/forked from conference.py by wesc on 2014 may 24 """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = '1006324622497-9qlhtun5go635oe5...
21.529412
91
0.789617
WEB_CLIENT_ID = '1006324622497-9qlhtun5go635oe57l2vevfrq3f16u57.apps.googleusercontent.com'
true
true
f7110777aa0eb0df6694e887f697099eb4135fd0
130
py
Python
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
stuntcat/__main__.py
JTRHACKER/StuntCat
1c581df8971113838219dc98c35207925e6b9228
[ "MIT" ]
null
null
null
""" Another Main module. """ if __name__ == "__main__": import stuntcat.cli cli = stuntcat.cli.Cli() cli.cli_main()
13
28
0.615385
if __name__ == "__main__": import stuntcat.cli cli = stuntcat.cli.Cli() cli.cli_main()
true
true
f711087fc49d8d2d1e4f621050569c812ce59cb7
123
py
Python
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
CursoIntensivoPython/curso-intensivo-python-master/capitulo_09/my_electric_car.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
import electric_car my_tesla = electric_car.ElectricCar('tesla', 'roadster', 2016) print(my_tesla.get_descriptive_name())
24.6
62
0.804878
import electric_car my_tesla = electric_car.ElectricCar('tesla', 'roadster', 2016) print(my_tesla.get_descriptive_name())
true
true
f71108f2dc22cced6e0edca17dae51190cd8f33d
1,105
py
Python
build/lib/biosteam/units/_enzyme_treatment.py
rjhanes/biosteam
ee345ac0b14ce4de9b38ac5a467588d2f854da71
[ "MIT" ]
1
2019-11-17T13:14:19.000Z
2019-11-17T13:14:19.000Z
build/lib/biosteam/units/_enzyme_treatment.py
lilanyu/biosteam
b025bbe138bfd0b016af58583792fb4f3ff9186e
[ "MIT" ]
null
null
null
build/lib/biosteam/units/_enzyme_treatment.py
lilanyu/biosteam
b025bbe138bfd0b016af58583792fb4f3ff9186e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Aug 23 22:07:01 2018 @author: yoelr """ from ._tank import MixTank from ._hx import HXutility class EnzymeTreatment(MixTank): """Create an EnzymeTreatment unit that is cost as a MixTank with a heat exchanger.""" _N_outs = 1 #: Residence time (hr) _tau = ...
26.309524
89
0.567421
from ._tank import MixTank from ._hx import HXutility class EnzymeTreatment(MixTank): _N_outs = 1 _tau = 1 def __init__(self, ID='', ins=None, outs=(), *, T): super().__init__(ID, ins, outs) self.T = T self._heat_exchanger = he = HXutility(None, None, T=T) ...
true
true
f71108f98a82dd40b3eff767d34aa0acebabcc22
72,622
py
Python
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
2,072
2020-08-11T20:16:48.000Z
2022-03-31T07:04:05.000Z
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
795
2020-08-11T15:24:39.000Z
2022-03-31T18:56:13.000Z
metadata/metadata_service/proxy/atlas_proxy.py
defendercrypt/amundsen
83c728b646020f60cf2270c12e766fe4af8c9948
[ "Apache-2.0" ]
671
2020-08-11T20:39:56.000Z
2022-03-31T08:39:07.000Z
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import datetime import logging import re from collections import defaultdict from operator import attrgetter from random import randint from typing import (Any, Dict, Generator, List, Optional, Set, Tuple, Type, ...
42.394629
120
0.592382
import datetime import logging import re from collections import defaultdict from operator import attrgetter from random import randint from typing import (Any, Dict, Generator, List, Optional, Set, Tuple, Type, Union) from amundsen_common.entity.resource_type import ResourceType from amundsen_c...
true
true
f71109e10fcd45e0190f2d7900c8aab146d9538e
1,281
py
Python
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
null
null
null
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
null
null
null
run.py
DataScience-MD/ABM
291911e005df8db8b764cd3f9b16b38b735207eb
[ "MIT" ]
6
2020-06-18T21:47:20.000Z
2021-05-05T21:25:34.000Z
# -*- coding: utf-8 -*- """ Created on Wed Mar 25 12:13:19 2020 @author: metalcorebear """ from model import propagation_model import model_params import argparse import os import pandas as pd # Specify arguments def get_path(): parser = argparse.ArgumentParser() parser.add_argument('-o', '--...
25.117647
88
0.697112
from model import propagation_model import model_params import argparse import os import pandas as pd def get_path(): parser = argparse.ArgumentParser() parser.add_argument('-o', '--output', help='Enter the output path.', required=True) args = vars(parser.parse_args()) output_path = str(a...
true
true
f7110a3a9b918590809e75600d33ed9e69f464fc
2,103
py
Python
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
1
2020-10-25T04:39:41.000Z
2020-10-25T04:39:41.000Z
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
4
2018-11-13T22:15:36.000Z
2018-12-07T18:31:38.000Z
vision/google/cloud/vision_v1p2beta1/types.py
deryrahman/google-cloud-python
b55058c4b2328fde32f29bfd8ea04708fcc578e0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
30.042857
74
0.770804
from __future__ import absolute_import import sys from google.api_core.protobuf_helpers import get_messages from google.api import http_pb2 from google.cloud.vision_v1p2beta1.proto import geometry_pb2 from google.cloud.vision_v1p2beta1.proto import image_annotator_pb2 from google.cloud.vision_v1p2beta...
true
true
f7110a923f1dfdc24b38657b7ed503e0e741a094
351
py
Python
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
null
null
null
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
10
2018-07-30T15:09:57.000Z
2022-03-29T21:54:12.000Z
cms_bs3_theme/context_processors.py
Nekmo/djangocms-bs3-theme
1155588414164d6e5d027131e9181856f8a80d5d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # from cms_bs3_theme.models import ThemeSite def settings(request): """ """ from . import conf conf = dict(vars(conf)) # conf.update(ThemeSite.objects.get_theme_conf(request=request, fail=False)) data = request.session.get('cms_bs3_theme_conf', {}) conf.update(data)...
25.071429
80
0.655271
def settings(request): from . import conf conf = dict(vars(conf)) data = request.session.get('cms_bs3_theme_conf', {}) conf.update(data) return {'bs3_conf': conf}
true
true
f7110d49a2e7fea67a97fd1616c5378611856817
836
py
Python
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
bin/tellopro.py
hgu-sit22005/telloproject-21800130
9f9e27c64d702982795311fcabfba6a2b6d5d1f2
[ "MIT" ]
null
null
null
from tello import Tello import sys from datetime import datetime import time import TelloPro tello = Tello() command_lst = [] command_lst.append(TelloPro.get_instance('takeoff', -1, "")) command_lst.append(TelloPro.get_instance('up', 30, "")) command_lst.append(TelloPro.get_instance('down', 30, "")) command_lst.appen...
34.833333
60
0.752392
from tello import Tello import sys from datetime import datetime import time import TelloPro tello = Tello() command_lst = [] command_lst.append(TelloPro.get_instance('takeoff', -1, "")) command_lst.append(TelloPro.get_instance('up', 30, "")) command_lst.append(TelloPro.get_instance('down', 30, "")) command_lst.appen...
true
true
f7110ed7a1c5c6ec8eedf0cbbdad38d01af37edd
5,451
py
Python
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2016-04-05T22:30:14.000Z
2016-04-05T22:30:14.000Z
yt/frontends/_skeleton/data_structures.py
danielgrassinger/yt_new_frontend
5f91d2fb8721c4c5da0af543a6256ed979cd9fc9
[ "BSD-3-Clause-Clear" ]
1
2020-12-05T05:51:09.000Z
2020-12-05T05:51:09.000Z
""" Skeleton data structures """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #------------------...
37.854167
78
0.593653
from yt.data_objects.grid_patch import \ AMRGridPatch from yt.geometry.grid_geometry_handler import \ GridIndex from yt.data_objects.static_output import \ Dataset from .fields import SkeletonFieldInfo class SkeletonGrid(AMRGridPatch): _id_offset = 0 def __init__(self, id, index, level, st...
true
true
f7110fbcf2ee39a52a9cf4baf18e8773ac09b93d
766
py
Python
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
blog/admin.py
hdzAlexander/MyDjangoBlog
4c8b0a654d8086e4c3b1bc4b8533479f79d7b834
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Article, Category, User from django import forms from pagedown.widgets import AdminPagedownWidget class ArticleForm(forms.ModelForm): text = forms.CharField(widget=AdminPagedownWidget()) class Meta: model = Article fields = '__all__' clas...
25.533333
70
0.741514
from django.contrib import admin from .models import Article, Category, User from django import forms from pagedown.widgets import AdminPagedownWidget class ArticleForm(forms.ModelForm): text = forms.CharField(widget=AdminPagedownWidget()) class Meta: model = Article fields = '__all__' clas...
true
true
f711129c9db6df7c63a7497c63fdb1ce99c0681f
463
bzl
Python
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
38
2022-01-07T05:19:28.000Z
2022-03-27T13:44:53.000Z
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
19
2022-01-11T14:25:03.000Z
2022-02-18T14:24:19.000Z
third_party/snappy/workspace.bzl
jeongukjae/nori-clone
e0f8afb842499be4d55f1fc47292fbecdbca2a86
[ "Apache-2.0" ]
3
2022-02-14T13:51:20.000Z
2022-03-28T06:55:38.000Z
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//third_party:repo.bzl", "clean_dep") def configure_snappy(): http_archive( name = "com_github_google_snappy", build_file = clean_dep("//third_party/snappy:BUILD.bzl"), sha256 = "e170ce0def2c71d0403f5cda61d6e2743373f...
38.583333
84
0.691145
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//third_party:repo.bzl", "clean_dep") def configure_snappy(): http_archive( name = "com_github_google_snappy", build_file = clean_dep("//third_party/snappy:BUILD.bzl"), sha256 = "e170ce0def2c71d0403f5cda61d6e2743373f...
true
true
f71113c1dbcd319ed876635e4cd8becd72b4fcca
748
py
Python
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
1
2021-06-12T22:01:10.000Z
2021-06-12T22:01:10.000Z
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
allennlp/__main__.py
12seetharaman/allennlp
212035f23c4642b3f3bc850316fe0119f2053ab1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import logging import os import sys if os.environ.get("ALLENNLP_DEBUG"): LEVEL = logging.DEBUG else: level_name = os.environ.get("ALLENNLP_LOG_LEVEL") LEVEL = logging._nameToLevel.get(level_name, logging.INFO) sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.join(__file__, ...
25.793103
95
0.731283
import logging import os import sys if os.environ.get("ALLENNLP_DEBUG"): LEVEL = logging.DEBUG else: level_name = os.environ.get("ALLENNLP_LOG_LEVEL") LEVEL = logging._nameToLevel.get(level_name, logging.INFO) sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))) logging...
true
true
f71114482557985f31dbb204aaef377b0d7b4168
3,125
py
Python
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
2
2019-12-19T02:10:39.000Z
2020-06-03T15:28:54.000Z
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
null
null
null
vds_vault_oauth/utilities/Token.py
veeva/vds-vault-oauth-tool
91e424a673e99261d538b27a938f7f56ac154475
[ "Apache-2.0" ]
1
2022-02-17T08:09:27.000Z
2022-02-17T08:09:27.000Z
from datetime import datetime from jose import jwt from jose.utils import base64url_decode from jose.exceptions import JWTError from vds_vault_oauth.utilities import OAuthContainer # Token that stores the necessary tokens and provides the ability to decode & log them. class Token(): def __init__(self, toke...
49.603175
135
0.5552
from datetime import datetime from jose import jwt from jose.utils import base64url_decode from jose.exceptions import JWTError from vds_vault_oauth.utilities import OAuthContainer class Token(): def __init__(self, token_value, token_type, logger): self.token_value = token_value self.toke...
true
true
f7111500e4a819c6afa8f433794c1e6549e9bd38
6,317
py
Python
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
1
2021-03-18T20:55:04.000Z
2021-03-18T20:55:04.000Z
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
17
2018-05-23T15:14:17.000Z
2018-05-25T23:39:38.000Z
lwb_heartbeat/child/views.py
jayadams011/lwb_heartbeat
6d9b594f317107cd26932485dd8d063e226970fa
[ "MIT" ]
2
2018-06-12T20:50:38.000Z
2021-03-18T20:55:21.000Z
from django.views.generic import (TemplateView, ListView, DetailView, CreateView, UpdateView) from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.conf import settings from .forms import ChildEditForm, ChildAddForm from .models impo...
32.901042
84
0.609467
from django.views.generic import (TemplateView, ListView, DetailView, CreateView, UpdateView) from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy from django.conf import settings from .forms import ChildEditForm, ChildAddForm from .models impo...
true
true
f71115104cdacec380fdd3d6df84abcdf9c0321a
552
py
Python
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
MatchApp/migrations/0062_auto_20210511_2322.py
elizza19/django_local_library
f2dc053e44684b7a966d8bc0ff364f5251449f5b
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.7 on 2021-05-11 21:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MatchApp', '0061_apadrinamiento'), ] operations = [ migrations.AlterField( model_name='apadrinamiento', name='tipo_i...
29.052632
205
0.632246
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('MatchApp', '0061_apadrinamiento'), ] operations = [ migrations.AlterField( model_name='apadrinamiento', name='tipo_ingreso', field=models.CharField(bla...
true
true
f71115497ba704cbabc6220d07f71e798fe5819d
589
py
Python
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
3
2021-10-04T17:13:14.000Z
2021-10-17T21:08:26.000Z
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
null
null
null
src/models/conv_block.py
plutasnyy/mgr
4ca5686ba7d62d0e2b8c172f17eb90bd822fdc21
[ "MIT" ]
null
null
null
from torch import nn class ConvolutionalBlock(nn.Module): def __init__(self, in_channels=128, out_channels=256, kernel_size=3, padding=1, stride=1, padding_mode='zeros'): super().__init__() self.conv1 = nn.Conv1d(in_channels, out_channels, kernel_size=kernel_size, padding=padding, stride=stride, ...
32.722222
116
0.633277
from torch import nn class ConvolutionalBlock(nn.Module): def __init__(self, in_channels=128, out_channels=256, kernel_size=3, padding=1, stride=1, padding_mode='zeros'): super().__init__() self.conv1 = nn.Conv1d(in_channels, out_channels, kernel_size=kernel_size, padding=padding, stride=stride, ...
true
true
f71115f7872ed81af5335fcea362c1a33abafa50
4,675
py
Python
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
LinReg/utilsLinReg.py
peterchanw/utils
26133c52ba5b0407d38371100b7b56fe2cf68149
[ "MIT" ]
null
null
null
import sklearn.metrics as metrics import pandas as pd import numpy as np def repair_chrdata(df, tCol): ### Parameters: # df: input dataframe # tCol: targeted column label with NaN ### Output # df: repaired dataframe # word: string of related dataframe column with some records have NaN in target...
39.618644
103
0.678503
import sklearn.metrics as metrics import pandas as pd import numpy as np def repair_chrdata(df, tCol): m = df[df[tCol].isnull()] count = len(dFrm) tword = df[tCol].unique().tolist() wordLT = df[tCol].value_counts(dropna=False) word = '' wordCnt = 0 for index, value in wordLT.items...
true
true
f7111649d25110179d27bb7eae88a96fbb847598
6,173
py
Python
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
autotest/t024_test.py
hansonmcoombs/flopy
49398983c36d381992621d5bf698ea7f78fc0014
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
import os import numpy as np import pytest from ci_framework import FlopyTestSetup, base_test_dir import flopy base_dir = base_test_dir(__file__, rel_path="temp", verbose=True) ex_pth = os.path.join("..", "examples", "data", "mf2005_test") testmodels = [ os.path.join(ex_pth, f) for f in os.listdir(ex_pth) if f....
30.408867
86
0.61526
import os import numpy as np import pytest from ci_framework import FlopyTestSetup, base_test_dir import flopy base_dir = base_test_dir(__file__, rel_path="temp", verbose=True) ex_pth = os.path.join("..", "examples", "data", "mf2005_test") testmodels = [ os.path.join(ex_pth, f) for f in os.listdir(ex_pth) if f....
true
true
f71116abd987c23bd57eb804a843ee09589e01bb
1,039
py
Python
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
mkt/receipts/forms.py
muffinresearch/zamboni
045a6f07c775b99672af6d9857d295ed02fe5dd9
[ "BSD-3-Clause" ]
null
null
null
from urlparse import urlparse from django import forms from tower import ugettext_lazy as _lazy import amo from mkt.api.forms import SluggableModelChoiceField from mkt.webapps.models import Addon class ReceiptForm(forms.Form): app = SluggableModelChoiceField( queryset=Addon.objects.filter(type=amo.ADDO...
29.685714
69
0.633301
from urlparse import urlparse from django import forms from tower import ugettext_lazy as _lazy import amo from mkt.api.forms import SluggableModelChoiceField from mkt.webapps.models import Addon class ReceiptForm(forms.Form): app = SluggableModelChoiceField( queryset=Addon.objects.filter(type=amo.ADDO...
true
true
f71116b2ae769985945c817a41063eed0536271e
104
py
Python
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
workflow/__init__.py
upsila/Upflow
ab6238d48911685da06ff91bce9041e37fb18b3f
[ "MIT" ]
null
null
null
from entities.workflow import Workflow class Main(Workflow): def _run(self, job): return {}
20.8
38
0.682692
from entities.workflow import Workflow class Main(Workflow): def _run(self, job): return {}
true
true
f7111a0e4b0ff2edf2962809ef97e273e18bb374
625
py
Python
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
4
2016-05-27T20:01:36.000Z
2016-07-03T01:39:17.000Z
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
7
2016-05-11T01:47:29.000Z
2016-06-11T03:32:25.000Z
test/example_using_relations.py
renzon/ndb_relations
90ac165aeb2a01ec89e59c1db6da9d934ca4d6ee
[ "MIT" ]
1
2016-09-08T19:48:06.000Z
2016-09-08T19:48:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from ndb_relations.relations import OneToMany class User2(ndb.Model): name = ndb.StringProperty() class Order2(ndb.Model): pass class OrderItem2(ndb.Model): name = ndb.StringProperty...
18.939394
56
0.7264
from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from ndb_relations.relations import OneToMany class User2(ndb.Model): name = ndb.StringProperty() class Order2(ndb.Model): pass class OrderItem2(ndb.Model): name = ndb.StringProperty() price = ndb.Floa...
true
true
f7111b18c712225e31d8dae10ffb3f63df40655a
3,524
py
Python
deepvariant/python/variant_calling_wrap_test.py
tedyun/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
1
2018-12-07T19:48:57.000Z
2018-12-07T19:48:57.000Z
deepvariant/python/variant_calling_wrap_test.py
hcxiong/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
null
null
null
deepvariant/python/variant_calling_wrap_test.py
hcxiong/deepvariant
aba55537eec832e6cea678349422124ef50680f4
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2017 Google Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
37.489362
78
0.755675
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import absltest from third_party.nucleus.io import fasta from third_party.nucleus.io import sam from third_party.nucleus.util import ranges from deepvariant impo...
true
true
f7111b40a996bfc4e37a080db8cb29fe6e7081e2
4,902
py
Python
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
bot.py
Pdiskbot/doodurl
31cf2bef4d6e5093254e374b16029976a6c4d1ff
[ "MIT" ]
null
null
null
from os import environ import os import time from urllib.parse import urlparse import aiohttp from pyshorteners import Shortener from bs4 import BeautifulSoup import requests import re from pyrogram import Client, filters API_ID = environ.get('API_ID') API_HASH = environ.get('API_HASH') BOT_TOKEN = environ.get('BOT_TO...
35.014286
231
0.648307
from os import environ import os import time from urllib.parse import urlparse import aiohttp from pyshorteners import Shortener from bs4 import BeautifulSoup import requests import re from pyrogram import Client, filters API_ID = environ.get('API_ID') API_HASH = environ.get('API_HASH') BOT_TOKEN = environ.get('BOT_TO...
true
true
f7111b54edc96721170c65660842877a6eab505a
3,373
py
Python
discovery-provider/src/models/__init__.py
lucylow/audius-protocol
5ef93462f9dc7df01a15877c02ca79b9a7d99236
[ "Apache-2.0" ]
1
2022-03-27T21:40:36.000Z
2022-03-27T21:40:36.000Z
discovery-provider/src/models/__init__.py
abelxmendoza/audius-protocol
33757e1b722a4be97960086b98b26ae3a75ee56b
[ "Apache-2.0" ]
null
null
null
discovery-provider/src/models/__init__.py
abelxmendoza/audius-protocol
33757e1b722a4be97960086b98b26ae3a75ee56b
[ "Apache-2.0" ]
null
null
null
from .aggregate_interval_play import AggregateIntervalPlay from .milestone import Milestone from .models import ( AggregateDailyAppNameMetrics, AggregateDailyTotalUsersMetrics, AggregateDailyUniqueUsersMetrics, AggregateMonthlyAppNameMetrics, AggregateMonthlyPlays, AggregateMonthlyTotalUsersMetr...
24.266187
59
0.721613
from .aggregate_interval_play import AggregateIntervalPlay from .milestone import Milestone from .models import ( AggregateDailyAppNameMetrics, AggregateDailyTotalUsersMetrics, AggregateDailyUniqueUsersMetrics, AggregateMonthlyAppNameMetrics, AggregateMonthlyPlays, AggregateMonthlyTotalUsersMetr...
true
true
f7111b7a88487687de3ed2da70a17151db0b1ae9
824
py
Python
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
setup.py
patilsangram/filesystem
e5e5dc6be07ea656649f11484b072c43e3249163
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from pip.req import parse_requirements import re, ast # get version from __version__ variable in file_management/__init__.py _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('file_management/__init__.py', 'rb') as f: version = str(as...
30.518519
70
0.746359
from setuptools import setup, find_packages from pip.req import parse_requirements import re, ast _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('file_management/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) requirements...
true
true
f7111bc8bd0bd3222f4299cc296a1b52711c7e58
632
py
Python
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
16
2015-08-11T17:20:26.000Z
2022-02-11T20:15:41.000Z
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
534
2015-08-04T00:10:54.000Z
2022-03-17T10:44:47.000Z
feder/letters/migrations/0010_auto_20180112_1721.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
10
2017-08-30T13:34:32.000Z
2022-02-18T13:00:35.000Z
# Generated by Django 1.11.7 on 2018-01-12 17:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [("letters", "0009_auto_20170826_0742")] operations = [ migrations.AlterModelOptions( name="letter", options={ "ordering": ...
26.333333
65
0.509494
from django.db import migrations class Migration(migrations.Migration): dependencies = [("letters", "0009_auto_20170826_0742")] operations = [ migrations.AlterModelOptions( name="letter", options={ "ordering": ["created"], "permissions": ( ...
true
true
f7111c244cf17ed30e14fe5cad1f582a6877bbef
3,512
py
Python
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
ranger/commands.py
mariofrescas/configfiles
694623d9590ecc939a6ebeed8dd7806ed0dc248e
[ "MIT" ]
null
null
null
from ranger.api.commands import Command class paste_as_root(Command): def execute(self): if self.fm.do_cut: self.fm.execute_console('shell sudo mv %c .') else: self.fm.execute_console('shell sudo cp -r %c .') class fzf_select(Command): """ :fzf_select Find a file using fzf. With a prefix ...
33.132075
118
0.577733
from ranger.api.commands import Command class paste_as_root(Command): def execute(self): if self.fm.do_cut: self.fm.execute_console('shell sudo mv %c .') else: self.fm.execute_console('shell sudo cp -r %c .') class fzf_select(Command): def execute(self): import subprocess import os.path...
true
true
f7111c4b339a8c9a31964af5560fd7bc01cde698
18,586
py
Python
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
3
2019-04-15T12:27:57.000Z
2021-06-08T20:30:55.000Z
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
null
null
null
CallHome/_version.py
yinruiqing/pyannote-db-callhome
81db9c8cc611322d10e9bddb3af0d72707124ec8
[ "MIT" ]
1
2019-11-26T01:24:10.000Z
2019-11-26T01:24:10.000Z
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.537285
79
0.585494
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
f7111d7380c0da12701099921e08841c81cb9296
1,795
py
Python
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
test/functional/feature_filelock.py
caffeine239/bitcoin
94e5f13e62041bc299514b38a04ba1686002143e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Check that it's not possible to start a second muskcoind instance using the same datadir or wallet.""" impor...
48.513514
177
0.720891
import os from test_framework.test_framework import BitcoinTestFramework from test_framework.test_node import ErrorMatch class FilelockTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 def setup_network(self): self.add_nodes(se...
true
true
f7111f05c84ed4cfc811daaea97b7ff27f4879ce
6,649
py
Python
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
28
2016-05-03T21:16:48.000Z
2021-06-11T17:09:58.000Z
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
45
2016-05-03T22:16:09.000Z
2019-04-23T20:53:07.000Z
infra/config.py
szyszy/dist_test
a992ed1c007e9ec4850643e707bc803fbf5a084b
[ "Apache-2.0" ]
25
2016-04-20T00:02:08.000Z
2020-11-24T18:05:45.000Z
from ConfigParser import SafeConfigParser import errno import logging import os import urllib2 class Config(object): # S3 settings AWS_ACCESS_KEY_CONFIG = ('aws', 'access_key', 'AWS_ACCESS_KEY') AWS_SECRET_KEY_CONFIG = ('aws', 'secret_key', 'AWS_SECRET_KEY') AWS_TEST_RESULT_BUCKET_CONFIG = ('aws', 'test_result...
41.298137
98
0.719958
from ConfigParser import SafeConfigParser import errno import logging import os import urllib2 class Config(object): AWS_ACCESS_KEY_CONFIG = ('aws', 'access_key', 'AWS_ACCESS_KEY') AWS_SECRET_KEY_CONFIG = ('aws', 'secret_key', 'AWS_SECRET_KEY') AWS_TEST_RESULT_BUCKET_CONFIG = ('aws', 'test_result_bucket', 'TE...
true
true
f7111ff9d442298eb7e9b8dc90218d35c91d6141
2,107
py
Python
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
112
2015-01-15T21:36:02.000Z
2021-12-28T19:19:01.000Z
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
6
2017-03-14T00:42:42.000Z
2022-01-06T23:09:18.000Z
jodconverter-web/src/main/office/program/python-core-2.7.6/lib/ctypes/macholib/dylib.py
Congliang0229/kkFileView
1b5793c10aaa047f78c6be4abc41d807e71f71ab
[ "Apache-2.0" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### """ Generic dylib path manipulation """ import re __all__ = ['dylib_info'] DYLIB_RE = re.comp...
31.447761
97
0.542477
true
true
f711200559a829dfeddb00585fc885fd87a0e944
31,403
py
Python
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
1
2022-03-06T12:57:08.000Z
2022-03-06T12:57:08.000Z
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
null
null
null
nni/retiarii/nn/pytorch/api.py
ggzhang0071/nni
f4145e62d89c3ca383cf00f2de5dfd2d1025ad92
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import math import operator import warnings from typing import Any, List, Union, Dict, Optional, Callable, Iterable, NoReturn, TypeVar import torch import torch.nn as nn from nni.common.serializer import Translatable from nni.retiarii.serialize...
39.107098
134
0.613158
import math import operator import warnings from typing import Any, List, Union, Dict, Optional, Callable, Iterable, NoReturn, TypeVar import torch import torch.nn as nn from nni.common.serializer import Translatable from nni.retiarii.serializer import basic_unit from nni.retiarii.utils import STATE_DICT_PY_MAPPIN...
true
true
f711203454b2f2654e8b0af1e775e99c49b81bcf
3,176
py
Python
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
3
2018-02-11T16:58:48.000Z
2019-11-28T08:33:54.000Z
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
null
null
null
examples/tutorial/tutorial/spiders/rotate_useragent.py
cjymz886/crawl_examples
f8c7d31f60a4df512f83a397491b4ec498a23289
[ "MIT" ]
null
null
null
# -*-coding:utf-8-*- import logging """避免被ban策略之一:使用useragent池。 使用注意:需在settings.py中进行相应的设置。 """ import random from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): def __init__(self, user_agent=''): self.user_agent = user_agent ...
47.402985
108
0.627834
import logging import random from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): def __init__(self, user_agent=''): self.user_agent = user_agent def process_request(self, request, spider): ua = random.choice(self.use...
true
true