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
1c3aba465304b6285d331e2c3d8dd66f956edd2d
1,471
py
Python
src/media_server/serializers.py
nefarius/portfolio-backend
f595041354eedee71a4aa5b761501be030b81d09
[ "Apache-2.0" ]
6
2019-06-19T12:56:42.000Z
2021-12-26T07:22:47.000Z
src/media_server/serializers.py
nefarius/portfolio-backend
f595041354eedee71a4aa5b761501be030b81d09
[ "Apache-2.0" ]
13
2019-12-20T10:39:44.000Z
2022-02-10T09:11:09.000Z
src/media_server/serializers.py
nefarius/portfolio-backend
f595041354eedee71a4aa5b761501be030b81d09
[ "Apache-2.0" ]
1
2021-12-01T12:03:29.000Z
2021-12-01T12:03:29.000Z
from rest_framework import serializers from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from core.models import Entry from .validators import validate_license as vl def validate_license(value): if value is not None: try: vl(value) ...
29.42
90
0.71448
from rest_framework import serializers from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from core.models import Entry from .validators import validate_license as vl def validate_license(value): if value is not None: try: vl(value) ...
true
true
1c3abb1ad5688d5f6754c39edb8aa508dcfa7d1c
1,028
py
Python
Python/flip-binary-tree-to-match-preorder-traversal.py
black-shadows/LeetCode-Solutions
b1692583f7b710943ffb19b392b8bf64845b5d7a
[ "Fair", "Unlicense" ]
null
null
null
Python/flip-binary-tree-to-match-preorder-traversal.py
black-shadows/LeetCode-Solutions
b1692583f7b710943ffb19b392b8bf64845b5d7a
[ "Fair", "Unlicense" ]
null
null
null
Python/flip-binary-tree-to-match-preorder-traversal.py
black-shadows/LeetCode-Solutions
b1692583f7b710943ffb19b392b8bf64845b5d7a
[ "Fair", "Unlicense" ]
null
null
null
# Time: O(n) # Space: O(h) # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def flipMatchVoyage(self, root, voyage): """ :type root: TreeNo...
30.235294
66
0.476654
class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def flipMatchVoyage(self, root, voyage): def dfs(root, voyage, i, result): if not root: return True ...
true
true
1c3abb9ac79583acad9bbf281f80f7e7c3b927d3
7,926
py
Python
applications/auto_pilot_bigball/container/c2_Obstacle_Detection/app/predict.py
Dumpkin1996/clipper
1a08bbdde846c3cfe76236c68548a848f71605e0
[ "Apache-2.0" ]
2
2019-04-24T13:46:28.000Z
2019-05-28T06:59:26.000Z
applications/auto_pilot_bigball/container/c2_Obstacle_Detection/app/predict.py
SimonZsx/clipper
457088be2ebe68c68b94d90389d1308e35b4c844
[ "Apache-2.0" ]
null
null
null
applications/auto_pilot_bigball/container/c2_Obstacle_Detection/app/predict.py
SimonZsx/clipper
457088be2ebe68c68b94d90389d1308e35b4c844
[ "Apache-2.0" ]
4
2019-04-03T11:03:57.000Z
2019-06-26T08:22:38.000Z
import numpy as np import tensorflow as tf import cv2 import time previous = [] class yolo_tf: w_img = 1280 h_img = 720 weights_file = '/container/c2_Obstacle_Detection/app/weights/YOLO_small.ckpt' alpha = 0.1 threshold = 0.3 iou_threshold = 0.5 result_list = None classes = ["car"] def __init__(self): ...
37.386792
148
0.696064
import numpy as np import tensorflow as tf import cv2 import time previous = [] class yolo_tf: w_img = 1280 h_img = 720 weights_file = '/container/c2_Obstacle_Detection/app/weights/YOLO_small.ckpt' alpha = 0.1 threshold = 0.3 iou_threshold = 0.5 result_list = None classes = ["car"] def __init__(self): ...
true
true
1c3abbb1826a720dc0409dbf7f20ba1bb775ab71
532
py
Python
api/tracker/lib.py
yurebecca/spam-tracker
c210f683cdef1b6c61edc45759534a8f8a2cef49
[ "MIT" ]
null
null
null
api/tracker/lib.py
yurebecca/spam-tracker
c210f683cdef1b6c61edc45759534a8f8a2cef49
[ "MIT" ]
null
null
null
api/tracker/lib.py
yurebecca/spam-tracker
c210f683cdef1b6c61edc45759534a8f8a2cef49
[ "MIT" ]
null
null
null
import re import math # Simple way to count number of words in a string def word_count(str): words = str.split() return len(words) # This is due to python's rounding issue def round_half_up(n, decimals = 0): multiplier = 10 ** decimals return math.floor(n * multiplier + 0.5) / multiplier def pre_pro...
21.28
56
0.62782
import re import math def word_count(str): words = str.split() return len(words) def round_half_up(n, decimals = 0): multiplier = 10 ** decimals return math.floor(n * multiplier + 0.5) / multiplier def pre_process(text): # lowercase text = text.lower() #remove tags text = re.sub("<!...
true
true
1c3abd66b0857aa0c1ac086a6dc7a04879fe82eb
2,265
py
Python
urls.py
Pickerup-Yirui/ourSpider
f85e39b07335b77a57b08ab5aea5792ad3dc67e7
[ "MIT" ]
null
null
null
urls.py
Pickerup-Yirui/ourSpider
f85e39b07335b77a57b08ab5aea5792ad3dc67e7
[ "MIT" ]
null
null
null
urls.py
Pickerup-Yirui/ourSpider
f85e39b07335b77a57b08ab5aea5792ad3dc67e7
[ "MIT" ]
null
null
null
""" author = "YiRui Wang" 定义了一系列抓取51jobs页面上urls的函数(包) 创建于2020 1 16 getPageNum(num):根据初始url找到并返回网页总页数 webUrlsPool(page_num):根据得到的网页总数,构造并返回所有符合搜索标准的网页url列表 getJobUrls(pageUrl):根据pageUrl,得到该page上的jobUrl """ import requests from bs4 import BeautifulSoup def getPageNum(): """ 根据初始url找到并返回网页总页数 """ # k...
27.962963
160
0.661369
import requests from bs4 import BeautifulSoup def getPageNum(): url = 'https://search.51job.com/list/070300%252C020000,000000,0000,00,9,99,\ %25E6%2595%25B0%25E5%25AD%2597%25E8%2590%25A5%25E9%2594%2580,2,1.html?\ lang=c&stype=&postchannel=0000&workyear=99&cotype=99&degreefrom=99&jobterm=9...
true
true
1c3abf155ac5dafd3b312ee9b76e109b091d1503
2,368
py
Python
examples/adspygoogle/dfp/v201302/creative_wrapper_service/create_creative_wrappers.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfp/v201302/creative_wrapper_service/create_creative_wrappers.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfp/v201302/creative_wrapper_service/create_creative_wrappers.py
cherry-wb/googleads-python-lib
24a1ecb7c1cca5af3624a3b03ebaa7f5147b4a04
[ "Apache-2.0" ]
2
2020-04-02T19:00:31.000Z
2020-08-06T03:28:38.000Z
#!/usr/bin/python # # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
34.823529
80
0.712416
__author__ = 'api.shamjeff@gmail.com (Jeff Sham)' import os import sys sys.path.insert(0, os.path.join('..', '..', '..', '..', '..')) from adspygoogle import DfpClient LABEL_ID = 'INSERT_CREATIVE_WRAPPER_LABEL_ID_HERE' def main(client, label_id): creative_wrapper_service = client.GetService('CreativeWrapperS...
true
true
1c3abf390f833ba023c82673917278d8ccce4a81
4,331
py
Python
lisa/show_segmentation.py
mjirik/lisa
06c5cb8f375f51302341e768512f02236774c8a3
[ "BSD-3-Clause" ]
22
2015-01-26T12:58:54.000Z
2021-04-15T17:48:13.000Z
lisa/show_segmentation.py
mjirik/lisa
06c5cb8f375f51302341e768512f02236774c8a3
[ "BSD-3-Clause" ]
31
2015-01-23T14:46:13.000Z
2018-05-18T14:47:18.000Z
lisa/show_segmentation.py
mjirik/lisa
06c5cb8f375f51302341e768512f02236774c8a3
[ "BSD-3-Clause" ]
13
2015-06-30T08:54:27.000Z
2020-09-11T16:08:19.000Z
#! /usr/bin/python # -*- coding: utf-8 -*- """ Module is used for visualization of segmentation stored in pkl file. """ import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src")) from loguru import logger # logge...
25.034682
124
0.643962
import sys import os.path path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/dicom2fem/src")) from loguru import logger from PyQt5.QtWidgets import QApplication import argparse import numpy as np try: import dicom2fem import dicom...
true
true
1c3abf7fcae14682cbe89c0667091899ac054267
5,384
py
Python
examples/plot_interpolation.py
mdrolet01/scikit-fda
f16ffb3986408c12a2dfdf910688bd56ddecb188
[ "BSD-3-Clause" ]
1
2020-06-27T22:25:49.000Z
2020-06-27T22:25:49.000Z
examples/plot_interpolation.py
KonstantinKlepikov/scikit-fda
93c4ad80aaba8739b4f90932a2a759d6f5960387
[ "BSD-3-Clause" ]
null
null
null
examples/plot_interpolation.py
KonstantinKlepikov/scikit-fda
93c4ad80aaba8739b4f90932a2a759d6f5960387
[ "BSD-3-Clause" ]
null
null
null
""" Interpolation ===================== This example shows the types of interpolation used in the evaluation of FDataGrids. """ # Author: Pablo Marcos Manchón # License: MIT # sphinx_gallery_thumbnail_number = 3 import skfda from skfda.representation.interpolation import SplineInterpolation from mpl_toolkits.mplot...
34.961039
80
0.570208
import skfda from skfda.representation.interpolation import SplineInterpolation from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import numpy as np fd = skfda.datasets.make_sinusoidal_process(n_samples=2, n_features=6, random_state=1) fig = fd.sc...
true
true
1c3ac11edbb911fcd05ae9c9593b4e3342b95310
4,326
py
Python
fbpcs/private_computation/test/service/test_compute_metrics_stage_service.py
chaitanya2334/fbpcs
8b9f35df31b1c85820805c1a0df7c6a881b15b6c
[ "MIT" ]
33
2021-05-07T19:45:15.000Z
2021-08-11T17:10:26.000Z
fbpcs/private_computation/test/service/test_compute_metrics_stage_service.py
chaitanya2334/fbpcs
8b9f35df31b1c85820805c1a0df7c6a881b15b6c
[ "MIT" ]
111
2021-05-18T22:43:05.000Z
2021-08-13T15:58:12.000Z
fbpcs/private_computation/test/service/test_compute_metrics_stage_service.py
chaitanya2334/fbpcs
8b9f35df31b1c85820805c1a0df7c6a881b15b6c
[ "MIT" ]
14
2021-05-18T22:42:24.000Z
2021-07-26T17:51:18.000Z
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import defaultdict from unittest import IsolatedAsyncioTestCase from unittest.mock import AsyncMock,...
41.596154
96
0.718678
from collections import defaultdict from unittest import IsolatedAsyncioTestCase from unittest.mock import AsyncMock, MagicMock, patch from fbpcp.entity.mpc_instance import MPCParty from fbpcs.common.entity.pcs_mpc_instance import PCSMPCInstance from fbpcs.onedocker_binary_config import OneDockerBinaryConfig from fbp...
true
true
1c3ac2c3e925dd7380b9f7412396e842a9a3d381
7,543
py
Python
backend/coreapp/models/github.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
47
2021-11-05T14:20:58.000Z
2022-03-19T18:56:46.000Z
backend/coreapp/models/github.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
131
2021-10-20T09:17:16.000Z
2022-03-31T22:22:54.000Z
backend/coreapp/models/github.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
20
2021-11-23T18:49:45.000Z
2022-03-29T06:25:10.000Z
import shutil import subprocess from pathlib import Path from typing import Optional import requests from django.conf import settings from django.contrib.auth import login from django.contrib.auth.models import User from django.core.cache import cache from django.db import models, transaction from django.dispatch imp...
31.429167
92
0.610367
import shutil import subprocess from pathlib import Path from typing import Optional import requests from django.conf import settings from django.contrib.auth import login from django.contrib.auth.models import User from django.core.cache import cache from django.db import models, transaction from django.dispatch imp...
true
true
1c3ac2d09d38edf07628177024ae5dbc3817b8e9
17,488
py
Python
tensorflow/python/training/optimizer.py
adsar/tensorflow
b4b2575ec4bf7e6da2686505f61b5f16cb9273ab
[ "Apache-2.0" ]
21
2016-03-10T11:55:45.000Z
2021-02-03T02:49:11.000Z
tensorflow/python/training/optimizer.py
getnamo/tensorflow
b4b2575ec4bf7e6da2686505f61b5f16cb9273ab
[ "Apache-2.0" ]
null
null
null
tensorflow/python/training/optimizer.py
getnamo/tensorflow
b4b2575ec4bf7e6da2686505f61b5f16cb9273ab
[ "Apache-2.0" ]
39
2016-03-25T05:13:09.000Z
2020-06-16T01:30:53.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
36.132231
80
0.687043
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import gradients from tensorflow.python...
true
true
1c3ac313d13f15b5d98c34af76ec504b207cd802
1,682
py
Python
2021/20/20a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
3
2021-12-07T17:46:48.000Z
2022-02-23T13:33:19.000Z
2021/20/20a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
null
null
null
2021/20/20a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
null
null
null
import fileinput from itertools import product from collections import Counter def find_neighbors(coor): # calculate all neighbors from offsets n = [(coor[0] + x[0], coor[1] + x[1]) for x in OFFSETS] n.sort(key=lambda y: y[1]) return n def read_binary_number(pixels, image): bin_str = "" conve...
25.104478
61
0.613555
import fileinput from itertools import product from collections import Counter def find_neighbors(coor): n = [(coor[0] + x[0], coor[1] + x[1]) for x in OFFSETS] n.sort(key=lambda y: y[1]) return n def read_binary_number(pixels, image): bin_str = "" converter = {"#": "1", ".": "0"} for coo...
true
true
1c3ac3df3b724f75d33832bc36122e5a31a75e33
371
py
Python
setup.py
zacharyvoase/django-conch
b964715e52f23e998811b6ffc95a481abff141ad
[ "Unlicense" ]
11
2015-02-11T18:00:51.000Z
2020-12-27T19:40:33.000Z
setup.py
zacharyvoase/django-conch
b964715e52f23e998811b6ffc95a481abff141ad
[ "Unlicense" ]
null
null
null
setup.py
zacharyvoase/django-conch
b964715e52f23e998811b6ffc95a481abff141ad
[ "Unlicense" ]
3
2015-02-06T07:15:02.000Z
2019-08-21T06:05:22.000Z
from setuptools import setup, find_packages setup( name='django-conch', version='0.0.1', description='Expose the Django shell as an SSH server.', author='Zachary Voase', author_email='z@zacharyvoase.com', url='https://github.com/zacharyvoase/django-conch', packages=find_packages(), inst...
24.733333
60
0.663073
from setuptools import setup, find_packages setup( name='django-conch', version='0.0.1', description='Expose the Django shell as an SSH server.', author='Zachary Voase', author_email='z@zacharyvoase.com', url='https://github.com/zacharyvoase/django-conch', packages=find_packages(), inst...
true
true
1c3ac6e13ded41f757bb93c822f7b8a62f1e0db5
1,562
py
Python
examples/docs_snippets/docs_snippets_tests/concepts_tests/solids_pipelines_tests/test_op_events.py
facultyai/dagster
779e27faa3e46b7d043cb9624617e655a9ed570c
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets_tests/concepts_tests/solids_pipelines_tests/test_op_events.py
facultyai/dagster
779e27faa3e46b7d043cb9624617e655a9ed570c
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets_tests/concepts_tests/solids_pipelines_tests/test_op_events.py
facultyai/dagster
779e27faa3e46b7d043cb9624617e655a9ed570c
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
import pytest from dagster import Failure, graph from docs_snippets.concepts.solids_pipelines.op_events import ( my_asset_op, my_expectation_op, my_failure_metadata_op, my_failure_op, my_metadata_expectation_op, my_metadata_output, my_named_yield_op, my_retry_op, my_simple_return_op,...
22.970588
95
0.684379
import pytest from dagster import Failure, graph from docs_snippets.concepts.solids_pipelines.op_events import ( my_asset_op, my_expectation_op, my_failure_metadata_op, my_failure_op, my_metadata_expectation_op, my_metadata_output, my_named_yield_op, my_retry_op, my_simple_return_op,...
true
true
1c3ac88eb31bff41592b4cd9757639d29e3aa0c2
3,988
py
Python
gazoo_device/gdm_cli.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
14
2020-11-05T23:23:32.000Z
2022-03-01T18:59:29.000Z
gazoo_device/gdm_cli.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
null
null
null
gazoo_device/gdm_cli.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
5
2021-05-20T22:52:51.000Z
2022-02-21T08:46:21.000Z
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.984962
80
0.722919
import sys from typing import Dict, NoReturn, Optional, Sequence import fire import gazoo_device from gazoo_device import errors from gazoo_device import extensions from gazoo_device import fire_manager from gazoo_device import fire_patch from gazoo_device import gdm_logger from gazoo_device import package_registrar ...
true
true
1c3ac904e382f2b3305eb0cb5780002ae3f4fb61
560
py
Python
launcher/tray/Main.py
liblit/sampler
eaedba51ee8367b9b355e6f85a6c677878160d49
[ "BSD-3-Clause" ]
null
null
null
launcher/tray/Main.py
liblit/sampler
eaedba51ee8367b9b355e6f85a6c677878160d49
[ "BSD-3-Clause" ]
null
null
null
launcher/tray/Main.py
liblit/sampler
eaedba51ee8367b9b355e6f85a6c677878160d49
[ "BSD-3-Clause" ]
1
2019-01-08T11:09:59.000Z
2019-01-08T11:09:59.000Z
import gi gi.require_version('Gtk', '3.0') from contextlib import closing from gi.repository import Gio, Gtk from os.path import abspath, dirname, join from sys import path path.insert(1, join(dirname(dirname(abspath(__file__))), 'common')) from NotificationIcon import NotificationIcon import Keys import Service ...
20.740741
72
0.635714
import gi gi.require_version('Gtk', '3.0') from contextlib import closing from gi.repository import Gio, Gtk from os.path import abspath, dirname, join from sys import path path.insert(1, join(dirname(dirname(abspath(__file__))), 'common')) from NotificationIcon import NotificationIcon import Keys import Service ...
true
true
1c3ac9352ff35a89ba9ffe44e2a4b1f37bb4ce16
1,469
py
Python
gcloud/contrib/analysis/urls.py
brookylin/bk-sops
6c0cf78879849921c4ff6ad6bf3bb82dfdf5b973
[ "Apache-2.0" ]
881
2019-03-25T02:45:42.000Z
2022-03-30T09:10:49.000Z
gcloud/contrib/analysis/urls.py
m0re-work/bk-sops
d03ba8a4ee0781c6daaf0dd38a7369dc82669f7d
[ "Apache-2.0" ]
3,303
2019-03-25T04:18:03.000Z
2022-03-31T11:52:03.000Z
gcloud/contrib/analysis/urls.py
m0re-work/bk-sops
d03ba8a4ee0781c6daaf0dd38a7369dc82669f7d
[ "Apache-2.0" ]
395
2019-03-25T02:53:36.000Z
2022-03-31T08:37:28.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
48.966667
115
0.756297
from django.conf.urls import url from gcloud.contrib.analysis import views urlpatterns = [ url(r"^query_instance_by_group/$", views.query_instance_by_group), url(r"^query_template_by_group/$", views.query_template_by_group), url(r"^query_atom_by_group/$", views.query_atom_by_group), url(r"^query_appma...
true
true
1c3ac9ae9d6e7c62868bb21ea49dd185eacdf50e
1,315
py
Python
recgov/utils.py
Carl4/recgov
2ebbf546861e0beece5fd2cb82cc75eabb145dcf
[ "MIT" ]
1
2021-03-27T19:20:03.000Z
2021-03-27T19:20:03.000Z
recgov/utils.py
Carl4/recgov
2ebbf546861e0beece5fd2cb82cc75eabb145dcf
[ "MIT" ]
1
2021-01-26T03:28:33.000Z
2021-01-26T03:28:33.000Z
recgov/utils.py
Carl4/recgov
2ebbf546861e0beece5fd2cb82cc75eabb145dcf
[ "MIT" ]
1
2021-03-27T19:20:44.000Z
2021-03-27T19:20:44.000Z
"""Just a place to put some handy utility functions. """ from datetime import datetime, timedelta # To find the next month easily: Add 31 days, then truncate back to day 1. def this_month(month: datetime) -> datetime: """Find the first day of this month given a datetime. :param month: the date :type mon...
22.672414
74
0.643346
from datetime import datetime, timedelta def this_month(month: datetime) -> datetime: return datetime(month.year, month.month, 1) _A_MONTH = timedelta(days=31) def next_month(month: datetime) -> datetime: dt = this_month(month) return datetime((dt+_A_MONTH).year, (dt+_A_MONTH).month, 1) def tokeniz...
true
true
1c3aca0376c40b2275667a1611df6d103e55870d
1,279
py
Python
tests/ant/core/test_node.py
soundsk/python-antrw
302bada33a83a8bfa545723883a21a31fcbb9175
[ "MIT" ]
16
2017-08-23T23:57:14.000Z
2022-01-05T01:00:23.000Z
tests/ant/core/test_node.py
soundsk/python-antrw
302bada33a83a8bfa545723883a21a31fcbb9175
[ "MIT" ]
12
2017-08-26T20:20:29.000Z
2020-01-22T14:52:33.000Z
tests/ant/core/test_node.py
soundsk/python-antrw
302bada33a83a8bfa545723883a21a31fcbb9175
[ "MIT" ]
11
2017-06-08T22:21:56.000Z
2022-01-10T15:48:47.000Z
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2017, Matt Hughes # # 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 w...
47.37037
78
0.6724
true
true
1c3acb79dffe5301debf4d75865233f21cf4f756
95
py
Python
URI2791.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
2
2020-07-21T18:01:37.000Z
2021-11-29T01:08:14.000Z
URI2791.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
null
null
null
URI2791.py
rashidulhasanhridoy/URI-Online-Judge-Problem-Solve-with-Python-3
c7db434e2e6e40c2ca3bd56db0d04cf79f69de12
[ "Apache-2.0" ]
null
null
null
X = list(map(int, input('').split())) for i in X: if i == 1: print(X.index(i) + 1)
19
37
0.473684
X = list(map(int, input('').split())) for i in X: if i == 1: print(X.index(i) + 1)
true
true
1c3acbabae93bd72a25b201657cbaa1571e73910
13,460
py
Python
tests/api/test_files.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/api/test_files.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tests/api/test_files.py
Xandersoft/seahub
f75f238b3e0a907e8a8003f419e367fa36e992e7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#coding: UTF-8 """ Test file/dir operations. """ import posixpath import pytest import urllib from urllib import urlencode, quote import urlparse from tests.common.utils import randstring, urljoin from tests.api.apitestbase import ApiTestBase from tests.api.urls import REPOS_URL class FilesApiTest(ApiTestBase): ...
41.16208
87
0.569614
import posixpath import pytest import urllib from urllib import urlencode, quote import urlparse from tests.common.utils import randstring, urljoin from tests.api.apitestbase import ApiTestBase from tests.api.urls import REPOS_URL class FilesApiTest(ApiTestBase): def test_rename_file(self): with self.get...
true
true
1c3acc9a9d4803560d5db364812a6583f8e90b7d
68
py
Python
nft_notificator.py
twofacednine380/nft-notificator
54f7e139b1784c81b91b9305696c9ab94fc32604
[ "MIT" ]
null
null
null
nft_notificator.py
twofacednine380/nft-notificator
54f7e139b1784c81b91b9305696c9ab94fc32604
[ "MIT" ]
null
null
null
nft_notificator.py
twofacednine380/nft-notificator
54f7e139b1784c81b91b9305696c9ab94fc32604
[ "MIT" ]
null
null
null
from src.utils import _main if __name__ == '__main__': _main()
13.6
27
0.676471
from src.utils import _main if __name__ == '__main__': _main()
true
true
1c3acdecca55f3277f91e256dd8593e2fbe38530
699
py
Python
flop/__init__.py
jwohlwend/flop
c5bbd4c5fae6291e2a056e68b44bcf97e4d757bf
[ "MIT" ]
null
null
null
flop/__init__.py
jwohlwend/flop
c5bbd4c5fae6291e2a056e68b44bcf97e4d757bf
[ "MIT" ]
null
null
null
flop/__init__.py
jwohlwend/flop
c5bbd4c5fae6291e2a056e68b44bcf97e4d757bf
[ "MIT" ]
null
null
null
from flop.hardconcrete import HardConcrete from flop.linear import ProjectedLinear, HardConcreteProjectedLinear, HardConcreteLinear from flop.train import HardConcreteTrainer from flop.utils import make_hard_concrete, make_projected_linear from flop.utils import get_hardconcrete_modules, get_hardconcrete_proj_linear_mo...
49.928571
88
0.816881
from flop.hardconcrete import HardConcrete from flop.linear import ProjectedLinear, HardConcreteProjectedLinear, HardConcreteLinear from flop.train import HardConcreteTrainer from flop.utils import make_hard_concrete, make_projected_linear from flop.utils import get_hardconcrete_modules, get_hardconcrete_proj_linear_mo...
true
true
1c3acf723768c88a3e5ed76910f430f9eea19ef7
744
py
Python
Python3/1599-Maximum-Profit-of-Operating-a-Centennial-Wheel/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/1599-Maximum-Profit-of-Operating-a-Centennial-Wheel/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/1599-Maximum-Profit-of-Operating-a-Centennial-Wheel/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution: def minOperationsMaxProfit(self, customers: List[int], boardingCost: int, runningCost: int) -> int: if runningCost > 4 * boardingCost: return -1 nwaits = 0 best_profit = 0 best_rotations = 0 profit = 0 for i, c in enumerate(itertools.chain(...
37.2
103
0.547043
class Solution: def minOperationsMaxProfit(self, customers: List[int], boardingCost: int, runningCost: int) -> int: if runningCost > 4 * boardingCost: return -1 nwaits = 0 best_profit = 0 best_rotations = 0 profit = 0 for i, c in enumerate(itertools.chain(...
true
true
1c3acf88e2216a9063255815651278e21fd268c9
7,422
py
Python
tensorflow_probability/python/distributions/internal/correlation_matrix_volumes_test.py
souravsingh/probability
0519b63094fdaa4e326357a0cdff056d5ef76cd8
[ "Apache-2.0" ]
1
2021-03-17T14:48:47.000Z
2021-03-17T14:48:47.000Z
tensorflow_probability/python/distributions/internal/correlation_matrix_volumes_test.py
souravsingh/probability
0519b63094fdaa4e326357a0cdff056d5ef76cd8
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/internal/correlation_matrix_volumes_test.py
souravsingh/probability
0519b63094fdaa4e326357a0cdff056d5ef76cd8
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
44.710843
103
0.721638
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow_probability.python.distributions.internal import correlation_matrix_volumes_lib as corr from tensorflow_probability.python.distributions.internal import statistical_testing ...
true
true
1c3ad02285f960adf7dad6ef1557a67fa008156e
3,118
py
Python
company/migrations/0017_auto_20161201_1715.py
uktrade/directory-api
45a9024a7ecc2842895201cbb51420ba9e57a168
[ "MIT" ]
2
2017-06-02T09:09:08.000Z
2021-01-18T10:26:53.000Z
company/migrations/0017_auto_20161201_1715.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
629
2016-10-10T09:35:52.000Z
2022-03-25T15:04:04.000Z
company/migrations/0017_auto_20161201_1715.py
konradko/directory-api
e9cd05b1deaf575e94352c46ddbd1857d8119fda
[ "MIT" ]
5
2017-06-22T10:02:22.000Z
2022-03-14T17:55:21.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.10 on 2016-12-01 17:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0016_merge'), ] operations = [ migrations.AlterField( ...
100.580645
1,923
0.685696
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0016_merge'), ] operations = [ migrations.AlterField( model_name='company', name='employees', field=m...
true
true
1c3ad06c3a369b08b51fe1ac58bcecb9a1f95046
15,296
py
Python
management/forms.py
stustanet/Wahlfang
bd7eb21a187d6c985d34c7f806d6f88e7f00db06
[ "MIT" ]
null
null
null
management/forms.py
stustanet/Wahlfang
bd7eb21a187d6c985d34c7f806d6f88e7f00db06
[ "MIT" ]
null
null
null
management/forms.py
stustanet/Wahlfang
bd7eb21a187d6c985d34c7f806d6f88e7f00db06
[ "MIT" ]
null
null
null
import csv import io import re from datetime import timedelta from typing import Tuple, List from django import forms from django.conf import settings from django.core.validators import validate_email from django.utils import timezone from management.models import ElectionManager from vote.models import Election, App...
39.524548
119
0.600418
import csv import io import re from datetime import timedelta from typing import Tuple, List from django import forms from django.conf import settings from django.core.validators import validate_email from django.utils import timezone from management.models import ElectionManager from vote.models import Election, App...
true
true
1c3ad11a0c2040419ccba925cd61776c686fbc7f
646
py
Python
hccf/utils/mathematics.py
kazarinov/cfdr
bf93428614af15440b60fb894097e94fa4efd168
[ "MIT" ]
null
null
null
hccf/utils/mathematics.py
kazarinov/cfdr
bf93428614af15440b60fb894097e94fa4efd168
[ "MIT" ]
null
null
null
hccf/utils/mathematics.py
kazarinov/cfdr
bf93428614af15440b60fb894097e94fa4efd168
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import math import scipy as sp def sigmoid(z): s = 1.0 / (1.0 + math.exp(-z)) return s def log_loss(act, pred): epsilon = 1e-15 pred = sp.maximum(epsilon, pred) pred = sp.minimum(1 - epsilon, pred) ll = sum(act * sp.log(pred.astype(float)) + sp.subtract(1, act.astype(...
23.925926
91
0.582043
import math import scipy as sp def sigmoid(z): s = 1.0 / (1.0 + math.exp(-z)) return s def log_loss(act, pred): epsilon = 1e-15 pred = sp.maximum(epsilon, pred) pred = sp.minimum(1 - epsilon, pred) ll = sum(act * sp.log(pred.astype(float)) + sp.subtract(1, act.astype(float)) * sp.log( ...
true
true
1c3ad1bc9968553b109809c28e96e90c83fa686c
137
py
Python
beer_store_api/urls.py
gwoods22/beer-store-api
c21593734022718896720db916b73f0404840dc2
[ "MIT" ]
1
2020-09-10T16:56:56.000Z
2020-09-10T16:56:56.000Z
beer_store_api/urls.py
gwoods22/beer-store-api
c21593734022718896720db916b73f0404840dc2
[ "MIT" ]
null
null
null
beer_store_api/urls.py
gwoods22/beer-store-api
c21593734022718896720db916b73f0404840dc2
[ "MIT" ]
1
2020-09-20T17:47:07.000Z
2020-09-20T17:47:07.000Z
from django.conf.urls import url, include urlpatterns = [ url(r'', include('products.urls')), url(r'', include('land.urls')), ]
19.571429
41
0.635036
from django.conf.urls import url, include urlpatterns = [ url(r'', include('products.urls')), url(r'', include('land.urls')), ]
true
true
1c3ad27979f8587c4744196d0b2622701d53b174
4,444
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_profile.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
54.864198
170
0.707021
from msrest.serialization import Model class VirtualMachineScaleSetVMProfile(Model): _attribute_map = { 'os_profile': {'key': 'osProfile', 'type': 'VirtualMachineScaleSetOSProfile'}, 'storage_profile': {'key': 'storageProfile', 'type': 'VirtualMachineScaleSetStorageProfile'}, 'network_pr...
true
true
1c3ad38252e97a57417ff208d102b970a5b32ee0
5,703
py
Python
what_apps/cms/tests.py
SlashRoot/WHAT
69e78d01065142446234e77ea7c8c31e3482af29
[ "MIT" ]
null
null
null
what_apps/cms/tests.py
SlashRoot/WHAT
69e78d01065142446234e77ea7c8c31e3482af29
[ "MIT" ]
null
null
null
what_apps/cms/tests.py
SlashRoot/WHAT
69e78d01065142446234e77ea7c8c31e3482af29
[ "MIT" ]
null
null
null
from unittest import expectedFailure from what_apps.cms.models import Question, QandA, QuestionOnForm, BooleanAnswer, \ ContentBlock from what_apps.do.config import set_up as do_set_up from what_apps.utility.tests import WHATTestCase, test_user_factory from what_apps.cms.views import edit_content_block from django....
47.92437
180
0.667017
from unittest import expectedFailure from what_apps.cms.models import Question, QandA, QuestionOnForm, BooleanAnswer, \ ContentBlock from what_apps.do.config import set_up as do_set_up from what_apps.utility.tests import WHATTestCase, test_user_factory from what_apps.cms.views import edit_content_block from django....
true
true
1c3ad3a386b71cbb7c8f485ac55de1c09fcd9451
24,767
py
Python
plexapi/client.py
atoy3731/python-plexapi
ec21c897b7b9087120efd51f67b75c9a8fda7a45
[ "BSD-3-Clause" ]
null
null
null
plexapi/client.py
atoy3731/python-plexapi
ec21c897b7b9087120efd51f67b75c9a8fda7a45
[ "BSD-3-Clause" ]
null
null
null
plexapi/client.py
atoy3731/python-plexapi
ec21c897b7b9087120efd51f67b75c9a8fda7a45
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import time from xml.etree import ElementTree import requests from plexapi import BASE_HEADERS, CONFIG, TIMEOUT, log, logfilter, utils from plexapi.base import PlexObject from plexapi.exceptions import BadRequest, NotFound, Unauthorized, Unsupported from plexapi.playqueue import PlayQueue from ...
43.603873
115
0.610005
import time from xml.etree import ElementTree import requests from plexapi import BASE_HEADERS, CONFIG, TIMEOUT, log, logfilter, utils from plexapi.base import PlexObject from plexapi.exceptions import BadRequest, NotFound, Unauthorized, Unsupported from plexapi.playqueue import PlayQueue from requests.status_codes im...
true
true
1c3ad4111acc4e4d42b72a16a85a190ffbf1d829
1,213
py
Python
src/Routes/v1_message.py
TheMrAnderson/Harbinger
a008226f790da62b8436d762d76c8900763a8f76
[ "Apache-2.0" ]
null
null
null
src/Routes/v1_message.py
TheMrAnderson/Harbinger
a008226f790da62b8436d762d76c8900763a8f76
[ "Apache-2.0" ]
null
null
null
src/Routes/v1_message.py
TheMrAnderson/Harbinger
a008226f790da62b8436d762d76c8900763a8f76
[ "Apache-2.0" ]
null
null
null
from flask import request from flask_restplus import Resource, Namespace, fields ns_messages = Namespace('Messages', description='Handles message actions') m_model = ns_messages.model('harbinger_message', { 'topic': fields.String(description='Topic name'), 'date_added': fields.DateTime(description=''), 'payload': ...
33.694444
102
0.741138
from flask import request from flask_restplus import Resource, Namespace, fields ns_messages = Namespace('Messages', description='Handles message actions') m_model = ns_messages.model('harbinger_message', { 'topic': fields.String(description='Topic name'), 'date_added': fields.DateTime(description=''), 'payload': ...
true
true
1c3ad43033cb8388d598393ffe6e70100da87d89
30,552
py
Python
scipy/optimize/tests/test_least_squares.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
11
2020-06-28T04:30:26.000Z
2022-03-26T08:40:47.000Z
scipy/optimize/tests/test_least_squares.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
44
2019-06-27T15:56:14.000Z
2022-03-15T22:21:10.000Z
scipy/optimize/tests/test_least_squares.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
20
2021-11-07T13:55:56.000Z
2021-12-02T10:54:01.000Z
from itertools import product import numpy as np from numpy.linalg import norm from numpy.testing import (assert_, assert_allclose, assert_equal, suppress_warnings) from pytest import raises as assert_raises from scipy.sparse import issparse, lil_matrix from scipy.sparse.linalg import asline...
39.069054
96
0.559931
from itertools import product import numpy as np from numpy.linalg import norm from numpy.testing import (assert_, assert_allclose, assert_equal, suppress_warnings) from pytest import raises as assert_raises from scipy.sparse import issparse, lil_matrix from scipy.sparse.linalg import asline...
true
true
1c3ad4d233fc232732890fb92f556dcbb8c87887
4,839
py
Python
week_2_data_ingestion/airflow/dags/data_ingestion_yellowtaxi_gcs.py
meswaramoorthy/gcp-de-zoomcamp
1b01ea425404c7c101839cf363dbf556b67d86a0
[ "MIT" ]
null
null
null
week_2_data_ingestion/airflow/dags/data_ingestion_yellowtaxi_gcs.py
meswaramoorthy/gcp-de-zoomcamp
1b01ea425404c7c101839cf363dbf556b67d86a0
[ "MIT" ]
2
2022-02-22T06:40:10.000Z
2022-02-23T05:41:02.000Z
week_2_data_ingestion/airflow/dags/data_ingestion_yellowtaxi_gcs.py
meswaramoorthy/gcp-de-zoomcamp
1b01ea425404c7c101839cf363dbf556b67d86a0
[ "MIT" ]
null
null
null
# Imports import os import logging from datetime import datetime from airflow import DAG from airflow.operators.bash import BashOperator from airflow.operators.python import PythonOperator from airflow.providers.google.cloud.operators.bigquery import BigQueryCreateExternalTableOperator from google.cloud import storag...
36.938931
119
0.66646
import os import logging from datetime import datetime from airflow import DAG from airflow.operators.bash import BashOperator from airflow.operators.python import PythonOperator from airflow.providers.google.cloud.operators.bigquery import BigQueryCreateExternalTableOperator from google.cloud import storage import p...
true
true
1c3ad52d3fc87c3182c23cc3f256734c7bb28c50
331
py
Python
examples/design_search/setup.py
uoa-iai/RoboGrammar
5837107b1588f126e162ba1e9b47f5c9d26c024b
[ "MIT" ]
null
null
null
examples/design_search/setup.py
uoa-iai/RoboGrammar
5837107b1588f126e162ba1e9b47f5c9d26c024b
[ "MIT" ]
null
null
null
examples/design_search/setup.py
uoa-iai/RoboGrammar
5837107b1588f126e162ba1e9b47f5c9d26c024b
[ "MIT" ]
1
2021-05-09T21:51:11.000Z
2021-05-09T21:51:11.000Z
import os from setuptools import setup # Change working directory to the one this file is in os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name='design_search', version='0.1.0', packages=['design_search'], package_dir={'design_search': '..'}, install_requires=[ 'numpy >= 1.1...
20.6875
53
0.65861
import os from setuptools import setup os.chdir(os.path.dirname(os.path.realpath(__file__))) setup( name='design_search', version='0.1.0', packages=['design_search'], package_dir={'design_search': '..'}, install_requires=[ 'numpy >= 1.19' ] )
true
true
1c3ad68dce23f052ad3db0ec86ff7220479905d4
4,272
py
Python
kolibri/core/tasks/main.py
kuboginichimaru/kolibri
18b398f62baa1c60f8456f7f9c6d6c9447068f69
[ "MIT" ]
null
null
null
kolibri/core/tasks/main.py
kuboginichimaru/kolibri
18b398f62baa1c60f8456f7f9c6d6c9447068f69
[ "MIT" ]
8
2021-05-21T15:31:24.000Z
2022-02-24T15:02:14.000Z
kolibri/core/tasks/main.py
kuboginichimaru/kolibri
18b398f62baa1c60f8456f7f9c6d6c9447068f69
[ "MIT" ]
null
null
null
import logging import os import sqlite3 from django.utils.functional import SimpleLazyObject from sqlalchemy import create_engine from sqlalchemy import event from sqlalchemy import exc from kolibri.core.sqlite.utils import check_sqlite_integrity from kolibri.core.sqlite.utils import repair_sqlite_db from kolibri.cor...
30.297872
88
0.704588
import logging import os import sqlite3 from django.utils.functional import SimpleLazyObject from sqlalchemy import create_engine from sqlalchemy import event from sqlalchemy import exc from kolibri.core.sqlite.utils import check_sqlite_integrity from kolibri.core.sqlite.utils import repair_sqlite_db from kolibri.cor...
true
true
1c3ad6e626f17d7949669b590b2ab4b21b862670
1,491
py
Python
python/verifair/benchmarks/fairsquare/M_BNc_F_NN_V3_H2_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
5
2019-11-05T20:40:40.000Z
2020-09-16T03:13:54.000Z
python/verifair/benchmarks/fairsquare/M_BNc_F_NN_V3_H2_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
python/verifair/benchmarks/fairsquare/M_BNc_F_NN_V3_H2_Q.py
obastani/verifair
1d5efea041330fa9fe8d59d976bdd3ef97aff417
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from .helper import * def sample(flag): sex = step([(0,1,0.3307), (1,2,0.6693)]) if sex < 1: capital_gain = gaussian(568.4105, 24248365.5428) if capital_gain < 7298.0000: age = gaussian(38.4208, 184.9151) education_num = gaussian(10.0827, 6.5096) else: ...
33.886364
89
0.539906
from .helper import * def sample(flag): sex = step([(0,1,0.3307), (1,2,0.6693)]) if sex < 1: capital_gain = gaussian(568.4105, 24248365.5428) if capital_gain < 7298.0000: age = gaussian(38.4208, 184.9151) education_num = gaussian(10.0827, 6.5096) else: ...
true
true
1c3ad6e7b9c7fbea3425c301501a21a9d703b98e
1,408
py
Python
Python/longest-happy-prefix.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/longest-happy-prefix.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
Python/longest-happy-prefix.py
sm2774us/leetcode_interview_prep_2021
33b41bea66c266b733372d9a8b9d2965cd88bf8c
[ "Fair" ]
null
null
null
# Time: O(n) # Space: O(n) # kmp solution class Solution(object): def longestPrefix(self, s): """ :type s: str :rtype: str """ def getPrefix(pattern): prefix = [-1]*len(pattern) j = -1 for i in range(1, len(pattern)): whil...
27.076923
74
0.426136
class Solution(object): def longestPrefix(self, s): def getPrefix(pattern): prefix = [-1]*len(pattern) j = -1 for i in range(1, len(pattern)): while j != -1 and pattern[j+1] != pattern[i]: j = prefix[j] if pattern[j+1] ...
true
true
1c3ad7c48b81c35fb3323f8e6ce0b41a1a4c8f05
973
py
Python
shikshastudio/worklist/migrations/0001_initial.py
I-ArchanaDash/shikshastudio
71c5631fa19c90d419a6f31335f07195dbccb124
[ "Apache-2.0" ]
null
null
null
shikshastudio/worklist/migrations/0001_initial.py
I-ArchanaDash/shikshastudio
71c5631fa19c90d419a6f31335f07195dbccb124
[ "Apache-2.0" ]
null
null
null
shikshastudio/worklist/migrations/0001_initial.py
I-ArchanaDash/shikshastudio
71c5631fa19c90d419a6f31335f07195dbccb124
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.9 on 2022-02-02 12:32 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
33.551724
141
0.63001
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c3ad9b85e444c0be6a54d60a231c91985be3569
6,496
py
Python
LearningSafeSets/Validation/Validation.py
alexliniger/AdversarialRoadModel
14157760687c22acc8b91c39128875005ada7563
[ "Apache-2.0" ]
20
2020-07-17T06:32:32.000Z
2022-03-27T03:24:26.000Z
LearningSafeSets/Validation/Validation.py
alexliniger/AdversarialRoadModel
14157760687c22acc8b91c39128875005ada7563
[ "Apache-2.0" ]
null
null
null
LearningSafeSets/Validation/Validation.py
alexliniger/AdversarialRoadModel
14157760687c22acc8b91c39128875005ada7563
[ "Apache-2.0" ]
7
2020-07-19T07:16:01.000Z
2022-01-22T22:58:02.000Z
## Copyright 2020 Alexander Liniger ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## http://www.apache.org/licenses/LICENSE-2.0 ## Unless required by applicable law or agreed to in ...
35.113514
119
0.552032
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import json class Validation: def __init__(self,config): self.config = config self.cut_off = config["cut_off"] self.data = {} self.result_dir = config["result_dir"] def validate(self,mode...
true
true
1c3ada5c5ef2fa17cd168410a01d8ba068d9d078
12,479
py
Python
var/spack/repos/builtin/packages/ascent/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2018-08-20T06:55:11.000Z
2018-08-20T06:55:11.000Z
var/spack/repos/builtin/packages/ascent/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/ascent/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-03-12T19:27:17.000Z
2020-03-12T19:27:17.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import socket import os import llnl.util.tty as tty from os import environ as env def cmake_cache_...
37.362275
79
0.494671
from spack import * import socket import os import llnl.util.tty as tty from os import environ as env def cmake_cache_entry(name, value): return 'set({0} "{1}" CACHE PATH "")\n\n'.format(name, value) class Ascent(Package): homepage = "https://github.com/Alpine-DAV/ascent" git = "https://github....
true
true
1c3ada6ac0274750c25dfe121fdcff9e5ebfe0aa
8,426
py
Python
linear_dynamical_systems/arma.py
kiss2u/google-research
2cd66234656f9e2f4218ed90a2d8aa9cf3139093
[ "Apache-2.0" ]
7
2020-03-15T12:14:07.000Z
2021-12-01T07:01:09.000Z
linear_dynamical_systems/arma.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
25
2020-07-25T08:53:09.000Z
2022-03-12T00:43:02.000Z
linear_dynamical_systems/arma.py
Alfaxad/google-research
2c0043ecd507e75e2df9973a3015daf9253e1467
[ "Apache-2.0" ]
4
2020-06-15T03:06:53.000Z
2021-08-06T16:38:33.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.283186
80
0.693805
from __future__ import absolute_import from __future__ import division from __future__ import print_function import warnings import numpy as np from statsmodels.regression.linear_model import OLS from statsmodels.tools import sm_exceptions from statsmodels.tools.tools import add_constant from statsmodels.tsa.ar_mod...
true
true
1c3ada899ff98335f4fbfabd64f32248e2f9b294
13,121
py
Python
lib/libsnmp/snmpmanager.py
tamihiro/libsnmp
537bb916dcc27e9e94eeae29b210b3a327586dc1
[ "MIT" ]
null
null
null
lib/libsnmp/snmpmanager.py
tamihiro/libsnmp
537bb916dcc27e9e94eeae29b210b3a327586dc1
[ "MIT" ]
null
null
null
lib/libsnmp/snmpmanager.py
tamihiro/libsnmp
537bb916dcc27e9e94eeae29b210b3a327586dc1
[ "MIT" ]
null
null
null
from __future__ import unicode_literals # $Id$ # $Revision$ # # libsnmp - a Python SNMP library # Copyright (c) 2003 Justin Warren <daedalus@eigenmagic.com> # ## An snmpmanager understands SNMPv1 and SNMPv2c messages ## and so it can encode and decode both. from future import standard_library from builtins impo...
34.258486
124
0.604908
from __future__ import unicode_literals from future import standard_library from builtins import bytes standard_library.install_aliases() import socket import select import logging import queue import time import os import asyncore import sys from libsnmp import debug from libsnmp import asynrole from libsnmp impor...
true
true
1c3adc6658ccf330715b06712be972a88383fdc5
2,820
py
Python
src/super_gradients/examples/cifar10_training_torch_objects/cifar10_training_torch_objects_example.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
308
2021-12-30T10:14:30.000Z
2022-03-30T19:05:31.000Z
src/super_gradients/examples/cifar10_training_torch_objects/cifar10_training_torch_objects_example.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
24
2022-01-10T08:05:37.000Z
2022-03-30T18:49:06.000Z
src/super_gradients/examples/cifar10_training_torch_objects/cifar10_training_torch_objects_example.py
Deci-AI/super-gradients
658f638389654668a085e23c3b19622241fd9267
[ "Apache-2.0" ]
26
2021-12-31T06:04:07.000Z
2022-03-21T09:51:44.000Z
""" Cifar10 training with SuperGradients training with the following initialized torch objects: DataLoaders Optimizers Networks (nn.Module) Schedulers Loss functions Main purpose is to demonstrate training in SG with minimal abstraction and maximal flexibility """ from super_gradients import SgM...
40.869565
125
0.750709
from super_gradients import SgModel from super_gradients.training.metrics.classification_metrics import Accuracy, Top5 from super_gradients.training import MultiGPUMode from torch.optim import ASGD from torch.optim.lr_scheduler import MultiStepLR, ReduceLROnPlateau from torch.nn import CrossEntropyLoss from super_gra...
true
true
1c3ae01f7d275d8c9a138cfb38421b60adf5332c
1,701
py
Python
app/core/migrations/0001_initial.py
elieish/recipe-api-django
19e3dff1111b2e570925c7b263363994258eaf22
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
elieish/recipe-api-django
19e3dff1111b2e570925c7b263363994258eaf22
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
elieish/recipe-api-django
19e3dff1111b2e570925c7b263363994258eaf22
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-08 11:32 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', f...
50.029412
266
0.637272
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_proxy_permissions'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.AutoField(...
true
true
1c3ae19661cdaf6cd25142e916f8ec09fd4b7223
4,289
py
Python
experiments/compare_fuzzers/plot.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
2
2019-10-15T11:28:12.000Z
2021-01-28T15:14:09.000Z
experiments/compare_fuzzers/plot.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
null
null
null
experiments/compare_fuzzers/plot.py
TCatshoek/lstar
042b0ae3a0627db7a412c828f3752a9c30928ec1
[ "MIT" ]
null
null
null
from afl.utils import AFLUtils from libfuzzer.utils import CorpusUtils from suls.rerssoconnector import RERSSOConnector from pathlib import Path import re import matplotlib.pyplot as plt def check_reached_afl(problem, problemset, rers_basepath, afl_basepath): rers_path = f"{rers_basepath}/{problemset}/{problem}/{p...
34.869919
101
0.717183
from afl.utils import AFLUtils from libfuzzer.utils import CorpusUtils from suls.rerssoconnector import RERSSOConnector from pathlib import Path import re import matplotlib.pyplot as plt def check_reached_afl(problem, problemset, rers_basepath, afl_basepath): rers_path = f"{rers_basepath}/{problemset}/{problem}/{p...
true
true
1c3ae21e16af0fc8d249ed3c8d2c07ae69ce6afd
12,402
py
Python
openstackclient/tests/identity/v3/test_service.py
citrix-openstack-build/python-openstackclient
ad59b03be6af9da31230689af268139b12b548e7
[ "Apache-2.0" ]
null
null
null
openstackclient/tests/identity/v3/test_service.py
citrix-openstack-build/python-openstackclient
ad59b03be6af9da31230689af268139b12b548e7
[ "Apache-2.0" ]
null
null
null
openstackclient/tests/identity/v3/test_service.py
citrix-openstack-build/python-openstackclient
ad59b03be6af9da31230689af268139b12b548e7
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Nebula Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30.322738
77
0.584261
import copy from openstackclient.identity.v3 import service from openstackclient.tests import fakes from openstackclient.tests.identity.v3 import fakes as identity_fakes from openstackclient.tests.identity.v3 import test_identity class TestService(test_identity.TestIdentityv3): def setUp(self): super(T...
true
true
1c3ae2fdc195c31175e0e67fa1831a524cc4bcbf
1,634
py
Python
test/test_driver.py
bunyk/pss
d903f187b69ea2282b79b730454a041dd0c5f007
[ "Unlicense" ]
null
null
null
test/test_driver.py
bunyk/pss
d903f187b69ea2282b79b730454a041dd0c5f007
[ "Unlicense" ]
null
null
null
test/test_driver.py
bunyk/pss
d903f187b69ea2282b79b730454a041dd0c5f007
[ "Unlicense" ]
null
null
null
import os, sys import unittest sys.path.insert(0, '.') sys.path.insert(0, '..') from psslib.driver import pss_run from test.utils import path_to_testdir, MockOutputFormatter class TestDriver(unittest.TestCase): # Just basic sanity tests for pss_run # Do all the heavy testing in test_pssmain.py, because it al...
32.68
79
0.591799
import os, sys import unittest sys.path.insert(0, '.') sys.path.insert(0, '..') from psslib.driver import pss_run from test.utils import path_to_testdir, MockOutputFormatter class TestDriver(unittest.TestCase): testdir1 = path_to_testdir('testdir1') def setUp(self): self.of = MockOut...
true
true
1c3ae327a71e2763888b0d8ab69b22d08995a16e
16,508
py
Python
src/vulkan/util/gen_enum_to_str.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/vulkan/util/gen_enum_to_str.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/vulkan/util/gen_enum_to_str.py
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
# Copyright © 2017 Intel Corporation # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dist...
33.967078
104
0.62182
import argparse import functools import os import re import textwrap import xml.etree.ElementTree as et from mako.template import Template COPYRIGHT = textwrap.dedent(u"""\ * Copyright © 2017 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of t...
true
true
1c3ae3292a9ef709a84f051cbd22878be2751be2
318
py
Python
codewars/find_next_square.py
tarcisioallyson/python_exercise
be5257c5cce7c0c2b573ece2308e3b5b03c22fac
[ "Unlicense" ]
null
null
null
codewars/find_next_square.py
tarcisioallyson/python_exercise
be5257c5cce7c0c2b573ece2308e3b5b03c22fac
[ "Unlicense" ]
null
null
null
codewars/find_next_square.py
tarcisioallyson/python_exercise
be5257c5cce7c0c2b573ece2308e3b5b03c22fac
[ "Unlicense" ]
null
null
null
def find_next_square(sq): import math # Return the next square if sq is a square, -1 otherwise root = int(math.sqrt(sq)) if root**2 == sq: sq += 1 while int(math.sqrt(sq))**2 != sq: sq+=1 return sq else: return -1 print(find_next_square(81))
24.461538
61
0.528302
def find_next_square(sq): import math root = int(math.sqrt(sq)) if root**2 == sq: sq += 1 while int(math.sqrt(sq))**2 != sq: sq+=1 return sq else: return -1 print(find_next_square(81))
true
true
1c3ae33aa7f08c8da33f8b3ce0bb608fedfe42c9
208
py
Python
self_driving/data_collection/util.py
cclauss/self_driving_pi_car
7dbb67b837b58ddc492ac5ea0822d69dfe6e2d34
[ "MIT" ]
724
2018-11-19T16:29:38.000Z
2022-01-27T19:52:13.000Z
self_driving/data_collection/util.py
cclauss/self_driving_pi_car
7dbb67b837b58ddc492ac5ea0822d69dfe6e2d34
[ "MIT" ]
5
2018-02-17T19:24:38.000Z
2018-02-17T19:31:42.000Z
self_driving/data_collection/util.py
cclauss/self_driving_pi_car
7dbb67b837b58ddc492ac5ea0822d69dfe6e2d34
[ "MIT" ]
69
2018-03-02T13:08:43.000Z
2022-01-13T07:44:27.000Z
import time def get_date(): """ Gives you the date in form: year-month-day-hours-minutes-second :return: current date :rtype: str """ return time.strftime('%Y-%m-%d-%H-%-M-%S')
16
46
0.581731
import time def get_date(): return time.strftime('%Y-%m-%d-%H-%-M-%S')
true
true
1c3ae481e79889fb0480f81200581ce4ee128173
3,017
py
Python
Supersegment/temp.py
XDZhelheim/TrafficDataAnalysis
a73dde10f91fb88af3a7b2edd7a04adaa5ea57f5
[ "MIT" ]
null
null
null
Supersegment/temp.py
XDZhelheim/TrafficDataAnalysis
a73dde10f91fb88af3a7b2edd7a04adaa5ea57f5
[ "MIT" ]
null
null
null
Supersegment/temp.py
XDZhelheim/TrafficDataAnalysis
a73dde10f91fb88af3a7b2edd7a04adaa5ea57f5
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import pandas as pd import geopandas as gp from shapely.geometry import Polygon, MultiLineString, Point import shapely.wkt as wkt import supersegment # def randrange(n, vmin, vmax): # ''' # Helper function to make an array of random numbers having shape (n, ) ...
28.196262
141
0.616175
import matplotlib.pyplot as plt import numpy as np import pandas as pd import geopandas as gp from shapely.geometry import Polygon, MultiLineString, Point import shapely.wkt as wkt import supersegment # Helper function to make an array of random numbers having shape (n, ) # with each number distributed Uniform...
true
true
1c3ae5f91f3ac2db9f56eb3b957a29a5ef0be04c
6,978
py
Python
layers/output_utils.py
Priyashbhugra/yolact
ef871057f2768dcb13e6d9636d49402c9862fcd4
[ "MIT" ]
null
null
null
layers/output_utils.py
Priyashbhugra/yolact
ef871057f2768dcb13e6d9636d49402c9862fcd4
[ "MIT" ]
null
null
null
layers/output_utils.py
Priyashbhugra/yolact
ef871057f2768dcb13e6d9636d49402c9862fcd4
[ "MIT" ]
null
null
null
""" Contains functions used to sanitize and prepare the output of Yolact. """ import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import cv2 from data import cfg, mask_type, MEANS, STD, activation_func from utils.augmentations import Resize from utils import timer from .box_utils im...
36.34375
171
0.586271
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import cv2 from data import cfg, mask_type, MEANS, STD, activation_func from utils.augmentations import Resize from utils import timer from .box_utils import crop, sanitize_coordinates def postprocess(det_output, w, h, batch_idx=0...
true
true
1c3ae671fe4a260122c3b70b182bc81814715e39
952
py
Python
test/test_face_snap_with_registered_face_snaps.py
vtpl1/vtpl_api
d289c92254deb040de925205c583de69802a1c6b
[ "MIT" ]
null
null
null
test/test_face_snap_with_registered_face_snaps.py
vtpl1/vtpl_api
d289c92254deb040de925205c583de69802a1c6b
[ "MIT" ]
null
null
null
test/test_face_snap_with_registered_face_snaps.py
vtpl1/vtpl_api
d289c92254deb040de925205c583de69802a1c6b
[ "MIT" ]
null
null
null
# coding: utf-8 """ Engine api Engine APIs # noqa: E501 The version of the OpenAPI document: 1.0.4 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import vtpl_api from vtpl_api.models.face_snap_with_registered_face_snaps import FaceSnapWith...
23.8
118
0.737395
from __future__ import absolute_import import unittest import vtpl_api from vtpl_api.models.face_snap_with_registered_face_snaps import FaceSnapWithRegisteredFaceSnaps from vtpl_api.rest import ApiException class TestFaceSnapWithRegisteredFaceSnaps(unittest.TestCase): def setUp(self): pass def...
true
true
1c3ae6bccaf5257f5a744f1daf9e4187c5f864e2
2,120
py
Python
examples/clustering/profile.py
catalinpopc/openstacksdk
adaf758076b0c74cf4bb55e88fdee7072764f5f3
[ "Apache-2.0" ]
null
null
null
examples/clustering/profile.py
catalinpopc/openstacksdk
adaf758076b0c74cf4bb55e88fdee7072764f5f3
[ "Apache-2.0" ]
null
null
null
examples/clustering/profile.py
catalinpopc/openstacksdk
adaf758076b0c74cf4bb55e88fdee7072764f5f3
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
25.542169
81
0.686792
from examples.connect import FLAVOR_NAME from examples.connect import IMAGE_NAME from examples.connect import NETWORK_NAME from examples.connect import SERVER_NAME def list_profiles(conn): print("List Profiles:") for profile in conn.clustering.profiles(): print(profile.to_dict()) for profile i...
true
true
1c3ae7fee60b1eade0c55933724255ed28cf901e
695
py
Python
PythonExercicios/ex003.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
PythonExercicios/ex003.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
PythonExercicios/ex003.py
gabjohann/python_3
380cb622669ed82d6b22fdd09d41f02f1ad50a73
[ "MIT" ]
null
null
null
# Faça um programa que leia algo pelo teclado e mostre na tela o seu tipo primitivo # e todas as informações possíveis sobre ele. n = input('Digite algo: ') print('O tipo primitivo é: ', type(n)) print('É alfanumérico? ', n.isalnum()) print('É alfabético? ', n.isalpha()) print('É decimal? ', n.isdecimal()) print('É um...
38.611111
83
0.683453
n = input('Digite algo: ') print('O tipo primitivo é: ', type(n)) print('É alfanumérico? ', n.isalnum()) print('É alfabético? ', n.isalpha()) print('É decimal? ', n.isdecimal()) print('É um dígito? ', n.isdigit()) print('É um identificador? ', n.isidentifier()) print('É possível ser impresso? ', n.isprintable()) print...
true
true
1c3ae8082e261353f40972c2e8e73000e45ed5c9
2,358
py
Python
bacteria_archaea/marine/marine_prok_biomass_estimate.py
yinonbaron/biomass_distribution
783a8d2f59754bde9b0ea802512b131abbe7d8a0
[ "MIT" ]
1
2021-05-17T13:55:48.000Z
2021-05-17T13:55:48.000Z
bacteria_archaea/marine/marine_prok_biomass_estimate.py
yinonbaron/biomass_distribution
783a8d2f59754bde9b0ea802512b131abbe7d8a0
[ "MIT" ]
null
null
null
bacteria_archaea/marine/marine_prok_biomass_estimate.py
yinonbaron/biomass_distribution
783a8d2f59754bde9b0ea802512b131abbe7d8a0
[ "MIT" ]
2
2018-01-10T08:53:35.000Z
2021-05-17T13:55:50.000Z
# coding: utf-8 # # Estimating the total biomass of marine archaea and bacteria # # We use our best estimates for the total number of marine prokaryotes, the carbon content of marine prokaryotes and the fraction of marine archaea and bacteria out of the total population of marine prokaryotes to estimate the total bi...
50.170213
271
0.772265
import numpy as np import pandas as pd pd.options.display.float_format = '{:,.1e}'.format import sys sys.path.insert(0, '../../statistics_helper') from CI_helper import * results = pd.read_excel('marine_prok_biomass_estimate.xlsx') results.head() total_arch_biomass = results['Value'][0]*results['Value'][1]*...
true
true
1c3ae8b8efd54b0337cb7ca549f48d80cbe99ef7
14,957
py
Python
libs/groupdocs_conversion_cloud/models/image_convert_options.py
rocketbot-cl/pdf2word
e46f6f574f69aa744e300baf4802e426b71bf9b2
[ "MIT" ]
null
null
null
libs/groupdocs_conversion_cloud/models/image_convert_options.py
rocketbot-cl/pdf2word
e46f6f574f69aa744e300baf4802e426b71bf9b2
[ "MIT" ]
null
null
null
libs/groupdocs_conversion_cloud/models/image_convert_options.py
rocketbot-cl/pdf2word
e46f6f574f69aa744e300baf4802e426b71bf9b2
[ "MIT" ]
null
null
null
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose Pty Ltd" file="ImageConvertOptions.py"> # Copyright (c) 2003-2019 Aspose Pty Ltd # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a co...
30.902893
259
0.586949
import pprint import re import six from groupdocs_conversion_cloud.models import ConvertOptions class ImageConvertOptions(ConvertOptions): swagger_types = { 'width': 'int', 'height': 'int', 'horizontal_resolution': 'int', 'vertical_resolution': 'int', 'grayscale': 'boo...
true
true
1c3ae9c8efd453aecda98026cf65208b789b948b
15,510
py
Python
lib/click/parser.py
sangwo/dubhacks2019
0074ef9cdfaf25b84ce40bbb97872b07167ad83f
[ "MIT" ]
6,140
2016-05-23T16:09:35.000Z
2022-03-30T19:00:46.000Z
lib/click/parser.py
sangwo/dubhacks2019
0074ef9cdfaf25b84ce40bbb97872b07167ad83f
[ "MIT" ]
1,384
2016-07-08T22:26:41.000Z
2022-03-24T16:39:43.000Z
lib/click/parser.py
sangwo/dubhacks2019
0074ef9cdfaf25b84ce40bbb97872b07167ad83f
[ "MIT" ]
5,110
2016-05-27T13:45:18.000Z
2022-03-31T18:40:42.000Z
# -*- coding: utf-8 -*- """ click.parser ~~~~~~~~~~~~ This module started out as largely a copy paste from the stdlib's optparse module with the features removed that we do not need from optparse because we implement them in Click on a higher level (for instance type handling, help formatting and a lot more). The pla...
36.238318
79
0.573823
import re from collections import deque from .exceptions import UsageError, NoSuchOption, BadOptionUsage, \ BadArgumentUsage def _unpack_args(args, nargs_spec): args = deque(args) nargs_spec = deque(nargs_spec) rv = [] spos = None def _fetch(c): try: if spos is None: ...
true
true
1c3aea34398d990c72f1835b9334fa867f54d7a3
778
py
Python
resources/models/permissions.py
suutari-ai/respa
a944b1c13f855eaf5f883687b5fd025ece7c8176
[ "MIT" ]
null
null
null
resources/models/permissions.py
suutari-ai/respa
a944b1c13f855eaf5f883687b5fd025ece7c8176
[ "MIT" ]
1
2020-06-12T08:58:58.000Z
2020-06-12T08:58:58.000Z
resources/models/permissions.py
suutari-ai/respa
a944b1c13f855eaf5f883687b5fd025ece7c8176
[ "MIT" ]
null
null
null
from django.utils.translation import ugettext_lazy as _ RESOURCE_PERMISSIONS = ( ('can_approve_reservation', _('Can approve reservation')), ('can_make_reservations', _('Can make reservations')), ('can_modify_reservations', _('Can modify reservations')), ('can_ignore_opening_hours', _('Can make reservat...
55.571429
92
0.755784
from django.utils.translation import ugettext_lazy as _ RESOURCE_PERMISSIONS = ( ('can_approve_reservation', _('Can approve reservation')), ('can_make_reservations', _('Can make reservations')), ('can_modify_reservations', _('Can modify reservations')), ('can_ignore_opening_hours', _('Can make reservat...
true
true
1c3aed124f5136bd609625cf41cf4529ddb81b12
7,619
py
Python
lib/Config.py
limebox/sublime-sdf
a315a0226b9fa3df938434b5c67e2f47f2a388d3
[ "MIT" ]
3
2017-10-12T19:11:44.000Z
2021-08-24T18:51:38.000Z
lib/Config.py
limebox/sublime-sdf
a315a0226b9fa3df938434b5c67e2f47f2a388d3
[ "MIT" ]
10
2018-04-20T06:31:58.000Z
2021-07-10T02:46:24.000Z
lib/Config.py
limebox/sublime-sdf
a315a0226b9fa3df938434b5c67e2f47f2a388d3
[ "MIT" ]
null
null
null
class Config(): config_object = { "cli_arguments": { "adddependencies": "-p \"[PROJECT_FOLDER]\" -all", "deploy": "-np -p \"[PROJECT_FOLDER]\"", "importbundle": "-p \"[PROJECT_FOLDER]\"", "importconfiguration": "-p \"[PROJECT_FOLDER]\"", # FEATURES:ALL_FEATURES", "importfiles": "-p \"[PROJECT_FO...
22.675595
163
0.60861
class Config(): config_object = { "cli_arguments": { "adddependencies": "-p \"[PROJECT_FOLDER]\" -all", "deploy": "-np -p \"[PROJECT_FOLDER]\"", "importbundle": "-p \"[PROJECT_FOLDER]\"", "importconfiguration": "-p \"[PROJECT_FOLDER]\"", "importfiles": "-p \"[PROJECT_FOLDER]\" -excludeproperties...
true
true
1c3aed1dcedbba4d6e31e8cb158888ac54b0db5e
871
py
Python
certbot-apache/certbot_apache/_internal/override_arch.py
silverbacknet/certbot
270b5535e24fd3dab4c05fa8929adca8117942f1
[ "Apache-2.0" ]
5
2021-01-26T08:47:29.000Z
2021-01-30T00:42:12.000Z
certbot-apache/certbot_apache/_internal/override_arch.py
silverbacknet/certbot
270b5535e24fd3dab4c05fa8929adca8117942f1
[ "Apache-2.0" ]
2
2019-11-20T07:08:26.000Z
2020-11-05T23:31:48.000Z
certbot-apache/certbot_apache/_internal/override_arch.py
silverbacknet/certbot
270b5535e24fd3dab4c05fa8929adca8117942f1
[ "Apache-2.0" ]
1
2020-10-28T05:49:43.000Z
2020-10-28T05:49:43.000Z
""" Distribution specific override class for Arch Linux """ import zope.interface from certbot import interfaces from certbot_apache._internal import configurator @zope.interface.provider(interfaces.IPluginFactory) class ArchConfigurator(configurator.ApacheConfigurator): """Arch Linux specific ApacheConfigurator...
30.034483
63
0.661309
import zope.interface from certbot import interfaces from certbot_apache._internal import configurator @zope.interface.provider(interfaces.IPluginFactory) class ArchConfigurator(configurator.ApacheConfigurator): OS_DEFAULTS = dict( server_root="/etc/httpd", vhost_root="/etc/httpd/conf", ...
true
true
1c3aed720ff3c84f8575b631665ae385013da9c9
12,656
py
Python
sdks/python/apache_beam/dataframe/expressions.py
bipinupd/beam
fffb85a35df6ae3bdb2934c077856f6b27559aa7
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/dataframe/expressions.py
bipinupd/beam
fffb85a35df6ae3bdb2934c077856f6b27559aa7
[ "Apache-2.0" ]
null
null
null
sdks/python/apache_beam/dataframe/expressions.py
bipinupd/beam
fffb85a35df6ae3bdb2934c077856f6b27559aa7
[ "Apache-2.0" ]
1
2020-04-29T20:09:40.000Z
2020-04-29T20:09:40.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
33.930295
89
0.680547
import contextlib import random import threading from typing import Any from typing import Callable from typing import Iterable from typing import Optional from typing import TypeVar from apache_beam.dataframe import partitionings class Session(object): def __init__(self, bindings=None): self._bindings = dict...
true
true
1c3aee424e7fc8070086b9ea865864c2f4fcc382
3,031
py
Python
python/sfm_global.py
teguhkhg/3dv_tutorial_py
5e7bc614c5a71cd9d125b1bd8767b0b502ef9241
[ "Beerware" ]
2
2020-12-15T06:33:45.000Z
2021-02-16T22:53:48.000Z
python/sfm_global.py
teguhkhg/3dv_tutorial_py
5e7bc614c5a71cd9d125b1bd8767b0b502ef9241
[ "Beerware" ]
null
null
null
python/sfm_global.py
teguhkhg/3dv_tutorial_py
5e7bc614c5a71cd9d125b1bd8767b0b502ef9241
[ "Beerware" ]
null
null
null
import numpy as np import g2o import cv2 import glob from bundle_adjustment import MonoBA # def makeNoisyPoints(Xs, xs, ) class Frame(object): def __init__(self): pass class Mappoint(object): def __init__(self): pass class Measurement(object): def __init__(self): pass class Cov...
28.866667
117
0.571429
import numpy as np import g2o import cv2 import glob from bundle_adjustment import MonoBA class Frame(object): def __init__(self): pass class Mappoint(object): def __init__(self): pass class Measurement(object): def __init__(self): pass class CovisibilityGraph(object): def ...
true
true
1c3aef1a22edb2ebc2b9b274684f2b269d3324c2
4,634
py
Python
chalice/app.py
viswanath-puttagunta/aws-cheatsheet
2425eb15a6a1a22e9679c218d69b2f4e9c277a75
[ "Apache-2.0" ]
null
null
null
chalice/app.py
viswanath-puttagunta/aws-cheatsheet
2425eb15a6a1a22e9679c218d69b2f4e9c277a75
[ "Apache-2.0" ]
null
null
null
chalice/app.py
viswanath-puttagunta/aws-cheatsheet
2425eb15a6a1a22e9679c218d69b2f4e9c277a75
[ "Apache-2.0" ]
null
null
null
from chalice import Chalice, BadRequestError from chalice import NotFoundError from chalice import CORSConfig import json import boto3 from botocore.exceptions import ClientError ''' Commands that worked http ${GATEWAY}/cities/seattle http -v ${GATEWAY}/objects/mykey X-Api-Key:${APIKEY} echo '{"name":"Viswanath"}' | h...
31.739726
131
0.630125
from chalice import Chalice, BadRequestError from chalice import NotFoundError from chalice import CORSConfig import json import boto3 from botocore.exceptions import ClientError app = Chalice(app_name='khelloworld') app.debug = True CITIES_TO_STATE = { 'seattle': 'WA', 'portland': 'OR' } S3 = boto3.client(...
true
true
1c3aefa8b340ce2d1addc68b0b56285e80ee1ddd
730
py
Python
main/management/commands/strava_update.py
cablespaghetti/running-club-challenge
46bc289084c5c089154f456ac2b8901924653ead
[ "MIT" ]
null
null
null
main/management/commands/strava_update.py
cablespaghetti/running-club-challenge
46bc289084c5c089154f456ac2b8901924653ead
[ "MIT" ]
null
null
null
main/management/commands/strava_update.py
cablespaghetti/running-club-challenge
46bc289084c5c089154f456ac2b8901924653ead
[ "MIT" ]
null
null
null
import logging import sys from django.core.management.base import BaseCommand from main.models import Athlete from main.strava import update_user_strava_activities from stravalib.exc import RateLimitExceeded logger = logging.getLogger() class Command(BaseCommand): help = 'Gets any new athlete activities from St...
30.416667
99
0.680822
import logging import sys from django.core.management.base import BaseCommand from main.models import Athlete from main.strava import update_user_strava_activities from stravalib.exc import RateLimitExceeded logger = logging.getLogger() class Command(BaseCommand): help = 'Gets any new athlete activities from St...
true
true
1c3af011d6321136b8938fe7837075da6815aaca
5,798
py
Python
direct/src/showutil/Rope.py
cmarshall108/panda3d-python3
8bea2c0c120b03ec1c9fd179701fdeb7510bb97b
[ "PHP-3.0", "PHP-3.01" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
direct/src/showutil/Rope.py
cmarshall108/panda3d-python3
8bea2c0c120b03ec1c9fd179701fdeb7510bb97b
[ "PHP-3.0", "PHP-3.01" ]
20
2021-05-03T18:02:23.000Z
2022-03-12T12:01:04.000Z
Lib/site-packages/direct/showutil/Rope.py
fochoao/cpython
3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9
[ "bzip2-1.0.6", "0BSD" ]
1
2021-04-09T00:02:59.000Z
2021-04-09T00:02:59.000Z
from panda3d.core import * class Rope(NodePath): """ This class defines a NURBS curve whose control vertices are defined based on points relative to one or more nodes in space, so that the "rope" will animate as the nodes move around. It uses the C++ RopeNode class to achieve fancy rendering effe...
39.175676
91
0.606588
from panda3d.core import * class Rope(NodePath): showRope = ConfigVariableBool('show-rope', True, \ "Set this to false to deactivate the display of ropes.") def __init__(self, name = 'Rope'): self.ropeNode = RopeNode(name) self.curve = NurbsCurveEvaluator() self.ropeNode.setCur...
true
true
1c3af0a9f97c74c950a5a9ea22723d4bcb881eca
10,372
py
Python
Jumpscale/core/PlatformTypes.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
Jumpscale/core/PlatformTypes.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
Jumpscale/core/PlatformTypes.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
from Jumpscale import j import sys import os import platform # import re # def _useELFtrick(file): # fd = os.open(file, os.O_RDONLY) # out = os.read(fd, 5) # if out[0:4] != "\x7fELF": # result = 0 # ELF trick fails... # elif out[4] == '\x01': # result = 32 # elif out[4] == '\x02'...
34.573333
111
0.56209
from Jumpscale import j import sys import os import platform JSBASE = j.application.jsbase_get_class() class PlatformTypes(JSBASE): def __init__(self): self.__jslocation__ = "j.core.platformtype" JSBASE.__init__(self) self._myplatform = None self._platformParents = {} s...
true
true
1c3af165e3c85db39d0dd8c954af057b250efa94
40,450
py
Python
chromewhip/protocol/debugger.py
Cosive/chromewhip
3179aeeea898c20c8ba4fbb3926c7c696dfee165
[ "MIT" ]
null
null
null
chromewhip/protocol/debugger.py
Cosive/chromewhip
3179aeeea898c20c8ba4fbb3926c7c696dfee165
[ "MIT" ]
1
2022-01-26T02:10:57.000Z
2022-02-07T21:07:18.000Z
chromewhip/protocol/debugger.py
Cosive/chromewhip
3179aeeea898c20c8ba4fbb3926c7c696dfee165
[ "MIT" ]
null
null
null
# noinspection PyPep8 # noinspection PyArgumentList """ AUTO-GENERATED BY `scripts/generate_protocol.py` using `data/browser_protocol.json` and `data/js_protocol.json` as inputs! Please do not modify this file. """ import logging from typing import Any, Optional, Union from chromewhip.helpers import PayloadMixin, Ba...
36.873291
130
0.548925
import logging from typing import Any, Optional, Union from chromewhip.helpers import PayloadMixin, BaseEvent, ChromeTypeBase log = logging.getLogger(__name__) from chromewhip.protocol import runtime as Runtime BreakpointId = str CallFrameId = str class Location(ChromeTypeBase): def __init__(self, ...
true
true
1c3af1a5253375ac01aa65d1cf0b3648005c610f
3,475
py
Python
nuitka/nodes/FunctionAttributeNodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/FunctionAttributeNodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
nuitka/nodes/FunctionAttributeNodes.py
sthagen/Nuitka-Nuitka
023dc76eeafd9c53ee2a51931474ddd98a3ba083
[ "Apache-2.0" ]
null
null
null
# Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
34.405941
88
0.721439
from .ExpressionBases import ( CompileTimeConstantExpressionBase, ExpressionChildHavingBase, ) from .NodeBases import SideEffectsFromChildrenMixin from .NodeMakingHelpers import makeConstantReplacementNode class ExpressionFunctionQualnameRef(CompileTimeConstantExpressionBase): kind = "EXPRESSION_FUNCTIO...
true
true
1c3af21cc1494b3e7e8c52b4d2bce3b10af9c0f5
1,308
py
Python
darkknight/models.py
fusionbox/django-darkknight
ae3d06f8c92120c45c5e18f6dd31950262f661ed
[ "BSD-2-Clause" ]
3
2016-05-23T20:43:40.000Z
2021-07-08T22:11:57.000Z
darkknight/models.py
fusionbox/django-darkknight
ae3d06f8c92120c45c5e18f6dd31950262f661ed
[ "BSD-2-Clause" ]
1
2018-04-13T01:12:01.000Z
2018-04-13T17:43:45.000Z
darkknight/models.py
fusionbox/django-darkknight
ae3d06f8c92120c45c5e18f6dd31950262f661ed
[ "BSD-2-Clause" ]
2
2016-11-27T22:35:03.000Z
2017-09-16T03:55:50.000Z
import os.path import uuid from django.db import models from django.core.signing import Signer from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from OpenSSL import crypto pk_signer = Signer('CSR PK') # must be a top-level function to be serializable in migrations def g...
26.693878
96
0.733945
import os.path import uuid from django.db import models from django.core.signing import Signer from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from OpenSSL import crypto pk_signer = Signer('CSR PK') def generate_uuid(): return uuid.uuid4().hex class SSLKey(model...
true
true
1c3af43fb511853ff61c8fae924b0d3c70187d2e
1,706
py
Python
toontown/ai/DistributedAprilToonsMgr.py
LittleNed/toontown-stride
1252a8f9a8816c1810106006d09c8bdfe6ad1e57
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/ai/DistributedAprilToonsMgr.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
null
null
null
toontown/ai/DistributedAprilToonsMgr.py
NoraTT/Historical-Commits-Project-Altis-Source
fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179
[ "Apache-2.0" ]
4
2019-06-20T23:45:23.000Z
2020-10-14T20:30:15.000Z
from direct.distributed.DistributedObject import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase.AprilToonsGlobals import * from toontown.toonbase import ToontownGlobals class DistributedAprilToonsMgr(DistributedObject): notify = DirectNotifyGlobal.directNotify.newCatego...
38.772727
107
0.697538
from direct.distributed.DistributedObject import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase.AprilToonsGlobals import * from toontown.toonbase import ToontownGlobals class DistributedAprilToonsMgr(DistributedObject): notify = DirectNotifyGlobal.directNotify.newCatego...
true
true
1c3af4ceae6c70494adf33983ad96e4c321ed51d
552
py
Python
Tests/image_tests/renderpasses/test_GBufferRT.py
Nuclearfossil/Falcor
667dc68a51bbaf87a2a063f4f0ef8928990ed203
[ "BSD-3-Clause" ]
62
2022-02-04T10:34:29.000Z
2022-03-31T19:41:20.000Z
Tests/image_tests/renderpasses/test_GBufferRT.py
Nuclearfossil/Falcor
667dc68a51bbaf87a2a063f4f0ef8928990ed203
[ "BSD-3-Clause" ]
1
2021-02-18T16:38:38.000Z
2021-02-18T16:38:38.000Z
Tests/image_tests/renderpasses/test_GBufferRT.py
fromasmtodisasm/Falcor
300aee1d7a9609e427f07e8887fd9bcb377426b0
[ "BSD-3-Clause" ]
4
2022-02-04T16:08:30.000Z
2022-03-09T09:39:41.000Z
from helpers import render_frames from graphs.GBufferRT import GBufferRT as g from falcor import * m.addGraph(g) m.loadScene('Arcade/Arcade.fscene') ctx = locals() # default render_frames(ctx, 'default', frames=[1,16,64]) # enable depth-of-field m.scene.camera.focalDistance = 3.0 m.scene.camera.apertureRadius = 0.1 ...
25.090909
84
0.762681
from helpers import render_frames from graphs.GBufferRT import GBufferRT as g from falcor import * m.addGraph(g) m.loadScene('Arcade/Arcade.fscene') ctx = locals() render_frames(ctx, 'default', frames=[1,16,64]) m.scene.camera.focalDistance = 3.0 m.scene.camera.apertureRadius = 0.1 render_frames(ctx, 'dof', frames=[...
true
true
1c3af52ad959cebe5559db5b7752747028e20cf2
4,399
py
Python
sdk/python/pulumi_azure_nextgen/recoveryservices/get_replication_recovery_services_provider.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/recoveryservices/get_replication_recovery_services_provider.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/recoveryservices/get_replication_recovery_services_provider.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
34.912698
185
0.643555
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs __all__ = [ 'GetReplicationRecoveryServicesProviderResult', 'AwaitableGetReplicationRecoveryServicesProviderResult', 'get_replication_reco...
true
true
1c3af52ea76f81bce8055804eeaef5872fe35d37
30
py
Python
pybot/plugins/api/__init__.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
pybot/plugins/api/__init__.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
pybot/plugins/api/__init__.py
harikrishnana2021/operationcode-pybot
6e78e069c274281d50dcb71b98b9f485afb012fc
[ "MIT" ]
null
null
null
from .plugin import APIPlugin
15
29
0.833333
from .plugin import APIPlugin
true
true
1c3af727a745fe5abf6fe52f3e5a1d0d832e4f48
11,756
py
Python
tests/loggers/test_tensorboard.py
mathemusician/pytorch-lightning
15fa5389387b3a220bc044dd30eb0be1e8f64944
[ "Apache-2.0" ]
3,469
2019-03-31T03:09:16.000Z
2020-01-13T15:06:31.000Z
tests/loggers/test_tensorboard.py
mathemusician/pytorch-lightning
15fa5389387b3a220bc044dd30eb0be1e8f64944
[ "Apache-2.0" ]
524
2019-04-02T12:33:39.000Z
2020-01-14T02:53:33.000Z
tests/loggers/test_tensorboard.py
mathemusician/pytorch-lightning
15fa5389387b3a220bc044dd30eb0be1e8f64944
[ "Apache-2.0" ]
365
2019-04-02T22:14:04.000Z
2020-01-13T17:21:54.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.884273
113
0.68986
import logging import operator import os from argparse import Namespace from unittest import mock import numpy as np import pytest import torch import yaml from pytorch_lightning import Trainer from pytorch_lightning.loggers import TensorBoardLogger from pytorch_lightning.utilities.imports import _compare_version, _O...
true
true
1c3af7863bed29b416a3e11a298c516cddaa8b47
407
py
Python
nicos_virt_mlz/biodiff/setups/shutter.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_virt_mlz/biodiff/setups/shutter.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_virt_mlz/biodiff/setups/shutter.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# -*- coding: utf-8 -*- description = 'Shutter setup' group = 'lowlevel' devices = dict( gammashutter = device('nicos.devices.generic.ManualSwitch', description = 'Gamma shutter (virtual)', states = ['open', 'closed'], ), photoshutter = device('nicos.devices.generic.ManualSwitch', ...
25.4375
63
0.60688
description = 'Shutter setup' group = 'lowlevel' devices = dict( gammashutter = device('nicos.devices.generic.ManualSwitch', description = 'Gamma shutter (virtual)', states = ['open', 'closed'], ), photoshutter = device('nicos.devices.generic.ManualSwitch', description = 'Photo shu...
true
true
1c3af82d4aa6de435bc8f76fa7dbf08b70fa5380
5,756
py
Python
inferbeddings/nli/disan/general.py
issca/inferbeddings
80492a7aebcdcac21e758514c8af403d77e8594a
[ "MIT" ]
33
2017-07-25T14:31:00.000Z
2019-03-06T09:18:00.000Z
inferbeddings/nli/disan/general.py
issca/inferbeddings
80492a7aebcdcac21e758514c8af403d77e8594a
[ "MIT" ]
1
2017-08-22T13:49:30.000Z
2017-08-22T13:49:30.000Z
inferbeddings/nli/disan/general.py
issca/inferbeddings
80492a7aebcdcac21e758514c8af403d77e8594a
[ "MIT" ]
9
2017-10-05T08:50:45.000Z
2019-04-18T12:40:56.000Z
# -*- coding: utf-8 -*- import tensorflow as tf from functools import reduce from operator import mul VERY_BIG_NUMBER = 1e30 VERY_SMALL_NUMBER = 1e-30 VERY_POSITIVE_NUMBER = VERY_BIG_NUMBER VERY_NEGATIVE_NUMBER = -VERY_BIG_NUMBER def get_last_state(rnn_out_put, mask): # correct ''' get_last_state of rnn ou...
37.620915
107
0.653753
import tensorflow as tf from functools import reduce from operator import mul VERY_BIG_NUMBER = 1e30 VERY_SMALL_NUMBER = 1e-30 VERY_POSITIVE_NUMBER = VERY_BIG_NUMBER VERY_NEGATIVE_NUMBER = -VERY_BIG_NUMBER def get_last_state(rnn_out_put, mask): rnn_out_put_flatten = flatten(rnn_out_put, 2) mask_flatten = fl...
true
true
1c3af8b980375785b361c0078e3e12131203e9fc
5,121
py
Python
detection/configs/sparse_rcnn_pvt_v2_b2_fpn_300_proposals_crop_mstrain_480-800_3x_coco.py
cclauss/PVT
cceb465b7dfb2b7a48b39074a14a04dedab427e8
[ "Apache-2.0" ]
1,056
2021-02-24T03:26:56.000Z
2022-03-31T01:57:48.000Z
detection/configs/sparse_rcnn_pvt_v2_b2_fpn_300_proposals_crop_mstrain_480-800_3x_coco.py
youngwanLEE/PVT
61d92c2a704bb35f6247e5fe957d7c9a08ed28f0
[ "Apache-2.0" ]
85
2021-02-26T02:58:29.000Z
2022-03-15T08:32:00.000Z
detection/configs/sparse_rcnn_pvt_v2_b2_fpn_300_proposals_crop_mstrain_480-800_3x_coco.py
youngwanLEE/PVT
61d92c2a704bb35f6247e5fe957d7c9a08ed28f0
[ "Apache-2.0" ]
173
2021-02-25T02:21:41.000Z
2022-03-19T04:36:22.000Z
_base_ = [ '_base_/datasets/coco_detection.py', '_base_/schedules/schedule_1x.py', '_base_/default_runtime.py' ] num_stages = 6 num_proposals = 300 model = dict( type='SparseRCNN', # pretrained='pretrained/pvt_v2_b2.pth', pretrained='https://github.com/whai362/PVT/releases/download/v2/pvt_v2_b2....
38.503759
85
0.507909
_base_ = [ '_base_/datasets/coco_detection.py', '_base_/schedules/schedule_1x.py', '_base_/default_runtime.py' ] num_stages = 6 num_proposals = 300 model = dict( type='SparseRCNN', pretrained='https://github.com/whai362/PVT/releases/download/v2/pvt_v2_b2.pth', backbone=dict( type='pv...
true
true
1c3afa472f2951ad9c8d105d75fd9458ae8aeedd
50,638
py
Python
tests/helpers/test_template.py
dcramer/home-assistant
c1936f6fe4b28a3899c31524027c06e7b31a050b
[ "Apache-2.0" ]
1
2020-01-03T03:35:49.000Z
2020-01-03T03:35:49.000Z
tests/helpers/test_template.py
pickerin/home-assistant
4bf15a07a34c24e9c4939cd05ea2c86d8a013b2f
[ "Apache-2.0" ]
5
2021-02-08T20:54:44.000Z
2022-03-12T00:48:52.000Z
tests/helpers/test_template.py
pickerin/home-assistant
4bf15a07a34c24e9c4939cd05ea2c86d8a013b2f
[ "Apache-2.0" ]
null
null
null
"""Test Home Assistant template helper methods.""" from datetime import datetime import math import random from unittest.mock import patch import pytest import pytz from homeassistant.components import group from homeassistant.const import ( LENGTH_METERS, MASS_GRAMS, MATCH_ALL, PRESSURE_PA, TEMP_...
28.03876
88
0.570481
from datetime import datetime import math import random from unittest.mock import patch import pytest import pytz from homeassistant.components import group from homeassistant.const import ( LENGTH_METERS, MASS_GRAMS, MATCH_ALL, PRESSURE_PA, TEMP_CELSIUS, VOLUME_LITERS, ) from homeassistant.ex...
true
true
1c3afb5ff9d4981f9d2a60625c92fcfd2930c52c
327
py
Python
controller/recipe/service.py
StykMartin/poc-controller
6deb6be12e72837a9f4e40d13899a267f1c6a088
[ "MIT" ]
1
2021-12-17T16:58:39.000Z
2021-12-17T16:58:39.000Z
controller/recipe/service.py
StykMartin/poc-controller
6deb6be12e72837a9f4e40d13899a267f1c6a088
[ "MIT" ]
3
2021-11-28T08:58:39.000Z
2021-12-20T19:01:36.000Z
controller/recipe/service.py
StykMartin/poc-controller
6deb6be12e72837a9f4e40d13899a267f1c6a088
[ "MIT" ]
1
2021-12-19T05:10:41.000Z
2021-12-19T05:10:41.000Z
# Proxy to Beaker Server from typing import Any, Dict, Tuple def get_recipe(recipe_id: int) -> Dict[str, Any]: return {"recipe_id": recipe_id} def get_recipe_watchdog(recipe_id: int) -> int: return recipe_id def post_recipe_watchdog(recipe_id: int, seconds: int) -> Tuple[int, int]: return recipe_id, s...
21.8
74
0.721713
from typing import Any, Dict, Tuple def get_recipe(recipe_id: int) -> Dict[str, Any]: return {"recipe_id": recipe_id} def get_recipe_watchdog(recipe_id: int) -> int: return recipe_id def post_recipe_watchdog(recipe_id: int, seconds: int) -> Tuple[int, int]: return recipe_id, seconds
true
true
1c3afc82812398389454280db5bc7d765bef91ec
5,745
py
Python
funowl/general_definitions.py
hsolbrig/funowl
9345591e6c6cdf246fb8f4b0fcdae0b904c2a45d
[ "CC0-1.0" ]
23
2019-05-24T05:27:25.000Z
2022-02-18T16:37:17.000Z
funowl/general_definitions.py
cmungall/funowl
67ccb3ece369b1c889341403430120c33cb5a572
[ "CC0-1.0" ]
22
2019-11-04T21:03:33.000Z
2022-03-11T19:38:15.000Z
funowl/general_definitions.py
cmungall/funowl
67ccb3ece369b1c889341403430120c33cb5a572
[ "CC0-1.0" ]
5
2019-10-07T13:28:14.000Z
2021-12-20T08:28:58.000Z
""" nonNegativeInteger := a nonempty finite sequence of digits between 0 and 9 quotedString := a finite sequence of characters in which " (U+22) and \\ (U+5C) occur only in pairs of the form \\" (U+5C, U+22) and \\ (U+5C, U+5C), enclosed in a pair of " (U+22) characters languageTag := @ (U+40) followed a nonempty seque...
42.555556
191
0.662489
from typing import Optional, ClassVar, Set import bcp47 import rdflib import rfc3987 from rdflib import BNode, URIRef, Graph, Literal from rdflib.namespace import is_ncname, XSD from funowl.base.fun_owl_base import FunOwlBase, FunOwlRoot from funowl.terminals.Terminals import PNAME_NS, PNAME_LN, BLANK_NODE_LABEL, QUO...
true
true
1c3afd51a20bfdb1b868bd870ca6f23018628fae
18,995
py
Python
dautils/nb.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
dautils/nb.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
dautils/nb.py
diabloxenon/dautils
064307b0fd9bbca2adcc7df5c6a0289954c74d58
[ "MIT" ]
null
null
null
""" IPython/Jupyter notebook widgets and utilities. """ from IPython.display import display from IPython.display import Math # from IPython.html import widgets : DEPRECATED OPTION import ipywidgets as widgets from dautils import collect from dautils import conf from dautils import ts from dautils import log_api import ...
31.08838
79
0.59621
from IPython.display import display from IPython.display import Math import ipywidgets as widgets from dautils import collect from dautils import conf from dautils import ts from dautils import log_api import matplotlib as mpl from matplotlib.colors import rgb2hex import pprint from matplotlib.colors import ColorConver...
true
true
1c3afe002948062303b2fdb2338c03553fc6ecf1
2,763
py
Python
mqtt_pi0_client/list_control.py
hengying/mqtt_at_home
ed1cc5dd0a57cc46e57ec5edeb48ae1d019ebae5
[ "BSD-3-Clause" ]
null
null
null
mqtt_pi0_client/list_control.py
hengying/mqtt_at_home
ed1cc5dd0a57cc46e57ec5edeb48ae1d019ebae5
[ "BSD-3-Clause" ]
null
null
null
mqtt_pi0_client/list_control.py
hengying/mqtt_at_home
ed1cc5dd0a57cc46e57ec5edeb48ae1d019ebae5
[ "BSD-3-Clause" ]
null
null
null
from layer import Layer from button_enum import * from event import * BIAS_Y = -2 class ListControl(Layer): def __init__(self, holder, name, labels): super().__init__(holder, name) self._labels = labels self._current_item = 0 self._top_item = 0 def handle_event(self, event):...
44.564516
93
0.564966
from layer import Layer from button_enum import * from event import * BIAS_Y = -2 class ListControl(Layer): def __init__(self, holder, name, labels): super().__init__(holder, name) self._labels = labels self._current_item = 0 self._top_item = 0 def handle_event(self, event):...
true
true
1c3afe5cfc45a414c8c4351a3aecf2ce63bcb80e
751
py
Python
200. Number of Islands/solution.py
alexwhyy/leetcode
41664aa48137677d2f98817b9c512d76f13c525f
[ "MIT" ]
null
null
null
200. Number of Islands/solution.py
alexwhyy/leetcode
41664aa48137677d2f98817b9c512d76f13c525f
[ "MIT" ]
null
null
null
200. Number of Islands/solution.py
alexwhyy/leetcode
41664aa48137677d2f98817b9c512d76f13c525f
[ "MIT" ]
null
null
null
class Solution: def traverse(self, grid, y, x): grid[y][x] = "0" if y - 1 >= 0 and grid[y - 1][x] == "1": self.traverse(grid, y - 1, x) if x + 1 < len(grid[0]) and grid[y][x + 1] == "1": self.traverse(grid, y, x + 1) if y + 1 < len(grid) and grid[y + 1][x] == ...
37.55
58
0.423435
class Solution: def traverse(self, grid, y, x): grid[y][x] = "0" if y - 1 >= 0 and grid[y - 1][x] == "1": self.traverse(grid, y - 1, x) if x + 1 < len(grid[0]) and grid[y][x + 1] == "1": self.traverse(grid, y, x + 1) if y + 1 < len(grid) and grid[y + 1][x] == ...
true
true
1c3afea626267efe957e1bdf8d89b5b62b7b2996
11,343
py
Python
myven/lib/python3.8/site-packages/ansible/modules/network/a10/a10_virtual_server.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
1
2021-04-02T08:08:39.000Z
2021-04-02T08:08:39.000Z
myven/lib/python3.8/site-packages/ansible/modules/network/a10/a10_virtual_server.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
null
null
null
myven/lib/python3.8/site-packages/ansible/modules/network/a10/a10_virtual_server.py
baltham/dne-dna-code
4a13309a790a670d2f07e635c9264a0c29976c6a
[ "MIT" ]
1
2020-05-03T01:13:16.000Z
2020-05-03T01:13:16.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Mischa Peters <mpeters@a10networks.com>, # Eric Chou <ericc@a10networks.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = t...
38.979381
138
0.627876
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: a10_virtual_server version_added: 1.8 short_description: ...
true
true
1c3afeb4753bda4fbff9b2dcc854e5d06db45765
1,054
py
Python
python36/dxa/sn_random_numbers.py
luckyzflQ/py4fix
03c17eeab201f9510789b328609273205db75d41
[ "CNRI-Python" ]
1
2018-09-10T18:51:14.000Z
2018-09-10T18:51:14.000Z
python3/dxa/sn_random_numbers.py
ioancw/py4fi
bbf7b41d375e4f7b0344bc9b1e97d7910ad1e6ec
[ "CNRI-Python" ]
2
2020-10-27T19:44:15.000Z
2020-11-03T23:55:36.000Z
python3/dxa/sn_random_numbers.py
ioancw/py4fi
bbf7b41d375e4f7b0344bc9b1e97d7910ad1e6ec
[ "CNRI-Python" ]
2
2019-03-05T15:03:15.000Z
2019-12-27T19:09:41.000Z
import numpy as np def sn_random_numbers(shape, antithetic=True, moment_matching=True, fixed_seed=False): ''' Returns an array of shape shape with (pseudo)random numbers that are standard normally distributed. Parameters ========== shape : tuple (o, n, m) generati...
29.277778
80
0.591082
import numpy as np def sn_random_numbers(shape, antithetic=True, moment_matching=True, fixed_seed=False): if fixed_seed: np.random.seed(1000) if antithetic: ran = np.random.standard_normal((shape[0], shape[1], int(shape[2] / 2))) ran = np.concatenate((ran, -ran), a...
true
true
1c3b00055fe866bbbd99dcd71c94fc7e0edbc356
396
py
Python
src/blog/migrations/0009_auto_20200804_1509.py
SleepNoMore/django_blog_site
d23397e1595c488c424ed7eb46d1f844afd8178e
[ "MIT" ]
null
null
null
src/blog/migrations/0009_auto_20200804_1509.py
SleepNoMore/django_blog_site
d23397e1595c488c424ed7eb46d1f844afd8178e
[ "MIT" ]
null
null
null
src/blog/migrations/0009_auto_20200804_1509.py
SleepNoMore/django_blog_site
d23397e1595c488c424ed7eb46d1f844afd8178e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.9 on 2020-08-04 13:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0008_auto_20200804_1508'), ] operations = [ migrations.AlterField( model_name='post', name='category', ...
20.842105
63
0.60101
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0008_auto_20200804_1508'), ] operations = [ migrations.AlterField( model_name='post', name='category', field=models.CharField(blank=True, max_le...
true
true
1c3b0039b51ce776822a9b608112c4ba7e849670
7,997
py
Python
django/utils/http.py
blaze33/django
2f6d887bd0a110e3a662ac1d056d6cdabf38632b
[ "BSD-3-Clause" ]
null
null
null
django/utils/http.py
blaze33/django
2f6d887bd0a110e3a662ac1d056d6cdabf38632b
[ "BSD-3-Clause" ]
1
2016-02-19T00:22:18.000Z
2016-02-19T00:22:18.000Z
django/utils/http.py
blaze33/django
2f6d887bd0a110e3a662ac1d056d6cdabf38632b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: # Python 2 import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate fro...
34.769565
84
0.654996
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate from django.ut...
true
true
1c3b00ee71b0bffd223e0576b49eb93ff93b66a5
1,194
py
Python
email/app.py
vivekbhanu18/MASK_RCNN
0fe43b5638a062f6fc42cd1a9598f45cb06b99b3
[ "MIT" ]
null
null
null
email/app.py
vivekbhanu18/MASK_RCNN
0fe43b5638a062f6fc42cd1a9598f45cb06b99b3
[ "MIT" ]
null
null
null
email/app.py
vivekbhanu18/MASK_RCNN
0fe43b5638a062f6fc42cd1a9598f45cb06b99b3
[ "MIT" ]
null
null
null
# importing libraries from flask import Flask from flask_mail import Mail, Message from flask import Flask, render_template, request,url_for, redirect app = Flask(__name__) mail = Mail(app) # instantiate the mail class # configuration of mail app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_PORT'] = ...
30.615385
119
0.643216
from flask import Flask from flask_mail import Mail, Message from flask import Flask, render_template, request,url_for, redirect app = Flask(__name__) mail = Mail(app) app.config['MAIL_SERVER']='smtp.gmail.com' app.config['MAIL_PORT'] = 465 app.config['MAIL_USERNAME'] = 'bhanuvivek9705@gmail.com' app.config['MAIL_...
true
true
1c3b0189e79fc7f49f9e191f628922ea18e6c04e
1,367
py
Python
maize/types/unfinished_header_block.py
denern/maize-blockchain
b8639899f44b03232dda90c706d061e5e1158ca3
[ "Apache-2.0" ]
14
2021-07-21T19:45:05.000Z
2022-02-09T04:29:51.000Z
maize/types/unfinished_header_block.py
denern/maize-blockchain
b8639899f44b03232dda90c706d061e5e1158ca3
[ "Apache-2.0" ]
9
2021-07-24T09:30:46.000Z
2021-12-05T19:51:29.000Z
maize/types/unfinished_header_block.py
denern/maize-blockchain
b8639899f44b03232dda90c706d061e5e1158ca3
[ "Apache-2.0" ]
5
2021-10-04T17:33:47.000Z
2022-03-15T08:37:51.000Z
from dataclasses import dataclass from typing import List, Optional from maize.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock from maize.types.blockchain_format.reward_chain_block import RewardChainBlockUnfinished from maize.types.blockchain_format.vdf import VDFProof from maize.types.end_of_s...
40.205882
104
0.792977
from dataclasses import dataclass from typing import List, Optional from maize.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock from maize.types.blockchain_format.reward_chain_block import RewardChainBlockUnfinished from maize.types.blockchain_format.vdf import VDFProof from maize.types.end_of_s...
true
true
1c3b01a302a11cf5e166c2f86c0e9660fd8d7353
1,693
py
Python
tests/web/test_flask.py
mikkoi/py-healthcheck
ca86da28c26d7b1a4adda90dfff870f0326bc9ff
[ "MIT" ]
85
2017-02-09T18:11:38.000Z
2022-01-30T17:19:09.000Z
tests/web/test_flask.py
mikkoi/py-healthcheck
ca86da28c26d7b1a4adda90dfff870f0326bc9ff
[ "MIT" ]
16
2017-03-29T21:41:08.000Z
2021-07-06T08:24:57.000Z
tests/web/test_flask.py
mikkoi/py-healthcheck
ca86da28c26d7b1a4adda90dfff870f0326bc9ff
[ "MIT" ]
26
2017-02-07T22:49:26.000Z
2022-02-18T11:01:36.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import flask from healthcheck import HealthCheck, EnvironmentDump class BasicHealthCheckTest(unittest.TestCase): def setUp(self): self.path = '/h' self.app = flask.Flask(__name__) self.hc = self._hc() self.client = se...
25.268657
73
0.632014
import unittest import flask from healthcheck import HealthCheck, EnvironmentDump class BasicHealthCheckTest(unittest.TestCase): def setUp(self): self.path = '/h' self.app = flask.Flask(__name__) self.hc = self._hc() self.client = self.app.test_client() self.app.add_url...
true
true
1c3b0308475be21dbb6cbfba0ce3411666d1d13f
6,312
py
Python
python/raspberrypi/DFRobot_4DIO_S.py
cdjq/DFRobot_4DIO_S
d278e935ab5f217198e3d2ff3964454e9aa3d89b
[ "MIT" ]
null
null
null
python/raspberrypi/DFRobot_4DIO_S.py
cdjq/DFRobot_4DIO_S
d278e935ab5f217198e3d2ff3964454e9aa3d89b
[ "MIT" ]
null
null
null
python/raspberrypi/DFRobot_4DIO_S.py
cdjq/DFRobot_4DIO_S
d278e935ab5f217198e3d2ff3964454e9aa3d89b
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- ''' @file DFRobot_4DIO_S.py @brief DFRobot_4DIO_S libary for raspberry. @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) @licence The MIT License (MIT) @author [fengli](li.feng@dfrobot.com) @version V1.0 @date 2021-07-21 @https://github.com/DFRobot...
31.718593
84
0.637516
from DFRobot_RTU import * class DFRobot_4DIO_S(DFRobot_RTU): REG_4DIO_DEVICE_PID = 0x00 REG_4DIO_DEVICE_VID = 0x01 REG_4DIO_DEVICE_ADRR = 0x02 REG_4DIO_UART_CONFIG1 = 0x03 REG_4DIO_UART_CONFIG2 = 0x04 BEEP = 0X00 DIO_1 = 0X01 DIO_2 = 0X02 DIO_3 = 0X03 DIO_4 = 0X0...
true
true
1c3b03e56fa1ffe917a51782c729d303e6974a4a
3,496
py
Python
docs/conf.py
sbslee/dokdo
a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d
[ "MIT" ]
23
2020-11-01T21:55:30.000Z
2021-12-05T14:03:05.000Z
docs/conf.py
sbslee/dokdo
a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d
[ "MIT" ]
25
2020-11-25T23:24:23.000Z
2022-03-30T04:40:45.000Z
docs/conf.py
sbslee/dokdo
a528a830b3347c39e1dc415b0f3e2c6ad60b0a1d
[ "MIT" ]
7
2020-11-27T06:46:47.000Z
2021-09-25T03:26:07.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
27.100775
83
0.641876
import os import sys sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('../')) project = 'dokdo' copyright = '2020, Seung-been "Steven" Lee' author = 'Seung-been "Steven" Lee' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.linkcode', 'sphinx.ext...
true
true
1c3b064445f3e0a09a6d3b4b622259737fb43e8d
5,717
py
Python
ceilometer/tests/functional/api/v2/test_list_events_scenarios.py
redhat-openstack/ceilometer
9e503d7068889e52e9144079de331ed51676e535
[ "Apache-2.0" ]
1
2016-03-10T06:55:45.000Z
2016-03-10T06:55:45.000Z
ceilometer/tests/functional/api/v2/test_list_events_scenarios.py
redhat-openstack/ceilometer
9e503d7068889e52e9144079de331ed51676e535
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/functional/api/v2/test_list_events_scenarios.py
redhat-openstack/ceilometer
9e503d7068889e52e9144079de331ed51676e535
[ "Apache-2.0" ]
null
null
null
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
35.955975
78
0.500437
import datetime import mock from oslo_utils import timeutils import six from ceilometer.publisher import utils from ceilometer import sample from ceilometer.tests import db as tests_db from ceilometer.tests.functional.api import v2 class TestListEvents(v2.FunctionalTest, tests_db.MixinTestsWit...
true
true
1c3b0668bca9636afcc439e2353bcb34470133fc
81
py
Python
demo/bug/apps.py
valbendan/django-ninja-demo
806071b82e55b5034a13cc1674520a9743f94963
[ "MIT" ]
null
null
null
demo/bug/apps.py
valbendan/django-ninja-demo
806071b82e55b5034a13cc1674520a9743f94963
[ "MIT" ]
3
2021-03-30T13:43:20.000Z
2021-06-10T19:39:51.000Z
demo/bug/apps.py
valbendan/django-ninja-demo
806071b82e55b5034a13cc1674520a9743f94963
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BugConfig(AppConfig): name = 'bug'
13.5
33
0.728395
from django.apps import AppConfig class BugConfig(AppConfig): name = 'bug'
true
true
1c3b067e5ceed6737730ff58e1ac4790a027212a
444
py
Python
arc/arc017/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
arc/arc017/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
arc/arc017/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() def is_prime(x): for i in range(2, int(math.sqrt(x)) + 1): ...
18.5
53
0.617117
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() def is_prime(x): for i in range(2, int(math.sqrt(x)) + 1): ...
true
true
1c3b06f168230558a536abf144a7eeef74c0d92d
68
py
Python
Practice/Python/EyeAndIdentity.py
avantikasharma/HackerRank-Solutions
a980859ac352688853fcbcf3c7ec6d95685f99ea
[ "MIT" ]
1
2018-07-08T15:44:15.000Z
2018-07-08T15:44:15.000Z
Practice/Python/EyeAndIdentity.py
avantikasharma/HackerRank-Solutions
a980859ac352688853fcbcf3c7ec6d95685f99ea
[ "MIT" ]
null
null
null
Practice/Python/EyeAndIdentity.py
avantikasharma/HackerRank-Solutions
a980859ac352688853fcbcf3c7ec6d95685f99ea
[ "MIT" ]
2
2018-08-10T06:49:34.000Z
2020-10-01T04:50:59.000Z
import numpy N,M=map(int,input().split()) print(numpy.eye(N,M,k=0))
17
28
0.676471
import numpy N,M=map(int,input().split()) print(numpy.eye(N,M,k=0))
true
true
1c3b087880b70328bf06a6fb67b73e768fcfddb8
11,821
py
Python
resolwe_bio/tools/samplehcluster.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/samplehcluster.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/samplehcluster.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Hierarchical clustering of samples.""" import argparse import json import numpy as np import pandas as pd import resdk from resolwe_runtime_utils import error, warning from scipy.cluster.hierarchy import dendrogram, linkage from scipy.stats import spearmanr, zscore def parse_args(): ""...
35.821212
98
0.602825
import argparse import json import numpy as np import pandas as pd import resdk from resolwe_runtime_utils import error, warning from scipy.cluster.hierarchy import dendrogram, linkage from scipy.stats import spearmanr, zscore def parse_args(): parser = argparse.ArgumentParser(description="Hierarchical clusteri...
true
true