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
1c43298bed00cdb37ea907188f0a6c7890f1ffd1
12,765
py
Python
src/c3nav/editor/api.py
bate/c3nav
9a86dd3eaeb3a10af3c5fa869575ed1e9300465a
[ "Apache-2.0" ]
null
null
null
src/c3nav/editor/api.py
bate/c3nav
9a86dd3eaeb3a10af3c5fa869575ed1e9300465a
[ "Apache-2.0" ]
null
null
null
src/c3nav/editor/api.py
bate/c3nav
9a86dd3eaeb3a10af3c5fa869575ed1e9300465a
[ "Apache-2.0" ]
null
null
null
from itertools import chain from django.db.models import Prefetch, Q from rest_framework.decorators import detail_route, list_route from rest_framework.exceptions import PermissionDenied, ValidationError from rest_framework.generics import get_object_or_404 from rest_framework.response import Response from rest_framew...
45.106007
119
0.627889
from itertools import chain from django.db.models import Prefetch, Q from rest_framework.decorators import detail_route, list_route from rest_framework.exceptions import PermissionDenied, ValidationError from rest_framework.generics import get_object_or_404 from rest_framework.response import Response from rest_framew...
true
true
1c4329a9bd36f09a7c5e52e9bfeb15c30d5395fb
3,766
py
Python
python/smap/drivers/washingtonbpa.py
carlosduarteroa/smap
5760631dfaf3e85da26ce68bf542bf254bb92c80
[ "BSD-2-Clause" ]
null
null
null
python/smap/drivers/washingtonbpa.py
carlosduarteroa/smap
5760631dfaf3e85da26ce68bf542bf254bb92c80
[ "BSD-2-Clause" ]
null
null
null
python/smap/drivers/washingtonbpa.py
carlosduarteroa/smap
5760631dfaf3e85da26ce68bf542bf254bb92c80
[ "BSD-2-Clause" ]
null
null
null
""" Copyright (c) 2011, 2012, Regents of the University of California All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this l...
44.305882
114
0.674721
import urllib2 import logging from smap.driver import SmapDriver from smap.util import periodicSequentialCall from smap.contrib import dtutil class BPADriver(SmapDriver): def setup(self, opts): self.w = self.add_timeseries('/wind','MW',description='Total Wind Generation') self.h = self.add_timese...
true
true
1c4329acb597363d5b87ee67cdeb44ad2032ba5e
517
py
Python
reloadAll.py
elpie89/MaxToolsUpdater
a8ba5437b3005bbc79992f0ac7a8723b68680525
[ "Apache-2.0" ]
null
null
null
reloadAll.py
elpie89/MaxToolsUpdater
a8ba5437b3005bbc79992f0ac7a8723b68680525
[ "Apache-2.0" ]
null
null
null
reloadAll.py
elpie89/MaxToolsUpdater
a8ba5437b3005bbc79992f0ac7a8723b68680525
[ "Apache-2.0" ]
null
null
null
import os # we use os.path.join, os.path.basename import sys # we use sys.path import glob # we use glob.glob import importlib # we use importlib.import_module projectFolder = os.path.join(os.path.dirname(__file__),"src") sys.path.append(projectFolder) # this tells python to look in `import_folder` for imports for src...
43.083333
89
0.748549
import os import sys import glob import importlib projectFolder = os.path.join(os.path.dirname(__file__),"src") sys.path.append(projectFolder) for src_file in glob.glob(os.path.join(projectFolder, '*.py')): name = os.path.basename(src_file)[:-3] importlib.import_module(name) reload(sys.modules[name]) ...
true
true
1c4329c02e4844c5e0af2d6a1ba24d97c83766f1
566
py
Python
Python/PythonApp/rename.py
nanhuayu/hello-world
4c97477d72cc5d46b65ab3a36b10f6b7dfff3e95
[ "MIT" ]
null
null
null
Python/PythonApp/rename.py
nanhuayu/hello-world
4c97477d72cc5d46b65ab3a36b10f6b7dfff3e95
[ "MIT" ]
null
null
null
Python/PythonApp/rename.py
nanhuayu/hello-world
4c97477d72cc5d46b65ab3a36b10f6b7dfff3e95
[ "MIT" ]
null
null
null
#-*- coding: UTF-8 -*- import os; def rename(): count = 0; path=os.getcwd(); filelist=os.listdir(path)#该文件夹下所有的文件(包括文件夹) for files in filelist:#遍历所有文件 Olddir=os.path.join(path,files);#原来的文件路径 if os.path.isdir(Olddir):#如果是文件夹则跳过 continue; filename=os.path.splitext(fi...
25.727273
66
0.595406
import os; def rename(): count = 0; path=os.getcwd(); filelist=os.listdir(path) for files in filelist: Olddir=os.path.join(path,files); if os.path.isdir(Olddir): continue; filename=os.path.splitext(files)[0]; filetype=os.path.splitext(files)[1]; if ...
true
true
1c432a70566fcc28b0fa0efcb500e4f4da1ac4c8
275
py
Python
17.Python for Automation/04.Automating with APIs/02.working_with_API_keys.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
17.Python for Automation/04.Automating with APIs/02.working_with_API_keys.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
17.Python for Automation/04.Automating with APIs/02.working_with_API_keys.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
import requests import json base_url = "http://api.openweathermap.org/data/2.5/forecast" APP_ID = "your_own_id" parameters = {"appid": APP_ID, "q": "Singapore"} response = requests.get(base_url, params=parameters) print(json.dumps(json.loads(response.content), indent=1))
25
60
0.749091
import requests import json base_url = "http://api.openweathermap.org/data/2.5/forecast" APP_ID = "your_own_id" parameters = {"appid": APP_ID, "q": "Singapore"} response = requests.get(base_url, params=parameters) print(json.dumps(json.loads(response.content), indent=1))
true
true
1c432a895617a75e605c71e8d82467918f9d18b3
1,287
py
Python
brmflask/blueprints/static/views.py
BRMWebDev/BRMFlask
203031aae8a2d2db3c435bb6b39ccda6a90913a1
[ "MIT" ]
1
2016-09-14T19:20:07.000Z
2016-09-14T19:20:07.000Z
brmflask/blueprints/static/views.py
BRMWebDev/BRMFlask
203031aae8a2d2db3c435bb6b39ccda6a90913a1
[ "MIT" ]
1
2018-06-12T14:06:01.000Z
2018-06-12T14:06:01.000Z
brmflask/blueprints/static/views.py
brmullikin/BRMFlask
203031aae8a2d2db3c435bb6b39ccda6a90913a1
[ "MIT" ]
null
null
null
"""Blueprint: static views.""" from flask import ( make_response, render_template, jsonify, current_app, abort ) from brmflask.utils.routing import template_path from . import static @static.route('/list-configs') def list_configs(): """Return the config dictionary if in Debug mode.""" if ...
25.74
76
0.61927
from flask import ( make_response, render_template, jsonify, current_app, abort ) from brmflask.utils.routing import template_path from . import static @static.route('/list-configs') def list_configs(): if current_app.debug: return jsonify(current_app.config) else: abort(40...
true
true
1c432aaff07554254b56f50f567f20d8c2595cdc
7,611
py
Python
readability_transformers/features/lf/Syntactic/PhrF.py
OneTheta/readability-transformers
3c122c98a90c67add8eafad16563b269d5e3124a
[ "Apache-2.0" ]
1
2022-01-26T10:55:59.000Z
2022-01-26T10:55:59.000Z
readability_transformers/features/lf/Syntactic/PhrF.py
OneTheta/readability-transformers
3c122c98a90c67add8eafad16563b269d5e3124a
[ "Apache-2.0" ]
null
null
null
readability_transformers/features/lf/Syntactic/PhrF.py
OneTheta/readability-transformers
3c122c98a90c67add8eafad16563b269d5e3124a
[ "Apache-2.0" ]
2
2021-10-14T22:53:57.000Z
2022-01-26T10:53:32.000Z
# -*- coding: UTF-8 -*- """ Software: LingFeat - Comprehensive Linguistic Features for Readability Assessment Page: PhrF.py (Phrasal Features) License: CC-BY-SA 4.0 Original Author: Bruce W. Lee (이웅성) @brucewlee Affiliation 1: LXPER AI, Seoul, South Korea Affiliation 2: University of Pennsylvania, PA, USA Contributing...
46.127273
190
0.681119
from ..utils import division def retrieve(SuPar, sent_token_list, n_token, n_sent): to_NoPhr_C = 0 to_VePhr_C = 0 to_SuPhr_C = 0 to_PrPhr_C = 0 to_AjPhr_C = 0 to_AvPhr_C = 0 for sent in sent_token_list: dataset = SuPar.predict([sent], prob=True, verbose=False) parsed_tree =...
true
true
1c432b06b387490c72510d448aefe7e7c3c08760
949
py
Python
arrays/kids_candies.py
wtlow003/leetcode-daily
e1d9c74b55e5b3106731a324d70a510e03b3b21f
[ "MIT" ]
null
null
null
arrays/kids_candies.py
wtlow003/leetcode-daily
e1d9c74b55e5b3106731a324d70a510e03b3b21f
[ "MIT" ]
null
null
null
arrays/kids_candies.py
wtlow003/leetcode-daily
e1d9c74b55e5b3106731a324d70a510e03b3b21f
[ "MIT" ]
1
2022-01-05T17:52:41.000Z
2022-01-05T17:52:41.000Z
""" 1431. Kids With the Greatest Number of Candies Given the array candies and the integer extraCandies, where candies[i] represents the number of candies that the ith kid has. For each kid check if there is a way to distribute extraCandies among the kids such that he or she can have the greatest number of candies am...
30.612903
83
0.724974
class Solution: def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]: arr = [] for candy in candies: increase_candy = candy + extraCandies arr.append(increase_candy >= max(candies)) return arr
true
true
1c432b1c13b25e0bb055da76df5793b653390c8a
3,345
py
Python
setup.py
OceanPang/qdtrack
b905d2a599a87242d9cf3d01b1833eff155bf688
[ "Apache-2.0" ]
241
2020-11-28T03:28:03.000Z
2022-03-31T13:27:01.000Z
setup.py
msg4rajesh/qdtrack
b28af06c7fdb6ce99b967302c0c7e9a557d508bf
[ "Apache-2.0" ]
61
2020-12-11T20:04:18.000Z
2022-03-05T13:49:05.000Z
setup.py
msg4rajesh/qdtrack
b28af06c7fdb6ce99b967302c0c7e9a557d508bf
[ "Apache-2.0" ]
37
2020-12-26T08:41:54.000Z
2022-03-29T21:52:44.000Z
import os import subprocess import time from setuptools import find_packages, setup def readme(): with open('README.md', encoding='utf-8') as f: content = f.read() return content version_file = 'qdtrack/version.py' def get_git_hash(): def _minimal_ext_cmd(cmd): # construct minimal env...
28.589744
77
0.571001
import os import subprocess import time from setuptools import find_packages, setup def readme(): with open('README.md', encoding='utf-8') as f: content = f.read() return content version_file = 'qdtrack/version.py' def get_git_hash(): def _minimal_ext_cmd(cmd): env = {} ...
true
true
1c432b857ecf1b0513a984dd6a0888ac62e3d769
4,980
py
Python
model_zoo/official/cv/retinanet/eval.py
kungfu-team/mindspore-bert
71501cf52ae01db9d6a73fb64bcfe68a6509dc32
[ "Apache-2.0" ]
2
2021-07-08T13:10:42.000Z
2021-11-08T02:48:57.000Z
model_zoo/official/cv/retinanet/eval.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
model_zoo/official/cv/retinanet/eval.py
peixinhou/mindspore
fcb2ec2779b753e95c762cf292b23bd81d1f561b
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
43.684211
115
0.644779
import os import argparse import time import numpy as np from mindspore import context, Tensor from mindspore.train.serialization import load_checkpoint, load_param_into_net from src.retinanet import retinanet50, resnet50, retinanetInferWithDecoder from src.dataset import create_retinanet_dataset, data...
true
true
1c432bcae48e4b7101e228590bdfc40cee2ef124
1,622
py
Python
CK_MainScript.py
KL-Turner/machL-Sleep-Scoring
48a43bba32ee265b48b3fda666a1a92a2fe93032
[ "MIT" ]
null
null
null
CK_MainScript.py
KL-Turner/machL-Sleep-Scoring
48a43bba32ee265b48b3fda666a1a92a2fe93032
[ "MIT" ]
null
null
null
CK_MainScript.py
KL-Turner/machL-Sleep-Scoring
48a43bba32ee265b48b3fda666a1a92a2fe93032
[ "MIT" ]
null
null
null
""" Written by Christina Echagarruga and Kevin L. Turner Purpose: apply all the necessary pre-processing steps for the matlab -> python workflow to sleep score Inputs: n matlab files with the extension PythonData.mat, and one file titled animalNotes_baselines.mat with the time indeces and filenames for re...
47.705882
130
0.795931
from PreProcData import ConvMAT2CSV from PreProcData import CalcRestingBaselines from PreProcData import NormalizeData rootDir = '/Users/kevinturner/Documents/Jupyter Sleep Scoring/' codeDir = '/Users/kevinturner/Documents/Core-Analysis/Spyder/' ConvMAT2CSV(rootDir, codeDir) uniqueDayArray = CalcRestingBaseline...
true
true
1c432ce5d445e34617ca5e5e4d09085f17c8434a
5,251
py
Python
src/sagemaker/mxnet/model.py
evanfwelch/sagemaker-python-sdk
8b3d113a23c09995c6a6a5d12d4364e27bfd549d
[ "Apache-2.0" ]
null
null
null
src/sagemaker/mxnet/model.py
evanfwelch/sagemaker-python-sdk
8b3d113a23c09995c6a6a5d12d4364e27bfd549d
[ "Apache-2.0" ]
2
2018-04-09T17:53:10.000Z
2018-04-09T17:53:38.000Z
src/sagemaker/mxnet/model.py
evanfwelch/sagemaker-python-sdk
8b3d113a23c09995c6a6a5d12d4364e27bfd549d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
54.697917
118
0.703675
from __future__ import absolute_import import sagemaker from sagemaker.fw_utils import create_image_uri, model_code_key_prefix from sagemaker.model import FrameworkModel, MODEL_SERVER_WORKERS_PARAM_NAME from sagemaker.mxnet.defaults import MXNET_VERSION from sagemaker.predictor import RealTimePredictor, js...
true
true
1c432e7d125192df507522f510ae7b88db0c26f1
83
py
Python
import_coords/__main__.py
gwvsol/ImportingCSVtoPostgres
0d23418b5f7c2c981b020d7e3d5a76905ebf0d45
[ "MIT" ]
null
null
null
import_coords/__main__.py
gwvsol/ImportingCSVtoPostgres
0d23418b5f7c2c981b020d7e3d5a76905ebf0d45
[ "MIT" ]
null
null
null
import_coords/__main__.py
gwvsol/ImportingCSVtoPostgres
0d23418b5f7c2c981b020d7e3d5a76905ebf0d45
[ "MIT" ]
null
null
null
from .import_coords import run_import if __name__ == "__main__": run_import()
16.6
37
0.73494
from .import_coords import run_import if __name__ == "__main__": run_import()
true
true
1c432f914ed6c58dcddeaca1299901b49420cd1b
315
py
Python
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
1
2019-04-01T05:52:37.000Z
2019-04-01T05:52:37.000Z
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
1
2015-03-11T16:18:12.000Z
2015-03-11T16:18:12.000Z
sokoapp/blog/admin_forms.py
Mercy-Nekesa/sokoapp
6c7bc4c1278b7223226124a49fc33c5b8b6b617a
[ "MIT" ]
null
null
null
from django import forms from mptt.forms import TreeNodeChoiceField from models import Category class CategoryForm(forms.ModelForm): parent = TreeNodeChoiceField(queryset=Category.objects.all(), level_indicator=3*unichr(160), empty_label='---------', required=False) class Meta: model = Category
28.636364
137
0.749206
from django import forms from mptt.forms import TreeNodeChoiceField from models import Category class CategoryForm(forms.ModelForm): parent = TreeNodeChoiceField(queryset=Category.objects.all(), level_indicator=3*unichr(160), empty_label='---------', required=False) class Meta: model = Category
true
true
1c432fd8aafbe155c419a37e9a6e28ef223f4100
2,275
py
Python
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/raw_data_retrieve_start_result_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
59.868421
845
0.782857
import unittest from netapp.santricity.models.symbol.raw_data_retrieve_start_result import RawDataRetrieveStartResult class RawDataRetrieveStartResultTest(unittest.TestCase): def test_raw_data_retrieve_start_result(self): raw_data_retrieve_start_result_obj = RawDataRetrieveStartRe...
true
true
1c43316ba426e186d7d74059eb7f554612fcaa26
52,235
py
Python
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
swift/common/swob.py
steveruckdashel/swift
91d04ce611b10a9403ff36ada40899414b011d08
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
37.606192
79
0.593414
from collections import defaultdict from cStringIO import StringIO import UserDict import time from functools import partial from datetime import datetime, timedelta, tzinfo from email.utils import parsedate import urlparse import urllib2 import re import random import functools import inspect from swi...
true
true
1c4331b3340c76fc2bb61a1cbefe73cd7b1a46bd
1,663
py
Python
dvc/render/image_converter.py
itcarroll/dvc
55219e9089005ac15d668ecf735aeaf31a771d0b
[ "Apache-2.0" ]
null
null
null
dvc/render/image_converter.py
itcarroll/dvc
55219e9089005ac15d668ecf735aeaf31a771d0b
[ "Apache-2.0" ]
41
2021-11-16T15:38:50.000Z
2022-03-30T10:32:14.000Z
dvc/render/image_converter.py
jhhuh/dvc
fecc81e951efeaa8130264f726c27e92876422ae
[ "Apache-2.0" ]
null
null
null
import base64 import os from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from dvc.render import FILENAME_FIELD, REVISION_FIELD, SRC_FIELD if TYPE_CHECKING: from dvc.types import StrPath class ImageConverter: def __init__(self, plot_properties: Optional[Dict] = None): self.plot_propertie...
28.186441
64
0.594708
import base64 import os from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from dvc.render import FILENAME_FIELD, REVISION_FIELD, SRC_FIELD if TYPE_CHECKING: from dvc.types import StrPath class ImageConverter: def __init__(self, plot_properties: Optional[Dict] = None): self.plot_propertie...
true
true
1c4331f767c85c11f71d344660c6f4ec8a44f48d
636
py
Python
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
109
2020-10-03T16:41:30.000Z
2021-09-16T21:03:34.000Z
zeitsprung/base.py
munterfinger/zeitsprung
8b1a539069cd0d5508b5ce419fc2ba8c26aaecf2
[ "MIT" ]
null
null
null
from datetime import datetime, timezone class Base: """Base class for 'zeitsprung-fm' package classes.""" def __init__(self, verbose: bool = True) -> None: """ Class constructor for the Base class. Parameters ---------- verbose : bool, default True Print m...
24.461538
95
0.575472
from datetime import datetime, timezone class Base: def __init__(self, verbose: bool = True) -> None: self.verbose = verbose def _print(self, message: str) -> None: if self.verbose: print(f'{datetime.now(timezone.utc).replace(microsecond=0).isoformat()} {message}')
true
true
1c43340b8e297014f5f5b70a00221b88898d6631
835
py
Python
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
1
2020-11-07T15:53:19.000Z
2020-11-07T15:53:19.000Z
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
null
null
null
predict_orbit_BCBF.py
janismac/ksp_rtls_launch_to_rendezvous
195ebfb5aacf1a857aaaf0a69bf071d93d887efd
[ "Apache-2.0" ]
1
2020-11-07T15:56:06.000Z
2020-11-07T15:56:06.000Z
import numpy as np import scipy.integrate def predict_orbit_BCBF(vessel, frame): r0 = vessel.position(frame) v0 = vessel.velocity(frame) omega = vessel.orbit.body.rotational_speed mu = vessel.orbit.body.gravitational_parameter y0 = list(r0)+list(v0) t_grid = np.arange(0.0,60.0*20,5.0) re...
29.821429
116
0.657485
import numpy as np import scipy.integrate def predict_orbit_BCBF(vessel, frame): r0 = vessel.position(frame) v0 = vessel.velocity(frame) omega = vessel.orbit.body.rotational_speed mu = vessel.orbit.body.gravitational_parameter y0 = list(r0)+list(v0) t_grid = np.arange(0.0,60.0*20,5.0) re...
true
true
1c4334625377c3c0e7ac7312e2837d4a6d25667d
1,151
py
Python
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
null
null
null
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
1
2020-12-17T02:09:29.000Z
2020-12-17T02:09:29.000Z
tests/utils.py
SE2020Fall-Group1/BaiTuanTong-Backend
8e2575332ff9c3d8c7b7412376b5105c4c68cc95
[ "MIT" ]
null
null
null
from exts import db from app.models import User, Preference, Club, Post, Like, Comment def add_items(): u1 = User(id=1, username='jhc', password='hehehe', email='jhc@pku.edu.cn') u2 = User(id=2, username='gf', password='gagaga', email='gf@stu.pku.edu.cn') u3 = User(id=3, username='zhp', password='hailjd',...
37.129032
82
0.655951
from exts import db from app.models import User, Preference, Club, Post, Like, Comment def add_items(): u1 = User(id=1, username='jhc', password='hehehe', email='jhc@pku.edu.cn') u2 = User(id=2, username='gf', password='gagaga', email='gf@stu.pku.edu.cn') u3 = User(id=3, username='zhp', password='hailjd',...
true
true
1c433609b1e3a76fc08d0fd1cbd6dafcf08efe6a
11,179
py
Python
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
2
2021-09-04T03:39:26.000Z
2021-09-05T00:29:20.000Z
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
4
2021-09-04T07:50:41.000Z
2021-09-05T09:35:20.000Z
myems-api/reports/meterrealtime.py
MyEMS/MyEMS
00263969a32e02293025880403b6657a65c1585b
[ "MIT" ]
2
2021-09-03T00:01:17.000Z
2021-09-06T06:38:20.000Z
import re import falcon import simplejson as json import mysql.connector import config from datetime import datetime, timedelta, timezone class Reporting: @staticmethod def __init__(): """"Initializes Reporting""" pass @staticmethod def on_options(req, resp): resp.status = fal...
49.684444
120
0.469631
import re import falcon import simplejson as json import mysql.connector import config from datetime import datetime, timedelta, timezone class Reporting: @staticmethod def __init__(): pass @staticmethod def on_options(req, resp): resp.status = falcon.HTTP_200
true
true
1c4336b105b492bd501735393b32c1a2be626606
5,514
py
Python
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
1
2022-01-27T14:51:18.000Z
2022-01-27T14:51:18.000Z
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
null
null
null
dags/acona_notifications.py
acolono/ACONA-scheduler-intelligence
1ccaaca21a2b4e10b30242294d5fc8dc087dbd8d
[ "Apache-2.0" ]
null
null
null
from airflow.decorators import dag, task from airflow.utils.dates import days_ago from airflow.operators.bash import BashOperator from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.models import Variable from datetime import datet...
38.830986
143
0.591222
from airflow.decorators import dag, task from airflow.utils.dates import days_ago from airflow.operators.bash import BashOperator from airflow.providers.postgres.operators.postgres import PostgresOperator from airflow.hooks.postgres_hook import PostgresHook from airflow.models import Variable from datetime import datet...
true
true
1c4336c8355df8a2828caa6afe949180f0053eaa
3,088
py
Python
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
2
2021-01-15T15:58:44.000Z
2021-04-15T15:29:04.000Z
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
null
null
null
Beginner Python projects/Tip Calculator/tip.py
manish1822510059/build-10-python-beginner-projects
999363f332069a8266dfab1504f16c3193272ea0
[ "MIT" ]
null
null
null
from tkinter import Tk,Radiobutton, Button,Label,StringVar,IntVar,Entry class TipCalculator(): def __init__(self): window = Tk() window.title("Tip Calculator App") window.configure(background="sky blue") window.geometry("375x250") window.resizable(width=False,height=...
35.906977
103
0.647668
from tkinter import Tk,Radiobutton, Button,Label,StringVar,IntVar,Entry class TipCalculator(): def __init__(self): window = Tk() window.title("Tip Calculator App") window.configure(background="sky blue") window.geometry("375x250") window.resizable(width=False,height=...
true
true
1c4336de70a1d80e4e3fa9569e8ca3984e4bbef7
5,855
py
Python
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
tests/build_test_db.py
zhongxinghong/EECS-Volunteer-Reservation-2-Backend
e468aff0f33760432326a8b355ef8ed028b96bdf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # filename: build_test_db.py # modified: 2019-10-29 import sys sys.path.append("../") from pprint import pprint from flask import current_app from requests.sessions import Session from requests.compat import json from app import create_app, db from app.models import Adm...
25.34632
86
0.616225
import sys sys.path.append("../") from pprint import pprint from flask import current_app from requests.sessions import Session from requests.compat import json from app import create_app, db from app.models import Admin, User from app.core.const import SAFETY_PROFILE from app.core.exceptions import Success BA...
true
true
1c433737047e09d318ff08a65f9b1dc95a9604fc
2,229
py
Python
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
src/continuous_scheduler.py
tdm-project/tdm-energy-consumption-report
a36c42b87f9eccd6feeb7f4049537a0ce41007d2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2018-2022, CRS4 - Center for Advanced Studies, Research and Development in Sardinia # # 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...
35.380952
96
0.493046
import sched from time import sleep, time class TaskWrapper(object): def __init__(self, task, period, priority, scheduler, *args, **kwargs): self._task = task self._period = period self._priority = priority self._scheduler = scheduler self._args...
true
true
1c4337947826be9ce90962a0fce2550f49d15f6b
3,284
py
Python
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
python3/koans/about_strings.py
StevenLeighton21/mentoring-python-koans
944275bd4d0e86455faf18135245ad3343b1bb0d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStrings(Koan): # def test_show_us_what_strings_do(self): # a = 1 # print(string1 = "a == {a}") # print(string2 = 'a == {a}') # print(string3 = """a == {a}""") def test_double_quoted_strings_are_...
32.84
85
0.637028
from runner.koan import * class AboutStrings(Koan): def test_double_quoted_strings_are_strings(self): string = "Hello, world." self.assertEqual(True, isinstance(string, str)) def test_single_quoted_strings_are_also_strings(self): string = 'Goodbye, world.' ...
true
true
1c433794e4e123470798b01d9ce643005c276372
3,411
py
Python
examples/color/colormaps_reference.py
mkcor/matplotlib
016a4e350cf48aa6ebb969abfcb3cee1904969e4
[ "MIT", "BSD-3-Clause" ]
16
2016-06-14T19:45:35.000Z
2020-11-30T19:02:58.000Z
Documentation/matplotlib/mpl_examples/color/colormaps_reference.py
leesavide/pythonista-docs
9ec3363f07e328bde0a58738a16907f11dfd06e1
[ "Apache-2.0" ]
1
2016-06-15T07:10:27.000Z
2016-06-15T07:10:27.000Z
Documentation/matplotlib/mpl_examples/color/colormaps_reference.py
leesavide/pythonista-docs
9ec3363f07e328bde0a58738a16907f11dfd06e1
[ "Apache-2.0" ]
null
null
null
""" Reference for colormaps included with Matplotlib. This reference example shows all colormaps included with Matplotlib. Note that any colormap listed here can be reversed by appending "_r" (e.g., "pink_r"). These colormaps are divided into the following categories: Sequential: These colormaps are approximately...
42.6375
79
0.620053
import numpy as np import matplotlib.pyplot as plt cmaps = [('Sequential', ['binary', 'Blues', 'BuGn', 'BuPu', 'gist_yarg', 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', 'Reds', 'YlG...
true
true
1c4337a1a0edfb82064a32346d4a3f22552cfa5d
900
py
Python
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
LintCode/1282.py
RENHANFEI/LintCode
d572dee248ba4c2a95b52cd737d76c7297f4e7b4
[ "CNRI-Python" ]
null
null
null
class Solution: """ @param s: a string @return: reverse only the vowels of a string """ def reverseVowels(self, s): vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] vowels_positions = [] vowels_in_string = [] for i, ss in enumerate(s): ...
28.125
68
0.465556
class Solution: def reverseVowels(self, s): vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] vowels_positions = [] vowels_in_string = [] for i, ss in enumerate(s): if ss in vowels: vowels_positions.append(i) vow...
true
true
1c433806301ab740218f064066f85c2ca5542cfa
1,283
py
Python
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
custom_components/volkswagencarnet/switch.py
hwikene/homeassistant-volkswagencarnet
9eb180c5246abd1d52de3243fdf96cfdb5e4d776
[ "Apache-2.0" ]
null
null
null
""" Support for Volkswagen Carnet Platform """ import logging from homeassistant.helpers.entity import ToggleEntity from . import DATA_KEY, VolkswagenEntity _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): """ Setup the volkswagen swit...
29.159091
86
0.691348
import logging from homeassistant.helpers.entity import ToggleEntity from . import DATA_KEY, VolkswagenEntity _LOGGER = logging.getLogger(__name__) async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): if discovery_info is None: return async_add_entities([Volkswagen...
true
true
1c433874685941350d69a0a92f89662ea9766734
3,642
py
Python
django/template/context.py
huicheese/Django-test3
ac11d2dce245b48392e52d1f4acfd5e7433b243e
[ "BSD-3-Clause" ]
2
2021-04-27T03:57:00.000Z
2021-06-18T09:39:58.000Z
django/template/context.py
oppian/django
8a60ad2e421b76942b4dadcd74bbe387a1f9a9f9
[ "BSD-3-Clause" ]
null
null
null
django/template/context.py
oppian/django
8a60ad2e421b76942b4dadcd74bbe387a1f9a9f9
[ "BSD-3-Clause" ]
2
2021-09-06T18:44:45.000Z
2022-02-24T04:10:10.000Z
from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module _standard_context_processors = None class ContextPopException(Exception): "pop() has been called more times than push()" pass class Context(object): "A stack container for variable context" def __...
33.722222
124
0.633992
from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module _standard_context_processors = None class ContextPopException(Exception): "pop() has been called more times than push()" pass class Context(object): "A stack container for variable context" def __...
false
true
1c4338ae38a6705f96e83955c78a4df816be2bda
915
py
Python
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
git_contributions_importer/generators/Generator.py
kennydukor/mock-repo
cb780885b32b48171285c7502b616635546d23b8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import random class Generator: def __init__(self): pass def random_string(self, length=10): return ''.join([chr(int(random.random() * (ord('z') - ord('a'))) + ord('a')) for c in range(length)]) def random_phrase(self, length=10, word_length=10): ...
32.678571
110
0.602186
import random class Generator: def __init__(self): pass def random_string(self, length=10): return ''.join([chr(int(random.random() * (ord('z') - ord('a'))) + ord('a')) for c in range(length)]) def random_phrase(self, length=10, word_length=10): return ' '.join([s...
true
true
1c43394790c2be2b49bba1d33554a2876abc4543
529
py
Python
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
2
2019-06-27T16:00:17.000Z
2020-08-14T07:46:05.000Z
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
26
2020-02-15T22:39:35.000Z
2022-02-19T21:09:01.000Z
diventi/landing/migrations/0078_auto_20200215_1909.py
flavoi/diven
3173ca3ca3fbedc191b8eab3639a6bceb3c442c4
[ "Apache-2.0" ]
1
2021-11-12T22:30:15.000Z
2021-11-12T22:30:15.000Z
# Generated by Django 2.2.10 on 2020-02-15 18:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('landing', '0077_auto_20190618_0829'), ] operations = [ migrations.AlterField( model_name='section', name='featured_...
27.842105
180
0.644612
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('landing', '0077_auto_20190618_0829'), ] operations = [ migrations.AlterField( model_name='section', name='featured_template', field=models.CharField(ch...
true
true
1c433ac930cb19d2d759684e1136fef5a382b3db
3,261
py
Python
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
unikastaroak/settings.py
bipoza/unikastaroak
4044d3ff3eaa4172275a8f46d9765a3840a51d7b
[ "Apache-2.0" ]
null
null
null
""" Django settings for unikastaroak project. Generated by 'django-admin startproject' using Django 1.11.7. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ #codi...
26.088
91
0.701625
import os SECURE_SSL_REDIRECT = True BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '1(o*qoluw*3i1brm0(+lum22k7v@jc+l(com94g5up$-*e_9bd' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', ...
true
true
1c433b4735f0971086fcc7a912331746ead9bc23
507
py
Python
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
null
null
null
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
null
null
null
clear_pay/cloudfix.py
utterclarity/clear-pay
45632839d9bca21e8f5760e683f027e72b3f9abf
[ "MIT" ]
1
2020-01-05T21:34:25.000Z
2020-01-05T21:34:25.000Z
# -*- coding: utf-8 -*- class CloudFix(object): """ Fixes the REMOTE_ADDR given if the app is run behind CloudFlare w/ nginx setting CF-Connecting-IP. """ def __init__(self, app): self.app = app def __call__(self, environ, start_response): connecting_ip = environ.get('HTTP_CF...
28.166667
64
0.64497
class CloudFix(object): def __init__(self, app): self.app = app def __call__(self, environ, start_response): connecting_ip = environ.get('HTTP_CF_CONNECTING_IP', '') if connecting_ip: environ['REMOTE_ADDR'] = connecting_ip return self.app(environ, start_response)...
true
true
1c433bc11c80dadd9785e0089ecbc09c6ace7239
1,465
py
Python
test.py
martinwe001/U-Net-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
3
2021-12-14T09:12:08.000Z
2022-03-14T11:31:13.000Z
test.py
martinwe001/CNNs-for-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
null
null
null
test.py
martinwe001/CNNs-for-Building-Segmentation
8bd32a8a2bca25a4c0bd9b22fee5a09d77bffbad
[ "MIT" ]
null
null
null
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" import tensorflow as tf import numpy as np import cv2 from glob import glob from tqdm import tqdm import tensorflow_addons as tfa if __name__ == "__main__": """ Load the test images """ test_images = glob("building-segmentation/test/test_64/*") """ Load ...
27.641509
152
0.606826
import os os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" import tensorflow as tf import numpy as np import cv2 from glob import glob from tqdm import tqdm import tensorflow_addons as tfa if __name__ == "__main__": test_images = glob("building-segmentation/test/test_64/*") model = 'unet' epochs = 300 res =...
true
true
1c433bffa908cc42bff4c65440b2b56678682692
1,975
py
Python
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
1
2022-01-08T01:38:57.000Z
2022-01-08T01:38:57.000Z
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
null
null
null
onnx_export/export_mobilenetv3_block.py
AndrewZhaoLuo/OnnxSnippets
40e2231da8dc3d9152bc71daff5f4b154b97a5e4
[ "BSD-3-Clause" ]
null
null
null
import torch from pytorch.common.blocks import mobilenetv3_block from onnx_export import common class ExportMobilenetV3: default_conditions = { "in_channels": 64, "spatial_dimension": 128, } sequential_conditions = { "in_channels": [32, 64, 128], } def get_all_conditions...
28.623188
85
0.585316
import torch from pytorch.common.blocks import mobilenetv3_block from onnx_export import common class ExportMobilenetV3: default_conditions = { "in_channels": 64, "spatial_dimension": 128, } sequential_conditions = { "in_channels": [32, 64, 128], } def get_all_conditions...
true
true
1c433e01186700b7be39cc948171e3292588ea2d
302
py
Python
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
34/digit_factorials.py
redfast00/euler
98fc49a1fcb8b49415cc4384952a6447378bd4f4
[ "MIT" ]
null
null
null
import math def is_digit_factorial_sum(number): return number == sum((math.factorial(int(i)) for i in str(number))) def find_digit_factorials_below(number): for i in range(10, number): if is_digit_factorial_sum(i): yield(i) print(sum(find_digit_factorials_below(10**7)))
25.166667
71
0.701987
import math def is_digit_factorial_sum(number): return number == sum((math.factorial(int(i)) for i in str(number))) def find_digit_factorials_below(number): for i in range(10, number): if is_digit_factorial_sum(i): yield(i) print(sum(find_digit_factorials_below(10**7)))
true
true
1c433e9c4c17c952afb97290afcb7754ed002175
12,575
py
Python
src/MSongsDB/Tasks_Demos/ArtistRecognition/process_test_set.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
1
2016-07-28T23:20:13.000Z
2016-07-28T23:20:13.000Z
src/MSongsDB/Tasks_Demos/ArtistRecognition/process_test_set.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
4
2020-11-18T21:14:32.000Z
2021-12-13T19:45:55.000Z
src/MSongsDB/Tasks_Demos/ArtistRecognition/process_test_set.py
lxchavez/Yeezy-Taught-Me
c08f09b773602ad252ed89f4d0c11677803487ce
[ "MIT" ]
null
null
null
""" Thierry Bertin-Mahieux (2011) Columbia University tb2332@columbia.edu Code to parse the whole testing set using a trained KNN and predict an artist. This is part of the Million Song Dataset project from LabROSA (Columbia University) and The Echo Nest. Copyright (c) 2011, Thierry Bertin-Mahieux, All Rights Reserv...
34.078591
107
0.640954
""" Thierry Bertin-Mahieux (2011) Columbia University tb2332@columbia.edu Code to parse the whole testing set using a trained KNN and predict an artist. This is part of the Million Song Dataset project from LabROSA (Columbia University) and The Echo Nest. Copyright (c) 2011, Thierry Bertin-Mahieux, All Rights Reserv...
false
true
1c433fa7868fe1c11080ceaef1de8eec4bb09f43
974
py
Python
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
applications/schemas/admin_power.py
jobeckham7/pear-admin-flask
c2042d5f8054be289a363283345ea05f27e00ec4
[ "MIT" ]
null
null
null
from applications.extensions import ma from marshmallow import fields # 权限models序列化类 class PowerSchema(ma.Schema): id = fields.Integer() title = fields.Str(attribute="name") type = fields.Str() code = fields.Str() href = fields.Str(attribute="url") openType = fields.Str(attribute="open_type") ...
29.515152
48
0.679671
from applications.extensions import ma from marshmallow import fields class PowerSchema(ma.Schema): id = fields.Integer() title = fields.Str(attribute="name") type = fields.Str() code = fields.Str() href = fields.Str(attribute="url") openType = fields.Str(attribute="open_type") parent_id ...
true
true
1c4340253aae3fe1b54ac0df1ebeba8097c29baa
9,152
py
Python
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
tensorlayer/app/computer_vision_object_detection/yolov4.py
dalonsoa/tensorlayer
066c09be1eea1b49914b2a6e806329a599edce58
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- """YOLOv4 for MS COCO. # Reference: - [tensorflow-yolov4-tflite]( https://github.com/hunglc007/tensorflow-yolov4-tflite) """ import tensorflow as tf import numpy as np import tensorlayer as tl from tensorlayer.activation import mish from tensorlayer.layers import Conv2d...
41.225225
116
0.666412
import tensorflow as tf import numpy as np import tensorlayer as tl from tensorlayer.activation import mish from tensorlayer.layers import Conv2d, MaxPool2d, BatchNorm2d, ZeroPad2d, UpSampling2d, Concat, Input, Elementwise from tensorlayer.models import Model from tensorlayer import logging INPUT_SIZE = 416 weights...
true
true
1c4340270dcdef2713ee8a18152ba3aebc09a59b
2,836
py
Python
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
pyventskalender/tag20.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
# Heute wollen wir ein externes Paket installieren. # # Dazu wird in Python `pip` verwendet. # # Setzt Datei virtualenv_und_pip.md voraus. # %% Venv erstellen -- Tests 10 20 # Damit man Pakete später wieder einfach löschen kann, legt man am besten ein # Virtual Environment an. # Das geht am besten in der Konsole power...
41.101449
98
0.744711
try: import requests from cat_fact.client import CatClient cat_client = CatClient(requests.Session(), "http://cat-fact.herokuapp.com") cat_client.get_random_fact("cat") except ImportError: "Katzen sind tolle Tiere" except ModuleNotFoundError: ...
true
true
1c43409cd5f286e144c46827ab418d817bfc839f
9,301
bzl
Python
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
2
2020-01-13T19:37:29.000Z
2021-01-18T05:52:44.000Z
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
null
null
null
experimental/python/wheel.bzl
Antobiotics/rules_python
4b84ad270387a7c439ebdccfd530e2339601ef27
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.321033
101
0.641006
def _path_inside_wheel(input_file): # manually instead of using short_path here. root = input_file.root.path if root != "": # TODO: '/' is wrong on windows, but the path separator is not available in skylark. # Fix this once ctx.configuration has directory separator ...
true
true
1c43435b0db90baabc818eeeb1b256f1f625d861
838
py
Python
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
app.py
ericsouza/flask-restful
906301b27fa9968b3a88db04820d437ebbc3767c
[ "MIT" ]
null
null
null
import os from flask import Flask from flask_restful import Api from flask_jwt import JWT from security import authenticate, identity from resources.user import UserRegister from resources.item import Item, ItemList from resources.store import Store, StoreList app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_UR...
29.928571
91
0.768496
import os from flask import Flask from flask_restful import Api from flask_jwt import JWT from security import authenticate, identity from resources.user import UserRegister from resources.item import Item, ItemList from resources.store import Store, StoreList app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_UR...
true
true
1c4343837fc4e55a0a92d392000573c4581268cb
2,673
py
Python
networkx/linalg/tests/test_spectrum.py
bjedwards/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
3
2016-02-06T01:18:41.000Z
2020-11-10T08:15:33.000Z
networkx/linalg/tests/test_spectrum.py
tomzhang/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
null
null
null
networkx/linalg/tests/test_spectrum.py
tomzhang/NetworkX_fork
6cb4465d73b8adc4692206fdbc8e1a3934d94fe6
[ "BSD-3-Clause" ]
7
2015-04-28T19:19:30.000Z
2022-02-06T11:46:29.000Z
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestSpectrum(object): @classmethod def setupClass(cls): global numpy global assert_equal global assert_almost_equal try: import numpy from...
36.616438
74
0.483726
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestSpectrum(object): @classmethod def setupClass(cls): global numpy global assert_equal global assert_almost_equal try: import numpy from...
true
true
1c4343ae4b115bd8ea517c39a6fe9b057f3ad62d
443
py
Python
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
randjsongenerator.py
vajgi90/Python_Scripting
b9852878f458b9ed75f0e1a7804cd5328df9a058
[ "MIT" ]
null
null
null
import random import os import json count = int(os.getenv("FILE_COUNT") or 100) words = [word.strip() for word in open('/usr/share/dict/words').readlines()] for identifier in range(count): amount = random.uniform(1.0, 1000) content = { 'topic': random.choice(words), 'value': "%.2f" % amount ...
24.611111
76
0.623025
import random import os import json count = int(os.getenv("FILE_COUNT") or 100) words = [word.strip() for word in open('/usr/share/dict/words').readlines()] for identifier in range(count): amount = random.uniform(1.0, 1000) content = { 'topic': random.choice(words), 'value': "%.2f" % amount ...
true
true
1c43444f6c249fc8b371b96fac7f8df903b98549
89
py
Python
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
16
2018-04-12T22:38:28.000Z
2020-08-19T16:06:33.000Z
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
36
2018-03-23T15:40:26.000Z
2021-06-10T17:51:23.000Z
src/fixture/apps.py
vineethvanga18/gymkhana_portal
9dcb108dab0fd9fe163c72013b6de3210d5c9cd5
[ "MIT" ]
46
2018-04-06T21:03:36.000Z
2021-11-03T04:39:27.000Z
from django.apps import AppConfig class FixtureConfig(AppConfig): name = 'fixture'
14.833333
33
0.752809
from django.apps import AppConfig class FixtureConfig(AppConfig): name = 'fixture'
true
true
1c4345873e6851e4aef8c0d19674b52cae299711
11,920
py
Python
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/databases/mysql_users.py
ahmednofal/grr
08a57f6873ee13f425d0106e4143663bc6dbdd60
[ "Apache-2.0" ]
2
2020-08-24T00:22:03.000Z
2020-11-14T08:34:43.000Z
#!/usr/bin/env python """The MySQL database methods for GRR users and approval handling.""" from __future__ import absolute_import from __future__ import unicode_literals import MySQLdb from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import random from grr_response_server import db from grr...
35.58209
80
0.660906
from __future__ import absolute_import from __future__ import unicode_literals import MySQLdb from grr_response_core.lib import rdfvalue from grr_response_core.lib.util import random from grr_response_server import db from grr_response_server.databases import mysql_utils from grr_response_server.rdfvalues import obj...
true
true
1c434822c8627f3057f2aef1288f8299aa05dbf6
1,931
py
Python
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
mmtbx/command_line/find_residue_in_pdb.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function from libtbx.utils import Sorry, Usage import libtbx.phil.command_line import sys master_phil = libtbx.phil.parse(""" resname = None .type = str d_max = None .type = float polymeric_type = *Any Free Polymeric .type = choice xray_only = True .type...
28.820896
78
0.688762
from __future__ import absolute_import, division, print_function from libtbx.utils import Sorry, Usage import libtbx.phil.command_line import sys master_phil = libtbx.phil.parse(""" resname = None .type = str d_max = None .type = float polymeric_type = *Any Free Polymeric .type = choice xray_only = True .type...
true
true
1c4349ace41d27f9430e4589be24e3400d7e2a91
500
py
Python
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
settings.py
Nehal90/Conference_Central
ac49f36a0e628a066988b7e6393bed29d4aecf23
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """settings.py Udacity conference server-side Python App Engine app user settings $Id$ created/forked from conference.py by wesc on 2014 may 24 """ # Replace the following lines with client IDs obtained from the APIs # Console or Cloud Console. WEB_CLIENT_ID = '72691056799-4vk1buhvl0r5hkkh04...
26.315789
89
0.788
WEB_CLIENT_ID = '72691056799-4vk1buhvl0r5hkkh04v7r26tv2m29p7k.apps.googleusercontent.com'
true
true
1c4349b3af412aec59ad5423ae460850b44d434f
2,807
py
Python
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
2
2019-10-08T18:59:15.000Z
2021-06-28T09:22:39.000Z
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
null
null
null
options/train_options.py
masontchen/GANPOP
235f1cb7bb14a7b62197114fbe39bfdd4736f5e3
[ "MIT" ]
2
2019-10-03T06:35:20.000Z
2020-08-18T12:44:23.000Z
from .base_options import BaseOptions class TrainOptions(BaseOptions): def initialize(self, parser): parser = BaseOptions.initialize(self, parser) parser.add_argument('--display_freq', type=int, default=400, help='frequency of showing training results on screen') parser.add_argument('--dis...
90.548387
175
0.705023
from .base_options import BaseOptions class TrainOptions(BaseOptions): def initialize(self, parser): parser = BaseOptions.initialize(self, parser) parser.add_argument('--display_freq', type=int, default=400, help='frequency of showing training results on screen') parser.add_argument('--dis...
true
true
1c434aa48f3265b229e2a4c8296bfe89aec06143
811
py
Python
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
null
null
null
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
1
2021-06-10T20:32:59.000Z
2021-06-10T20:32:59.000Z
nginx_rtmp_wizard/urls.py
Gerhut/nginx-rtmp-wizard
c821c3bb262503ee26408b8b3bf4a252b49a29d6
[ "Unlicense" ]
null
null
null
"""nginx_rtmp_wizard URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') C...
32.44
77
0.707768
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('', views.rtmp_conf), path('admin/', admin.site.urls), ]
true
true
1c434ae9bf00b2693b91079d22ca9150a3986139
5,459
gyp
Python
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
27
2016-04-27T01:02:03.000Z
2021-12-13T08:53:19.000Z
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
2
2017-03-09T09:00:50.000Z
2017-09-21T15:48:20.000Z
src/third_party/skia/gyp/images.gyp
neeker/chromium_extract
0f9a0206a1876e98cf69e03869983e573138284c
[ "BSD-3-Clause" ]
17
2016-04-27T02:06:39.000Z
2019-12-18T08:07:00.000Z
# Copyright 2015 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # GYP file for images project. { 'targets': [ { 'target_name': 'images', 'product_name': 'skia_images', 'type': 'static_library', 'standalone_static_library...
33.697531
90
0.532881
{ 'targets': [ { 'target_name': 'images', 'product_name': 'skia_images', 'type': 'static_library', 'standalone_static_library': 1, 'dependencies': [ 'core.gyp:*', 'giflib.gyp:giflib', 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', 'etc1.gyp...
true
true
1c434b5af497473b6ccd24c93ac7686c7ecb97f5
27,530
py
Python
airflow/providers/google/cloud/operators/workflows.py
Piatachock/airflow
6dd0a0df7e6a2f025e9234bdbf97b41e9b8f6257
[ "Apache-2.0" ]
3
2020-12-25T04:09:44.000Z
2021-04-02T13:37:42.000Z
airflow/providers/google/cloud/operators/workflows.py
XiangchunChen/airflow
56bdfe7a840c25360d596ca94fd11d2ccfadb4ba
[ "Apache-2.0" ]
5
2021-06-16T11:41:36.000Z
2022-01-27T17:20:37.000Z
airflow/providers/google/cloud/operators/workflows.py
XiangchunChen/airflow
56bdfe7a840c25360d596ca94fd11d2ccfadb4ba
[ "Apache-2.0" ]
2
2021-12-28T22:46:07.000Z
2022-01-08T13:29:00.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...
38.720113
104
0.663967
import hashlib import json import re import uuid from datetime import datetime, timedelta from typing import Dict, Optional, Sequence, Tuple, Union import pytz from google.api_core.exceptions import AlreadyExists from google.api_core.retry import Retry from google.cloud.workflows.executions_v1beta impo...
true
true
1c434bce107c02897258cb87e66f2cdcbcbad14c
1,804
py
Python
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
344
2020-01-10T09:45:02.000Z
2022-03-30T09:48:28.000Z
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
44
2020-01-23T03:00:56.000Z
2022-03-25T17:14:22.000Z
mushroom_rl/algorithms/value/td/sarsa_lambda_continuous.py
PuzeLiu/mushroom-rl
99942b425e66b4ddcc26009d7105dde23841e95d
[ "MIT" ]
93
2020-01-10T21:17:58.000Z
2022-03-31T17:58:52.000Z
import numpy as np from mushroom_rl.algorithms.value.td import TD from mushroom_rl.approximators import Regressor from mushroom_rl.utils.parameters import to_parameter class SARSALambdaContinuous(TD): """ Continuous version of SARSA(lambda) algorithm. """ def __init__(self, mdp_info, policy, approxi...
30.066667
77
0.634701
import numpy as np from mushroom_rl.algorithms.value.td import TD from mushroom_rl.approximators import Regressor from mushroom_rl.utils.parameters import to_parameter class SARSALambdaContinuous(TD): def __init__(self, mdp_info, policy, approximator, learning_rate, lambda_coeff, features, appro...
true
true
1c434c195eeea6ea401b7813cdfd0c50091f02a0
1,219
py
Python
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
cypherdotXd/o3de
bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676
[ "Apache-2.0", "MIT" ]
11
2021-07-08T09:58:26.000Z
2022-03-17T17:59:26.000Z
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
29
2021-07-06T19:33:52.000Z
2022-03-22T10:27:49.000Z
Tools/LyTestTools/tests/unit/test_ly_process_killer.py
RoddieKieley/o3de
e804fd2a4241b039a42d9fa54eaae17dc94a7a92
[ "Apache-2.0", "MIT" ]
4
2021-07-06T19:24:43.000Z
2022-03-31T12:42:27.000Z
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Unit tests for ly_test_tools._internal.managers.ly_process_killer """ import unittest.mock as mock import pytest ...
34.828571
114
0.794914
import unittest.mock as mock import pytest import ly_test_tools._internal.managers.ly_process_killer pytestmark = pytest.mark.SUITE_smoke class TestProcessKiller(object): @mock.patch('ly_test_tools.environment.process_utils.process_exists') def test_DetectLumberyardProcesses_ValidProcessesList_ReturnsDet...
true
true
1c434c415e0dfeee6055723b0d1e441f37e30c14
7,086
py
Python
Deteccion de paginas maliciosas (PDG)/Scripts/Python/extraer_info_app.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
9
2021-10-01T22:02:58.000Z
2021-11-09T17:48:45.000Z
Deteccion de paginas maliciosas (PDG)/Scripts/Python/extraer_info_app.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
null
null
null
Deteccion de paginas maliciosas (PDG)/Scripts/Python/extraer_info_app.py
i2tResearch/Ciberseguridad_web
ac3dd934a60628532e3538369cb145d9a8f33e4f
[ "MIT" ]
null
null
null
""" Autores: Melisa Garcia P. y Jose Luis Osorio Q. Proyecto de grado: Sistema open source para la deteccion de ataques en paginas web maliciosas Universidad Icesi, 2017 """ import datetime from cachecontrol import CacheControl import whois import requests def longitud_url(url): """ Determina la longitud de la u...
35.253731
99
0.60048
""" Autores: Melisa Garcia P. y Jose Luis Osorio Q. Proyecto de grado: Sistema open source para la deteccion de ataques en paginas web maliciosas Universidad Icesi, 2017 """ import datetime from cachecontrol import CacheControl import whois import requests def longitud_url(url): """ Determina la longitud de la u...
false
true
1c434c4469fea787812685fd4db156c4149e329e
4,815
py
Python
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
1
2019-09-15T18:50:36.000Z
2019-09-15T18:50:36.000Z
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
null
null
null
h2o-bindings/bin/custom/python/gen_stackedensemble.py
13927729580/h2o-3
850ecb214f01340edb62c45242c76212f4b60381
[ "Apache-2.0" ]
null
null
null
rest_api_version = 99 def update_param(name, param): if name == 'metalearner_params': param['type'] = 'KeyValue' param['default_value'] = None return param return None # param untouched def class_extensions(): def metalearner(self): """Print the metalearner of an H2OStac...
37.038462
155
0.675389
rest_api_version = 99 def update_param(name, param): if name == 'metalearner_params': param['type'] = 'KeyValue' param['default_value'] = None return param return None def class_extensions(): def metalearner(self): model = self._model_json["output"] if "metalear...
true
true
1c434cc6b89ca7223fc6db90e76c420ed7ec4e36
388
py
Python
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
pip_services_logging/container/__init__.py
pip-services-infrastructure/pip-services-logging-python
5b1f6eb4e0204004fb7b4affa527d9d3325bb3c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pip_services_logging.container.__init__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Container module initialization :copyright: Conceptual Vision Consulting LLC 2015-2016, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ __all__ = [...
22.823529
89
0.615979
__all__ = [ 'LoggingProcess' ] from .LoggingProcess import LoggingProcess
true
true
1c434d23a2e332d1479e4fcf2ae23a2194938eee
655
py
Python
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
migrations/versions/373b28e97f76_.py
yuraist/model_agency
64ce5a03fc1a919465c040d5adb939fc2bda1965
[ "MIT" ]
null
null
null
"""empty message Revision ID: 373b28e97f76 Revises: 4cf0021cdcd0 Create Date: 2018-08-19 17:24:58.766750 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '373b28e97f76' down_revision = '4cf0021cdcd0' branch_labels = None depends_on = None def upgrade(): # ...
22.586207
77
0.691603
from alembic import op import sqlalchemy as sa revision = '373b28e97f76' down_revision = '4cf0021cdcd0' branch_labels = None depends_on = None def upgrade():
true
true
1c434e6a0fbec6dbbca77f04a60a8550e6411695
2,210
py
Python
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
null
null
null
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
3
2019-08-13T10:20:32.000Z
2019-08-23T14:52:04.000Z
intake_azure_blob/azure_blob.py
hamed2005/intake-azure-blob
a9dfb8021d1fc0b354d9f08c0c86ed39e3a16993
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from . import __version__ from intake.source.base import DataSource, Schema import json import dask.dataframe as dd from datetime import datetime, timedelta from azureblobfs.dask import DaskAzureBlobFileSystem class AzureBlobSource(DataSource): """Common behaviours for plugins in this rep...
32.028986
151
0.631222
from . import __version__ from intake.source.base import DataSource, Schema import json import dask.dataframe as dd from datetime import datetime, timedelta from azureblobfs.dask import DaskAzureBlobFileSystem class AzureBlobSource(DataSource): name = 'azure_blob' version = __version__ container = 'data...
true
true
1c434e783336bce9850898aa4594fc81c24c9d64
5,197
py
Python
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
25
2020-02-14T17:16:31.000Z
2022-02-25T14:58:42.000Z
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
15
2020-02-17T12:13:30.000Z
2021-11-30T09:12:38.000Z
src/dominh/connection.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020-2021, G.A. vd. Hoorn # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
37.121429
80
0.666538
import typing as t class Connection(object): def __init__( self, host: str, base_path: str, helpers_uploaded: bool, skipped_helpers_upload: bool, request_timeout: float = 5, kcl_auth: t.Optional[t.Tuple[str, str]] = None, karel_auth:...
true
true
1c434ea6ac31675f1989083e696631dbcb369f69
43,613
py
Python
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
1
2021-12-31T04:10:42.000Z
2021-12-31T04:10:42.000Z
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
gamestonk_terminal/stocks/behavioural_analysis/ba_controller.py
DidierRLopes/GST-discordbot
8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c
[ "MIT" ]
null
null
null
"""Behavioural Analysis Controller Module""" __docformat__ = "numpy" import argparse import difflib from typing import List, Union from datetime import datetime, timedelta import textwrap from prompt_toolkit.completion import NestedCompleter from colorama import Style from gamestonk_terminal import feature_flags as gt...
37.117447
121
0.570243
__docformat__ = "numpy" import argparse import difflib from typing import List, Union from datetime import datetime, timedelta import textwrap from prompt_toolkit.completion import NestedCompleter from colorama import Style from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.helper_funcs impor...
true
true
1c43500ab565f603474d3551abc7e2a246e9e65f
1,243
py
Python
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
9
2015-04-05T00:18:32.000Z
2020-05-10T03:21:19.000Z
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
3
2015-04-11T13:31:13.000Z
2015-06-19T13:45:48.000Z
src/rudiments/reamed/__init__.py
jhermann/rudiments
7852dae498ec6ba6a7ec4cd2978ac13c05995d71
[ "Apache-2.0" ]
3
2016-09-01T19:20:57.000Z
2021-04-20T08:57:45.000Z
# -*- coding: utf-8 -*- # pylint: disable=bad-continuation """ Extensions to third-party libraries. Note that you need to add the underlying package to your dependencies in addition to ``rudiments``, in case you use one of the modules in here. ``rudiments`` itself does not publish any dependencies on t...
42.862069
74
0.745776
from __future__ import absolute_import, unicode_literals, print_function
true
true
1c4350bca861826476082837fad153d4b6705c52
7,792
py
Python
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
79
2020-02-26T19:20:07.000Z
2022-03-24T11:12:57.000Z
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
34
2020-04-26T01:55:31.000Z
2022-03-15T17:38:34.000Z
steam/ext/commands/help.py
Gobot1234/steam
ffcd3a6c4d531fbf174f359f0b66d9a9525d62cb
[ "MIT" ]
14
2020-07-15T14:50:14.000Z
2022-01-26T21:51:30.000Z
""" The MIT License (MIT) Copyright (c) 2020 James 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, publis...
35.099099
115
0.63963
from __future__ import annotations import abc import sys import traceback from collections.abc import Mapping from typing import TYPE_CHECKING, Any from typing_extensions import final from .commands import Command, Group from .context import Context if TYPE_CHECKING: from steam.ext import commands __all__ = (...
true
true
1c43517a6ac0c278538d2d7dacc69c184b3d16e4
1,340
py
Python
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
25
2020-02-14T17:16:31.000Z
2022-02-25T14:58:42.000Z
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
15
2020-02-17T12:13:30.000Z
2021-11-30T09:12:38.000Z
src/dominh/tool/dominh_get.py
gavanderhoorn/dominh
318ca25d2095bc86007e2f9e87bd8dd8b06aec43
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2020, G.A. vd. Hoorn # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
26.27451
79
0.70597
import sys from docopt import docopt from requests import exceptions import dominh def main(argv, skip_upload=False): args = docopt(__doc__, argv=argv) varname = args['<variable>'] try: c = dominh.connect(host=args['<host>'], skip_helper_upload=skip_upload) print(c....
true
true
1c43517c38174b6aeaa4bfb9dc5f205dd8d49a1b
387
py
Python
phoenix-code-samples/cap.py
phoenix-project/phoenix
17c0acf0c9f57b0e94a6510b7d411f64beb1a85d
[ "BSD-Source-Code", "ADSL" ]
1
2021-08-18T15:34:21.000Z
2021-08-18T15:34:21.000Z
phoenix-code-samples/cap.py
phoenix-project/phoenix
17c0acf0c9f57b0e94a6510b7d411f64beb1a85d
[ "BSD-Source-Code", "ADSL" ]
null
null
null
phoenix-code-samples/cap.py
phoenix-project/phoenix
17c0acf0c9f57b0e94a6510b7d411f64beb1a85d
[ "BSD-Source-Code", "ADSL" ]
1
2016-01-30T16:16:06.000Z
2016-01-30T16:16:06.000Z
""" Connect Capacitor between CH0 and GND. Resistor from D3out to CH0. For linear charging: Connect capcitor between D3out and CH0. Resistor from CCS to CH0 """ import phm, time p=phm.phm() p.select_adc(0) p.set_adc_size(2) p.write_outputs(8) time.sleep(1) p.enable_set_low(3) v=p.read_block(200,25,0) p.plot_data(v) p...
19.35
66
0.744186
""" Connect Capacitor between CH0 and GND. Resistor from D3out to CH0. For linear charging: Connect capcitor between D3out and CH0. Resistor from CCS to CH0 """ import phm, time p=phm.phm() p.select_adc(0) p.set_adc_size(2) p.write_outputs(8) time.sleep(1) p.enable_set_low(3) v=p.read_block(200,25,0) p.plot_data(v) p...
false
true
1c4351de021e4418f19db6fd841a2bfb0803c8e3
5,517
py
Python
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/DayHR
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
7
2019-07-12T07:37:50.000Z
2020-04-10T00:32:23.000Z
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/dayhr-transfer
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
null
null
null
Python/AI-ToolBox/computer_vision/image_classification_keras/parameterAdjusting_practice/CNN_v3/CNN_v3.py
Lornatang/dayhr-transfer
02e81961e0a710f2c82db70c06b505e608db61cc
[ "Apache-2.0" ]
2
2019-08-02T21:29:52.000Z
2020-01-02T15:36:28.000Z
# -*- coding: utf-8 -*- """ Created on Thu Nov 1 12:02:27 2018 CNN调参练习version3: 使用一个类似AlexNet和VGG的简单架构 在CNN_v2的基础上,进行数据增强 @author: zyb_as """ # ----------------------------------------------------------- # 基本参数 # ----------------------------------------------------------- trainSetRootPath = '../../../dataset/trai...
32.263158
124
0.589995
trainSetRootPath = '../../../dataset/trainSetExample' validSetRootPath = '../../../dataset/validSetExample/' targetSize = (224, 224, 3) categoryNum = 3 batchSize = 32 epochNum = 100 from keras.preprocessing.image import ImageDataGenerator train_datage...
true
true
1c435271961185b573cfe80263e018907fa38fe0
4,404
py
Python
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_forloop.py
aseyboldt/numba
0c0a8aa7a7cad8b5f0a5383101f5cca5a4a89df3
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # ______________________________________________________________________ '''test_forloop Test the Numba compiler on a simple for loop over an iterable object. ''' # ______________________________________________________________________ from numba.decorators import jit import numpy import unit...
33.363636
94
0.663942
from numba.decorators import jit import numpy import unittest import __builtin__ def for_loop_fn_0 (iterable): acc = 0. for value in iterable: acc += value return acc def for_loop_fn_1 (start, stop, inc): acc = 0 for value in range(start, stop, inc): acc += value retu...
true
true
1c4353518377089683fe37c0a25d8096adebb750
7,393
py
Python
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
xblock_jupyter_graded/nbgrader_utils.py
titlethanason/jupyter-edx-grader-xblock
f70326432f998b919dd30a27c41175ab1249bd4b
[ "BSD-3-Clause" ]
null
null
null
import json import logging import os import pkg_resources from subprocess import Popen, PIPE from .config import ( RELEASE, SUBMITTED, SOURCE, AUTOGRADED, FEEDBACK, EDX_ROOT, CONT_ROOT ) from . import file_manager as fm from . import container_manager as cm from .exceptions import DockerContainerError, Validation...
33.757991
102
0.67361
import json import logging import os import pkg_resources from subprocess import Popen, PIPE from .config import ( RELEASE, SUBMITTED, SOURCE, AUTOGRADED, FEEDBACK, EDX_ROOT, CONT_ROOT ) from . import file_manager as fm from . import container_manager as cm from .exceptions import DockerContainerError, Validation...
true
true
1c4353835cf00f4003b23a6e859d571efa53e899
1,129
py
Python
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/hooks/webhdfs_hook.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.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...
38.931034
95
0.76705
import warnings from airflow.providers.apache.hdfs.hooks.webhdfs import WebHDFSHook warnings.warn( "This module is deprecated. Please use `airflow.providers.apache.hdfs.hooks.webhdfs`.", DeprecationWarning, stacklevel=2, )
true
true
1c4353fef35e15660683e78f01919ecd4744808d
574
py
Python
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
3
2020-07-17T05:37:41.000Z
2021-09-06T19:46:15.000Z
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
null
null
null
flask_monitoringdashboard/test/core/profiler/util/test_stringhash.py
timgates42/Flask-MonitoringDashboard
0404b05b9a8f1917796e0f314a77a53a754a0b15
[ "MIT" ]
1
2020-11-21T01:25:51.000Z
2020-11-21T01:25:51.000Z
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash class TestStringHash(unittest.TestCase): def test_stringhash(self): string_hash = StringHash() self.assertEqual(string_hash.hash('abc'), 0) self.assertEqual(string_hash.hash('def'), 1) ...
31.888889
78
0.709059
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash class TestStringHash(unittest.TestCase): def test_stringhash(self): string_hash = StringHash() self.assertEqual(string_hash.hash('abc'), 0) self.assertEqual(string_hash.hash('def'), 1) ...
true
true
1c435454ba87053a25944354013eb38a8d2a0d71
1,220
py
Python
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
1
2016-05-08T18:33:12.000Z
2016-05-08T18:33:12.000Z
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/matplotlib/numerix/_nc_imports.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
from Numeric import array, ravel, reshape, shape, alltrue, sometrue from Numeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, \ Float32, Float64, Complex32, Complex64, Float, Int, Complex from numpy import isnan as _isnan class _TypeNamespace: """Numeric compatible type aliases for use with extension fun...
28.372093
75
0.62377
from Numeric import array, ravel, reshape, shape, alltrue, sometrue from Numeric import Int8, UInt8, Int16, UInt16, Int32, UInt32, \ Float32, Float64, Complex32, Complex64, Float, Int, Complex from numpy import isnan as _isnan class _TypeNamespace: Int8 = Int8 UInt8 = UInt8 Int16 ...
true
true
1c4354e052adc0aa774f9c2bc79318c236495b02
403
py
Python
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
1
2021-08-20T14:51:37.000Z
2021-08-20T14:51:37.000Z
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
2
2021-08-20T14:55:50.000Z
2021-08-23T22:09:45.000Z
TheHouseSteak/asgi.py
enessfk/TheHouseSteak
21ee01bb1e028dec7d840beb9255191f6b5f4a7e
[ "MIT" ]
null
null
null
""" ASGI config for TheHouseSteak project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'TheHouseSteak.settings') application = get_asgi_application()
true
true
1c43558a0014473f068d0482a8a8fd2d833db805
11,648
py
Python
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
null
null
null
nere/torch_trainer.py
WangShengguang/NERE
4b8166aa348b9db207bb9a1e1da6eed5d567ae6f
[ "MIT" ]
1
2021-08-21T09:21:21.000Z
2021-08-21T09:21:21.000Z
import logging import os from pathlib import Path import torch import torch.nn as nn from torch.optim import Adam from torch.optim.lr_scheduler import LambdaLR from tqdm import trange from config import Config from nere.data_helper import DataHelper from nere.evaluator import Evaluator class BaseTrainer(object): ...
49.777778
120
0.606542
import logging import os from pathlib import Path import torch import torch.nn as nn from torch.optim import Adam from torch.optim.lr_scheduler import LambdaLR from tqdm import trange from config import Config from nere.data_helper import DataHelper from nere.evaluator import Evaluator class BaseTrainer(object): ...
true
true
1c435843fc9b1aa7fb6f57042c4a5dfe1206dd9c
9,063
py
Python
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
2
2022-02-28T02:51:59.000Z
2022-03-24T15:23:18.000Z
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
src/tests/core/constructs/test_workspace.py
cdev-framework/cdev-sdk
06cd7b40936ab063d1d8fd1a7d9f6882750e8a96
[ "BSD-3-Clause-Clear" ]
null
null
null
from typing import Dict from core.constructs.backend import Backend from core.constructs.cloud_output import cloud_output_model from core.constructs.workspace import Workspace, Workspace_State, Workspace_Info from core.constructs.resource import ResourceModel from core.constructs.components import ComponentModel from ...
30.618243
88
0.439038
from typing import Dict from core.constructs.backend import Backend from core.constructs.cloud_output import cloud_output_model from core.constructs.workspace import Workspace, Workspace_State, Workspace_Info from core.constructs.resource import ResourceModel from core.constructs.components import ComponentModel from ...
true
true
1c43596eac0d0b0ab25adde8d4a9d380a9e9bd82
55,039
py
Python
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
kraken/ketos.py
jpmjpmjpm/kraken
8ceae75230f5e47bc5d75f8d68fb41b0532cd0ca
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2015 Benjamin Kiessling # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
54.548067
229
0.616708
import os import time import json import glob import uuid import click import logging import unicodedata from click import open_file from bidi.algorithm import get_display from typing import cast, Set, List, IO, Any from collections import defaultdict from kraken.lib import log from kraken.lib.excepti...
true
true
1c435aaf0e77dfe1367116e247fb907561430e8a
3,130
py
Python
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
null
null
null
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
22
2020-09-26T00:34:37.000Z
2022-03-29T22:28:45.000Z
app/run.py
adarbha/disaster_response
34e1e3586caffb18e6d7f57a2c121426c02f1886
[ "MIT" ]
null
null
null
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sklearn.externals import joblib from sqlalchemy import create_engine from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from ...
27.946429
136
0.64984
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sklearn.externals import joblib from sqlalchemy import create_engine from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from ...
true
true
1c435b85f4b9d6a628a79791664b31d42e045c1c
751
py
Python
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
3
2019-10-09T08:33:41.000Z
2020-02-23T14:20:53.000Z
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
12
2019-10-05T17:27:58.000Z
2019-10-19T15:08:56.000Z
backend/bikestore/bikestore/urls.py
AlexandreInsua/HacktoberFest-2k9
a929bd8edd90395d2e0d0faac4b73ebfd47ed43a
[ "MIT" ]
10
2019-10-05T17:01:37.000Z
2019-10-20T16:24:20.000Z
"""bikestore URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
34.136364
77
0.70972
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c435c117bd8020ae31707eefb8deb065c4d65d2
1,699
py
Python
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
17
2019-09-11T20:02:09.000Z
2020-04-19T18:20:46.000Z
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
11
2020-02-12T01:17:28.000Z
2022-02-10T18:51:55.000Z
backend/debtors/migrations/0001_initial.py
yaseralnajjar/Debtor-Administrator
b75172cf8f833781277b5af4e7fd996c3542dd87
[ "MIT" ]
5
2019-09-11T19:09:20.000Z
2020-03-09T11:10:19.000Z
# Generated by Django 2.1.3 on 2019-08-10 09:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(setting...
42.475
159
0.621542
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import localflavor.generic.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
1c435c7fe5171f2e64440da4f2e365288bf81aad
4,934
py
Python
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
1
2022-03-07T20:46:09.000Z
2022-03-07T20:46:09.000Z
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
null
null
null
schema.py
cojo24/eia
b2115a4cbc2e30c23abcbf4060deef962d3f82f9
[ "MIT" ]
1
2022-03-18T01:07:23.000Z
2022-03-18T01:07:23.000Z
import datetime as dt import pandas as pd from .client import EIA from collections import namedtuple from typing import Optional, Union CategoryCollection = namedtuple('CategoryCollection', 'items') SeriesCollection = namedtuple('SeriesCollection', 'items') class Category: def __init__( self, ...
31.031447
101
0.542967
import datetime as dt import pandas as pd from .client import EIA from collections import namedtuple from typing import Optional, Union CategoryCollection = namedtuple('CategoryCollection', 'items') SeriesCollection = namedtuple('SeriesCollection', 'items') class Category: def __init__( self, ...
true
true
1c435cc608779fbc867cb796fbc56b574704d723
6,618
py
Python
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
src/Evaluation/evaluation.py
kuefmz/software_classification
0dee3a046e59052ab272e4029195fb21f3d58c04
[ "Apache-2.0" ]
null
null
null
import argparse import csv import json import os import sys from typing import Any, Callable, Dict, Iterable, Set import logthis sys.path.append(os.path.abspath(os.getcwd()) + '/src') from util.utils import getCategories, BASE_CATEGORIES def lower_transform(predictions: Iterable[str]) -> Set[str]: """ Transforms t...
37.602273
212
0.699456
import argparse import csv import json import os import sys from typing import Any, Callable, Dict, Iterable, Set import logthis sys.path.append(os.path.abspath(os.getcwd()) + '/src') from util.utils import getCategories, BASE_CATEGORIES def lower_transform(predictions: Iterable[str]) -> Set[str]: return {pred.lowe...
true
true
1c435dece6ce248772afe2c144485740d027f7cb
27,181
py
Python
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
null
null
null
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
null
null
null
rpyc/core/protocol.py
ramezsaeed/rpyc
5909b7f984969ca8ea453154593d28159cd1c1b2
[ "MIT" ]
1
2020-09-09T16:27:51.000Z
2020-09-09T16:27:51.000Z
""" The RPyC protocol """ import sys import itertools import socket import time import gc from threading import Lock, Condition from rpyc.lib import spawn, Timeout from rpyc.lib.compat import (pickle, next, is_py3k, maxint, select_error, acquire_lock) from rpyc.lib.colls import WeakValueDi...
43.007911
119
0.567124
import sys import itertools import socket import time import gc from threading import Lock, Condition from rpyc.lib import spawn, Timeout from rpyc.lib.compat import (pickle, next, is_py3k, maxint, select_error, acquire_lock) from rpyc.lib.colls import WeakValueDict, RefCountingColl from r...
true
true
1c435df40ccfb869ca74b75601e2b8f81af69a5e
630
py
Python
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
1
2016-08-19T09:33:09.000Z
2016-08-19T09:33:09.000Z
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
null
null
null
flask/migrations/versions/6a6005dc2d4c_.py
schinke/solid-fortnight-ba
221ad998e51e9b2634d1cfb17c84ad28dbc9a7d5
[ "MIT" ]
null
null
null
"""empty message Revision ID: 6a6005dc2d4c Revises: 574cfcd5eb17 Create Date: 2016-09-22 00:24:15.999102 """ # revision identifiers, used by Alembic. revision = '6a6005dc2d4c' down_revision = '574cfcd5eb17' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
23.333333
100
0.7
revision = '6a6005dc2d4c' down_revision = '574cfcd5eb17' from alembic import op import sqlalchemy as sa def upgrade():
true
true
1c435e59e7f071e12abce0d551669c93ab68ebbc
2,289
bzl
Python
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
1
2021-06-24T15:10:49.000Z
2021-06-24T15:10:49.000Z
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
null
null
null
envoy_build_config/extensions_build_config.bzl
Yannic/envoy-mobile
27fd74c88d71b2c91f484e3660c936948b2eb481
[ "Apache-2.0" ]
null
null
null
EXTENSION_CONFIG_VISIBILITY = ["//visibility:public"] EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"] EXTENSIONS = { "envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster", "envoy.filters.connection_pools.http.generic": "//source/extens...
99.521739
142
0.698558
EXTENSION_CONFIG_VISIBILITY = ["//visibility:public"] EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"] EXTENSIONS = { "envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster", "envoy.filters.connection_pools.http.generic": "//source/extens...
true
true
1c436011cf53472714dfe02473381d8d6a4e7c58
2,560
py
Python
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
6
2020-08-28T22:44:07.000Z
2022-01-24T20:53:00.000Z
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
1
2021-02-20T09:38:46.000Z
2021-02-20T09:38:46.000Z
ariadne_v2/data_chunk.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
2
2021-10-04T09:25:06.000Z
2022-02-09T09:09:09.000Z
import multiprocessing from abc import abstractmethod, ABCMeta from contextlib import contextmanager from typing import List, Union, Callable, Any, Dict import numpy as np import pandas as pd class HDF5Serializable: @abstractmethod def to_hdf5(self, db, hash, path): pass @staticmethod def fro...
32.820513
131
0.596875
import multiprocessing from abc import abstractmethod, ABCMeta from contextlib import contextmanager from typing import List, Union, Callable, Any, Dict import numpy as np import pandas as pd class HDF5Serializable: @abstractmethod def to_hdf5(self, db, hash, path): pass @staticmethod def fro...
true
true
1c436014310567c0ee3904476243c19fb93b383e
532
py
Python
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
3
2015-09-16T13:32:41.000Z
2015-09-16T15:10:20.000Z
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
81
2015-02-05T07:05:50.000Z
2020-06-02T11:27:24.000Z
laterpay/constants.py
laterpay/laterpay-client-python
c75e13408f6900202108f52e386e1c8c719e5377
[ "MIT" ]
1
2016-12-14T12:26:38.000Z
2016-12-14T12:26:38.000Z
EXPIRY_SECONDS_FOR_HOUR = 60 * 60 EXPIRY_SECONDS_FOR_DAY = 60 * 60 * 24 EXPIRY_SECONDS_FOR_WEEK = 60 * 60 * 24 * 7 EXPIRY_SECONDS_FOR_MONTH = 60 * 60 * 24 * 31 EXPIRY_SECONDS_FOR_YEAR = 60 * 60 * 24 * 365 EXPIRY_SECONDS_FOR_TIME_UNITS = { 'h': EXPIRY_SECONDS_FOR_HOUR, 'd': EXPIRY_SECONDS_FOR_DAY, 'w': EXPI...
29.555556
46
0.75
EXPIRY_SECONDS_FOR_HOUR = 60 * 60 EXPIRY_SECONDS_FOR_DAY = 60 * 60 * 24 EXPIRY_SECONDS_FOR_WEEK = 60 * 60 * 24 * 7 EXPIRY_SECONDS_FOR_MONTH = 60 * 60 * 24 * 31 EXPIRY_SECONDS_FOR_YEAR = 60 * 60 * 24 * 365 EXPIRY_SECONDS_FOR_TIME_UNITS = { 'h': EXPIRY_SECONDS_FOR_HOUR, 'd': EXPIRY_SECONDS_FOR_DAY, 'w': EXPI...
true
true
1c43614701fd1d9f4f8204066b3f979895e61bb2
140
py
Python
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
7
2020-10-26T21:33:40.000Z
2022-02-14T10:56:06.000Z
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-13T19:17:15.000Z
2022-02-13T19:17:15.000Z
mcc_f1/__init__.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-14T10:56:08.000Z
2022-02-14T10:56:08.000Z
from .mcc_f1_curve import mcc_f1_curve from ._plot.mcc_f1_curve import plot_mcc_f1_curve from ._plot.mcc_f1_curve import MCCF1CurveDisplay
28
49
0.871429
from .mcc_f1_curve import mcc_f1_curve from ._plot.mcc_f1_curve import plot_mcc_f1_curve from ._plot.mcc_f1_curve import MCCF1CurveDisplay
true
true
1c43619780c24f54971cce30454c78088c797ed4
2,009
py
Python
keystoneworkout/cli/core.py
dstanek/keystone-exercises
5023fe87896ffefb462936ca9e6a982b9d099d6c
[ "Apache-2.0" ]
null
null
null
keystoneworkout/cli/core.py
dstanek/keystone-exercises
5023fe87896ffefb462936ca9e6a982b9d099d6c
[ "Apache-2.0" ]
null
null
null
keystoneworkout/cli/core.py
dstanek/keystone-exercises
5023fe87896ffefb462936ca9e6a982b9d099d6c
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
31.390625
75
0.688402
import argparse import sys import pkg_resources from keystoneworkout.cli import subcommands __version__ = pkg_resources.require('keystone-workout')[0].version PROJECT_NAME = pkg_resources.require('keystone-workout')[0].project_name def cli(): parser = argparse.ArgumentParser( prog=PROJECT_...
false
true
1c43626b704050331b0176d0ad3a8b95c275535f
7,675
py
Python
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
10
2021-06-18T16:32:07.000Z
2022-02-11T06:25:03.000Z
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
13
2021-05-27T00:48:15.000Z
2022-01-08T16:13:59.000Z
solutions/projectstaffing/deployment/arm/scripts/post_deploy/db.py
dgeorge-blueprint/dataconnect-solutions
40f54abb98af6a3cdb1389086f7d7270d40fa9b6
[ "MIT" ]
18
2021-06-03T13:43:43.000Z
2022-03-25T11:04:47.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. import datetime import os import re from os.path import join, dirname from skills_finder_utils import ad_ops, blob_ops from skills_finder_utils import arm_...
54.821429
121
0.673746
import datetime import os import re from os.path import join, dirname from skills_finder_utils import ad_ops, blob_ops from skills_finder_utils import arm_ops from config import InstallConfiguration def create_gdc_deployer_identity(install_config: InstallConfiguration, resource_group: str): admin_ad_group_nam...
true
true
1c4362b3e15b08f17949d9f9d632bb7a3c1b0d2e
681
py
Python
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
day01/p1.py
pwicks86/adventofcode2016
331523e45095962f5e4614bdca15cc35e3243fdb
[ "MIT" ]
null
null
null
f = open('input.txt') steps = f.read().strip().split(",") steps = [s.strip() for s in steps] cur_x = 0 cur_y = 0 facing = "N" for step in steps: blocks = int(step[1:]) lr = step[0] if facing == "N": facing = "W" if lr == "L" else "E" elif facing == "S": facing = "E" if lr == "L" else "W...
21.28125
42
0.478708
f = open('input.txt') steps = f.read().strip().split(",") steps = [s.strip() for s in steps] cur_x = 0 cur_y = 0 facing = "N" for step in steps: blocks = int(step[1:]) lr = step[0] if facing == "N": facing = "W" if lr == "L" else "E" elif facing == "S": facing = "E" if lr == "L" else "W...
true
true
1c436417afdedf6574bf5c1a0a23938183ec0be9
3,110
py
Python
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/eventlog/admin.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
import csv import json from datetime import datetime from django.contrib import admin from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.http import HttpResponse from django.urls import reverse, NoReverseMatch from django.utils.html import format_html from dataworkspace.apps.eventlog.m...
32.395833
89
0.619614
import csv import json from datetime import datetime from django.contrib import admin from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.http import HttpResponse from django.urls import reverse, NoReverseMatch from django.utils.html import format_html from dataworkspace.apps.eventlog.m...
true
true
1c436436f2326798aaf205de74c074ae0cbd9838
5,245
py
Python
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
29
2020-01-30T00:10:59.000Z
2022-03-26T21:25:25.000Z
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
13
2020-04-28T09:38:58.000Z
2022-03-12T00:15:46.000Z
policies.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
9
2020-09-15T10:34:31.000Z
2021-06-16T20:51:04.000Z
import os import random from collections import deque from collections import namedtuple import torch.nn as nn import torch.nn.functional as F import numpy as np import torch from scipy import signal from scipy.ndimage.interpolation import shift Transition = namedtuple('Transition', ('inputs', 'labels')) class Repl...
31.787879
98
0.638322
import os import random from collections import deque from collections import namedtuple import torch.nn as nn import torch.nn.functional as F import numpy as np import torch from scipy import signal from scipy.ndimage.interpolation import shift Transition = namedtuple('Transition', ('inputs', 'labels')) class Repl...
true
true
1c436493685d5365b2b9572faad7ced80b6cdd9a
2,794
py
Python
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
1
2020-08-04T14:19:30.000Z
2020-08-04T14:19:30.000Z
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
1
2021-09-29T22:44:24.000Z
2021-09-29T22:44:24.000Z
selfdrive/car/mock/interface.py
u8511049/dragonpilot
cc0d4c938dc2aff089a0c15e0532de90ff342659
[ "MIT" ]
2
2020-03-10T19:11:34.000Z
2020-08-04T14:19:30.000Z
#!/usr/bin/env python3 from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase # mocked car interface to work with chffrplus TS...
29.410526
93
0.687903
from cereal import car from selfdrive.config import Conversions as CV from selfdrive.swaglog import cloudlog import cereal.messaging as messaging from selfdrive.car import gen_empty_fingerprint from selfdrive.car.interfaces import CarInterfaceBase TS = 0.01 YAW_FR = 0.2 LPG = 2 * 3.1415 * YAW_FR * TS / (1 + 2 * ...
true
true
1c4365c916fd11ebbac04860062e52fb7cd37f81
765
py
Python
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from_3b1b/on_hold/eop/chapter1/think_about_coin.py
sanjaydatasciencedojo/manim
603a1a21dbb5eca325ed670f46ea72401a8edf1d
[ "MIT" ]
null
null
null
from active_projects.eop.reusable_imports import * from manimlib.imports import * class RandyThinksAboutCoin(PiCreatureScene): def construct(self): randy = self.get_primary_pi_creature() randy.center() self.add(randy) self.wait() h_or_t = BinaryOption(UprightHeads().scal...
23.181818
79
0.542484
from active_projects.eop.reusable_imports import * from manimlib.imports import * class RandyThinksAboutCoin(PiCreatureScene): def construct(self): randy = self.get_primary_pi_creature() randy.center() self.add(randy) self.wait() h_or_t = BinaryOption(UprightHeads().scal...
true
true
1c436727ce1a44e7f9cbc3035c82def6d153f509
37,345
py
Python
nexus/lib/generic.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
null
null
null
nexus/lib/generic.py
eugeneswalker/qmcpack
352ff27f163bb92e0c232c48bec8ae7951ed9d8c
[ "NCSA" ]
11
2020-05-09T20:57:21.000Z
2020-06-10T00:00:17.000Z
nexus/lib/generic.py
williamfgc/qmcpack
732b473841e7823a21ab55ff397eed059f0f2e96
[ "NCSA" ]
null
null
null
################################################################## ## (c) Copyright 2015- by Jaron T. Krogel ## ################################################################## #====================================================================# # generic.py ...
27.622041
188
0.502664
t in other.__dict__: return False svar = self.__dict__[sname] ovar = other.__dict__[sname] stype = type(svar) otype = type(ovar) if stype!=otype: return False eqval = svar==ovar ...
true
true
1c43679258b2a2e1b386ecb71012e7cb90892898
2,386
py
Python
mediagoblin/plugins/ldap/tools.py
Metamaquina/mediagoblin
4cb06071b1b082b3b40e8ed27c5ffb082a104bc4
[ "CC0-1.0" ]
3
2016-12-26T02:30:07.000Z
2017-05-25T11:54:31.000Z
mediagoblin/plugins/ldap/tools.py
odinho/mediagoblin
2c7698614da73f1e146ab5d6f499b161da1ef105
[ "CC0-1.0" ]
null
null
null
mediagoblin/plugins/ldap/tools.py
odinho/mediagoblin
2c7698614da73f1e146ab5d6f499b161da1ef105
[ "CC0-1.0" ]
1
2019-05-13T14:25:59.000Z
2019-05-13T14:25:59.000Z
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
36.151515
78
0.624057
import ldap import logging from mediagoblin.tools import pluginapi _log = logging.getLogger(__name__) class LDAP(object): def __init__(self): self.ldap_settings = pluginapi.get_config('mediagoblin.plugins.ldap') def _connect(self, server): _log.info('Connecting to {0}.'.forma...
false
true
1c4367cf95f9922bb13c21a0d1b1367e1787deb5
63,124
py
Python
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/documentdb/v20210615/database_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
56.411081
2,956
0.699021
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['DatabaseAccountArgs', 'DatabaseAccount'] @pulumi.input_type class DatabaseAccountArgs: ...
true
true
1c4369aea349a0415f317871e3e85ce3efe8e7c9
3,971
py
Python
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
null
null
null
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
4
2017-08-22T03:15:22.000Z
2017-12-19T17:55:31.000Z
find_trans.py
jacob975/TATIRP
2d81fa280e039aa931c6f8456632a23ef123282a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # author: Serebryakov S., 2019 #https://astro.swarthmore.edu/transits.cgi import os import json import requests from lxml import html page = requests.get('https://astro.swarthmore.edu/print_transits.cgi?observatory_string=28.758333%3B-17.88%3BAtlantic%2FCanary%3BRoque+de+los+Muchachos%2C+La+Palma&use...
70.910714
492
0.458071
import os import json import requests from lxml import html page = requests.get('https://astro.swarthmore.edu/print_transits.cgi?observatory_string=28.758333%3B-17.88%3BAtlantic%2FCanary%3BRoque+de+los+Muchachos%2C+La+Palma&use_utc=1&observatory_latitude=&observatory_longitude=&timezone=UTC&start_date=today&days_to_...
true
true
1c4369fdab4c48c1a95e2314a68965d8415983d5
2,686
py
Python
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
1
2022-01-05T05:46:50.000Z
2022-01-05T05:46:50.000Z
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
null
null
null
graphgym/custom_graphgym/train/example.py
itamblyn/pytorch_geometric
67ed16492863378b8434b03713a75924f0cc5df1
[ "MIT" ]
null
null
null
import torch import time import logging from torch_geometric.graphgym.config import cfg from torch_geometric.graphgym.loss import compute_loss from torch_geometric.graphgym.utils.epoch import is_eval_epoch, is_ckpt_epoch from torch_geometric.graphgym.checkpoint import load_ckpt, save_ckpt, \ clean_ckpt from torch...
36.297297
77
0.627699
import torch import time import logging from torch_geometric.graphgym.config import cfg from torch_geometric.graphgym.loss import compute_loss from torch_geometric.graphgym.utils.epoch import is_eval_epoch, is_ckpt_epoch from torch_geometric.graphgym.checkpoint import load_ckpt, save_ckpt, \ clean_ckpt from torch...
true
true
1c436a4ec3351d4cc481420600a5673157ef3b13
4,929
py
Python
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
Round3/train.py
teejaytanmay/image_object_localization_flipkart
ca0976a7df1280be942d666cdebea110e1a70633
[ "MIT" ]
null
null
null
# coding: utf-8 import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, MaxPooling2D, Input, Flatten from keras.optimizers import Adam from keras.regularizers import l2 from keras import backend as K from keras.models import Model,load_model from ...
31.596154
161
0.695476
import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, MaxPooling2D, Input, Flatten from keras.optimizers import Adam from keras.regularizers import l2 from keras import backend as K from keras.models import Model,load_model from keras.callbacks...
true
true