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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7600319c640e557d5e660481bdf86f03567fbf6
43,503
py
Python
bin/Python27/Lib/site-packages/pyxb/bundles/wssplat/raw/soap12.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/pyxb/bundles/wssplat/raw/soap12.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/pyxb/bundles/wssplat/raw/soap12.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
# ./pyxb/bundles/wssplat/raw/soap12.py # -*- coding: utf-8 -*- # PyXB bindings for NM:d8b77ba08b421cd2387db6ece722305a4cdf2cdc # Generated 2013-09-18 10:35:50.958395 by PyXB version 1.2.3 # Namespace http://www.w3.org/2003/05/soap-envelope import pyxb import pyxb.binding import pyxb.binding.saxer import io import pyxb...
54.515038
371
0.755626
import pyxb import pyxb.binding import pyxb.binding.saxer import io import pyxb.utils.utility import pyxb.utils.domutils import sys _GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:ff667f52-2077-11e3-8d80-c8600024e903') _PyXBVersion = '1.2.3' if pyxb.__version__ != _PyXBVersion: raise pyxb.PyXBVers...
false
true
f760031ec6f5cb61f834c58ef2ac05c8d09562a3
1,588
py
Python
src/util/logging.py
equardo/dynatrace-aws-log-forwarder
3d0b9cf567070e744989a93ec04def5219ba5673
[ "Apache-2.0" ]
null
null
null
src/util/logging.py
equardo/dynatrace-aws-log-forwarder
3d0b9cf567070e744989a93ec04def5219ba5673
[ "Apache-2.0" ]
null
null
null
src/util/logging.py
equardo/dynatrace-aws-log-forwarder
3d0b9cf567070e744989a93ec04def5219ba5673
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Dynatrace 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 t...
33.787234
113
0.745592
import traceback from typing import Text from util.context import Context def log_multiline_message(message: Text): message = message.replace('\n', ' ') print(message) def debug_log_multiline_message(message: Text, context: Context): if context.debug: log_multiline_message("DEBUG: " + mess...
true
true
f76004331f9edfc04c6e64f6f4f64eec38b49625
4,685
py
Python
src/main.py
AlexBlack2202/SimpleHTR
73884324b6f28ceec25ca3ceba8ec3ddec1398ec
[ "MIT" ]
2
2021-09-15T18:41:20.000Z
2022-02-09T17:40:05.000Z
src/main.py
AlexBlack2202/SimpleHTR
73884324b6f28ceec25ca3ceba8ec3ddec1398ec
[ "MIT" ]
null
null
null
src/main.py
AlexBlack2202/SimpleHTR
73884324b6f28ceec25ca3ceba8ec3ddec1398ec
[ "MIT" ]
null
null
null
import sys import argparse import cv2 import editdistance from DataLoader import DataLoader, Batch from Model import Model, DecoderType from SamplePreprocessor import preprocess class FilePaths: "filenames and paths to data" fnCharList = '../model/charList.txt' fnAccuracy = '../model/accuracy.txt' fnTrain = '../d...
33.22695
120
0.723799
import sys import argparse import cv2 import editdistance from DataLoader import DataLoader, Batch from Model import Model, DecoderType from SamplePreprocessor import preprocess class FilePaths: fnCharList = '../model/charList.txt' fnAccuracy = '../model/accuracy.txt' fnTrain = '../data/' fnInfer = '../data/test....
true
true
f760054283a7579592e44d1416bea11375a21cc3
36
py
Python
tests/indexer/__init__.py
2kodevs/Search-Engine
840001f825d9632c6c7a5fd24151b79ca1a9a06b
[ "MIT" ]
null
null
null
tests/indexer/__init__.py
2kodevs/Search-Engine
840001f825d9632c6c7a5fd24151b79ca1a9a06b
[ "MIT" ]
null
null
null
tests/indexer/__init__.py
2kodevs/Search-Engine
840001f825d9632c6c7a5fd24151b79ca1a9a06b
[ "MIT" ]
null
null
null
from ._tests import IndexerTestCase
18
35
0.861111
from ._tests import IndexerTestCase
true
true
f7600625e359127e93201be9893821f456e40453
2,635
py
Python
No_1325_Delete Leaves With a Given Value/delete_leaves_with_given_value_by_looping.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
32
2020-01-05T13:37:16.000Z
2022-03-26T07:27:09.000Z
No_1325_Delete Leaves With a Given Value/delete_leaves_with_given_value_by_looping.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
null
null
null
No_1325_Delete Leaves With a Given Value/delete_leaves_with_given_value_by_looping.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
8
2020-06-18T16:17:27.000Z
2022-03-15T23:58:18.000Z
# Note: # Taking time and space complexity into consideration, # this implementation is not good enough. # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def removeLeafNodes(self, roo...
34.220779
73
0.373055
class Solution: def removeLeafNodes(self, root: TreeNode, target: int) -> TreeNode: def helper( node: TreeNode, target:int) -> bool: left_removal = False right_removal = False if node: ...
true
true
f760073ab861837b4e3ef502199b39dc4843cf25
303
py
Python
data/multilingual/Latn.TDT/Sans_16/pdf_to_json_test_Latn.TDT_Sans_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.TDT/Sans_16/pdf_to_json_test_Latn.TDT_Sans_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.TDT/Sans_16/pdf_to_json_test_Latn.TDT_Sans_16.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.TDT/Sans_16/udhr_Latn.TDT_Sans_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.3
73
0.811881
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.TDT/Sans_16/udhr_Latn.TDT_Sans_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
f76009316fbbe8d5c5f35a45d024a9ccb4ee9ecb
269
py
Python
norden/norden/doctype/transmission_performance/transmission_performance.py
thispl/norden
2a208056e948cae42da688e28c15024124254867
[ "MIT" ]
null
null
null
norden/norden/doctype/transmission_performance/transmission_performance.py
thispl/norden
2a208056e948cae42da688e28c15024124254867
[ "MIT" ]
null
null
null
norden/norden/doctype/transmission_performance/transmission_performance.py
thispl/norden
2a208056e948cae42da688e28c15024124254867
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Teampro and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class TransmissionPerformance(Document): pass
24.454545
49
0.784387
from __future__ import unicode_literals from frappe.model.document import Document class TransmissionPerformance(Document): pass
true
true
f7600934c17ff76eaf6d7a1b79f87e9b9a4019ff
802
py
Python
manage.py
garvinipkiss/portfolio
0ba4b85dfab1b79b1696c0c17d7c13b1a7caacdc
[ "Unlicense" ]
null
null
null
manage.py
garvinipkiss/portfolio
0ba4b85dfab1b79b1696c0c17d7c13b1a7caacdc
[ "Unlicense" ]
null
null
null
manage.py
garvinipkiss/portfolio
0ba4b85dfab1b79b1696c0c17d7c13b1a7caacdc
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "port.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
34.869565
77
0.640898
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "port.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f760093dd42a2d46fc83ea9942a3ba31d5a45a3f
933
py
Python
scripts/calendar_view_gui/utils/parcel_utils.py
voicagi/cbm
c076e272f34a93a2e7dcc7de3c9685bd5c86c27a
[ "BSD-3-Clause" ]
null
null
null
scripts/calendar_view_gui/utils/parcel_utils.py
voicagi/cbm
c076e272f34a93a2e7dcc7de3c9685bd5c86c27a
[ "BSD-3-Clause" ]
null
null
null
scripts/calendar_view_gui/utils/parcel_utils.py
voicagi/cbm
c076e272f34a93a2e7dcc7de3c9685bd5c86c27a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 18 14:52:21 2021 @author: Csaba """ import math def get_parcel_area_ha_2decimals_str(parcel): # check the parcels projection. if it is not geographic then project it to WG84 orig_crs = parcel.crs orig_crs_value = orig_crs['init'].split(":")[1] if not ori...
32.172414
83
0.670954
import math def get_parcel_area_ha_2decimals_str(parcel): orig_crs = parcel.crs orig_crs_value = orig_crs['init'].split(":")[1] if not orig_crs_value == "4326": parcel = parcel.to_crs("EPSG:4326") lon = parcel.centroid.x utm_zone = int(math.floor((lon + 1...
true
true
f7600a914cc6bc2d3cb86c54aa99007c88096744
1,577
py
Python
algorithm/delete_duplicate_num.py
niasand/experiment_code
b4eaa255667952ab7a412e8217687aab2539edcb
[ "MIT" ]
null
null
null
algorithm/delete_duplicate_num.py
niasand/experiment_code
b4eaa255667952ab7a412e8217687aab2539edcb
[ "MIT" ]
30
2018-06-27T02:09:09.000Z
2021-07-25T09:22:51.000Z
algorithm/delete_duplicate_num.py
niasand/experiment_code
b4eaa255667952ab7a412e8217687aab2539edcb
[ "MIT" ]
1
2018-06-26T07:46:21.000Z
2018-06-26T07:46:21.000Z
# -*- coding: utf-8 -*- # @Time : 2020/10/2 21:15 # @Author : Zhiwei Yang from log_lib import log def remove_duplicates(nums: list) -> int: """ 给定一个排序数组,你需要在原地删除重复出现的元素,使得每个元素只出现一次,返回移除后数组的新长度。 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成。 示例 1: 给定数组 nums = [1,1,2], 函数应该返回新的长度 2, 并且原数组 num...
24.640625
66
0.541535
from log_lib import log def remove_duplicates(nums: list) -> int: if len(nums) == 0: return 0 slow, fast = 0, 0 while fast < len(nums): if nums[fast] != nums[slow]: slow += 1 nums[slow] = nums[fast] fast += 1 log.info(nums[0:slow + 1]) return slow + ...
true
true
f7600aade386f878ed9ed045908d03b3d030a587
1,489
py
Python
src/rust/iced-x86-py/src/iced_x86/RepPrefixKind.py
moodykeke/iced
0a3f062d06dbfe53750a8006821348e3ce7ef13a
[ "MIT" ]
1
2021-01-13T07:21:32.000Z
2021-01-13T07:21:32.000Z
src/rust/iced-x86-py/src/iced_x86/RepPrefixKind.py
moodykeke/iced
0a3f062d06dbfe53750a8006821348e3ce7ef13a
[ "MIT" ]
null
null
null
src/rust/iced-x86-py/src/iced_x86/RepPrefixKind.py
moodykeke/iced
0a3f062d06dbfe53750a8006821348e3ce7ef13a
[ "MIT" ]
null
null
null
# # Copyright (C) 2018-2019 de4dot@gmail.com # # 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, publ...
29.78
72
0.727334
from typing import List NONE: int = 0 REPE: int = 1 REPNE: int = 2 __all__: List[str] = []
true
true
f7600be226607b68ea2e6db6a5982fc7d6c5a04e
1,648
py
Python
backend/api/users/types.py
patrick91/pycon
9d7e15f540adcf0eaceb61fdbf67206d6aef73ec
[ "MIT" ]
2
2017-07-18T21:51:25.000Z
2017-12-23T11:08:39.000Z
backend/api/users/types.py
patrick91/pycon
9d7e15f540adcf0eaceb61fdbf67206d6aef73ec
[ "MIT" ]
23
2017-07-18T20:22:38.000Z
2018-01-05T05:45:15.000Z
backend/api/users/types.py
patrick91/pycon
9d7e15f540adcf0eaceb61fdbf67206d6aef73ec
[ "MIT" ]
2
2017-07-18T21:27:33.000Z
2017-07-18T22:07:03.000Z
from typing import List import strawberry from api.pretix.query import get_user_orders, get_user_tickets from api.pretix.types import AttendeeTicket, PretixOrder from api.submissions.types import Submission from conferences.models import Conference from submissions.models import Submission as SubmissionModel @straw...
33.632653
84
0.725121
from typing import List import strawberry from api.pretix.query import get_user_orders, get_user_tickets from api.pretix.types import AttendeeTicket, PretixOrder from api.submissions.types import Submission from conferences.models import Conference from submissions.models import Submission as SubmissionModel @straw...
true
true
f7600c7dcbd49244433ed4ea93d6521a699190b0
884
py
Python
ZoidbergStudios/urls.py
gunzapper/ZoidbergStudio
3883d7058bb874a1e0bffd41eaaace93c15bab4e
[ "Apache-2.0" ]
null
null
null
ZoidbergStudios/urls.py
gunzapper/ZoidbergStudio
3883d7058bb874a1e0bffd41eaaace93c15bab4e
[ "Apache-2.0" ]
null
null
null
ZoidbergStudios/urls.py
gunzapper/ZoidbergStudio
3883d7058bb874a1e0bffd41eaaace93c15bab4e
[ "Apache-2.0" ]
null
null
null
"""ZoidbergStudios URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') C...
36.833333
77
0.696833
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^$', 'dicom_visio.views.home_page', name='home'), url(r'^dicom_visio/', include('dicom_visio.urls')) ]
true
true
f7600ca00f13ecd43ac0e380c357b83a735857e6
2,506
py
Python
sadbot/bot/teachers.py
sadellie/sadBot
5964470115fb077a77452e1716de06bcbac87544
[ "Apache-2.0" ]
1
2021-07-20T21:48:50.000Z
2021-07-20T21:48:50.000Z
sadbot/bot/teachers.py
sadellie/sadBot
5964470115fb077a77452e1716de06bcbac87544
[ "Apache-2.0" ]
null
null
null
sadbot/bot/teachers.py
sadellie/sadBot
5964470115fb077a77452e1716de06bcbac87544
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Elshan Agaev # # 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 agr...
32.128205
117
0.658819
from bot.base import db from bot.teachers_vocabulary import * cur = db.cursor() def add_teacher(req: str, user_id: int): if req.lower() == "имя=предмет": return "🤬 Чел, ты... [Имя=Предмет это лишь пример]" try: req = req.split("=") req = (req[0], req[1], req[1].lower(), user_...
true
true
f7600d1b83bdb745d7cc5e46ced2184af86720c1
14,565
py
Python
pybind/slxos/v16r_1_00b/interface/ethernet/vrrp/track/interface/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/interface/ethernet/vrrp/track/interface/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/interface/ethernet/vrrp/track/interface/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
70.362319
700
0.701133
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f7600dc4a358a29619d3ee633c8dd2e145797974
347
py
Python
photos/migrations/0002_auto_20200523_1317.py
mosesbabu/photoshare
18f2e72882fde6ce45482f9cf59af3ef41351585
[ "MIT" ]
null
null
null
photos/migrations/0002_auto_20200523_1317.py
mosesbabu/photoshare
18f2e72882fde6ce45482f9cf59af3ef41351585
[ "MIT" ]
9
2021-03-19T03:53:39.000Z
2022-03-12T00:32:01.000Z
photos/migrations/0002_auto_20200523_1317.py
mosesbabu/photoshare
18f2e72882fde6ce45482f9cf59af3ef41351585
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-23 10:17 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('photos', '0001_initial'), ] operations = [ migrations.RenameField( model_name='image', old_name='image', new_nam...
18.263158
47
0.564841
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('photos', '0001_initial'), ] operations = [ migrations.RenameField( model_name='image', old_name='image', new_name='path', ), ]
true
true
f7600e067bd0174aec3d9dba28651498e79ea602
6,906
py
Python
src/t5.py
abdouaziz/wolof-translation
505324f8a7c5a91a42e2c775495fc3bdebc8f761
[ "MIT" ]
null
null
null
src/t5.py
abdouaziz/wolof-translation
505324f8a7c5a91a42e2c775495fc3bdebc8f761
[ "MIT" ]
null
null
null
src/t5.py
abdouaziz/wolof-translation
505324f8a7c5a91a42e2c775495fc3bdebc8f761
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import argparse import numpy as np from torch.utils.data import DataLoader , Dataset import pandas as pd from tqdm import tqdm from transformers import ( BertTokenizer, AdamW , get_linear_schedule_with_warmup , T5Tokenizer, T5ForConditionalGeneration) devi...
26.561538
125
0.589632
import torch import torch.nn as nn import argparse import numpy as np from torch.utils.data import DataLoader , Dataset import pandas as pd from tqdm import tqdm from transformers import ( BertTokenizer, AdamW , get_linear_schedule_with_warmup , T5Tokenizer, T5ForConditionalGeneration) devi...
true
true
f7600e236c0abaccd55979ae9a2a27d63f43d499
3,359
py
Python
mesonbuild/modules/python3.py
iinuwa/meson
7528c69fcca63889d67c1d6c2463c9e9485585a8
[ "Apache-2.0" ]
2
2017-11-18T11:26:15.000Z
2020-06-12T12:47:59.000Z
mesonbuild/modules/python3.py
iinuwa/meson
7528c69fcca63889d67c1d6c2463c9e9485585a8
[ "Apache-2.0" ]
null
null
null
mesonbuild/modules/python3.py
iinuwa/meson
7528c69fcca63889d67c1d6c2463c9e9485585a8
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2017 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
40.46988
106
0.678773
import sysconfig from .. import mesonlib from . import ExtensionModule from ..interpreterbase import noKwargs, permittedKwargs, FeatureDeprecated, FeatureNew from ..build import known_shmod_kwargs from ..programs import ExternalProgram class Python3Module(ExtensionModule): @FeatureNew('python3 module', '0.38...
true
true
f7600e79fbe88ed35027148e2e43200fa28d6f5a
12,772
py
Python
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/health_monitor.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/health_monitor.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-elb/huaweicloudsdkelb/v3/model/health_monitor.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class HealthMonitor: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is a...
26.719665
262
0.597322
import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class HealthMonitor: sensitive_list = [] openapi_types = { 'admin_state_up': 'bool', 'delay': 'int', 'domain_name': 'str', 'expected_codes': 'str', 'http_method': 'st...
true
true
f7600f32e435a192034a4683818d3d53b5a5680a
305
py
Python
simple_cqrs/debugger.py
Rydra/simple-cqrs
36730c89a21122e829c563f40057449f8d319a6d
[ "MIT" ]
null
null
null
simple_cqrs/debugger.py
Rydra/simple-cqrs
36730c89a21122e829c563f40057449f8d319a6d
[ "MIT" ]
null
null
null
simple_cqrs/debugger.py
Rydra/simple-cqrs
36730c89a21122e829c563f40057449f8d319a6d
[ "MIT" ]
null
null
null
from methoddispatch import singledispatch from simple_cqrs.domain_event_bus import DomainEventHandler class Debugger(DomainEventHandler): @singledispatch def process(self, event): print( f"Event received: {type(event).__name__} at {event.occurred_on.isoformat()}" )
25.416667
88
0.721311
from methoddispatch import singledispatch from simple_cqrs.domain_event_bus import DomainEventHandler class Debugger(DomainEventHandler): @singledispatch def process(self, event): print( f"Event received: {type(event).__name__} at {event.occurred_on.isoformat()}" )
true
true
f7600f7838450a23ba3b86f41b7b2f7979973262
550
py
Python
freeipa/komand_freeipa/connection/connection.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
freeipa/komand_freeipa/connection/connection.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
freeipa/komand_freeipa/connection/connection.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
null
null
null
import komand from .schema import ConnectionSchema # Custom imports below import ipahttp class Connection(komand.Connection): def __init__(self): super(self.__class__, self).__init__(input=ConnectionSchema()) def connect(self, params): server = params.get('server') username = params....
27.5
70
0.678182
import komand from .schema import ConnectionSchema import ipahttp class Connection(komand.Connection): def __init__(self): super(self.__class__, self).__init__(input=ConnectionSchema()) def connect(self, params): server = params.get('server') username = params.get('credentials').get(...
true
true
f7601086fc6d5191490b731d47083a9dc5114bbc
3,110
py
Python
local_configs/10.11/feature_stage3.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
local_configs/10.11/feature_stage3.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
local_configs/10.11/feature_stage3.py
wzpscott/SegformerDistillation
6558757f5071251410e90270e197755860a6f41c
[ "DOC" ]
null
null
null
_base_ = [ '../_base_/datasets/ade20k_repeat.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k_adamw.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='SDModule', cfg_s=dict( type='EncoderDecoder', pretrained='pretrained/mit_b0.pth', ...
34.175824
95
0.540514
_base_ = [ '../_base_/datasets/ade20k_repeat.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k_adamw.py' ] norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='SDModule', cfg_s=dict( type='EncoderDecoder', pretrained='pretrained/mit_b0.pth', ...
true
true
f76010d5c91573998eddee8425bc04da3778efda
3,466
py
Python
bindings/python/ensmallen/datasets/string/anophelesfunestus.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/anophelesfunestus.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/anophelesfunestus.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Anopheles funestus. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein ass...
33.009524
223
0.677149
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def AnophelesFunestus( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/string",...
true
true
f7601253d543a895226cf4662188d2660589fdc4
1,900
py
Python
test/TEX/PDFTEXCOM.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
3
2017-01-06T09:26:23.000Z
2017-03-04T04:13:20.000Z
test/TEX/PDFTEXCOM.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
2
2015-10-27T20:17:24.000Z
2016-08-04T21:49:56.000Z
test/TEX/PDFTEXCOM.py
datalogics-staylor/scons
4c48deb6947066e53aac7d86621a7ec17f3b4034
[ "MIT" ]
4
2015-03-31T16:09:15.000Z
2021-08-04T12:41:47.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
27.142857
74
0.727895
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import string import sys import TestSCons _python_ = TestSCons._python_ _exe = TestSCons._exe test = TestSCons.TestSCons() test.write('mypdftex.py', r""" import sys outfile = open(sys.argv[1], 'wb') infile = open(sys.argv[2], 'rb') for l ...
true
true
f7601325705c91358b07693d12d41fd7d95fde71
2,305
py
Python
2019/finals/misc-stuffed-finals/bomb_creation/huffman.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
2019/finals/misc-stuffed-finals/bomb_creation/huffman.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
2019/finals/misc-stuffed-finals/bomb_creation/huffman.py
iicarus-bit/google-ctf
4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b
[ "Apache-2.0" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
30.328947
79
0.707592
from __future__ import absolute_import from __future__ import division from __future__ import print_function import buff def InsertInTree(tree, code, v): assert len(code) > 0 assert v is not None assert type(v) is not list assert len(tree) == 2 loc = int(code[-1]) if len(code) == 1: assert tree[loc]...
true
true
f7601337de7d04be1cab21e007293dd019386255
738
py
Python
app/errorHandlers.py
L-Nafaryus/elnafo
ca278503fec78224fbdc265b3245df44b7a1a33a
[ "MIT" ]
null
null
null
app/errorHandlers.py
L-Nafaryus/elnafo
ca278503fec78224fbdc265b3245df44b7a1a33a
[ "MIT" ]
null
null
null
app/errorHandlers.py
L-Nafaryus/elnafo
ca278503fec78224fbdc265b3245df44b7a1a33a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import make_response, render_template from app import app, ENV @app.errorhandler(404) def not_found(error): error = "404 Not found" return make_response( render_template("error.html", title = ENV["sitename"], error = error), 404 ) ...
21.705882
79
0.642276
from flask import make_response, render_template from app import app, ENV @app.errorhandler(404) def not_found(error): error = "404 Not found" return make_response( render_template("error.html", title = ENV["sitename"], error = error), 404 ) @app.errorhandler(400) def bad_request(error):...
true
true
f760134bdae9301bbeca6068bad351b2f308d14b
5,339
py
Python
btclib/mnemonic/bip39.py
dginst/btclib
70932afe32167449e369d4e2911b1bf741c0f5d2
[ "MIT" ]
16
2019-01-04T22:21:17.000Z
2020-02-01T10:41:28.000Z
btclib/mnemonic/bip39.py
dginst/BitcoinBlockchainTechnology
70932afe32167449e369d4e2911b1bf741c0f5d2
[ "MIT" ]
20
2018-05-24T18:47:12.000Z
2018-12-22T09:52:09.000Z
btclib/mnemonic/bip39.py
dginst/BitcoinBlockchainTechnology
70932afe32167449e369d4e2911b1bf741c0f5d2
[ "MIT" ]
9
2018-05-16T09:53:32.000Z
2019-01-03T13:49:37.000Z
#!/usr/bin/env python3 # Copyright (C) 2017-2022 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
32.95679
85
0.688144
import secrets from hashlib import pbkdf2_hmac, sha256 from typing import Optional, Tuple from btclib.bip32.bip32 import rootxprv_from_seed from btclib.exceptions import BTClibValueError from btclib.mnemonic.entropy import ( BinStr, Entropy, bin_str_entropy_from_entropy, bin_str_entropy_from_wordli...
true
true
f76013c36adedf9bcc28e40383947fbac44b99df
9,062
py
Python
sales/api/handlers.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
sales/api/handlers.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
sales/api/handlers.py
nuwainfo/treeio
f57bf9114d9774c11468a1b0e44614b04631beb1
[ "MIT" ]
null
null
null
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license #-*- coding: utf-8 -*- from __future__ import absolute_import, with_statement __all__ = ['SaleCommonHandler', 'SaleStatusHandler', 'ProductHandler', 'SaleSourceHandler', ...
30.307692
123
0.629442
from __future__ import absolute_import, with_statement __all__ = ['SaleCommonHandler', 'SaleStatusHandler', 'ProductHandler', 'SaleSourceHandler', 'LeadHandler', 'OpportunityHandler', 'SaleOrderHandler', 'SubscriptionHandler', 'O...
true
true
f76016322f852fc7b276f67d69bdc9925898ef77
2,559
py
Python
ua_stache_api/ua_stache_api.py
UACoreFacilitiesIT/UA-Stache-API
a1eb550bb576376adf00e94ee1e64397cf59abeb
[ "MIT" ]
1
2020-07-14T16:25:21.000Z
2020-07-14T16:25:21.000Z
ua_stache_api/ua_stache_api.py
UACoreFacilitiesIT/UA-Stache-API
a1eb550bb576376adf00e94ee1e64397cf59abeb
[ "MIT" ]
null
null
null
ua_stache_api/ua_stache_api.py
UACoreFacilitiesIT/UA-Stache-API
a1eb550bb576376adf00e94ee1e64397cf59abeb
[ "MIT" ]
1
2019-10-03T23:50:28.000Z
2019-10-03T23:50:28.000Z
"""Retrieves information stored in stache entry secrets.""" import requests import json def auth(key, url, cred_type=None, get_all=False): """Takes api keys and returns the desired from the stache entry's secret. Arguments: key: The stache X-STACHE-READ-KEY. url: The stache endpoint. ...
28.120879
78
0.635795
import requests import json def auth(key, url, cred_type=None, get_all=False): response = requests.get(url, headers=key) response.raise_for_status() response = response.json() secret = json.loads(response["secret"]) if get_all: result = response result["secret"] = secret els...
true
true
f760166e31699af126eda95c2d6a4c15bc4221c6
19,335
py
Python
tests/unit/test_pipeline.py
ParidelPooya/aws-step-functions-data-science-sdk-python
173b4635d8fb3ce569515bcfb6fee1d5a2c29b63
[ "Apache-2.0" ]
2
2020-07-04T11:11:01.000Z
2020-08-17T07:16:25.000Z
tests/unit/test_pipeline.py
ParidelPooya/aws-step-functions-data-science-sdk-python
173b4635d8fb3ce569515bcfb6fee1d5a2c29b63
[ "Apache-2.0" ]
null
null
null
tests/unit/test_pipeline.py
ParidelPooya/aws-step-functions-data-science-sdk-python
173b4635d8fb3ce569515bcfb6fee1d5a2c29b63
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
41.138298
145
0.581433
from __future__ import absolute_import import pytest import sagemaker from sagemaker.sklearn.estimator import SKLearn from unittest.mock import MagicMock, patch from stepfunctions.template import TrainingPipeline, InferencePipeline from sagemaker.debugger import DebuggerHookConfig from tests.unit.utils import mock_b...
true
true
f7601870fac3cb7fb26a0ed02c4dae13603a95a3
2,400
py
Python
mindhome_alpha/erpnext/hr/doctype/appraisal/appraisal.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/hr/doctype/appraisal/appraisal.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/hr/doctype/appraisal/appraisal.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document imp...
30.379747
122
0.72125
from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document import Document from erpnext.hr.utils import set_employee_name class Appraisal(Document): def validate(self): if not self.stat...
true
true
f7601975637a382f10837613cb11fc83725bea98
7,440
py
Python
kitti2cityscapesScripts/preparation/createPanopticImgs.py
TWJianNuo/detectron2
091bc43e85b8f7cefdccebf8d85afb7cfff2a3f0
[ "Apache-2.0" ]
null
null
null
kitti2cityscapesScripts/preparation/createPanopticImgs.py
TWJianNuo/detectron2
091bc43e85b8f7cefdccebf8d85afb7cfff2a3f0
[ "Apache-2.0" ]
null
null
null
kitti2cityscapesScripts/preparation/createPanopticImgs.py
TWJianNuo/detectron2
091bc43e85b8f7cefdccebf8d85afb7cfff2a3f0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Converts the *instanceIds.png annotations of the Cityscapes dataset # to COCO-style panoptic segmentation format (http://cocodataset.org/#format-data). # The convertion is working for 'fine' set of the annotations. # # By default with this tool uses IDs specified in labels.py. You can use flag # -...
40.216216
133
0.570968
from __future__ import print_function, absolute_import, division, unicode_literals import os import glob import sys import argparse import json import numpy as np from PIL import Image from kitti2cityscapesScripts.helpers.csHelpers import printError from kitti2cityscapesScripts.helpers.labels import id2label, labels...
true
true
f7601981bf9dc53bf505231cfd4d666486e97d51
1,426
py
Python
Assignment/AlbumCreator/migrations/0001_initial.py
onurhunce/AutoAlbumCreator
7e9447d0a9316902c748bf66cc8e9f4153dd3e6d
[ "BSD-2-Clause" ]
null
null
null
Assignment/AlbumCreator/migrations/0001_initial.py
onurhunce/AutoAlbumCreator
7e9447d0a9316902c748bf66cc8e9f4153dd3e6d
[ "BSD-2-Clause" ]
null
null
null
Assignment/AlbumCreator/migrations/0001_initial.py
onurhunce/AutoAlbumCreator
7e9447d0a9316902c748bf66cc8e9f4153dd3e6d
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-27 13:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
36.564103
138
0.58906
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Album', fields=[ (...
true
true
f7601a9d31821c4e3fd86cfbe98beb693c0b8b0a
12,930
py
Python
channels/altadefinizione01.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
channels/altadefinizione01.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
channels/altadefinizione01.py
sodicarus/channels
d77402f4f460ea6daa66959aa5384aaffbff70b5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Thegroove360 - XBMC Plugin # Canale altadefinizione01 # ------------------------------------------------------------ import re import urlparse from core import config from core import httptools from core import logger from core i...
42.81457
150
0.500928
import re import urlparse from core import config from core import httptools from core import logger from core import scrapertools from core import servertools from core.item import Item from core.tmdb import infoSod __channel__ = "altadefinizione01" host = "http://altadefinizione01.link" headers = [['Referer', host...
true
true
f7601af9ed238111be6676ec4efa62bc98574eac
4,924
py
Python
qnn_utils.py
dankernel/mnist-qnn
a8b9bfc0689625ee593d990be70e8b375f233d26
[ "MIT" ]
null
null
null
qnn_utils.py
dankernel/mnist-qnn
a8b9bfc0689625ee593d990be70e8b375f233d26
[ "MIT" ]
1
2021-07-14T18:11:54.000Z
2021-07-14T18:11:54.000Z
qnn_utils.py
dankernel/mnist-qnn
a8b9bfc0689625ee593d990be70e8b375f233d26
[ "MIT" ]
null
null
null
import os import numpy as np from termcolor import colored def ndarray_to_bin(ndarray, out_path: str): """ ndarray to bin file (4byte) dim (4byte) shape x dim :param ndarray: target numpy ndarrat :param str out_path: output path :return: None """ with open(out_path, 'wb') as file...
32.609272
89
0.516044
import os import numpy as np from termcolor import colored def ndarray_to_bin(ndarray, out_path: str): with open(out_path, 'wb') as file: dim = len(ndarray.shape) print('dim :', dim) file.write(dim.to_bytes(4, byteorder='little', signed=True)) for s in range(dim): size...
true
true
f7601bb62dccf7d7b1aeb3fd327bd59b024d4071
1,885
py
Python
python/binary_search/game_binary_search.py
alfreddagenais/kilukru-dev-articles
5e4de581c7e3b70c04d0faf385ff3571a5662b37
[ "MIT" ]
null
null
null
python/binary_search/game_binary_search.py
alfreddagenais/kilukru-dev-articles
5e4de581c7e3b70c04d0faf385ff3571a5662b37
[ "MIT" ]
null
null
null
python/binary_search/game_binary_search.py
alfreddagenais/kilukru-dev-articles
5e4de581c7e3b70c04d0faf385ff3571a5662b37
[ "MIT" ]
null
null
null
min_x = 0 min_y = 0 def init_game(): global min_x, min_y min_x = 0 min_y = 0 def get_position_middle(max, current): return int(abs((max - current) / 2)) def get_position_middle_reversed(min, current): result = get_position_middle(min, current) if result == 0: result = 1 return ...
24.802632
91
0.677984
min_x = 0 min_y = 0 def init_game(): global min_x, min_y min_x = 0 min_y = 0 def get_position_middle(max, current): return int(abs((max - current) / 2)) def get_position_middle_reversed(min, current): result = get_position_middle(min, current) if result == 0: result = 1 return ...
true
true
f7601cfd8e8be0a1b154818dbb6267fccde25717
6,804
py
Python
run.py
maeda6uiui/BingImageDownloader
5ccb781828633abdc8be9ec9bddfe46d99f9c6a1
[ "MIT" ]
null
null
null
run.py
maeda6uiui/BingImageDownloader
5ccb781828633abdc8be9ec9bddfe46d99f9c6a1
[ "MIT" ]
null
null
null
run.py
maeda6uiui/BingImageDownloader
5ccb781828633abdc8be9ec9bddfe46d99f9c6a1
[ "MIT" ]
null
null
null
#!python3.6 import argparse import glob import hashlib import logging import multiprocessing import os import pathlib import shutil import sys from icrawler.builtin import BingImageCrawler from typing import Any,List sys.path.append(".") from postprocessing import format_images logging_fmt = "%(asctime)s %(levelname)...
38.011173
116
0.714139
import argparse import glob import hashlib import logging import multiprocessing import os import pathlib import shutil import sys from icrawler.builtin import BingImageCrawler from typing import Any,List sys.path.append(".") from postprocessing import format_images logging_fmt = "%(asctime)s %(levelname)s: %(message...
true
true
f7601e233291de4aa29fc4bcc08a0c9e6dfc12a7
399
py
Python
aip.py
DragonCat1/wechat-robot
589e1b3605a1c7dc6a3a358d3f8f7738f0b123f8
[ "MIT" ]
null
null
null
aip.py
DragonCat1/wechat-robot
589e1b3605a1c7dc6a3a358d3f8f7738f0b123f8
[ "MIT" ]
null
null
null
aip.py
DragonCat1/wechat-robot
589e1b3605a1c7dc6a3a358d3f8f7738f0b123f8
[ "MIT" ]
null
null
null
from aip.speech import AipSpeech appId = '10749810' apiKey='cxIvL8MP2PBVArtcLCYXZNdC' secret = '6ef14e35f5376de5fa8b3377ccd7c4bb' # def get_file_content(filePath): # with open(filePath, 'rb') as fp: # return fp.read() aipSpeech = AipSpeech(appId,apiKey,secret) vioceFile = open('vioce/180125-230730.wav','...
26.6
48
0.739348
from aip.speech import AipSpeech appId = '10749810' apiKey='cxIvL8MP2PBVArtcLCYXZNdC' secret = '6ef14e35f5376de5fa8b3377ccd7c4bb' aipSpeech = AipSpeech(appId,apiKey,secret) vioceFile = open('vioce/180125-230730.wav','rb') vioce = vioceFile.read() result = aipSpeech.asr(vioce,'pcm') print(result)
true
true
f7601e469804f8d27efe8333700c38df38899a4d
11,800
py
Python
pytorch_rl/main.py
sunilmallya/gym-duckietown
d915bbe0317ee355f82a7b22d3314fbab8563187
[ "MIT" ]
null
null
null
pytorch_rl/main.py
sunilmallya/gym-duckietown
d915bbe0317ee355f82a7b22d3314fbab8563187
[ "MIT" ]
null
null
null
pytorch_rl/main.py
sunilmallya/gym-duckietown
d915bbe0317ee355f82a7b22d3314fbab8563187
[ "MIT" ]
1
2018-06-18T22:54:33.000Z
2018-06-18T22:54:33.000Z
import copy import glob import os import time import operator from functools import reduce import gym import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from arguments import get_args from vec_env.dummy_vec_env import D...
39.464883
176
0.563305
import copy import glob import os import time import operator from functools import reduce import gym import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from arguments import get_args from vec_env.dummy_vec_env import D...
true
true
f7601ead7d2f0632fda1b1b5564169178b9c8215
2,085
py
Python
code/realworld_s2v_scp/main.py
pqros/graph_comb_opt
09d5a7f2a64fa69947d0dca9882d8fb729fa8679
[ "MIT" ]
379
2017-05-27T15:24:38.000Z
2022-03-31T13:11:00.000Z
code/realworld_s2v_scp/main.py
pqros/graph_comb_opt
09d5a7f2a64fa69947d0dca9882d8fb729fa8679
[ "MIT" ]
29
2017-06-25T07:21:19.000Z
2022-03-01T16:00:51.000Z
code/realworld_s2v_scp/main.py
pqros/graph_comb_opt
09d5a7f2a64fa69947d0dca9882d8fb729fa8679
[ "MIT" ]
123
2017-06-14T04:22:51.000Z
2022-02-22T10:59:26.000Z
import numpy as np import networkx as nx import cPickle as cp import random import ctypes import os import sys from tqdm import tqdm sys.path.append( '%s/setcover_lib' % os.path.dirname(os.path.realpath(__file__)) ) from setcover_lib import SetCoverLib sys.path.append( '%s/../memetracker' % os.path.dirname(os.path.rea...
28.561644
101
0.605755
import numpy as np import networkx as nx import cPickle as cp import random import ctypes import os import sys from tqdm import tqdm sys.path.append( '%s/setcover_lib' % os.path.dirname(os.path.realpath(__file__)) ) from setcover_lib import SetCoverLib sys.path.append( '%s/../memetracker' % os.path.dirname(os.path.rea...
false
true
f7601ec81ec23d423cbabf94fbcdd5d32a501eb3
503
py
Python
missingchild_app/urls.py
amarkrsinha1997/Missing_child
355bb80f10a038c1cd6e679cd6aa57fd6cc1cb73
[ "MIT" ]
null
null
null
missingchild_app/urls.py
amarkrsinha1997/Missing_child
355bb80f10a038c1cd6e679cd6aa57fd6cc1cb73
[ "MIT" ]
null
null
null
missingchild_app/urls.py
amarkrsinha1997/Missing_child
355bb80f10a038c1cd6e679cd6aa57fd6cc1cb73
[ "MIT" ]
null
null
null
from django.conf.urls import url,include from . import views from .forms import CustomAutoForm from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^$', views.home,name='home'), url(r'^login/$',auth_views.login, name='login', kwargs={"authentication_form":CustomAutoForm}), url(r'^logout/$',a...
33.533333
97
0.705765
from django.conf.urls import url,include from . import views from .forms import CustomAutoForm from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^$', views.home,name='home'), url(r'^login/$',auth_views.login, name='login', kwargs={"authentication_form":CustomAutoForm}), url(r'^logout/$',a...
true
true
f7601ed4e9a0bc1aaa85252180184c2b14452a64
1,793
py
Python
idb/common/gzip.py
sergey-plevako-badoo/FBSimulatorControl
117af8508ba7405bdbacd29ec95a0523b3926ad3
[ "MIT" ]
1
2019-06-12T16:46:25.000Z
2019-06-12T16:46:25.000Z
idb/common/gzip.py
BalestraPatrick/idb
9deac2af129e7595c303c121944034c556202454
[ "MIT" ]
null
null
null
idb/common/gzip.py
BalestraPatrick/idb
9deac2af129e7595c303c121944034c556202454
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import asyncio import sys from typing import AsyncContextManager, AsyncIterator from idb.utils.contextlib import asynccontextmanager from idb.utils.typing import none_throws READ_CHUNK_SIZE: int = 1024 * 1024 * 4 # 4Mb,...
29.883333
88
0.695482
import asyncio import sys from typing import AsyncContextManager, AsyncIterator from idb.utils.contextlib import asynccontextmanager from idb.utils.typing import none_throws READ_CHUNK_SIZE: int = 1024 * 1024 * 4 @asynccontextmanager async def _create_gzip_decompress_command( extract_path: str, ) -> AsyncC...
true
true
f7601ef5c5da2f07a66d519c64f7e6a6c10fd5a6
459
py
Python
web/transiq/transaction/migrations/0024_auto_20180619_1853.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
web/transiq/transaction/migrations/0024_auto_20180619_1853.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
14
2020-06-05T23:06:45.000Z
2022-03-12T00:00:18.000Z
web/transiq/transaction/migrations/0024_auto_20180619_1853.py
manibhushan05/transiq
763fafb271ce07d13ac8ce575f2fee653cf39343
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.0.5 on 2018-06-19 18:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transaction', '0023_auto_20180618_1151'), ] operations = [ migrations.AlterField( model_name='insurance', name='is_i...
24.157895
112
0.599129
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transaction', '0023_auto_20180618_1151'), ] operations = [ migrations.AlterField( model_name='insurance', name='is_insured', field=models.CharField(blan...
true
true
f7601f139080d6cd8477440632560e74f543ab5f
730
py
Python
python/anyascii/_data/_267.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_267.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
python/anyascii/_data/_267.py
casept/anyascii
d4f426b91751254b68eaa84c6cd23099edd668e6
[ "ISC" ]
null
null
null
b='Phi Feng Xu Tui Han Ku Shen Zhi Pang Zheng Li Wan Fan Xin Ya Vu Ju Shen Ron Mang Tun Zhuo Xi Yin Jing Tun Geng Ji Kei Dit Rom Rang Phen San Dit Ngac De Tron Mun Mep San Phop Zhuan Tie Zhi Ji Ying Wei Huan Ting Chan Jim Kui Qia Ban Cha Tuo Nan Jie Yan Tu Wen Cong Xu...
730
730
0.646575
b='Phi Feng Xu Tui Han Ku Shen Zhi Pang Zheng Li Wan Fan Xin Ya Vu Ju Shen Ron Mang Tun Zhuo Xi Yin Jing Tun Geng Ji Kei Dit Rom Rang Phen San Dit Ngac De Tron Mun Mep San Phop Zhuan Tie Zhi Ji Ying Wei Huan Ting Chan Jim Kui Qia Ban Cha Tuo Nan Jie Yan Tu Wen Cong Xu...
true
true
f7601f4644fcafb50980fc4c2c85074f81dd5c71
4,219
py
Python
tensorflow_fold/blocks/metrics.py
BioGeek/fold
a1e1ab3625f7624ed3ae90d08a4ea11cfd296294
[ "Apache-2.0" ]
1
2021-03-21T16:34:33.000Z
2021-03-21T16:34:33.000Z
tensorflow_fold/blocks/metrics.py
samjabrahams/fold
a1e1ab3625f7624ed3ae90d08a4ea11cfd296294
[ "Apache-2.0" ]
null
null
null
tensorflow_fold/blocks/metrics.py
samjabrahams/fold
a1e1ab3625f7624ed3ae90d08a4ea11cfd296294
[ "Apache-2.0" ]
1
2018-11-14T00:44:37.000Z
2018-11-14T00:44:37.000Z
# Copyright 2017 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...
37.669643
79
0.694477
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow_fold.blocks.blocks as tdb import tensorflow_fold.blocks.result_types as tdt class Metric(tdb.Block): def __init__(self, metric_name): self._metric_name = metric_name super(Metric, ...
true
true
f7601fb123923702eeeedb3a0bd190c56b3a734e
12,827
py
Python
venv/lib/python2.7/site-packages/rest_framework/authentication.py
andela-bojengwa/talk
587324e8cee5081638807b43356ff7dfe162d209
[ "MIT" ]
1
2016-02-13T15:41:43.000Z
2016-02-13T15:41:43.000Z
venv/lib/python2.7/site-packages/rest_framework/authentication.py
andela-bojengwa/talk
587324e8cee5081638807b43356ff7dfe162d209
[ "MIT" ]
null
null
null
venv/lib/python2.7/site-packages/rest_framework/authentication.py
andela-bojengwa/talk
587324e8cee5081638807b43356ff7dfe162d209
[ "MIT" ]
null
null
null
""" Provides various authentication policies. """ from __future__ import unicode_literals import base64 from django.contrib.auth import authenticate from django.core.exceptions import ImproperlyConfigured from django.middleware.csrf import CsrfViewMiddleware from django.conf import settings from rest_framework import ...
35.729805
104
0.659156
from __future__ import unicode_literals import base64 from django.contrib.auth import authenticate from django.core.exceptions import ImproperlyConfigured from django.middleware.csrf import CsrfViewMiddleware from django.conf import settings from rest_framework import exceptions, HTTP_HEADER_ENCODING from rest_framewo...
true
true
f760200c2c9cfd50fb4b5dd51c60bc929eae3064
4,348
py
Python
comparevocabs.py
spyysalo/sent2wordpiece
47ba44e4bb4faa50bc617a7da93987f94a934d3f
[ "MIT" ]
2
2020-07-24T13:47:43.000Z
2020-10-21T11:41:02.000Z
comparevocabs.py
spyysalo/sent2wordpiece
47ba44e4bb4faa50bc617a7da93987f94a934d3f
[ "MIT" ]
null
null
null
comparevocabs.py
spyysalo/sent2wordpiece
47ba44e4bb4faa50bc617a7da93987f94a934d3f
[ "MIT" ]
2
2022-01-23T12:33:28.000Z
2022-03-26T17:46:09.000Z
#!/usr/bin/env python3 import sys import os import re from collections import Counter, OrderedDict from itertools import combinations from random import sample from logging import warning from berttokenizer import basic_tokenize # BERT special tokens BERT_SPECIAL = set(['[PAD]', '[UNK]', '[CLS]', '[SEP]', '[MASK]'...
31.970588
81
0.560948
import sys import os import re from collections import Counter, OrderedDict from itertools import combinations from random import sample from logging import warning from berttokenizer import basic_tokenize BERT_SPECIAL = set(['[PAD]', '[UNK]', '[CLS]', '[SEP]', '[MASK]']) UNUSED_RE = re.compile(r'^\[unused[0-9]+\...
true
true
f7602106fe3f02cc2ab27264f21da3d649dda055
2,249
py
Python
tests/test_benchmark.py
ntropy-network/ntropy-sdk
7fa1c1e90be64f27f5f5034f804b1eb04e78ad78
[ "MIT" ]
10
2021-05-18T14:22:32.000Z
2022-03-29T13:21:30.000Z
tests/test_benchmark.py
ntropy-network/ntropy-sdk
7fa1c1e90be64f27f5f5034f804b1eb04e78ad78
[ "MIT" ]
9
2021-08-25T13:30:19.000Z
2022-03-21T11:54:17.000Z
tests/test_benchmark.py
ntropy-network/ntropy-sdk
7fa1c1e90be64f27f5f5034f804b1eb04e78ad78
[ "MIT" ]
3
2021-08-25T11:42:27.000Z
2021-12-09T12:13:30.000Z
import sys import tempfile import pytest import csv import pandas as pd from tests import API_KEY from ntropy_sdk import SDK from ntropy_sdk.benchmark import main TRANSACTIONS = [ { "": "0", "account_id": "6039c4ac1c63e9c7", "description": "AMAZON WEB SERVICES AWS.AMAZON.CO WA Ref5543286...
24.445652
103
0.545131
import sys import tempfile import pytest import csv import pandas as pd from tests import API_KEY from ntropy_sdk import SDK from ntropy_sdk.benchmark import main TRANSACTIONS = [ { "": "0", "account_id": "6039c4ac1c63e9c7", "description": "AMAZON WEB SERVICES AWS.AMAZON.CO WA Ref5543286...
true
true
f760218207d502cdbc4d8aa5b5820584cfd17653
10,005
py
Python
dataloader.py
PDR-benchmark-standardization-committee/LTS-benchmark-tool
007da9bd3fb48996c0b97ad1e61549cb2ebb479e
[ "MIT" ]
null
null
null
dataloader.py
PDR-benchmark-standardization-committee/LTS-benchmark-tool
007da9bd3fb48996c0b97ad1e61549cb2ebb479e
[ "MIT" ]
null
null
null
dataloader.py
PDR-benchmark-standardization-committee/LTS-benchmark-tool
007da9bd3fb48996c0b97ad1e61549cb2ebb479e
[ "MIT" ]
null
null
null
# coding: utf-8 import os import sys import cv2 import pandas as pd import numpy as np from configparser import ConfigParser from logging import getLogger logger = getLogger("__main__").getChild("dataloader") def config(track, base_dname, config_file='config.ini'): ''' Load ground_truth directory ini file ...
27.113821
127
0.635982
import os import sys import cv2 import pandas as pd import numpy as np from configparser import ConfigParser from logging import getLogger logger = getLogger("__main__").getChild("dataloader") def config(track, base_dname, config_file='config.ini'): logger.debug('Loading configuration file: {}'.format(config_f...
true
true
f7602192f25ee2e334178768a82e956040ba29a9
75
py
Python
Configuration/Eras/python/Modifier_run2_egamma_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Eras/python/Modifier_run2_egamma_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Eras/python/Modifier_run2_egamma_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms run2_egamma_2018 =cms.Modifier()
18.75
40
0.826667
import FWCore.ParameterSet.Config as cms run2_egamma_2018 =cms.Modifier()
true
true
f76022442cfd98737e6ce790abdb7ecabf4f16fd
809
py
Python
paratransit/manage.py
NiJeLorg/paratransit_api
f3e1cfd922e58c6c539a9c11c29d04e4bdd701f2
[ "MIT" ]
null
null
null
paratransit/manage.py
NiJeLorg/paratransit_api
f3e1cfd922e58c6c539a9c11c29d04e4bdd701f2
[ "MIT" ]
null
null
null
paratransit/manage.py
NiJeLorg/paratransit_api
f3e1cfd922e58c6c539a9c11c29d04e4bdd701f2
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paratransit.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that ...
35.173913
77
0.644005
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paratransit.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f760227712c2853da397030609bf68d9f45f8e3a
1,386
py
Python
aicsimageio/readers/__init__.py
brisvag/aicsimageio
d372e0d3699ba48adcba0a2c69a1434f0be45e47
[ "BSD-3-Clause" ]
110
2019-06-27T16:46:53.000Z
2022-03-14T10:37:22.000Z
aicsimageio/readers/__init__.py
brisvag/aicsimageio
d372e0d3699ba48adcba0a2c69a1434f0be45e47
[ "BSD-3-Clause" ]
359
2019-06-27T17:50:08.000Z
2022-03-30T20:33:10.000Z
aicsimageio/readers/__init__.py
brisvag/aicsimageio
d372e0d3699ba48adcba0a2c69a1434f0be45e47
[ "BSD-3-Clause" ]
26
2020-03-11T20:51:06.000Z
2022-03-18T20:16:51.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from typing import TYPE_CHECKING, Type # To add a new reader add it both to TYPE_CHECKING and _READERS if TYPE_CHECKING: from .array_like_reader import ArrayLikeReader # noqa: F401 from .bioformats_reader import BioformatsReader # noqa: F401 from .czi_reade...
32.232558
86
0.698413
from typing import TYPE_CHECKING, Type if TYPE_CHECKING: from .array_like_reader import ArrayLikeReader from .bioformats_reader import BioformatsReader from .czi_reader import CziReader from .dv_reader import DVReader from .lif_reader import LifReader from .nd2_reader import ND2Reader ...
true
true
f7602294e4a3e5ee789ffefb1e5d0ff544e6f072
19,912
py
Python
tutorials/intro/plot_10_overview.py
paulroujansky/mne-python
6c36f8806dffe48bd82e461ad6cc8aad782e5f43
[ "BSD-3-Clause" ]
null
null
null
tutorials/intro/plot_10_overview.py
paulroujansky/mne-python
6c36f8806dffe48bd82e461ad6cc8aad782e5f43
[ "BSD-3-Clause" ]
null
null
null
tutorials/intro/plot_10_overview.py
paulroujansky/mne-python
6c36f8806dffe48bd82e461ad6cc8aad782e5f43
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ .. _tut-overview: Overview of MEG/EEG analysis with MNE-Python ============================================ This tutorial covers the basic EEG/MEG pipeline for event-related analysis: loading data, epoching, averaging, plotting, and estimating cortical activity from sensor data. It introdu...
51.854167
79
0.643632
import os import numpy as np import mne # ":ref:`sample-dataset`"), which contains EEG and MEG data from one subject # performing an audiovisual experiment, along with structural MRI scans for # that subject. The :func:`mne.datasets.sample.data_path` function will # automatically download the dataset if it isn't foun...
true
true
f76023d2d570475b159901a57ea1f69e0a5f59a6
1,530
py
Python
asr/labels.py
aflyingwolf/ctc-asr
6f1a17366b942c1a70230e170da4d0ae15fa52da
[ "MIT" ]
null
null
null
asr/labels.py
aflyingwolf/ctc-asr
6f1a17366b942c1a70230e170da4d0ae15fa52da
[ "MIT" ]
null
null
null
asr/labels.py
aflyingwolf/ctc-asr
6f1a17366b942c1a70230e170da4d0ae15fa52da
[ "MIT" ]
1
2020-12-19T13:11:53.000Z
2020-12-19T13:11:53.000Z
""" Convert characters (chr) to integer (int) labels and vice versa. REVIEW: index 0 bug, also see: https://github.com/baidu-research/warp-ctc/tree/master/tensorflow_binding `ctc_loss`_ maps labels from 0=<unused>, 1=<space>, 2=a, ..., 27=z, 28=<blank> See: https://www.tensorflow.org/api_docs/python/tf/nn/ctc_loss "...
23.90625
78
0.624183
__MAP = r' abcdefghijklmnopqrstuvwxyz' __CTOI = dict() __ITOC = dict([(0, '')]) if not __CTOI or not __ITOC: for i, c in enumerate(__MAP): __CTOI.update({c: i + 1}) __ITOC.update({i + 1: c}) def ctoi(char): if char not in __MAP: raise ValueError('Invalid input character \'{}\'.'.fo...
true
true
f760249e17b09905439e71fc034b6910341389d1
1,740
py
Python
margin_community_strategies/cycle_grid_martingale_strategy/get_command_tlg.py
MarginOpenSource/community-strategies
00b13075f85d66dc3717186ff174e007fb944ad4
[ "MIT" ]
13
2019-11-24T09:56:02.000Z
2022-03-05T01:43:52.000Z
margin_community_strategies/cycle_grid_martingale_strategy/get_command_tlg.py
MarginOpenSource/community-strategies
00b13075f85d66dc3717186ff174e007fb944ad4
[ "MIT" ]
13
2020-12-21T20:26:02.000Z
2022-01-12T14:59:55.000Z
margin_community_strategies/cycle_grid_martingale_strategy/get_command_tlg.py
MarginOpenSource/community-strategies
00b13075f85d66dc3717186ff174e007fb944ad4
[ "MIT" ]
11
2020-03-04T22:03:30.000Z
2022-03-05T01:43:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get message from Telegram bot and parse it into funds_rate.db # Copyright © 2021 Jerry Fedorenko aka VM import sqlite3 import time import requests import cfg def telegram_get(offset=None): command_list = [] url = cfg.url token = cfg.token channel_id =...
32.222222
95
0.583333
import sqlite3 import time import requests import cfg def telegram_get(offset=None): command_list = [] url = cfg.url token = cfg.token channel_id = cfg.channel_id url += token method = url + '/getUpdates' res = requests.post(method, data={'chat_id': channel_id, 'offset': offset}) if...
true
true
f76025f513b87ad2927f31ad8966d2728d65f4e2
4,905
py
Python
crawler/crawler_v2.py
Otto-G/coronavirus-dashboard
f960f0b1741ca4bac20c6ae505a58b61730d6bc8
[ "Apache-2.0" ]
6
2020-03-24T14:21:33.000Z
2021-08-21T16:58:56.000Z
crawler/crawler_v2.py
Otto-G/coronavirus-dashboard
f960f0b1741ca4bac20c6ae505a58b61730d6bc8
[ "Apache-2.0" ]
2
2020-03-25T01:05:52.000Z
2020-06-09T00:10:37.000Z
crawler/crawler_v2.py
Otto-G/coronavirus-dashboard
f960f0b1741ca4bac20c6ae505a58b61730d6bc8
[ "Apache-2.0" ]
4
2020-03-25T16:13:01.000Z
2020-05-18T16:36:10.000Z
""" crawler version 2: match strings to get values """ import requests from parsel import Selector import datetime as dt import json import time import sys import os import pandas as pd import fnmatch as fnm from lxml import html # start = time.time() url='https://coronavirus.ohio.gov/wps/portal/gov/covid-19/' toda...
33.59589
124
0.671356
import requests from parsel import Selector import datetime as dt import json import time import sys import os import pandas as pd import fnmatch as fnm from lxml import html url='https://coronavirus.ohio.gov/wps/portal/gov/covid-19/' today_date = dt.date.today().strftime("%Y-%m-%d") yesterday = dt.date.today() - d...
true
true
f7602699b447dc12db3219c21e5463b9ced03a7f
426
py
Python
python/python_crash_course/project_alien_invasion/robot.py
lmonsalve22/Learning-to-Code
2e32eba3fbd0bd63cc539e1e6d372ca346b765c9
[ "MIT" ]
null
null
null
python/python_crash_course/project_alien_invasion/robot.py
lmonsalve22/Learning-to-Code
2e32eba3fbd0bd63cc539e1e6d372ca346b765c9
[ "MIT" ]
null
null
null
python/python_crash_course/project_alien_invasion/robot.py
lmonsalve22/Learning-to-Code
2e32eba3fbd0bd63cc539e1e6d372ca346b765c9
[ "MIT" ]
null
null
null
""" """ import pygame class Robot: def __init__(self, screen): self.screen = screen self.image = pygame.image.load('images/robot.bmp') self.rect = self.image.get_rect() self.screen_rect = screen.get_rect() self.rect.centerx = self.screen_rect.centerx self.re...
23.666667
58
0.626761
import pygame class Robot: def __init__(self, screen): self.screen = screen self.image = pygame.image.load('images/robot.bmp') self.rect = self.image.get_rect() self.screen_rect = screen.get_rect() self.rect.centerx = self.screen_rect.centerx self.rect.bottom...
true
true
f76026a66e4b38956e4a5595cec2121b0719411e
529
py
Python
server/app.py
anthrax3/py4jshell
8ddf7dd3a48e502f6acfdd23a4862db4f71393f8
[ "MIT" ]
1
2021-12-18T08:31:14.000Z
2021-12-18T08:31:14.000Z
server/app.py
anthrax3/py4jshell
8ddf7dd3a48e502f6acfdd23a4862db4f71393f8
[ "MIT" ]
null
null
null
server/app.py
anthrax3/py4jshell
8ddf7dd3a48e502f6acfdd23a4862db4f71393f8
[ "MIT" ]
1
2021-12-19T06:03:38.000Z
2021-12-19T06:03:38.000Z
import logging from logging.handlers import RotatingFileHandler from flask import Flask, logging as flask_logger, request from formatter import ShellishFormatter app = Flask(__name__) @app.before_request def log_request(): return None @app.get("/hello") def hello(): app.logger.info("Headers: {}".format(req...
23
66
0.742911
import logging from logging.handlers import RotatingFileHandler from flask import Flask, logging as flask_logger, request from formatter import ShellishFormatter app = Flask(__name__) @app.before_request def log_request(): return None @app.get("/hello") def hello(): app.logger.info("Headers: {}".format(req...
true
true
f76027ed0985ad6bcab2f3b04a13dbf06804bf2f
1,128
py
Python
Server/Configure.py
PythonSimon/CovertChat
63509966ae9354a43bdb1c74b1de3fc3a91611ad
[ "Apache-2.0" ]
null
null
null
Server/Configure.py
PythonSimon/CovertChat
63509966ae9354a43bdb1c74b1de3fc3a91611ad
[ "Apache-2.0" ]
null
null
null
Server/Configure.py
PythonSimon/CovertChat
63509966ae9354a43bdb1c74b1de3fc3a91611ad
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from enum import * from socket import * host = gethostbyname(gethostname()) @unique class Command(IntEnum): LOGIN = 11 REGISTER = 12 SEND = 13 @unique class Status(IntEnum): MAIN_USER = 21 SPECIAL_USER = 22 @unique class LoginResult(IntEnum): SUCCESS = 31 USER_NONE = ...
16.835821
61
0.667553
from enum import * from socket import * host = gethostbyname(gethostname()) @unique class Command(IntEnum): LOGIN = 11 REGISTER = 12 SEND = 13 @unique class Status(IntEnum): MAIN_USER = 21 SPECIAL_USER = 22 @unique class LoginResult(IntEnum): SUCCESS = 31 USER_NONE = -32 PASSWOR...
true
true
f7602841c845944f96d8be494788a4005a692a59
13,609
py
Python
python/packages/win64/materialexport/material_strategies.py
artcom/cinema4d-material-export
4107040af650a319fdcbf3eec007f56e0559aa62
[ "MIT" ]
4
2018-01-26T07:37:49.000Z
2021-11-02T07:27:52.000Z
python/packages/win64/materialexport/material_strategies.py
artcom/cinema4d-material-export
4107040af650a319fdcbf3eec007f56e0559aa62
[ "MIT" ]
null
null
null
python/packages/win64/materialexport/material_strategies.py
artcom/cinema4d-material-export
4107040af650a319fdcbf3eec007f56e0559aa62
[ "MIT" ]
null
null
null
import c4d def collect_material_info(mat, name): '''Collects Cinama4D standard material informations - cannot gather data from custom material models Args: mat (c4d.TextureTag): input material with data attached name (str): material channel in which attributes are gathered Returns: ...
47.253472
106
0.731134
import c4d def collect_material_info(mat, name): name = name.lower() if name == 'luminance': return collect_luminance_info(mat) elif name == 'normal': return collect_normal_info(mat) elif name == 'bump': return collect_bump_info(mat) elif name == 'displacement': ret...
true
true
f76029655389d685235236d63bd4c95a82c17197
384
py
Python
jlf_stats/bucket.py
worldofchris/jlf
9f80a4e17ffa9fab33bd2bd0ee68d0e260e9c68c
[ "BSD-2-Clause" ]
14
2015-01-10T03:02:08.000Z
2019-01-09T10:58:44.000Z
jlf_stats/bucket.py
worldofchris/jlf
9f80a4e17ffa9fab33bd2bd0ee68d0e260e9c68c
[ "BSD-2-Clause" ]
1
2015-09-07T20:23:52.000Z
2015-11-01T21:32:35.000Z
jlf_stats/bucket.py
worldofchris/jlf
9f80a4e17ffa9fab33bd2bd0ee68d0e260e9c68c
[ "BSD-2-Clause" ]
5
2015-07-06T11:01:05.000Z
2020-01-16T12:01:23.000Z
""" Buckets for Histograms """ def bucket_labels(buckets): labels = [] for idx, val in enumerate(buckets): if idx < len(buckets)-2: label = "{0}-{1}".format(val, buckets[idx+1]-1) labels.append(label) if idx == len(buckets)-2: label = "{0}-{1}".format(val, buc...
21.333333
57
0.544271
def bucket_labels(buckets): labels = [] for idx, val in enumerate(buckets): if idx < len(buckets)-2: label = "{0}-{1}".format(val, buckets[idx+1]-1) labels.append(label) if idx == len(buckets)-2: label = "{0}-{1}".format(val, buckets[idx+1]) labels...
true
true
f76029e3f0588338ebba19d90407c83f61faea80
1,740
py
Python
rdr_service/alembic/versions/a2daa4fb5658_create_gc_data_file_staging.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
rdr_service/alembic/versions/a2daa4fb5658_create_gc_data_file_staging.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
rdr_service/alembic/versions/a2daa4fb5658_create_gc_data_file_staging.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
"""create gc_data_file_staging Revision ID: a2daa4fb5658 Revises: a2424db07997 Create Date: 2021-09-29 11:35:50.653184 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a2daa4fb5658' down_revision = 'a2424db07997' branch_labels = None depends_on = None def upgr...
30
119
0.71092
from alembic import op import sqlalchemy as sa revision = 'a2daa4fb5658' down_revision = 'a2424db07997' branch_labels = None depends_on = None def upgrade(engine_name): globals()["upgrade_%s" % engine_name]() def downgrade(engine_name): globals()["downgrade_%s" % engine_name]() def upgrade_rdr(): ...
true
true
f76029f3611fa492fe05e24248f80bc4fda45c78
457
py
Python
conf.py
CyVerse-learning-materials/HTSeqQC_CyVerse_tutorial
4c991cab2535e281dd268920f6cd25018a0314b7
[ "CC-BY-4.0" ]
null
null
null
conf.py
CyVerse-learning-materials/HTSeqQC_CyVerse_tutorial
4c991cab2535e281dd268920f6cd25018a0314b7
[ "CC-BY-4.0" ]
null
null
null
conf.py
CyVerse-learning-materials/HTSeqQC_CyVerse_tutorial
4c991cab2535e281dd268920f6cd25018a0314b7
[ "CC-BY-4.0" ]
2
2020-03-20T13:52:45.000Z
2020-04-29T20:01:44.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # General information about the project. import sys import os sys.path.insert(0, os.path.dirname(__file__)) from misc.cyverse_sphinx_conf import * # noqa project = 'HTSeqQC Quick Start' copyright = '2020, Renesh Bedre' author = 'Renesh Bedre, Niranjan Baisakh, Kranth...
20.772727
58
0.737418
import sys import os sys.path.insert(0, os.path.dirname(__file__)) from misc.cyverse_sphinx_conf import * project = 'HTSeqQC Quick Start' copyright = '2020, Renesh Bedre' author = 'Renesh Bedre, Niranjan Baisakh, Kranthi Mandadi' version = '2.0' version = '2.0' epub_title = project epub_author = author epub_publis...
true
true
f7602a223eb3c94c60a46797fc9c56eb401f54af
1,957
py
Python
tools/jenkins-projects-checks.py
10171121/project-config-ci-name
a619cfeb03295b1fbf1fadb5a50276a8d5daca4c
[ "Apache-2.0" ]
null
null
null
tools/jenkins-projects-checks.py
10171121/project-config-ci-name
a619cfeb03295b1fbf1fadb5a50276a8d5daca4c
[ "Apache-2.0" ]
null
null
null
tools/jenkins-projects-checks.py
10171121/project-config-ci-name
a619cfeb03295b1fbf1fadb5a50276a8d5daca4c
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # Copyright 2014 SUSE Linux Products GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
30.578125
79
0.628002
import sys def normalize(s): return s.lower().replace("_", "-") def check_alphabetical(): errors = False last = "" count = 1 for line in open('jenkins/jobs/projects.yaml', 'r'): if line.startswith(' name: '): i = line.find(' name: ') current = line[i...
true
true
f7602d14aedb36647f33978bde7f3355ca73c94f
2,942
py
Python
dict_validator/field.py
gurunars/dict-validator
25152403c5e298a1d5aa4723c15c874ac1ec0e05
[ "Apache-2.0" ]
1
2018-08-16T22:18:08.000Z
2018-08-16T22:18:08.000Z
dict_validator/field.py
nephilim-solutions/dict-validator
25152403c5e298a1d5aa4723c15c874ac1ec0e05
[ "Apache-2.0" ]
2
2017-06-06T09:04:29.000Z
2018-02-10T10:27:25.000Z
dict_validator/field.py
nephilim-solutions/dict-validator
25152403c5e298a1d5aa4723c15c874ac1ec0e05
[ "Apache-2.0" ]
2
2017-01-13T14:47:10.000Z
2017-07-31T13:45:19.000Z
from abc import ABCMeta, abstractmethod class Field(object, metaclass=ABCMeta): """ The "leaf" primitive data type in a schema. E.g. string, integer, float, etc. :param description: textual explanation of what the field represents :param required: True by default. If false - the field is optional...
27.754717
78
0.586336
from abc import ABCMeta, abstractmethod class Field(object, metaclass=ABCMeta): def __init__(self, description=None, required=True): self._description = description self._required = required def _describe(self): @abstractmethod def _validate(self, value): def serialize(self...
true
true
f7602dd8527814d96378724e8fbf2ec6f109bde2
5,663
py
Python
IPython/core/extensions.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/extensions.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
3
2015-04-01T13:14:57.000Z
2015-05-26T16:01:37.000Z
IPython/core/extensions.py
tkf/ipython
a90f362925c92c4cf6e541e4d31edecabefc88a7
[ "BSD-3-Clause-Clear" ]
1
2017-02-03T06:22:33.000Z
2017-02-03T06:22:33.000Z
# encoding: utf-8 """A class for managing IPython extensions. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file C...
38.52381
84
0.625817
"""A class for managing IPython extensions. Authors: * Brian Granger """ import os import sys from urllib import urlretrieve from urlparse import urlparse from IPython.config.configurable import Configurable from IPython.utils.traitlets import Instance class ExtensionManager(Configurable): """A class to man...
false
true
f7602dddc7474be4c3ebedf6a6174903e2b7dd50
1,207
py
Python
Elastic_Search.py
duckwed/attack-to-elk
81fb4f14c10e1d20a84aa9ccb6de335fda19d58c
[ "Apache-2.0" ]
69
2019-01-10T23:10:29.000Z
2022-03-18T22:00:37.000Z
Elastic_Search.py
duckwed/attack-to-elk
81fb4f14c10e1d20a84aa9ccb6de335fda19d58c
[ "Apache-2.0" ]
3
2019-03-08T16:19:56.000Z
2020-08-31T01:39:17.000Z
Elastic_Search.py
duckwed/attack-to-elk
81fb4f14c10e1d20a84aa9ccb6de335fda19d58c
[ "Apache-2.0" ]
37
2019-03-27T12:53:32.000Z
2022-01-13T18:35:23.000Z
from elasticsearch import Elasticsearch, helpers import os class ElasticSearch: def __init__(self, index): es_host = os.environ['es_hostname'] es_port = os.environ['es_port'] if es_host is None: exit('You need to export Elasticsearch hostname') if es_port is None...
30.948718
73
0.543496
from elasticsearch import Elasticsearch, helpers import os class ElasticSearch: def __init__(self, index): es_host = os.environ['es_hostname'] es_port = os.environ['es_port'] if es_host is None: exit('You need to export Elasticsearch hostname') if es_port is None...
true
true
f7602e3eca45785c3d103c150516bcb91d938f99
563
py
Python
.idea/fileTemplates/includes/header.py
marcoprado17/flask-bone
772d25bdf6c6e41701da1ef2e2a67bae7ae21757
[ "MIT" ]
null
null
null
.idea/fileTemplates/includes/header.py
marcoprado17/flask-bone
772d25bdf6c6e41701da1ef2e2a67bae7ae21757
[ "MIT" ]
null
null
null
.idea/fileTemplates/includes/header.py
marcoprado17/flask-bone
772d25bdf6c6e41701da1ef2e2a67bae7ae21757
[ "MIT" ]
null
null
null
#set( $MyName ="Marco Aurélio Prado" ) #set( $MyEmail ="marco.pdsv@gmail.com" ) # !/usr/bin/env python # -*- coding: utf-8 -*- # ====================================================================================================================== # The MIT License (MIT) # ==============================================...
56.3
120
0.21492
true
true
f7602e3edff6e6c8b084c384371d8d80cdee4e50
4,440
py
Python
ibiala-code/helper.py
ilanbiala/16720-project
08c9c898549fd42c60a3d5d21192ea6c7662aaa8
[ "MIT" ]
null
null
null
ibiala-code/helper.py
ilanbiala/16720-project
08c9c898549fd42c60a3d5d21192ea6c7662aaa8
[ "MIT" ]
null
null
null
ibiala-code/helper.py
ilanbiala/16720-project
08c9c898549fd42c60a3d5d21192ea6c7662aaa8
[ "MIT" ]
null
null
null
""" Homework4. Helper functions. Written by Chen Kong, 2018. """ import numpy as np import matplotlib.pyplot as plt import scipy.optimize import submission as sub def _epipoles(E): U, S, V = np.linalg.svd(E) e1 = V[-1, :] U, S, V = np.linalg.svd(E.T) e2 = V[-1, :] return e1, e2 def displayEpipola...
27.239264
104
0.488288
import numpy as np import matplotlib.pyplot as plt import scipy.optimize import submission as sub def _epipoles(E): U, S, V = np.linalg.svd(E) e1 = V[-1, :] U, S, V = np.linalg.svd(E.T) e2 = V[-1, :] return e1, e2 def displayEpipolarF(I1, I2, F): e1, e2 = _epipoles(F) sy, sx, _ = I2.shape...
true
true
f7602ea0afc4877706dc1c4af2c62999125353e4
551
py
Python
web3auth/utils.py
Axellatron/django-web3-auth
738478958de660f3861e056af45e520d47c400f0
[ "MIT" ]
9
2018-05-31T20:38:27.000Z
2021-05-07T05:38:07.000Z
web3auth/utils.py
Axellatron/django-web3-auth
738478958de660f3861e056af45e520d47c400f0
[ "MIT" ]
2
2020-06-03T05:43:57.000Z
2020-10-07T08:25:16.000Z
web3auth/utils.py
atereshkin/django-web3-auth
738478958de660f3861e056af45e520d47c400f0
[ "MIT" ]
8
2018-06-24T09:57:29.000Z
2022-03-14T12:11:19.000Z
import sha3 import ethereum def sig_to_vrs(sig): # sig_bytes = bytes.fromhex(sig[2:]) r = int(sig[2:66], 16) s = int(sig[66:130], 16) v = int(sig[130:], 16) return v,r,s def hash_personal_message(msg): padded = "\x19Ethereum Signed Message:\n" + str(len(msg)) + msg return sha3.keccak_256(b...
25.045455
98
0.664247
import sha3 import ethereum def sig_to_vrs(sig): r = int(sig[2:66], 16) s = int(sig[66:130], 16) v = int(sig[130:], 16) return v,r,s def hash_personal_message(msg): padded = "\x19Ethereum Signed Message:\n" + str(len(msg)) + msg return sha3.keccak_256(bytes(padded, 'utf8')).digest() def rec...
true
true
f7602ef8d38bca1d07a0553f2dc11970743a3a15
1,268
py
Python
yeoboseyo/services/reddit.py
foxmask/yeoboseyo-django
8dc1df9373f4fc27502aa9097e3724a87a2b8ce6
[ "BSD-3-Clause" ]
2
2020-11-18T08:18:17.000Z
2021-02-27T13:17:20.000Z
yeoboseyo/services/reddit.py
foxmask/yeoboseyo-django
8dc1df9373f4fc27502aa9097e3724a87a2b8ce6
[ "BSD-3-Clause" ]
null
null
null
yeoboseyo/services/reddit.py
foxmask/yeoboseyo-django
8dc1df9373f4fc27502aa9097e3724a87a2b8ce6
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ 여보세요 Service Reddit """ # std lib from __future__ import unicode_literals from django.conf import settings from logging import getLogger # external lib from praw import Reddit as RedditAPI # yeoboseyo from yeoboseyo.services import Service # create logger logger = getLogger(__name__) __all__ = ...
26.978723
85
0.599369
from __future__ import unicode_literals from django.conf import settings from logging import getLogger from praw import Reddit as RedditAPI from yeoboseyo.services import Service logger = getLogger(__name__) __all__ = ['Reddit'] class Reddit(Service): def __init__(self): super().__init__() self....
true
true
f7602f23f3ae1c5171a18bbe8c7a760481f42211
11,560
py
Python
intersight/model/equipment_tpm_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/equipment_tpm_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/equipment_tpm_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
52.785388
1,678
0.642042
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7602f89ef519f643f6915537425840d3dc73fd7
4,284
py
Python
test_ndf.py
joshloyal/fully-differentiable-deep-ndf-tf
b049ca86c7e0065af373c110d8bb8b5721fb25d1
[ "MIT" ]
null
null
null
test_ndf.py
joshloyal/fully-differentiable-deep-ndf-tf
b049ca86c7e0065af373c110d8bb8b5721fb25d1
[ "MIT" ]
null
null
null
test_ndf.py
joshloyal/fully-differentiable-deep-ndf-tf
b049ca86c7e0065af373c110d8bb8b5721fb25d1
[ "MIT" ]
1
2020-04-16T19:34:53.000Z
2020-04-16T19:34:53.000Z
import numpy as np import skflow from sklearn import datasets from sklearn import metrics from sklearn.tree import DecisionTreeClassifier import tensorflow as tf import ndf DEPTH = 4 # Depth of a tree (this includes the leaf probabilities) N_LEAF = 2 ** (DEPTH - 1) # Number of leaf nodes N_DECISION_NODES = 2 ** (DE...
36
82
0.612512
import numpy as np import skflow from sklearn import datasets from sklearn import metrics from sklearn.tree import DecisionTreeClassifier import tensorflow as tf import ndf DEPTH = 4 N_LEAF = 2 ** (DEPTH - 1) N_DECISION_NODES = 2 ** (DEPTH - 1) - 1 N_BATCH = 3 N_LABELS = 10 class TestNDF(tf.test.TestCase): d...
true
true
f7602f98a7dee74a8e9ff699f07e0771a068885f
14,056
py
Python
test/engine/test_deprecations.py
sqlalchemy-bot/sqlalchemy
c0736e0b2a3bf8c0952db84f5b9943df9ebf18f7
[ "MIT" ]
null
null
null
test/engine/test_deprecations.py
sqlalchemy-bot/sqlalchemy
c0736e0b2a3bf8c0952db84f5b9943df9ebf18f7
[ "MIT" ]
null
null
null
test/engine/test_deprecations.py
sqlalchemy-bot/sqlalchemy
c0736e0b2a3bf8c0952db84f5b9943df9ebf18f7
[ "MIT" ]
null
null
null
import re from unittest.mock import Mock import sqlalchemy as tsa from sqlalchemy import create_engine from sqlalchemy import event from sqlalchemy import pool from sqlalchemy import select from sqlalchemy import testing from sqlalchemy.engine import BindTyping from sqlalchemy.engine import reflection from sqlalchemy....
31.586517
79
0.616534
import re from unittest.mock import Mock import sqlalchemy as tsa from sqlalchemy import create_engine from sqlalchemy import event from sqlalchemy import pool from sqlalchemy import select from sqlalchemy import testing from sqlalchemy.engine import BindTyping from sqlalchemy.engine import reflection from sqlalchemy....
true
true
f7603030631cc9c668092b8296ce65b10d522746
1,138
py
Python
LeetCode/2019-02-02-239-Sliding-Window-Maximum.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
5
2018-10-30T05:07:32.000Z
2019-06-18T08:11:38.000Z
LeetCode/2019-02-02-239-Sliding-Window-Maximum.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
1
2020-05-09T09:05:16.000Z
2020-05-09T09:05:16.000Z
LeetCode/2019-02-02-239-Sliding-Window-Maximum.py
HeRuivio/-Algorithm
1fbe6256630758fda3af68f469471ee246730afc
[ "MIT" ]
2
2020-05-09T09:02:22.000Z
2020-12-09T13:23:00.000Z
# -*- coding: utf-8 -*- # @Author: 何睿 # @Create Date: 2019-02-02 09:56:05 # @Last Modified by: 何睿 # @Last Modified time: 2019-02-02 12:40:56 from collections import deque # 实现一个单调非递增队列,继承于deque class MonotonicQueue(deque): def __init__(self): self.queue = deque() def push(self, n...
25.863636
65
0.521968
from collections import deque class MonotonicQueue(deque): def __init__(self): self.queue = deque() def push(self, num): while self.queue and num > self.queue[-1]: self.queue.pop() self.queue.append(num) return True class Solution: def maxSlidingWindo...
true
true
f7603050b161ae9e18f1cc2d7f68febb46b84da1
419
py
Python
tests/test/qua/test_hold_list.py
Eve-ning/reamber_base_py
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
10
2020-06-28T11:16:36.000Z
2021-08-09T21:41:43.000Z
tests/test/qua/test_hold_list.py
Eve-ning/reamberPy
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
35
2020-06-18T13:05:50.000Z
2022-02-18T10:13:35.000Z
tests/test/qua/test_hold_list.py
Eve-ning/reamber_base_py
6d19c84f2c110b60e633b82b73e0516396466f56
[ "MIT" ]
2
2021-05-26T17:05:06.000Z
2021-06-12T18:42:13.000Z
from reamber.quaver.lists.notes import QuaHoldList from tests.test.qua.test_fixture import qua_map def test_type(qua_map): assert isinstance(qua_map.holds, QuaHoldList) def test_df_names(qua_map): assert {'offset', 'column', 'length', 'key_sounds'}, set(qua_map.holds.df.columns) def test_to_yaml(qua_map): ...
29.928571
98
0.735084
from reamber.quaver.lists.notes import QuaHoldList from tests.test.qua.test_fixture import qua_map def test_type(qua_map): assert isinstance(qua_map.holds, QuaHoldList) def test_df_names(qua_map): assert {'offset', 'column', 'length', 'key_sounds'}, set(qua_map.holds.df.columns) def test_to_yaml(qua_map): ...
true
true
f760316001a23c55c6de22e9a70928d46ec8fd5e
9,460
py
Python
network.py
Holmes-Alan/Photo2Sketch
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
[ "MIT" ]
null
null
null
network.py
Holmes-Alan/Photo2Sketch
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
[ "MIT" ]
null
null
null
network.py
Holmes-Alan/Photo2Sketch
43a0ca6bb8a8e645b35a2ab23d11ed5efe117e09
[ "MIT" ]
null
null
null
import torch from torch import nn, einsum import torch.nn.functional as F import torchvision.models as models def exists(val): return val is not None # classes class Inverse(nn.Module): def __init__(self): super(Inverse, self).__init__() self.E = Encoder() self.D = Img_decoder_v3()...
35.298507
125
0.578013
import torch from torch import nn, einsum import torch.nn.functional as F import torchvision.models as models def exists(val): return val is not None class Inverse(nn.Module): def __init__(self): super(Inverse, self).__init__() self.E = Encoder() self.D = Img_decoder_v3() def ...
true
true
f760316e951e6f78590160380d659380ef5f8f04
1,558
py
Python
test/functional/disablewallet.py
BullCoin-Project/BullCoin
e01c79c13d27312a64ca5943a5cbd93cfbc18482
[ "MIT" ]
null
null
null
test/functional/disablewallet.py
BullCoin-Project/BullCoin
e01c79c13d27312a64ca5943a5cbd93cfbc18482
[ "MIT" ]
null
null
null
test/functional/disablewallet.py
BullCoin-Project/BullCoin
e01c79c13d27312a64ca5943a5cbd93cfbc18482
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Bull Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test a node with the -disablewallet option. - Test that ...
43.277778
128
0.729782
from test_framework.test_framework import BullTestFramework from test_framework.util import * class DisableWalletTest (BullTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-disablewallet"]] def run_test (self): ...
true
true
f760336a6a77377bbbbb08074728daec1726f494
5,714
py
Python
userbot/plugins/updater.py
emperor-akashi-4/HexBotX
6a1b97a9b8e7e164eae9fabbd6c04ed9f62c7cad
[ "MIT" ]
null
null
null
userbot/plugins/updater.py
emperor-akashi-4/HexBotX
6a1b97a9b8e7e164eae9fabbd6c04ed9f62c7cad
[ "MIT" ]
null
null
null
userbot/plugins/updater.py
emperor-akashi-4/HexBotX
6a1b97a9b8e7e164eae9fabbd6c04ed9f62c7cad
[ "MIT" ]
null
null
null
from os import remove from os import execl import sys # from git import Repo # from git.exc import GitCommandError # from git.exc import InvalidGitRepositoryError # from git.exc import NoSuchPathError # from .. import bot # from userbot.utils import register import git import asyncio import random imp...
33.22093
139
0.640707
from os import remove from os import execl import sys import git import asyncio import random import re import time from collections import deque import requests from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from telethon import...
true
true
f76033a8fb99abd9d139c72bff99912d10fd7840
1,224
py
Python
body/test/test_lift.py
soumith/stretch_body
998cec78fae67090060d4474c3029f9db45cde85
[ "RSA-MD" ]
null
null
null
body/test/test_lift.py
soumith/stretch_body
998cec78fae67090060d4474c3029f9db45cde85
[ "RSA-MD" ]
null
null
null
body/test/test_lift.py
soumith/stretch_body
998cec78fae67090060d4474c3029f9db45cde85
[ "RSA-MD" ]
null
null
null
# Logging level must be set before importing any stretch_body class import stretch_body.robot_params stretch_body.robot_params.RobotParams.set_logging_level("DEBUG") import unittest import stretch_body.lift import time class TestLift(unittest.TestCase): def test_homing(self): """Test lift homes correct...
27.2
68
0.626634
import stretch_body.robot_params stretch_body.robot_params.RobotParams.set_logging_level("DEBUG") import unittest import stretch_body.lift import time class TestLift(unittest.TestCase): def test_homing(self): l = stretch_body.lift.Lift() self.assertTrue(l.startup()) l.home() l.p...
true
true
f76033d3918ec6bbc2af712f8106b3a87ed309e5
8,580
py
Python
iot/api-client/end_to_end_example/cloudiot_pubsub_example_server.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
5,938
2015-05-18T05:04:37.000Z
2022-03-31T20:16:39.000Z
iot/api-client/end_to_end_example/cloudiot_pubsub_example_server.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
4,730
2015-05-07T19:00:38.000Z
2022-03-31T21:59:41.000Z
iot/api-client/end_to_end_example/cloudiot_pubsub_example_server.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
6,734
2015-05-05T17:06:20.000Z
2022-03-31T12:02:51.000Z
# Copyright 2017 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 agre...
38.133333
79
0.641958
import argparse import base64 import json import os import sys from threading import Lock import time from google.cloud import pubsub from google.oauth2 import service_account from googleapiclient import discovery from googleapiclient.errors import HttpError API_SCOPES = ['https://www.googleapis.com/auth/cloud-plat...
true
true
f7603429ff128477a7b1a45842e8ab2afb6662d6
526
py
Python
tests/mytest.py
Vladislav-Martian/SimpleEvents
b3794b0e71c5ed1932234bada606b6445d54addd
[ "MIT" ]
null
null
null
tests/mytest.py
Vladislav-Martian/SimpleEvents
b3794b0e71c5ed1932234bada606b6445d54addd
[ "MIT" ]
null
null
null
tests/mytest.py
Vladislav-Martian/SimpleEvents
b3794b0e71c5ed1932234bada606b6445d54addd
[ "MIT" ]
null
null
null
from SimpleEvents import Dispatcher # don't forget about those parentheses. # It is a parameterized decorator, # with just one optional parameter. # @Dispatcher(delegateObject = None) @Dispatcher() def doNothing(): pass @doNothing.subscribe def noname(): print("A") @doNothing.subscribe def noname(): ...
17.533333
61
0.758555
from SimpleEvents import Dispatcher # It is a parameterized decorator, # with just one optional parameter. # @Dispatcher(delegateObject = None) @Dispatcher() def doNothing(): pass @doNothing.subscribe def noname(): print("A") @doNothing.subscribe def noname(): print("B") # after subscribing returns...
true
true
f760343867180b54dea1254f61b43c0690564742
9,012
py
Python
examples/examples_test.py
alexandrebouayad/Cirq
4ba730b17b6af6265ee6458eb40172b847bd5684
[ "Apache-2.0" ]
null
null
null
examples/examples_test.py
alexandrebouayad/Cirq
4ba730b17b6af6265ee6458eb40172b847bd5684
[ "Apache-2.0" ]
null
null
null
examples/examples_test.py
alexandrebouayad/Cirq
4ba730b17b6af6265ee6458eb40172b847bd5684
[ "Apache-2.0" ]
null
null
null
# pylint: disable=wrong-or-nonexistent-copyright-notice import itertools import networkx import numpy as np import pytest import matplotlib.pyplot as plt import cirq import examples.basic_arithmetic import examples.bb84 import examples.bell_inequality import examples.bernstein_vazirani import examples.bcs_mean_field ...
28.700637
97
0.69474
import itertools import networkx import numpy as np import pytest import matplotlib.pyplot as plt import cirq import examples.basic_arithmetic import examples.bb84 import examples.bell_inequality import examples.bernstein_vazirani import examples.bcs_mean_field import examples.cross_entropy_benchmarking_example impor...
true
true
f7603449ef71dd9236a2e513adb0e6e4034d9cc2
4,894
py
Python
pgairspace/geom.py
hyperknot/pgairspace
51f02b54cd12bf4c8c3e7077aaccfaed15c40cfa
[ "MIT" ]
null
null
null
pgairspace/geom.py
hyperknot/pgairspace
51f02b54cd12bf4c8c3e7077aaccfaed15c40cfa
[ "MIT" ]
null
null
null
pgairspace/geom.py
hyperknot/pgairspace
51f02b54cd12bf4c8c3e7077aaccfaed15c40cfa
[ "MIT" ]
null
null
null
import os import pyproj from shapely.geometry import Point, LineString, asShape from shapely.geometry.polygon import Polygon from .utils import read_json def generate_circle(lon, lat, radius_meters): points = list() for dir in range(0, 360, 15): p = offset_point(lon, lat, radius_meters, dir) p...
26.743169
91
0.633837
import os import pyproj from shapely.geometry import Point, LineString, asShape from shapely.geometry.polygon import Polygon from .utils import read_json def generate_circle(lon, lat, radius_meters): points = list() for dir in range(0, 360, 15): p = offset_point(lon, lat, radius_meters, dir) p...
true
true
f760348376e0a2ed9832fee9b951c7858a8cd4c2
1,408
py
Python
aliyun-python-sdk-dbfs/aliyunsdkdbfs/request/v20200418/ListTagValuesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-dbfs/aliyunsdkdbfs/request/v20200418/ListTagValuesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-dbfs/aliyunsdkdbfs/request/v20200418/ListTagValuesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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 u...
37.052632
74
0.764915
from aliyunsdkcore.request import RpcRequest from aliyunsdkdbfs.endpoint import endpoint_data class ListTagValuesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'DBFS', '2020-04-18', 'ListTagValues') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self, "endpoint_map",...
true
true
f7603689db0fcc4ad150a460e606217d64667eed
441
py
Python
fdk_client/platform/models/VerifyOtpSuccess.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/VerifyOtpSuccess.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/VerifyOtpSuccess.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .UserSchema import UserSchema class VerifyOtpSuccess(BaseSchema): # User swagger.json user = fields.Nested(UserSchema, required...
16.961538
52
0.725624
from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .UserSchema import UserSchema class VerifyOtpSuccess(BaseSchema): user = fields.Nested(UserSchema, required=False) user_exists = fields.Boole...
true
true
f76036aa776a22708ec53ccf3a264270600d7815
238
py
Python
photoapp/admin.py
Cynthia-Kitili/photoapp
9c80301c183816d0656fcd27fb9718d3926648f1
[ "Unlicense", "MIT" ]
1
2021-01-11T17:48:03.000Z
2021-01-11T17:48:03.000Z
photoapp/admin.py
Cynthia-Kitili/photoapp
9c80301c183816d0656fcd27fb9718d3926648f1
[ "Unlicense", "MIT" ]
null
null
null
photoapp/admin.py
Cynthia-Kitili/photoapp
9c80301c183816d0656fcd27fb9718d3926648f1
[ "Unlicense", "MIT" ]
1
2021-01-11T17:48:05.000Z
2021-01-11T17:48:05.000Z
from django.contrib import admin from .models import Category,Location,Image class CategoryAdmin(admin.ModelAdmin): filter_horizontal =('image',) admin.site.register(Category) admin.site.register(Location) admin.site.register(Image)
26.444444
43
0.806723
from django.contrib import admin from .models import Category,Location,Image class CategoryAdmin(admin.ModelAdmin): filter_horizontal =('image',) admin.site.register(Category) admin.site.register(Location) admin.site.register(Image)
true
true
f76036c55ea61558cf5f91e9ea2bc853ae2372ec
3,068
py
Python
pipeline/tests/core/test_pipeline.py
springborland/bk-sops
a9057672c10efb5f2414a805a30ead4092429c76
[ "Apache-2.0" ]
1
2021-05-19T04:31:34.000Z
2021-05-19T04:31:34.000Z
pipeline/tests/core/test_pipeline.py
ZhuoZhuoCrayon/bk-sops
d1475d53c19729915727ce7adc24e3226f15e332
[ "Apache-2.0" ]
null
null
null
pipeline/tests/core/test_pipeline.py
ZhuoZhuoCrayon/bk-sops
d1475d53c19729915727ce7adc24e3226f15e332
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 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...
41.459459
115
0.702738
from django.test import TestCase from pipeline.core.data.base import DataObject from pipeline.core.flow.activity import ServiceActivity from pipeline.core.flow.base import SequenceFlow from pipeline.core.flow.event import EmptyEndEvent, EmptyStartEvent from pipeline.core.pipeline import * class TestPipeline(TestCa...
true
true
f76036e87bec41036c768e315c2d5ef00843f209
3,787
py
Python
venv/Lib/site-packages/astroid/brain/brain_ssl.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
null
null
null
venv/Lib/site-packages/astroid/brain/brain_ssl.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
1
2021-04-12T16:20:40.000Z
2021-04-12T16:20:40.000Z
venv/Lib/site-packages/astroid/brain/brain_ssl.py
professorbee/randomplushmiku
b2db186a5d081da0cb00b8c73dee9eff6047b1f1
[ "MIT" ]
1
2021-04-12T15:52:04.000Z
2021-04-12T15:52:04.000Z
# Copyright (c) 2016, 2018, 2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2016 Ceridwen <ceridwenv@gmail.com> # Copyright (c) 2019 Benjamin Elven <25181435+S3ntinelX@users.noreply.github.com> # Copyright (c) 2020 hippo91 <guillaume.peillex@gmail.com> # Licensed under the LGPL: https://www.gnu.org/licenses/...
49.181818
102
0.693689
from astroid import MANAGER, register_module_extender from astroid.builder import AstroidBuilder from astroid import nodes from astroid import parse def ssl_transform(): return parse( """ from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION from _ssl import _SSLContext...
true
true
f760370154d06e3b9f1b48b67f9efa7c4e1382b0
619
py
Python
retsinfo_app/scrapers/migrations/0009_auto_20210513_1955.py
IIMunchII/retsinformation
8576f11e7fa0e7fd87032d9cf86e60c4288a637e
[ "Apache-2.0" ]
1
2022-02-21T09:42:51.000Z
2022-02-21T09:42:51.000Z
retsinfo_app/scrapers/migrations/0009_auto_20210513_1955.py
IIMunchII/retsinformation
8576f11e7fa0e7fd87032d9cf86e60c4288a637e
[ "Apache-2.0" ]
null
null
null
retsinfo_app/scrapers/migrations/0009_auto_20210513_1955.py
IIMunchII/retsinformation
8576f11e7fa0e7fd87032d9cf86e60c4288a637e
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2 on 2021-05-13 19:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scrapers', '0008_retsinfodocument_scrapers_re_search__7f46e2_gin'), ] operations = [ migrations.AddField( model_name='retsinfodocu...
24.76
77
0.605816
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scrapers', '0008_retsinfodocument_scrapers_re_search__7f46e2_gin'), ] operations = [ migrations.AddField( model_name='retsinfodocument', name='created_at', ...
true
true
f7603717b4d89d207e55c412c8b88bdfdf84c26c
4,392
py
Python
pygpu/tests/test_parser.py
mdda/libgpuarray
5e9d33b3ad80684158938c2937a81161939992eb
[ "0BSD" ]
null
null
null
pygpu/tests/test_parser.py
mdda/libgpuarray
5e9d33b3ad80684158938c2937a81161939992eb
[ "0BSD" ]
null
null
null
pygpu/tests/test_parser.py
mdda/libgpuarray
5e9d33b3ad80684158938c2937a81161939992eb
[ "0BSD" ]
null
null
null
from pygpu.parser import Compiler OPERATORS = ['+', '-', '*', '/', '%', '//', '**', 'or', 'and', 'is', 'is not', '<', '<=', '>', '>=', '!=', '==', '|', '^', '&', '<<', '>>'] PREFIXES = ['+', '-', 'not ', '~'] def test_operators(): for op in OPERATORS: yield operators, op def operators(op): ...
23.486631
78
0.511384
from pygpu.parser import Compiler OPERATORS = ['+', '-', '*', '/', '%', '//', '**', 'or', 'and', 'is', 'is not', '<', '<=', '>', '>=', '!=', '==', '|', '^', '&', '<<', '>>'] PREFIXES = ['+', '-', 'not ', '~'] def test_operators(): for op in OPERATORS: yield operators, op def operators(op): ...
true
true
f76037292363b0afff9d1f6df395470fec99c0f3
2,733
py
Python
auth0/v3/test/management/test_resource_servers.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
auth0/v3/test/management/test_resource_servers.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
auth0/v3/test/management/test_resource_servers.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
import unittest import mock from ...management.resource_servers import ResourceServers class TestResourceServers(unittest.TestCase): @mock.patch('auth0.v3.management.resource_servers.RestClient') def test_create(self, mock_rc): mock_instance = mock_rc.return_value r = ResourceServers(domain='...
31.056818
75
0.604464
import unittest import mock from ...management.resource_servers import ResourceServers class TestResourceServers(unittest.TestCase): @mock.patch('auth0.v3.management.resource_servers.RestClient') def test_create(self, mock_rc): mock_instance = mock_rc.return_value r = ResourceServers(domain='...
true
true
f76037be4467b698f73c17306d08dba5c08d6ea2
11
py
Python
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Scikit-learn/garbage files/inicio.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
print("ff")
11
11
0.636364
print("ff")
true
true
f76037e9a5e0e5118ca154bca82d4a9805b1105c
5,067
py
Python
assets/resource.py
mhallo/concourse-hangouts-resource
f21dc5e558045bf17464b41aa174b73e6efc1973
[ "BSD-2-Clause" ]
6
2018-05-20T08:06:58.000Z
2021-02-23T14:17:02.000Z
assets/resource.py
mhallo/concourse-hangouts-resource
f21dc5e558045bf17464b41aa174b73e6efc1973
[ "BSD-2-Clause" ]
3
2018-09-04T14:09:14.000Z
2018-11-23T13:46:22.000Z
assets/resource.py
mhallo/concourse-hangouts-resource
f21dc5e558045bf17464b41aa174b73e6efc1973
[ "BSD-2-Clause" ]
5
2018-09-04T13:19:35.000Z
2021-10-01T07:30:13.000Z
#!/usr/bin/env python3 from __future__ import print_function import json import os import sys import requests import traceback class GoogleChatNotifyResource: """Notify resource implementation.""" def send(self, url, msg): """Construct the webhook request and send it.""" headers = {'Content-...
36.985401
122
0.595027
from __future__ import print_function import json import os import sys import requests import traceback class GoogleChatNotifyResource: def send(self, url, msg): headers = {'Content-Type': 'application/json; charset=UTF-8'} body = {'text': msg} response = requests.request("POST", url, j...
true
true
f760382b25862998c2a6f1f8a21ae7cb990cf4bb
907
py
Python
selfcare/ecommerce/form.py
Edmar-Sousa/selfcare
86982a055089840c2d39b3acab6869cf682b147c
[ "MIT" ]
null
null
null
selfcare/ecommerce/form.py
Edmar-Sousa/selfcare
86982a055089840c2d39b3acab6869cf682b147c
[ "MIT" ]
null
null
null
selfcare/ecommerce/form.py
Edmar-Sousa/selfcare
86982a055089840c2d39b3acab6869cf682b147c
[ "MIT" ]
null
null
null
from django import forms from .models import UserModel choices = [('vendedor', 'vendedor'), ('cliente', 'cliente')] class RegisterUser(forms.Form): imageuser = forms.ImageField() username = forms.CharField(max_length=255) email = forms.EmailField() password = forms.CharField() status = f...
30.233333
76
0.693495
from django import forms from .models import UserModel choices = [('vendedor', 'vendedor'), ('cliente', 'cliente')] class RegisterUser(forms.Form): imageuser = forms.ImageField() username = forms.CharField(max_length=255) email = forms.EmailField() password = forms.CharField() status = f...
true
true
f76038314bf3c1c19e83e6ee39e93c88415990e2
9,395
py
Python
intersight/model/tam_base_advisory_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/tam_base_advisory_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/tam_base_advisory_details_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
50.510753
1,678
0.639596
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) class Ta...
true
true
f7603968d5243284f053e554b86758f218477465
1,655
py
Python
test_bl_set.py
polyc/compilers-classifier
0d7b56a5196110459c9bbd0b9e358ec4ac269d42
[ "MIT" ]
null
null
null
test_bl_set.py
polyc/compilers-classifier
0d7b56a5196110459c9bbd0b9e358ec4ac269d42
[ "MIT" ]
null
null
null
test_bl_set.py
polyc/compilers-classifier
0d7b56a5196110459c9bbd0b9e358ec4ac269d42
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import random import joblib from sklearn.feature_extraction.text import * print('Libraries imported.') """#Import Dataset e print it""" filename = 'train_dataset.jsonl' db = pd.read_json(filename,lines=True) #print(db) filename='test_dataset_blind.jsonl' test_db = pd.read_js...
26.693548
84
0.761329
import numpy as np import pandas as pd import random import joblib from sklearn.feature_extraction.text import * print('Libraries imported.') filename = 'train_dataset.jsonl' db = pd.read_json(filename,lines=True) filename='test_dataset_blind.jsonl' test_db = pd.read_json(filename,lines=True) instructionExamples...
true
true
f7603969fa0436f444b4df93e7d138184969b35e
1,984
py
Python
other/dataflow_job.py
JochemMeeuwissen/airflow-training-skeleton
539c171949da3dfe83255a2155d59e99eea328e9
[ "Apache-2.0" ]
null
null
null
other/dataflow_job.py
JochemMeeuwissen/airflow-training-skeleton
539c171949da3dfe83255a2155d59e99eea328e9
[ "Apache-2.0" ]
null
null
null
other/dataflow_job.py
JochemMeeuwissen/airflow-training-skeleton
539c171949da3dfe83255a2155d59e99eea328e9
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import argparse import logging import apache_beam as beam from apache_beam.examples.cookbook.coders import JsonCoder from apache_beam.io import ReadFromText, BigQueryDisposition from apache_beam.io import WriteToBigQuery from apache_beam.options.pipeline_options import PipelineO...
39.68
310
0.702117
from __future__ import absolute_import import argparse import logging import apache_beam as beam from apache_beam.examples.cookbook.coders import JsonCoder from apache_beam.io import ReadFromText, BigQueryDisposition from apache_beam.io import WriteToBigQuery from apache_beam.options.pipeline_options import PipelineO...
true
true
f7603a6f75a2ed702d511fe29bc3c829ca7269d0
2,252
py
Python
server/api/v1/logs/views.py
DefenceLogic/Osmedeus
2aab82ea629016445d19afcfdd0e5917def19c6e
[ "MIT" ]
3,602
2018-11-10T18:09:14.000Z
2021-12-31T13:58:44.000Z
server/api/v1/logs/views.py
DefenceLogic/Osmedeus
2aab82ea629016445d19afcfdd0e5917def19c6e
[ "MIT" ]
187
2019-01-10T17:05:15.000Z
2021-12-23T11:59:22.000Z
server/api/v1/logs/views.py
DefenceLogic/Osmedeus
2aab82ea629016445d19afcfdd0e5917def19c6e
[ "MIT" ]
737
2018-11-15T14:15:22.000Z
2021-12-27T06:34:41.000Z
from rest_framework import generics, mixins from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.permissions import IsAuthenticated, IsAdminUser from rest_framework import serializers from api.models import Logs, Workspaces from core import utils from core import d...
29.246753
81
0.612789
from rest_framework import generics, mixins from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.permissions import IsAuthenticated, IsAdminUser from rest_framework import serializers from api.models import Logs, Workspaces from core import utils from core import d...
true
true
f7603cc1049048de6e8b2c24b0acac1e2d8f0746
490
py
Python
Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py
cerberus707/lab-python
ebba3c9cde873d70d4bb61084f79ce30b7f9e047
[ "Apache-2.0" ]
null
null
null
Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py
cerberus707/lab-python
ebba3c9cde873d70d4bb61084f79ce30b7f9e047
[ "Apache-2.0" ]
null
null
null
Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py
cerberus707/lab-python
ebba3c9cde873d70d4bb61084f79ce30b7f9e047
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import cgitb; cgitb.enable() print('Content-type: text/html\n') print( """<html> <head> <title>CGI 4 - CSS</title> <link rel="stylesheet" type="text/css" href="../css/estilo1.css"> </head> <body> <h1>Colocando CSS em um script a parte</h1> <hr> <p>Ola imagens CGI!</p> <di...
18.846154
101
0.604082
import cgitb; cgitb.enable() print('Content-type: text/html\n') print( """<html> <head> <title>CGI 4 - CSS</title> <link rel="stylesheet" type="text/css" href="../css/estilo1.css"> </head> <body> <h1>Colocando CSS em um script a parte</h1> <hr> <p>Ola imagens CGI!</p> <div class="wraptocenter"...
true
true