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
f7579b5e4054a61be981378a4fb47307586da147
7,060
py
Python
experiments/net/mynn.py
parneetk/PyTorch-Style-Transfer
f38ec4b1cd57cee4304787b054a6e6c9ce3b00ff
[ "MIT" ]
null
null
null
experiments/net/mynn.py
parneetk/PyTorch-Style-Transfer
f38ec4b1cd57cee4304787b054a6e6c9ce3b00ff
[ "MIT" ]
null
null
null
experiments/net/mynn.py
parneetk/PyTorch-Style-Transfer
f38ec4b1cd57cee4304787b054a6e6c9ce3b00ff
[ "MIT" ]
1
2020-10-29T01:29:41.000Z
2020-10-29T01:29:41.000Z
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Hang Zhang ## ECE Department, Rutgers University ## Email: zhang.hang@rutgers.edu ## Copyright (c) 2017 ## ## This source code is licensed under the MIT-style license found in the ## LICENSE file in the root directory of this sou...
34.607843
92
0.697875
import numpy as np import torch import torch.nn as nn from torch.autograd import Variable class MultConst(nn.Module): def forward(self, input): return 255*input class GramMatrix(nn.Module): def forward(self, y): (b, ch, h, w) = y.size() features = y.view(b, ch, w * h) features_t = features.transpose(1, 2)...
true
true
f7579b873dbc1e427ca16d7cae333ca1140807ce
593
py
Python
config/config.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2019-12-12T09:01:49.000Z
2019-12-12T09:01:49.000Z
config/config.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2019-11-25T13:43:45.000Z
2019-11-25T13:43:45.000Z
config/config.py
deecamp2019-group20/CNN_PokerNet
751576cb941be57c8a37656feaff14b414c3dcb2
[ "MIT" ]
1
2020-03-15T06:20:04.000Z
2020-03-15T06:20:04.000Z
config = { 'device': 'cuda:0', 'seed': 42, # config for logging 'logging': { 'log_file': 'run.log', 'fmt': '%(asctime)s: %(message)s', 'level': 'INFO', }, # config to load and save network 'net': { 'saved_net_path': None, 'net_path': 'models/resnet.p...
19.129032
42
0.46543
config = { 'device': 'cuda:0', 'seed': 42, 'logging': { 'log_file': 'run.log', 'fmt': '%(asctime)s: %(message)s', 'level': 'INFO', }, 'net': { 'saved_net_path': None, 'net_path': 'models/resnet.py', 'saved_params_path': None }, '...
true
true
f7579d4cf152d88c256c0a445d3e96f8543944c3
5,384
py
Python
scripts/evaluation/ec_summary.py
Mangul-Lab-USC/benchmarking_error_correction
a18d22b49f0f28424cc3be8cda53e768866d451e
[ "MIT" ]
7
2020-04-09T13:13:54.000Z
2022-01-04T04:29:59.000Z
scripts/evaluation/ec_summary.py
Mangul-Lab-USC/benchmarking_error_correction
a18d22b49f0f28424cc3be8cda53e768866d451e
[ "MIT" ]
null
null
null
scripts/evaluation/ec_summary.py
Mangul-Lab-USC/benchmarking_error_correction
a18d22b49f0f28424cc3be8cda53e768866d451e
[ "MIT" ]
4
2020-04-15T13:10:35.000Z
2020-08-06T16:31:00.000Z
##################################################################################### # Compression Summary for Error Correction Benchmarking # zar-lab ucla # 5/17/18 # supervisor: Serghei Mangul # author: Keith Mitchell """ Functions Contained check_existence: checks if the filename supplied has already ...
49.851852
131
0.565379
from __future__ import division import argparse import csv import os def check_existence(out_dir, file_name): if os.path.exists(out_dir + file_name): return 'a' else: return 'w' def append_summary(wrapper, kmer, read_data, base_data, ec_name, outdir, filename): read_sum = {"TN": 0, "TP...
true
true
f7579d88cf4a4a19273d618b95131ee00894bb57
1,090
py
Python
PyPDFForm/middleware/constants.py
XinyuLiu5566/PyPDFForm
bfc4a8046b2cfd94b41fd593fa7044b869467a8a
[ "MIT" ]
9
2020-10-31T00:55:25.000Z
2022-01-26T01:35:48.000Z
PyPDFForm/middleware/constants.py
XinyuLiu5566/PyPDFForm
bfc4a8046b2cfd94b41fd593fa7044b869467a8a
[ "MIT" ]
135
2020-10-30T00:09:36.000Z
2022-02-11T02:03:57.000Z
PyPDFForm/middleware/constants.py
XinyuLiu5566/PyPDFForm
bfc4a8046b2cfd94b41fd593fa7044b869467a8a
[ "MIT" ]
3
2021-04-16T07:41:27.000Z
2021-12-08T22:57:27.000Z
# -*- coding: utf-8 -*- """Contains constants for middleware layer.""" from typing import Tuple, Union class Text: """Contains constants for text parameters.""" @property def global_font(self) -> str: """Used for setting global font for text.""" return "Helvetica" @property def...
23.191489
72
0.607339
from typing import Tuple, Union class Text: @property def global_font(self) -> str: return "Helvetica" @property def global_font_size(self) -> Union[float, int]: return 12 @property def global_font_color( self, ) -> Tuple[Union[float, int], Union[float, int], ...
true
true
f7579db029ba8e6c310ac9f9aa613d6326b0e074
142
py
Python
Program_Python_code/16.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
Program_Python_code/16.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
Program_Python_code/16.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- num = 10 if num < 0 or num > 10: # 判断值是否在小于0或大于10 print 'hello' else: print 'undefine'
14.2
43
0.570423
num = 10 if num < 0 or num > 10: print 'hello' else: print 'undefine'
false
true
f7579e3dc7485e922b4ccc26fda0155e05448183
11,674
py
Python
train.py
dennisbappert/sod-using-vit
24ed0692d8eb09adf2f74e69a132f267a4137b68
[ "Apache-2.0" ]
89
2021-03-17T01:32:38.000Z
2022-03-25T08:38:54.000Z
train.py
dennisbappert/sod-using-vit
24ed0692d8eb09adf2f74e69a132f267a4137b68
[ "Apache-2.0" ]
12
2021-03-19T10:47:03.000Z
2022-03-24T04:45:50.000Z
train.py
dennisbappert/sod-using-vit
24ed0692d8eb09adf2f74e69a132f267a4137b68
[ "Apache-2.0" ]
13
2021-03-18T18:40:32.000Z
2022-03-11T16:43:52.000Z
import datetime import os import random import time import warnings import hydra import torch from hydra.utils import instantiate from omegaconf import DictConfig, OmegaConf from torch.cuda.amp import autocast, GradScaler from torch.nn import functional as F from torch.utils.data import DataLoader, WeightedRandomSampl...
41.692857
120
0.649392
import datetime import os import random import time import warnings import hydra import torch from hydra.utils import instantiate from omegaconf import DictConfig, OmegaConf from torch.cuda.amp import autocast, GradScaler from torch.nn import functional as F from torch.utils.data import DataLoader, WeightedRandomSampl...
true
true
f7579f581f9dec7d898c2c0a292c7a4c573dfb16
1,046
py
Python
kubernetes_asyncio/test/test_v1beta1_non_resource_rule.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
1
2021-01-13T09:28:57.000Z
2021-01-13T09:28:57.000Z
kubernetes_asyncio/test/test_v1beta1_non_resource_rule.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1beta1_non_resource_rule.py
hubo1016/kubernetes_asyncio
d57e9e9be11f6789e1ce8d5b161acb64d29acf35
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import u...
25.512195
119
0.737094
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v1beta1_non_resource_rule import V1beta1NonResourceRule from kubernetes_asyncio.client.rest import ApiException class TestV1beta1NonResourceRule(unittest.TestCase): def setUp(self):...
true
true
f757a027c6a429356704656a57049b9cdb556b3a
85
py
Python
atest/testresources/testlibs/archive_src/ZipLib.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
4
2016-02-29T17:00:24.000Z
2019-06-27T08:49:13.000Z
atest/testresources/testlibs/archive_src/ZipLib.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
atest/testresources/testlibs/archive_src/ZipLib.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
2
2017-10-30T06:34:47.000Z
2019-03-12T07:23:08.000Z
class ZipLib: def kw_from_zip(self, arg): print '*INFO*', arg return arg * 2
10.625
28
0.635294
class ZipLib: def kw_from_zip(self, arg): print '*INFO*', arg return arg * 2
false
true
f757a053fef4dde8257b5fd5ec2389f29a8667d9
670
py
Python
mirage/projectstartup/__init__.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
4
2019-05-16T09:26:21.000Z
2022-02-14T06:21:40.000Z
mirage/projectstartup/__init__.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
77
2019-05-10T22:24:54.000Z
2021-07-02T03:11:01.000Z
mirage/projectstartup/__init__.py
fossabot/django-mirage
814b3f2486af31f9dca42ef4bb0215655fe0aea6
[ "Apache-2.0" ]
1
2018-12-08T09:57:54.000Z
2018-12-08T09:57:54.000Z
# -*- coding: utf-8 -*- """ Copyright 2017-2018 Shota Shimazu. 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 appl...
35.263158
75
0.746269
from .angular_app_create import NgStartupWorkFlow
true
true
f757a0da335d1541b5996e8f6beaad6fb040c3ea
2,241
py
Python
tests/test_forms.py
christianmlong/dhmn
cce45f3b99e8f32bc4961f8119c859039d2c0755
[ "BSD-3-Clause" ]
null
null
null
tests/test_forms.py
christianmlong/dhmn
cce45f3b99e8f32bc4961f8119c859039d2c0755
[ "BSD-3-Clause" ]
null
null
null
tests/test_forms.py
christianmlong/dhmn
cce45f3b99e8f32bc4961f8119c859039d2c0755
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from dhmn_demo.public.forms import LoginForm from dhmn_demo.user.forms import RegisterForm from .factories import UserFactory class TestRegisterForm: def test_validate_user_already_registered(self, user): # Enters username that is already registered form = Re...
36.145161
74
0.682285
import pytest from dhmn_demo.public.forms import LoginForm from dhmn_demo.user.forms import RegisterForm from .factories import UserFactory class TestRegisterForm: def test_validate_user_already_registered(self, user): form = RegisterForm(username=user.username, email='foo@bar.com', p...
true
true
f757a1906d4f821266ea73eb9527eb2ad8102948
236
py
Python
utils/db_api/mongo.py
YoshlikMedia/DTM-Moderator-bot
e6cbf10fdc7844cd3b33d642f8c15ccfe2817b40
[ "MIT" ]
null
null
null
utils/db_api/mongo.py
YoshlikMedia/DTM-Moderator-bot
e6cbf10fdc7844cd3b33d642f8c15ccfe2817b40
[ "MIT" ]
null
null
null
utils/db_api/mongo.py
YoshlikMedia/DTM-Moderator-bot
e6cbf10fdc7844cd3b33d642f8c15ccfe2817b40
[ "MIT" ]
null
null
null
from pymongo import MongoClient from aiogram.contrib.fsm_storage.memory import MemoryStorage from data.config import IP client = MongoClient(IP) storage = MemoryStorage() database = client['DTM-Moderator'] user_db = database['users']
23.6
60
0.800847
from pymongo import MongoClient from aiogram.contrib.fsm_storage.memory import MemoryStorage from data.config import IP client = MongoClient(IP) storage = MemoryStorage() database = client['DTM-Moderator'] user_db = database['users']
true
true
f757a191caa69452b1670baf90bf6872d6e05eaf
342
py
Python
locale/pot/api/core/_autosummary/pyvista-PolyData-is_all_triangles-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-PolyData-is_all_triangles-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-PolyData-is_all_triangles-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
# Show a mesh from :func:`pyvista.Plane` is not composed of all # triangles. # import pyvista plane = pyvista.Plane() plane.is_all_triangles # Expected: ## False <CallableBool> # # Show that the mesh from :func:`pyvista.Sphere` contains only # triangles. # sphere = pyvista.Sphere() sphere.is_all_triangles # Expected: #...
20.117647
63
0.74269
import pyvista plane = pyvista.Plane() plane.is_all_triangles sphere = pyvista.Sphere() sphere.is_all_triangles
true
true
f757a1a7347ff2f1a4e0466c486fc277354b06f4
10,065
py
Python
src/deepSpeech.py
KyleHai/DeepSpeech2
44884426e213b6d5440914882064c9142b6ea7a3
[ "BSD-3-Clause" ]
56
2017-10-31T13:40:36.000Z
2021-11-16T11:00:45.000Z
src/deepSpeech.py
KyleHai/DeepSpeech2
44884426e213b6d5440914882064c9142b6ea7a3
[ "BSD-3-Clause" ]
2
2017-06-12T01:47:04.000Z
2017-08-25T01:35:28.000Z
src/deepSpeech.py
KyleHai/DeepSpeech2
44884426e213b6d5440914882064c9142b6ea7a3
[ "BSD-3-Clause" ]
22
2017-09-21T07:47:30.000Z
2021-09-16T11:22:01.000Z
# Author: Lakshmi Krishnan # Email: lkrishn7@ford.com # Author: YAO Matrix # Email: yaoweifeng0301@126.com """Builds the deepSpeech network. Summary of major functions: # Compute input feats and labels for training. inputs, labels, seq_len = inputs() # Compute inference on the model inputs to make a predict...
38.269962
148
0.616592
"""Builds the deepSpeech network. Summary of major functions: # Compute input feats and labels for training. inputs, labels, seq_len = inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compute the total loss of the prediction with respect to the la...
false
true
f757a1aa0d85fe52965ea5febe0d8af809a7986b
499
py
Python
django_select2/models.py
softwaydev/django-select2
2f6f08a806708ecdceee906419bc1c2afdf2cc01
[ "Apache-2.0" ]
null
null
null
django_select2/models.py
softwaydev/django-select2
2f6f08a806708ecdceee906419bc1c2afdf2cc01
[ "Apache-2.0" ]
null
null
null
django_select2/models.py
softwaydev/django-select2
2f6f08a806708ecdceee906419bc1c2afdf2cc01
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- from __future__ import absolute_import, unicode_literals from django.db import models from django.utils.encoding import force_text from six import python_2_unicode_compatible @python_2_unicode_compatible class KeyMap(models.Model): key = models.CharField(max_length=40, unique=True) val...
29.352941
62
0.753507
from __future__ import absolute_import, unicode_literals from django.db import models from django.utils.encoding import force_text from six import python_2_unicode_compatible @python_2_unicode_compatible class KeyMap(models.Model): key = models.CharField(max_length=40, unique=True) value = models.CharField(m...
true
true
f757a2352f9e417f523598cafbaaacdc4a27af5b
6,571
py
Python
emotion_cn.py
redtreeai/easy_text_emotion
df6e0f35ac49d041c9029514b9a42b274a63dbe6
[ "MIT" ]
31
2019-05-16T01:30:55.000Z
2022-02-18T02:37:42.000Z
emotion_cn.py
Chen-rainy/easy_text_emotion
df6e0f35ac49d041c9029514b9a42b274a63dbe6
[ "MIT" ]
null
null
null
emotion_cn.py
Chen-rainy/easy_text_emotion
df6e0f35ac49d041c9029514b9a42b274a63dbe6
[ "MIT" ]
6
2020-03-06T12:14:24.000Z
2022-01-12T07:46:22.000Z
# -*- coding: utf-8 -*- # @Time : 19-3-28 上午10:14 # @Author : Redtree # @File : emotion_cn.py # @Desc : import load_dict all_list = load_dict.getAllList() import jieba import random #文本情感分析算法 def cutSentence(input): #结巴分词 seg_list = jieba.cut(input) # 默认是精确模式 segwordList = (",".join(seg_list)) s...
33.871134
135
0.570842
import load_dict all_list = load_dict.getAllList() import jieba import random def cutSentence(input): seg_list = jieba.cut(input) segwordList = (",".join(seg_list)) ssp = segwordList.split(',') return ssp def reduceFunc(reduceTimes): addY=(10/reduceTimes)/10 return addY def levelReduceFu...
true
true
f757a239a242cff322db2e8a18fd08b09134904a
479
py
Python
total_connect_client/info.py
DanielDidWhat/total-connect-client
4baab6855380521833fc4bedc11a3cb870ba90c9
[ "MIT" ]
null
null
null
total_connect_client/info.py
DanielDidWhat/total-connect-client
4baab6855380521833fc4bedc11a3cb870ba90c9
[ "MIT" ]
null
null
null
total_connect_client/info.py
DanielDidWhat/total-connect-client
4baab6855380521833fc4bedc11a3cb870ba90c9
[ "MIT" ]
null
null
null
"""Test your system from the command line.""" import getpass import logging import sys from client import TotalConnectClient logging.basicConfig(filename="test.log", level=logging.DEBUG) if len(sys.argv) < 2 or len(sys.argv) > 3: print("usage: python3 test.py username [password]\n") sys.exit(1) USERNAME ...
19.16
61
0.707724
import getpass import logging import sys from client import TotalConnectClient logging.basicConfig(filename="test.log", level=logging.DEBUG) if len(sys.argv) < 2 or len(sys.argv) > 3: print("usage: python3 test.py username [password]\n") sys.exit(1) USERNAME = sys.argv[1] if len(sys.argv) == 2: PASSW...
true
true
f757a30330fca66f05b214fd75fc0f2078270266
392
py
Python
homes_to_let/factories/letting_feature_factory.py
Xtuden-com/django-property
6656d469a5d06c103a34c2e68b9f1754413fb3ba
[ "MIT" ]
null
null
null
homes_to_let/factories/letting_feature_factory.py
Xtuden-com/django-property
6656d469a5d06c103a34c2e68b9f1754413fb3ba
[ "MIT" ]
null
null
null
homes_to_let/factories/letting_feature_factory.py
Xtuden-com/django-property
6656d469a5d06c103a34c2e68b9f1754413fb3ba
[ "MIT" ]
null
null
null
from faker import Factory from homes_to_let.models import LettingFeature from homes_to_let.factories.letting_factory import LettingFactory import factory fake = Factory.create('en_GB') class LettingFeatureFactory(factory.DjangoModelFactory): class Meta: model = LettingFeature property = factory.S...
21.777778
65
0.778061
from faker import Factory from homes_to_let.models import LettingFeature from homes_to_let.factories.letting_factory import LettingFactory import factory fake = Factory.create('en_GB') class LettingFeatureFactory(factory.DjangoModelFactory): class Meta: model = LettingFeature property = factory.S...
true
true
f757a303ae3bf493825a1827aedb4a1008b13b93
9,249
py
Python
custom_components/kia_uvo/HyundaiBlueLinkAPIUSA.py
cdnninja/kia_uvo
7f45ef359bb1e69d45009cf7adf55473dbc86233
[ "MIT" ]
null
null
null
custom_components/kia_uvo/HyundaiBlueLinkAPIUSA.py
cdnninja/kia_uvo
7f45ef359bb1e69d45009cf7adf55473dbc86233
[ "MIT" ]
19
2021-10-31T19:22:33.000Z
2021-11-20T08:11:29.000Z
custom_components/kia_uvo/HyundaiBlueLinkAPIUSA.py
cdnninja/kia_uvo
7f45ef359bb1e69d45009cf7adf55473dbc86233
[ "MIT" ]
null
null
null
import logging import time from datetime import timedelta, datetime import json import push_receiver import random import requests from urllib.parse import parse_qs, urlparse import uuid import time import curlify from .const import ( DOMAIN, BRANDS, BRAND_HYUNDAI, BRAND_KIA, DATE_FORMAT, VEHI...
34.3829
144
0.596389
import logging import time from datetime import timedelta, datetime import json import push_receiver import random import requests from urllib.parse import parse_qs, urlparse import uuid import time import curlify from .const import ( DOMAIN, BRANDS, BRAND_HYUNDAI, BRAND_KIA, DATE_FORMAT, VEHI...
true
true
f757a341a5594a9f384193aecd874c98f5ebe54b
1,164
py
Python
benchexec/tools/ufo.py
SvenUmbricht/benchexec
ac2c3d71f6b390cea4b5da73d7c9013c6f5eb61a
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
137
2016-01-12T08:00:43.000Z
2022-03-28T20:05:22.000Z
benchexec/tools/ufo.py
SvenUmbricht/benchexec
ac2c3d71f6b390cea4b5da73d7c9013c6f5eb61a
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
505
2015-12-15T09:57:34.000Z
2022-03-19T13:15:07.000Z
benchexec/tools/ufo.py
SvenUmbricht/benchexec
ac2c3d71f6b390cea4b5da73d7c9013c6f5eb61a
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
164
2015-12-17T20:17:29.000Z
2022-03-18T02:53:28.000Z
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.util as util import benchexec.tools.template class Tool(benchexec.tools...
31.459459
80
0.612543
import benchexec.util as util import benchexec.tools.template class Tool(benchexec.tools.template.BaseTool): def executable(self): return util.find_executable("ufo.sh") def name(self): return "Ufo" def determine_result(self, returncode, returnsignal, output, isTimeout): output =...
true
true
f757a3966da9ef17e7b9b24cd3a0a4918a658924
5,252
py
Python
deeppavlov/models/feb/feb_common.py
antorionus/DeepPavlov_FEB
10159f07434865092d1a72fde2e8244de436db67
[ "Apache-2.0" ]
null
null
null
deeppavlov/models/feb/feb_common.py
antorionus/DeepPavlov_FEB
10159f07434865092d1a72fde2e8244de436db67
[ "Apache-2.0" ]
null
null
null
deeppavlov/models/feb/feb_common.py
antorionus/DeepPavlov_FEB
10159f07434865092d1a72fde2e8244de436db67
[ "Apache-2.0" ]
null
null
null
from enum import Enum from overrides import overrides from deeppavlov.core.common.registry import register from deeppavlov.core.models.component import Component from deeppavlov.core.common.log import get_logger from .feb_objects import * from question2wikidata.questions import pretty_json from time import time ...
33.452229
126
0.577113
from enum import Enum from overrides import overrides from deeppavlov.core.common.registry import register from deeppavlov.core.models.component import Component from deeppavlov.core.common.log import get_logger from .feb_objects import * from question2wikidata.questions import pretty_json from time import time ...
true
true
f757a53ab75ae2f54e689ad84c50d87d7f72d18a
6,978
py
Python
nhlstats/__init__.py
fancystats/nhlstats
c2352e459c9e257edbf71aeeee3cb0847a216a82
[ "MIT" ]
1
2015-03-20T20:34:42.000Z
2015-03-20T20:34:42.000Z
nhlstats/__init__.py
fancystats/nhlstats
c2352e459c9e257edbf71aeeee3cb0847a216a82
[ "MIT" ]
null
null
null
nhlstats/__init__.py
fancystats/nhlstats
c2352e459c9e257edbf71aeeee3cb0847a216a82
[ "MIT" ]
null
null
null
import sys import re import time import urllib2 import logging import datetime from version import __version__ from .db import create_tables, drop_tables, connect_db from .models import League, Season, SeasonType, Team, Conference, \ Division, Arena, Game from .collect import NHLTeams, NHLDivision...
32.760563
78
0.585125
import sys import re import time import urllib2 import logging import datetime from version import __version__ from .db import create_tables, drop_tables, connect_db from .models import League, Season, SeasonType, Team, Conference, \ Division, Arena, Game from .collect import NHLTeams, NHLDivision...
false
true
f757a5558b61a279acfafe66c0cfced81ec08790
9,513
py
Python
lib/prody/atomic/atom.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/atomic/atom.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
null
null
null
lib/prody/atomic/atom.py
npabon/ProDy
390322d9b7688809f91656bc1cadfdb66cd0a9b3
[ "NCSA" ]
1
2018-12-13T12:15:09.000Z
2018-12-13T12:15:09.000Z
# -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of th...
32.247458
79
0.5729
__author__ = 'Ahmet Bakan' __copyright__ = 'Copyright (C) 2010-2012 Ahmet Bakan' import numpy as np from . import flags from .fields import ATOMIC_FIELDS, READONLY from .fields import wrapGetMethod, wrapSetMethod from .pointer import AtomPointer from .bond import Bond __all__ = ['Atom'] class Atom(AtomPointer): ...
true
true
f757a5562b15115e4a32597548cf200d50e6de5a
2,033
py
Python
gunicorn.py
Skydipper/gee-tiles
24aa87141fbcb068ca171b8471287cb19324290b
[ "MIT" ]
1
2020-09-28T12:23:25.000Z
2020-09-28T12:23:25.000Z
gunicorn.py
Skydipper/gee-tiles
24aa87141fbcb068ca171b8471287cb19324290b
[ "MIT" ]
6
2019-08-28T17:17:25.000Z
2021-10-13T07:19:14.000Z
gunicorn.py
Skydipper/gee-tiles
24aa87141fbcb068ca171b8471287cb19324290b
[ "MIT" ]
5
2019-11-15T10:37:56.000Z
2021-07-15T08:07:27.000Z
import os import multiprocessing bind = '0.0.0.0:5700' backlog = 2048 worker_class = 'gevent' workers = 1 threads = 1 worker_connections = 1000 timeout = 30 keepalive = 2 max_requests = 1000 max_requests_jitter = 50 spew = False daemon = False pidfile = None umask = 666 user = os.getenv('USER') group = os.getenv('U...
25.098765
81
0.65273
import os import multiprocessing bind = '0.0.0.0:5700' backlog = 2048 worker_class = 'gevent' workers = 1 threads = 1 worker_connections = 1000 timeout = 30 keepalive = 2 max_requests = 1000 max_requests_jitter = 50 spew = False daemon = False pidfile = None umask = 666 user = os.getenv('USER') group = os.getenv('U...
true
true
f757a57ad18e3b8e8b80e3061f1d6babb8a3e7c3
3,089
py
Python
nova/tests/virt/xenapi/test_vm_utils.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
2
2015-11-05T04:52:34.000Z
2016-03-07T03:00:06.000Z
nova/tests/virt/xenapi/test_vm_utils.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
null
null
null
nova/tests/virt/xenapi/test_vm_utils.py
NetApp/nova
ca490d48a762a423449c654d5a7caeadecf2f6ca
[ "Apache-2.0" ]
1
2020-07-24T07:32:11.000Z
2020-07-24T07:32:11.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # 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.apach...
35.102273
78
0.62674
import contextlib import fixtures import mox from nova import test from nova import utils from nova.virt.xenapi import vm_utils @contextlib.contextmanager def contextified(result): yield result def _fake_noop(*args, **kwargs): return class GenerateConfigDriveTestCase(test.TestCase): def test_no_ad...
true
true
f757a72ff093cf2b95c25c2549dbef869a75c1c4
50,596
py
Python
src/gretel_synthetics/batch.py
em3ndez/gretel-synthetics
7d9f433a741469860c6ec3aadf76da02036671c4
[ "Apache-2.0" ]
null
null
null
src/gretel_synthetics/batch.py
em3ndez/gretel-synthetics
7d9f433a741469860c6ec3aadf76da02036671c4
[ "Apache-2.0" ]
null
null
null
src/gretel_synthetics/batch.py
em3ndez/gretel-synthetics
7d9f433a741469860c6ec3aadf76da02036671c4
[ "Apache-2.0" ]
null
null
null
""" This module allows automatic splitting of a DataFrame into smaller DataFrames (by clusters of columns) and doing model training and text generation on each sub-DF independently. Then we can concat each sub-DF back into one final synthetic dataset. For example usage, please see our Jupyter Notebook. """ import abc...
37.202941
120
0.624753
import abc import glob import gzip import io import json import logging import shutil import tempfile import threading import time from copy import deepcopy from dataclasses import dataclass, field from itertools import zip_longest from math import ceil from pathlib import Path from typing import Callable, Dict from t...
true
true
f757a741a962a8e0318085e9876009b15c7c4a47
3,612
py
Python
src/ui/ui_wallet_dlg_options1.py
hatchpay/hatch-masternode-tool
4775ee3a1297a2ff0b80c35b362a5f1ddffbe4e4
[ "MIT" ]
null
null
null
src/ui/ui_wallet_dlg_options1.py
hatchpay/hatch-masternode-tool
4775ee3a1297a2ff0b80c35b362a5f1ddffbe4e4
[ "MIT" ]
null
null
null
src/ui/ui_wallet_dlg_options1.py
hatchpay/hatch-masternode-tool
4775ee3a1297a2ff0b80c35b362a5f1ddffbe4e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/blogin/PycharmProjects/HMT-git/src/ui/ui_wallet_dlg_options1.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_WdgOptions1(...
48.810811
125
0.741141
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_WdgOptions1(object): def setupUi(self, WdgOptions1): WdgOptions1.setObjectName("WdgOptions1") WdgOptions1.resize(243, 76) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePo...
true
true
f757a9512cab8bee6891b736750c699e606150d2
54
py
Python
pathfinding/__init__.py
Tinggaard/pathfinding
90497208f5f761a64e099b42159157de45176b4a
[ "MIT" ]
null
null
null
pathfinding/__init__.py
Tinggaard/pathfinding
90497208f5f761a64e099b42159157de45176b4a
[ "MIT" ]
null
null
null
pathfinding/__init__.py
Tinggaard/pathfinding
90497208f5f761a64e099b42159157de45176b4a
[ "MIT" ]
null
null
null
from .main import cli from .scheme import Node, Graph
18
31
0.777778
from .main import cli from .scheme import Node, Graph
true
true
f757aa0f32dff09811623a0a7fd8e0af09950e69
2,788
py
Python
share/qt/extract_strings_qt.py
mulecore/mulecoin
e52131742938ae433463f32680837981a5cedc0f
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
mulecore/mulecoin
e52131742938ae433463f32680837981a5cedc0f
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
mulecore/mulecoin
e52131742938ae433463f32680837981a5cedc0f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2012-2016 The Bitcoin Core developers # Copyright (c) 2017-2019 The Raven Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Extract _("...") strings for translation and conver...
30.637363
107
0.645624
from __future__ import division,print_function,unicode_literals from subprocess import Popen, PIPE import operator import os import sys OUT_CPP="qt/mulecoinstrings.cpp" EMPTY=['""'] def parse_po(text): messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line in text.sp...
true
true
f757aa0fa2985a4e092af245f87304582b35dc98
3,344
py
Python
aim/sdk/adapters/hugging_face.py
YodaEmbedding/aim
8d8ad91dde5df2c5c0e5054072df5f7c4f8fdf79
[ "Apache-2.0" ]
null
null
null
aim/sdk/adapters/hugging_face.py
YodaEmbedding/aim
8d8ad91dde5df2c5c0e5054072df5f7c4f8fdf79
[ "Apache-2.0" ]
null
null
null
aim/sdk/adapters/hugging_face.py
YodaEmbedding/aim
8d8ad91dde5df2c5c0e5054072df5f7c4f8fdf79
[ "Apache-2.0" ]
null
null
null
from logging import getLogger from typing import Any, Dict, Optional from aim.ext.resource.configs import DEFAULT_SYSTEM_TRACKING_INT from aim.sdk.num_utils import is_number from aim.sdk.run import Run try: from transformers.trainer_callback import TrainerCallback except ImportError: raise RuntimeError( ...
33.44
87
0.601376
from logging import getLogger from typing import Any, Dict, Optional from aim.ext.resource.configs import DEFAULT_SYSTEM_TRACKING_INT from aim.sdk.num_utils import is_number from aim.sdk.run import Run try: from transformers.trainer_callback import TrainerCallback except ImportError: raise RuntimeError( ...
true
true
f757aa4a4a0c2453621260cdcbf21747c99b830a
4,087
py
Python
onlinepayments/sdk/merchant/productgroups/get_product_groups_params.py
wl-online-payments-direct/sdk-python3
99fca127334520cde4ffa3a34cbea3b3a0d3fbff
[ "Apache-2.0" ]
null
null
null
onlinepayments/sdk/merchant/productgroups/get_product_groups_params.py
wl-online-payments-direct/sdk-python3
99fca127334520cde4ffa3a34cbea3b3a0d3fbff
[ "Apache-2.0" ]
null
null
null
onlinepayments/sdk/merchant/productgroups/get_product_groups_params.py
wl-online-payments-direct/sdk-python3
99fca127334520cde4ffa3a34cbea3b3a0d3fbff
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # This class was auto-generated. # from onlinepayments.sdk.param_request import ParamRequest from onlinepayments.sdk.request_param import RequestParam class GetProductGroupsParams(ParamRequest): """ Query parameters for Get product groups """ __country_code = None __cur...
30.051471
200
0.630536
from onlinepayments.sdk.param_request import ParamRequest from onlinepayments.sdk.request_param import RequestParam class GetProductGroupsParams(ParamRequest): __country_code = None __currency_code = None __locale = None __amount = None __is_recurring = None __hide = None @property d...
true
true
f757ab7ac7eaf0bc2718a5e23b9281337f87e474
8,629
py
Python
AdvenPyGameMain.py
LegoAvatar04/AdvenPyGame
b6ec873d8d652515fab5f8fb5301ca473c019d72
[ "Apache-2.0" ]
null
null
null
AdvenPyGameMain.py
LegoAvatar04/AdvenPyGame
b6ec873d8d652515fab5f8fb5301ca473c019d72
[ "Apache-2.0" ]
null
null
null
AdvenPyGameMain.py
LegoAvatar04/AdvenPyGame
b6ec873d8d652515fab5f8fb5301ca473c019d72
[ "Apache-2.0" ]
null
null
null
import pygame import os pygame.init() clock = pygame.time.Clock() class Player(): walkRight = [pygame.image.load(os.path.join('SideScrollSprites', 'R1.png')), pygame.image.load(os.path.join('SideScrollSprites', 'R2.png')), pygame.image.load(os.path.join('SideScrollSprites', 'R3...
39.764977
90
0.549658
import pygame import os pygame.init() clock = pygame.time.Clock() class Player(): walkRight = [pygame.image.load(os.path.join('SideScrollSprites', 'R1.png')), pygame.image.load(os.path.join('SideScrollSprites', 'R2.png')), pygame.image.load(os.path.join('SideScrollSprites', 'R3...
true
true
f757aba18e6a622f9f7405933cd49b9a824760b3
10,474
py
Python
scripts/missionTests/missionTest_radar.py
MertGunducMA/iq_gnc
6ec760c3213036bff6fca85ae60f6f1dee31afa9
[ "MIT" ]
null
null
null
scripts/missionTests/missionTest_radar.py
MertGunducMA/iq_gnc
6ec760c3213036bff6fca85ae60f6f1dee31afa9
[ "MIT" ]
null
null
null
scripts/missionTests/missionTest_radar.py
MertGunducMA/iq_gnc
6ec760c3213036bff6fca85ae60f6f1dee31afa9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #---- Dronekit Imports --------------- from __future__ import print_function from dronekit import connect, VehicleMode, LocationGlobalRelative, LocationGlobal, Command import time import math from pymavlink import mavutil #----- Radar Imports ---------------- from signa...
32.937107
195
0.659347
from __future__ import print_function from dronekit import connect, VehicleMode, LocationGlobalRelative, LocationGlobal, Command import time import math from pymavlink import mavutil from signal import signal, SIGINT from srp.utilities import Sleep from srp.common.transport import SRP_TCPClient from srp.client impo...
true
true
f757abc75ac83f62d04ed0b45416c4267f8a2d00
10,175
py
Python
functions/source/KubeManifest/lambda_function.py
shrumit/quickstart-amazon-eks
e76baa0f2808c95aa8c208f7abcc7144cfc2c889
[ "Apache-2.0" ]
null
null
null
functions/source/KubeManifest/lambda_function.py
shrumit/quickstart-amazon-eks
e76baa0f2808c95aa8c208f7abcc7144cfc2c889
[ "Apache-2.0" ]
null
null
null
functions/source/KubeManifest/lambda_function.py
shrumit/quickstart-amazon-eks
e76baa0f2808c95aa8c208f7abcc7144cfc2c889
[ "Apache-2.0" ]
null
null
null
import json import logging import boto3 import subprocess import shlex import os import re from ruamel import yaml from datetime import date, datetime from crhelper import CfnResource from time import sleep logger = logging.getLogger(__name__) helper = CfnResource(json_logging=True, log_level='DEBUG') try: s3_cli...
33.692053
112
0.602555
import json import logging import boto3 import subprocess import shlex import os import re from ruamel import yaml from datetime import date, datetime from crhelper import CfnResource from time import sleep logger = logging.getLogger(__name__) helper = CfnResource(json_logging=True, log_level='DEBUG') try: s3_cli...
true
true
f757ae02fb619b91e6c3bf7db6415c373cc63b3b
1,778
py
Python
core/urls.py
AliBigdeli/Django-CustomUser-DRF-App
06904b2eb0df255caff318bc32845f6064e917c4
[ "MIT" ]
3
2021-12-07T21:49:06.000Z
2021-12-25T10:16:52.000Z
core/urls.py
AliBigdeli/Django-CustomUser-DRF-App
06904b2eb0df255caff318bc32845f6064e917c4
[ "MIT" ]
null
null
null
core/urls.py
AliBigdeli/Django-CustomUser-DRF-App
06904b2eb0df255caff318bc32845f6064e917c4
[ "MIT" ]
null
null
null
"""core URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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-based vi...
36.285714
96
0.708661
from django.contrib import admin from django.urls import path, include from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi schema_view = get_schema_view( openapi.Info( title="CustomUser Django API", default_version='v1', description="A Bas...
true
true
f757af4a1555618fb8d4c52c1d84a3f06c05405a
8,059
py
Python
api/tests/opentrons/protocol_api/test_accessor_fn.py
theosanderson/opentrons
df9f41d3dc56bd03ff0ef4e804d1224221272ddf
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/protocol_api/test_accessor_fn.py
theosanderson/opentrons
df9f41d3dc56bd03ff0ef4e804d1224221272ddf
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/protocol_api/test_accessor_fn.py
theosanderson/opentrons
df9f41d3dc56bd03ff0ef4e804d1224221272ddf
[ "Apache-2.0" ]
null
null
null
from opentrons.protocol_api import labware from opentrons.types import Point, Location minimalLabwareDef = { "metadata": { "displayName": "minimal labware" }, "cornerOffsetFromSlot": { "x": 10, "y": 10, "z": 5 }, "parameters": { "isTiprack": False, }, ...
32.760163
78
0.562601
from opentrons.protocol_api import labware from opentrons.types import Point, Location minimalLabwareDef = { "metadata": { "displayName": "minimal labware" }, "cornerOffsetFromSlot": { "x": 10, "y": 10, "z": 5 }, "parameters": { "isTiprack": False, }, ...
true
true
f757b03cda90cac503e7391c444d893a25a4ee06
14,145
py
Python
PaddleNLP/examples/text_generation/vae-seq2seq/model.py
weiwei1115/models
e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3
[ "Apache-2.0" ]
6
2021-06-08T13:19:35.000Z
2021-06-24T15:08:54.000Z
examples/text_generation/vae-seq2seq/model.py
xihuanafeng/PaddleNLP
14c3209118b2cadcce9a8f66b760c9cddb3a02ad
[ "Apache-2.0" ]
1
2021-11-22T08:11:08.000Z
2021-11-22T08:11:08.000Z
examples/text_generation/vae-seq2seq/model.py
xihuanafeng/PaddleNLP
14c3209118b2cadcce9a8f66b760c9cddb3a02ad
[ "Apache-2.0" ]
1
2021-04-28T09:01:37.000Z
2021-04-28T09:01:37.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 appl...
34.839901
87
0.602969
import numpy as np import paddle import paddle.nn as nn import paddle.nn.functional as F import paddle.nn.initializer as I class CrossEntropyWithKL(nn.Layer): def __init__(self, base_kl_weight, anneal_r): super(CrossEntropyWithKL, self).__init__() self.kl_weight = base_kl_weight self.an...
true
true
f757b09602a7d1cf60d3b787d7cf315f69ffa882
1,292
py
Python
commands/ipython.py
gaohongsong/flask-demo
a2afd1b64cad1bb08bada6f327abc7396db0a6df
[ "MIT" ]
12
2017-12-24T13:58:17.000Z
2021-04-06T16:21:00.000Z
commands/ipython.py
gaohongsong/flask-demo
a2afd1b64cad1bb08bada6f327abc7396db0a6df
[ "MIT" ]
null
null
null
commands/ipython.py
gaohongsong/flask-demo
a2afd1b64cad1bb08bada6f327abc7396db0a6df
[ "MIT" ]
1
2021-10-17T14:45:44.000Z
2021-10-17T14:45:44.000Z
import code import sys import click from flask import json from flask.cli import with_appcontext @click.command() @with_appcontext def command(): """Runs a shell in the app context. Runs an interactive Python shell in the context of a given Flask application. The application will populate the default ...
27.489362
71
0.677245
import code import sys import click from flask import json from flask.cli import with_appcontext @click.command() @with_appcontext def command(): from flask.globals import _app_ctx_stack app = _app_ctx_stack.top.app banner1 = '''Python %s on %s App: %s%s Instance: %s Db: %s''' % ( sys.version, ...
true
true
f757b20faf3b748a44cad2e69d069e148534f7e6
1,188
py
Python
docs/podstawy/elotek/toto29.py
damiankarol7/python101
1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b
[ "MIT" ]
44
2015-02-11T19:10:37.000Z
2021-11-11T09:45:43.000Z
docs/podstawy/elotek/toto29.py
damiankarol7/python101
1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b
[ "MIT" ]
9
2015-02-06T21:26:25.000Z
2022-03-31T10:44:22.000Z
docs/podstawy/elotek/toto29.py
damiankarol7/python101
1978a9402a8fb0f20c4ca7bd542cb8d7d4501b9b
[ "MIT" ]
172
2015-06-13T07:16:24.000Z
2022-03-30T20:41:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random try: ileliczb = int(input("Podaj ilość typowanych liczb: ")) maksliczba = int(input("Podaj maksymalną losowaną liczbę: ")) if ileliczb > maksliczba: print("Błędne dane!") exit() except ValueError: print("Błędne dane!") ex...
24.244898
65
0.554714
import random try: ileliczb = int(input("Podaj ilość typowanych liczb: ")) maksliczba = int(input("Podaj maksymalną losowaną liczbę: ")) if ileliczb > maksliczba: print("Błędne dane!") exit() except ValueError: print("Błędne dane!") exit() liczby = [] i = 0 while i < ileliczb: ...
true
true
f757b3483b80e7237d5e60f01b7794765915bae2
6,922
py
Python
galaxy_merge_edits/grad_cam.py
Kathryn-Downey/DeepMergeDomainAdaptation
334331ce8871cda80590cd9ec671941a82fa859c
[ "BSD-2-Clause" ]
1
2021-04-06T00:09:35.000Z
2021-04-06T00:09:35.000Z
galaxy_merge_edits/grad_cam.py
Kathryn-Downey/DeepMergeDomainAdaptation
334331ce8871cda80590cd9ec671941a82fa859c
[ "BSD-2-Clause" ]
null
null
null
galaxy_merge_edits/grad_cam.py
Kathryn-Downey/DeepMergeDomainAdaptation
334331ce8871cda80590cd9ec671941a82fa859c
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Author: Kazuto Nakashima # URL: http://kazuto1011.github.io # Created: 2017-05-26 from collections import Sequence import numpy as np import torch import torch.nn as nn from torch.nn import functional as F from tqdm import tqdm class _BaseWrapper(object): def __...
31.607306
97
0.628431
from collections import Sequence import numpy as np import torch import torch.nn as nn from torch.nn import functional as F from tqdm import tqdm class _BaseWrapper(object): def __init__(self, model): super(_BaseWrapper, self).__init__() self.device = next(model.parameters()).device self...
true
true
f757b4ff43c7357ceccff82978a2f520f9824c56
5,384
py
Python
c-dfs.py
ZhenoSan/DistributedFileSystem
8776e0ecffcc06ea213603ad0ca202e15595297c
[ "MIT" ]
1
2021-03-01T08:49:26.000Z
2021-03-01T08:49:26.000Z
c-dfs.py
ZhenoSan/DistributedFileSystem
8776e0ecffcc06ea213603ad0ca202e15595297c
[ "MIT" ]
null
null
null
c-dfs.py
ZhenoSan/DistributedFileSystem
8776e0ecffcc06ea213603ad0ca202e15595297c
[ "MIT" ]
null
null
null
import socket, threading, os, struct,selectors#,atexit from pathlib import Path from tkinter import * import queue # thread-safe Q = queue.Queue() sel = selectors.DefaultSelector() serv_fd = None CLIENT_PORT = 9999 MAX_MSG = 4096 last_cmd = '' last_print = '' class CleanExit: pass class TextEditor: #@staticmetho...
25.760766
70
0.57188
import socket, threading, os, struct,selectorsfrom pathlib import Path from tkinter import * import queue Q = queue.Queue() sel = selectors.DefaultSelector() serv_fd = None CLIENT_PORT = 9999 MAX_MSG = 4096 last_cmd = '' last_print = '' class CleanExit: pass class TextEditor: def quit_app(self, event=None): o...
true
true
f757b60320f3a3b289b2c9b6118f987874439a28
1,245
py
Python
numpy/fft/tests/test_helper.py
enthought/numpy-refactor
c6ca75110acf6d90a75b563bcee17cf1ab37be98
[ "BSD-3-Clause" ]
7
2016-11-29T18:01:53.000Z
2018-08-21T09:45:15.000Z
numpy/fft/tests/test_helper.py
plaes/numpy
209866bc55eee56e92692307c4437af024bae87d
[ "BSD-3-Clause" ]
1
2016-06-28T14:03:59.000Z
2016-06-28T14:03:59.000Z
numpy/fft/tests/test_helper.py
plaes/numpy
209866bc55eee56e92692307c4437af024bae87d
[ "BSD-3-Clause" ]
3
2016-10-19T00:41:31.000Z
2020-03-01T04:57:36.000Z
#!/usr/bin/env python # Copied from fftpack.helper by Pearu Peterson, October 2005 """ Test functions for fftpack.helper module """ from numpy.testing import * from numpy.fft import fftshift,ifftshift,fftfreq from numpy import pi def random(size): return rand(*size) class TestFFTShift(TestCase): def test_de...
28.953488
63
0.624096
from numpy.testing import * from numpy.fft import fftshift,ifftshift,fftfreq from numpy import pi def random(size): return rand(*size) class TestFFTShift(TestCase): def test_definition(self): x = [0,1,2,3,4,-4,-3,-2,-1] y = [-4,-3,-2,-1,0,1,2,3,4] assert_array_almost_equal(fftshift(x...
true
true
f757b61324ce321cbfb3ddc69bb19b3f632b6213
1,255
py
Python
citizen.py
thesquaregroot/election-simulation
cc1725b0b8154527ecf6ca7356af1e44771f27bd
[ "MIT" ]
3
2018-06-20T04:01:37.000Z
2022-03-01T19:16:21.000Z
citizen.py
thesquaregroot/election-simulation
cc1725b0b8154527ecf6ca7356af1e44771f27bd
[ "MIT" ]
null
null
null
citizen.py
thesquaregroot/election-simulation
cc1725b0b8154527ecf6ca7356af1e44771f27bd
[ "MIT" ]
null
null
null
import math class Citizen: def __init__(self, economicPosition, socialPosition): self.economicPosition = economicPosition self.socialPosition = socialPosition def vote(self, politicians): vote = (0, None) for politician in politicians: score = self._score(politician...
40.483871
126
0.676494
import math class Citizen: def __init__(self, economicPosition, socialPosition): self.economicPosition = economicPosition self.socialPosition = socialPosition def vote(self, politicians): vote = (0, None) for politician in politicians: score = self._score(politician...
true
true
f757b68904017fb96c5587ea4e5d55543bbed12e
7,999
py
Python
SPConvNets/models/pointnet_epn_netvlad.py
chienerh/EPN_PointCloud
d1488cf1ff82a5bc7ac89c28df30fa2f3f2e0e30
[ "MIT" ]
null
null
null
SPConvNets/models/pointnet_epn_netvlad.py
chienerh/EPN_PointCloud
d1488cf1ff82a5bc7ac89c28df30fa2f3f2e0e30
[ "MIT" ]
null
null
null
SPConvNets/models/pointnet_epn_netvlad.py
chienerh/EPN_PointCloud
d1488cf1ff82a5bc7ac89c28df30fa2f3f2e0e30
[ "MIT" ]
null
null
null
""" Code taken from https://github.com/cattaneod/PointNetVlad-Pytorch/blob/master/models/PointNetVlad.py """ from __future__ import print_function import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.autograd import Variable import numpy as np import torch.nn.functional as F i...
41.020513
138
0.580948
from __future__ import print_function import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.autograd import Variable import numpy as np import torch.nn.functional as F import math import SPConvNets.models.pr_so3net_pn as pr_so3net_pn import SPConvNets.utils as M class STN3d(n...
true
true
f757b7c1200edc57156bb4e472ccea1fb73eddae
4,054
py
Python
pyxlpr/ppocr/postprocess/pse_postprocess/pse_postprocess.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
null
null
null
pyxlpr/ppocr/postprocess/pse_postprocess/pse_postprocess.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
null
null
null
pyxlpr/ppocr/postprocess/pse_postprocess/pse_postprocess.py
XLPRUtils/pyUtils
3a62c14b0658ad3c24d83f953ee0d88530b02b23
[ "Apache-2.0" ]
null
null
null
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.067227
76
0.566848
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import cv2 import paddle from paddle.nn import functional as F from pyxlpr.ppocr.postprocess.pse_postprocess.pse import pse class PSEPostProcess(object): def __init__(self, ...
true
true
f757b84ba221581b6833e7ccbc4643c61e9f3ea7
17,035
py
Python
iroha/iroha.py
Pawlak00/iroha-python
e7a4ba912a82c2cfa1f0135674ef77c58e88f521
[ "Apache-2.0" ]
null
null
null
iroha/iroha.py
Pawlak00/iroha-python
e7a4ba912a82c2cfa1f0135674ef77c58e88f521
[ "Apache-2.0" ]
null
null
null
iroha/iroha.py
Pawlak00/iroha-python
e7a4ba912a82c2cfa1f0135674ef77c58e88f521
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Copyright Soramitsu Co., Ltd. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # from . import ed25519 import hashlib import binascii import grpc import time import re import os from . import commands_pb2 from . import endpoint_pb2 from . import endpoint_pb2_grpc from . import pri...
40.082353
108
0.657822
from . import ed25519 import hashlib import binascii import grpc import time import re import os from . import commands_pb2 from . import endpoint_pb2 from . import endpoint_pb2_grpc from . import primitive_pb2 from . import queries_pb2 from . import transaction_pb2 class IrohaCrypto(object): @staticmethod ...
true
true
f757b85a8eacd58ff0b3f0d6414637d35ce84a9f
850
py
Python
slices_to_npz.py
mlaves/imes4d
d1505f75487ced0a10c05f1c937af91ff666e3d4
[ "MIT" ]
20
2018-05-18T10:59:42.000Z
2022-03-10T18:03:15.000Z
slices_to_npz.py
mlaves/imes4d
d1505f75487ced0a10c05f1c937af91ff666e3d4
[ "MIT" ]
null
null
null
slices_to_npz.py
mlaves/imes4d
d1505f75487ced0a10c05f1c937af91ff666e3d4
[ "MIT" ]
3
2018-03-22T13:25:09.000Z
2018-03-22T13:47:54.000Z
from imes4d.utils import slices_to_npz from tqdm import tqdm if __name__ == "__main__": with tqdm(total=7) as pbar: slices_to_npz('/home/laves/Pictures/oct/Kugelplatte/0/*.JPG', 'sb_0.npz') pbar.update() slices_to_npz('/home/laves/Pictures/oct/Kugelplatte/1/*.JPG', 'sb_1.npz') pbar...
40.47619
81
0.641176
from imes4d.utils import slices_to_npz from tqdm import tqdm if __name__ == "__main__": with tqdm(total=7) as pbar: slices_to_npz('/home/laves/Pictures/oct/Kugelplatte/0/*.JPG', 'sb_0.npz') pbar.update() slices_to_npz('/home/laves/Pictures/oct/Kugelplatte/1/*.JPG', 'sb_1.npz') pbar...
true
true
f757b86d318a40045a02b597a7a5b1440c54a6c4
1,702
py
Python
app/programs/views.py
rukaury/vsrpapi
0e9b5d0bdef24028b1fb09c65107765245a05224
[ "MIT" ]
null
null
null
app/programs/views.py
rukaury/vsrpapi
0e9b5d0bdef24028b1fb09c65107765245a05224
[ "MIT" ]
null
null
null
app/programs/views.py
rukaury/vsrpapi
0e9b5d0bdef24028b1fb09c65107765245a05224
[ "MIT" ]
null
null
null
import datetime from flask import Blueprint, request, abort from app.auth.helper import token_required from app.programs.helper import response, response_for_program, get_programs_json_list, response_for_programs_list, get_programs, get_single_program from app.models.user import User from app.models.program import Prog...
29.859649
148
0.699177
import datetime from flask import Blueprint, request, abort from app.auth.helper import token_required from app.programs.helper import response, response_for_program, get_programs_json_list, response_for_programs_list, get_programs, get_single_program from app.models.user import User from app.models.program import Prog...
true
true
f757b8a47032cc0adedc53d18ad428c19af162aa
662
py
Python
April 2021/Longest Valid Parentheses.py
parikshitgupta1/leetcode
eba6c11740dc7597204af127c0f4c2163376294f
[ "MIT" ]
null
null
null
April 2021/Longest Valid Parentheses.py
parikshitgupta1/leetcode
eba6c11740dc7597204af127c0f4c2163376294f
[ "MIT" ]
null
null
null
April 2021/Longest Valid Parentheses.py
parikshitgupta1/leetcode
eba6c11740dc7597204af127c0f4c2163376294f
[ "MIT" ]
null
null
null
class Solution(object): def longestValidParentheses(self, s): """ :type s: str :rtype: int """ def length(it, start, c): depth, longest = 0, 0 for i in it: if s[i] == c: depth += 1 else: ...
30.090909
64
0.373112
class Solution(object): def longestValidParentheses(self, s): def length(it, start, c): depth, longest = 0, 0 for i in it: if s[i] == c: depth += 1 else: depth -= 1 if depth < 0: ...
true
true
f757b949e869bbb195152a0501d6ea14041ff7ff
423
py
Python
user_authentication_drf/asgi.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
user_authentication_drf/asgi.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
user_authentication_drf/asgi.py
Debagboola/User-Authentication-And-Registration-With-Django-Rest-Framework
45637d73d8f9ee679e96eb8332c27f0ad8b6b3be
[ "MIT" ]
null
null
null
""" ASGI config for user_authentication_drf 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.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefau...
24.882353
83
0.801418
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'user_authentication_drf.settings') application = get_asgi_application()
true
true
f757ba9d5944e480a4734f0dbb08ff1540ba6495
13,714
py
Python
keras/api/tests/api_compatibility_test.py
code-review-doctor/keras
96130040540e1405ffe746ddf2b2cceb9b8b8f65
[ "Apache-2.0" ]
null
null
null
keras/api/tests/api_compatibility_test.py
code-review-doctor/keras
96130040540e1405ffe746ddf2b2cceb9b8b8f65
[ "Apache-2.0" ]
null
null
null
keras/api/tests/api_compatibility_test.py
code-review-doctor/keras
96130040540e1405ffe746ddf2b2cceb9b8b8f65
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.96496
80
0.692285
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import argparse import os import re import sys import six from google.protobuf import message from google.protobuf import text_format from tensorflow.python.lib.io import file_io fr...
true
true
f757bbb502ffc7db2356876cfe47bc8a8d90c0dc
2,484
py
Python
images/forms.py
chechons/bookmarks
bbd4de4dbe601743f586ba5d11b8a047f209864b
[ "MIT" ]
1
2021-12-13T17:58:35.000Z
2021-12-13T17:58:35.000Z
images/forms.py
chechons/bookmarks
bbd4de4dbe601743f586ba5d11b8a047f209864b
[ "MIT" ]
1
2021-12-13T17:51:04.000Z
2021-12-13T17:51:04.000Z
images/forms.py
chechons/bookmarks
bbd4de4dbe601743f586ba5d11b8a047f209864b
[ "MIT" ]
null
null
null
""" Let's start by building a form to submit new images. """ from urllib import request from django.core.files.base import ContentFile from django.utils.text import slugify from django import forms from .models import Image class ImageCreateForm(forms.ModelForm): """ This form is a ModelFOrm form built from ...
40.064516
82
0.654992
from urllib import request from django.core.files.base import ContentFile from django.utils.text import slugify from django import forms from .models import Image class ImageCreateForm(forms.ModelForm): class Meta: model = Image fields = ('title', 'url', 'description') widgets = { ...
true
true
f757bd2fbdeb805a9f6da95078028eb41711e495
6,371
py
Python
examples/vae/train_vae.py
belldandyxtq/chainer
abffa9a7def07c2e6bcd79d8ddcebeed1e762161
[ "MIT" ]
null
null
null
examples/vae/train_vae.py
belldandyxtq/chainer
abffa9a7def07c2e6bcd79d8ddcebeed1e762161
[ "MIT" ]
null
null
null
examples/vae/train_vae.py
belldandyxtq/chainer
abffa9a7def07c2e6bcd79d8ddcebeed1e762161
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Chainer example: train a VAE on MNIST """ import argparse import os import warnings import numpy as np import chainer from chainer import training from chainer.training import extensions import chainerx import net import matplotlib matplotlib.use('Agg') def main(): parser = argparse.A...
40.069182
79
0.624235
import argparse import os import warnings import numpy as np import chainer from chainer import training from chainer.training import extensions import chainerx import net import matplotlib matplotlib.use('Agg') def main(): parser = argparse.ArgumentParser(description='Chainer example: VAE') parser.add_ar...
true
true
f757bd71a20251a0dc2438f739c44e4d71128bb3
765
py
Python
checkpointing/looping_test.py
tongni1975/spark_using_python
e59bfe36271899e4298cbfbd1ad88839f6f80ff5
[ "Apache-2.0" ]
42
2018-05-22T07:00:40.000Z
2022-03-22T09:21:09.000Z
checkpointing/looping_test.py
tongni1975/spark_using_python
e59bfe36271899e4298cbfbd1ad88839f6f80ff5
[ "Apache-2.0" ]
null
null
null
checkpointing/looping_test.py
tongni1975/spark_using_python
e59bfe36271899e4298cbfbd1ad88839f6f80ff5
[ "Apache-2.0" ]
30
2018-06-11T06:38:31.000Z
2021-09-20T16:45:55.000Z
# # Source code for the 'Checkpointing RDDs' Exercise in # Data Analytics with Spark Using Python # by Jeffrey Aven # # $ spark-submit --master looping_test.py # import sys from pyspark import SparkConf, SparkContext sc = SparkContext() sc.setCheckpointDir("file:///tmp/checkpointdir") rddofints = sc.parallelize([1,2,...
25.5
54
0.700654
import sys from pyspark import SparkConf, SparkContext sc = SparkContext() sc.setCheckpointDir("file:///tmp/checkpointdir") rddofints = sc.parallelize([1,2,3,4,5,6,7,8,9,10]) try: for i in range(1000): rddofints = rddofints.map(lambda x: x+1) if i % 10 == 0: print("Looped " + str(i) + " times") rddofint...
true
true
f757bd85422577e38470e447e15dfa9ab77331db
14,030
py
Python
extensions/answer_summarizers/models.py
carolinajimenez26/oppia
8a8f07e37e11beb441a53635530e1d3cebe6beef
[ "Apache-2.0" ]
1
2019-11-05T09:32:39.000Z
2019-11-05T09:32:39.000Z
extensions/answer_summarizers/models.py
TakorLucila/oppia
393a81474ddc02b7141eed80f33c720cde447517
[ "Apache-2.0" ]
13
2019-03-04T18:29:27.000Z
2019-08-24T23:27:36.000Z
extensions/answer_summarizers/models.py
TakorLucila/oppia
393a81474ddc02b7141eed80f33c720cde447517
[ "Apache-2.0" ]
1
2020-10-04T06:54:41.000Z
2020-10-04T06:54:41.000Z
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
39.857955
80
0.696436
from __future__ import absolute_import from __future__ import unicode_literals import collections import itertools import operator from core.domain import exp_domain from core.domain import stats_domain import feconf import python_utils import utils CLASSIFICATION_CATEGORIES = frozenset([ exp_domain.EXPLICIT_...
true
true
f757bf20335de5c8df286d726f835ca5af5d8966
13,920
py
Python
cove_iati/tests_functional.py
Xtuden-com/cove
8a26681eb914e6c351171966bff92430816f50f5
[ "MIT" ]
null
null
null
cove_iati/tests_functional.py
Xtuden-com/cove
8a26681eb914e6c351171966bff92430816f50f5
[ "MIT" ]
null
null
null
cove_iati/tests_functional.py
Xtuden-com/cove
8a26681eb914e6c351171966bff92430816f50f5
[ "MIT" ]
null
null
null
import os import time import pytest import requests from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.chrome.options import Options BROWSER = os.environ.get('BROWSER', 'ChromeHeadless') @pytest.fixture(scope="module") def browser(request): if BRO...
49.014085
202
0.702514
import os import time import pytest import requests from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.chrome.options import Options BROWSER = os.environ.get('BROWSER', 'ChromeHeadless') @pytest.fixture(scope="module") def browser(request): if BRO...
true
true
f757c0f671ed3b2a8c88b84d579b6e516f2659b3
9,273
py
Python
flask_social/views.py
aerickson/flask-social
63911f4028772e707be8f985fd40a3339161f374
[ "MIT" ]
null
null
null
flask_social/views.py
aerickson/flask-social
63911f4028772e707be8f985fd40a3339161f374
[ "MIT" ]
null
null
null
flask_social/views.py
aerickson/flask-social
63911f4028772e707be8f985fd40a3339161f374
[ "MIT" ]
1
2018-07-09T11:04:12.000Z
2018-07-09T11:04:12.000Z
# -*- coding: utf-8 -*- """ flask.ext.social.views ~~~~~~~~~~~~~~~~~~~~~~ This module contains the Flask-Social views :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ from importlib import import_module from flask import (Blueprint, current_app, redirect, requ...
35.258555
79
0.670441
from importlib import import_module from flask import (Blueprint, current_app, redirect, request, session, after_this_request, abort, url_for) from flask_security import current_user, login_required from flask_security.utils import (get_post_login_redirect, login_user, ...
true
true
f757c25e70d7dbf5c6350622ed539316c0ee0aa0
3,475
py
Python
chrome/common/extensions/docs/server2/permissions_data_source.py
iplo/Chain
8bc8943d66285d5258fffc41bed7c840516c4422
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
chrome/common/extensions/docs/server2/permissions_data_source.py
xiaoyuyanran/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-02-14T21:55:58.000Z
2017-02-14T21:55:58.000Z
chrome/common/extensions/docs/server2/permissions_data_source.py
xiaoyuyanran/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from itertools import ifilter from operator import itemgetter from data_source import DataSource from extensions_paths import PRIVATE_TEMPLATES import featu...
38.186813
80
0.738129
from itertools import ifilter from operator import itemgetter from data_source import DataSource from extensions_paths import PRIVATE_TEMPLATES import features_utility as features from future import Gettable, Future def _ListifyPermissions(permissions): def filter_permissions(perm): return 'description' in pe...
true
true
f757c291d231d3ca17f3af59d1c7fce35cff762d
4,066
py
Python
run_util.py
eustomaqua/ml-fairness-gym
0d69bdb022b2457da29c4f580ad22495cc121a53
[ "Apache-2.0" ]
null
null
null
run_util.py
eustomaqua/ml-fairness-gym
0d69bdb022b2457da29c4f580ad22495cc121a53
[ "Apache-2.0" ]
null
null
null
run_util.py
eustomaqua/ml-fairness-gym
0d69bdb022b2457da29c4f580ad22495cc121a53
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The ML Fairness Gym Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.603306
80
0.700935
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gin import tqdm @gin.configurable def run_simulation(env, agent, metrics, num_steps, seed=100, agent_seed=50): agent.seed(agent_seed) env.seed(seed) observation = env.reset() done = False ...
true
true
f757c353f8889b0eaf160eb60e9734cfa9354b80
3,313
py
Python
kornia/filters/filter.py
tdchaitanya/kornia
6dd16563f66f979c7a95846ef86678894b7d54fd
[ "Apache-2.0" ]
1
2019-11-21T13:18:56.000Z
2019-11-21T13:18:56.000Z
kornia/filters/filter.py
tdchaitanya/kornia
6dd16563f66f979c7a95846ef86678894b7d54fd
[ "Apache-2.0" ]
null
null
null
kornia/filters/filter.py
tdchaitanya/kornia
6dd16563f66f979c7a95846ef86678894b7d54fd
[ "Apache-2.0" ]
null
null
null
from typing import Tuple, List import torch import torch.nn as nn import torch.nn.functional as F from kornia.filters.kernels import normalize_kernel2d def compute_padding(kernel_size: Tuple[int, int]) -> List[int]: """Computes padding tuple.""" # 4 ints: (padding_left, padding_right,padding_top,padding_bot...
41.4125
79
0.643224
from typing import Tuple, List import torch import torch.nn as nn import torch.nn.functional as F from kornia.filters.kernels import normalize_kernel2d def compute_padding(kernel_size: Tuple[int, int]) -> List[int]: assert len(kernel_size) == 2, kernel_size computed = [(k - 1) // 2 for k in kernel_si...
true
true
f757c45e93d84f39ad5703013f5312590a60f13d
1,494
py
Python
test/unit/test_default_inference_handler.py
ericangelokim/sagemaker-inference-toolkit
24db871b1b193ac1a924c21be8c3ec48853b3263
[ "Apache-2.0" ]
null
null
null
test/unit/test_default_inference_handler.py
ericangelokim/sagemaker-inference-toolkit
24db871b1b193ac1a924c21be8c3ec48853b3263
[ "Apache-2.0" ]
null
null
null
test/unit/test_default_inference_handler.py
ericangelokim/sagemaker-inference-toolkit
24db871b1b193ac1a924c21be8c3ec48853b3263
[ "Apache-2.0" ]
null
null
null
# Copyright 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' file acc...
35.571429
88
0.777778
from mock import patch import pytest from sagemaker_inference import content_types from sagemaker_inference.default_inference_handler import DefaultInferenceHandler @patch('sagemaker_inference.decoder.decode') def test_default_input_fn(loads): assert DefaultInferenceHandler().default_input_fn(42, content_types.J...
true
true
f757c52cac535675e890951ede9392e70036997b
1,529
py
Python
meiduo_mall/apps/meiduo_admin/views/sku.py
zhengcongreal/meiduo_project-
5899a344859a0c1455e45ed4fb699d2ace08ba18
[ "Apache-2.0" ]
null
null
null
meiduo_mall/apps/meiduo_admin/views/sku.py
zhengcongreal/meiduo_project-
5899a344859a0c1455e45ed4fb699d2ace08ba18
[ "Apache-2.0" ]
1
2020-10-26T16:10:06.000Z
2020-10-26T16:10:06.000Z
meiduo_mall/apps/meiduo_admin/views/sku.py
zhengcongreal/meiduo_project
5899a344859a0c1455e45ed4fb699d2ace08ba18
[ "Apache-2.0" ]
null
null
null
from rest_framework.generics import ListAPIView from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from apps.contents.models import GoodsCategory from apps.goods.models import SKU, SPU, SPUSpecification from apps.meiduo_admin.serialize...
27.8
110
0.753434
from rest_framework.generics import ListAPIView from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet from apps.contents.models import GoodsCategory from apps.goods.models import SKU, SPU, SPUSpecification from apps.meiduo_admin.serialize...
true
true
f757c77eaf5cf1063badbbbd1803d645152d7a17
34,161
py
Python
contrib/python/six/six.py
gwjknvwjn/catboost
a5644bf80e2e37985012fb3bdd285fc6d798c61c
[ "Apache-2.0" ]
4
2020-06-24T06:07:52.000Z
2021-04-16T22:58:09.000Z
contrib/python/six/six.py
birichie/catboost
de75c6af12cf490700e76c22072fbdc15b35d679
[ "Apache-2.0" ]
1
2021-12-09T23:08:25.000Z
2021-12-09T23:08:25.000Z
contrib/python/six/six.py
birichie/catboost
de75c6af12cf490700e76c22072fbdc15b35d679
[ "Apache-2.0" ]
1
2021-04-27T23:40:09.000Z
2021-04-27T23:40:09.000Z
# Copyright (c) 2010-2020 Benjamin Peterson # # 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, publi...
34.75178
118
0.65446
from __future__ import absolute_import import functools import itertools import operator import sys import types __author__ = "Benjamin Peterson <benjamin@python.org>" __version__ = "1.15.0" PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 PY34 = sys.version_info[0:2] >= (3, 4) if PY3: string_ty...
true
true
f757c7b30d73cb17342a41e80a874fc1cde80dd6
624
py
Python
vertex_upload_model_docker/composer_op_example.py
ryangillard/gcp_vertex_ai_composer
71bbd7d73de5196f5c182f65015f151f10108373
[ "Apache-2.0" ]
null
null
null
vertex_upload_model_docker/composer_op_example.py
ryangillard/gcp_vertex_ai_composer
71bbd7d73de5196f5c182f65015f151f10108373
[ "Apache-2.0" ]
null
null
null
vertex_upload_model_docker/composer_op_example.py
ryangillard/gcp_vertex_ai_composer
71bbd7d73de5196f5c182f65015f151f10108373
[ "Apache-2.0" ]
null
null
null
vertex_upload_model_op = ( kubernetes_pod_operator.KubernetesPodOperator( image="gcr.io/my-project/vertex_upload_model_image:latest", name="vertex_upload_model_pod", arguments=[ '--project=my-project', '--region=us-central1', '--model_display_name=uploaded...
39
102
0.644231
vertex_upload_model_op = ( kubernetes_pod_operator.KubernetesPodOperator( image="gcr.io/my-project/vertex_upload_model_image:latest", name="vertex_upload_model_pod", arguments=[ '--project=my-project', '--region=us-central1', '--model_display_name=uploaded...
true
true
f757c95500ae31f9baefbd6b7eef5abdfd11844a
3,566
py
Python
detect_objects.py
debojit10/tf2-object-detection-api-tutorial
d51c29878b47ea9b2b5a572205591923d6210737
[ "MIT" ]
null
null
null
detect_objects.py
debojit10/tf2-object-detection-api-tutorial
d51c29878b47ea9b2b5a572205591923d6210737
[ "MIT" ]
null
null
null
detect_objects.py
debojit10/tf2-object-detection-api-tutorial
d51c29878b47ea9b2b5a572205591923d6210737
[ "MIT" ]
null
null
null
import os import cv2 import time import argparse from google.colab.patches import cv2_imshow from detector import DetectorTF2 def DetectFromVideo(detector, Video_path, save_output=False, output_dir='output/'): cap = cv2.VideoCapture(Video_path) if save_output: output_path = os.path.join(output_dir, 'detection_'...
38.344086
123
0.736399
import os import cv2 import time import argparse from google.colab.patches import cv2_imshow from detector import DetectorTF2 def DetectFromVideo(detector, Video_path, save_output=False, output_dir='output/'): cap = cv2.VideoCapture(Video_path) if save_output: output_path = os.path.join(output_dir, 'detection_'...
true
true
f757c9bd6a2f9987f5c1dc5c9ca18b454bfa510a
17,179
py
Python
growconomy/trading/core.py
CutieRei/growtube-news
e9cc1775364f1d9563b86aa84067a632f6a23deb
[ "WTFPL" ]
2
2021-11-23T09:05:21.000Z
2021-11-23T14:17:37.000Z
growconomy/trading/core.py
ReyterYT/growtube-news
e9cc1775364f1d9563b86aa84067a632f6a23deb
[ "WTFPL" ]
3
2021-12-09T07:17:03.000Z
2021-12-16T04:01:49.000Z
growconomy/trading/core.py
ReyterYT/growtube-news
e9cc1775364f1d9563b86aa84067a632f6a23deb
[ "WTFPL" ]
1
2021-12-09T07:10:48.000Z
2021-12-09T07:10:48.000Z
from asyncio.tasks import create_task, sleep from asyncpg.connection import Connection from bot import GrowContext, MessagedError from discord.ext import commands from typing import Dict, List, Optional, Literal, Tuple from discord import User, Message, Embed from secrets import token_urlsafe from discord.utils import ...
43.82398
117
0.478433
from asyncio.tasks import create_task, sleep from asyncpg.connection import Connection from bot import GrowContext, MessagedError from discord.ext import commands from typing import Dict, List, Optional, Literal, Tuple from discord import User, Message, Embed from secrets import token_urlsafe from discord.utils import ...
true
true
f757ca226895e5f618c877313e1727bf3d355de9
11,294
py
Python
base_agent/nsp_dialogue_manager.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
base_agent/nsp_dialogue_manager.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
base_agent/nsp_dialogue_manager.py
Dhiraj100892/droidlet
e4ea578672531524552b6ff021165fc9371b0ec8
[ "MIT" ]
null
null
null
""" Copyright (c) Facebook, Inc. and its affiliates. """ import json import logging import os import re import spacy from typing import Tuple, Dict, Optional from glob import glob import sentry_sdk import preprocess from base_agent.memory_nodes import ProgramNode from base_agent.dialogue_manager import DialogueManag...
42.458647
110
0.61422
import json import logging import os import re import spacy from typing import Tuple, Dict, Optional from glob import glob import sentry_sdk import preprocess from base_agent.memory_nodes import ProgramNode from base_agent.dialogue_manager import DialogueManager from base_agent.dialogue_objects import ( BotCapab...
true
true
f757cafb8c248c327630efb5f46a5a507ef0347b
175
py
Python
google_play_scraper/exceptions.py
shikher-chhawchharia/google-play-scraper
31dfd4df46911e3489a61d50ea098d06c79e8353
[ "MIT" ]
325
2019-07-19T09:52:45.000Z
2022-03-31T10:03:56.000Z
google_play_scraper/exceptions.py
shikher-chhawchharia/google-play-scraper
31dfd4df46911e3489a61d50ea098d06c79e8353
[ "MIT" ]
111
2019-07-08T16:31:19.000Z
2022-03-10T07:51:56.000Z
google_play_scraper/exceptions.py
shikher-chhawchharia/google-play-scraper
31dfd4df46911e3489a61d50ea098d06c79e8353
[ "MIT" ]
93
2019-07-25T05:38:38.000Z
2022-03-31T03:08:56.000Z
class GooglePlayScraperException(Exception): pass class NotFoundError(GooglePlayScraperException): pass class ExtraHTTPError(GooglePlayScraperException): pass
15.909091
49
0.805714
class GooglePlayScraperException(Exception): pass class NotFoundError(GooglePlayScraperException): pass class ExtraHTTPError(GooglePlayScraperException): pass
true
true
f757cb3fd2aba875afd4fac19eb65ce0924f4933
2,580
py
Python
tools/accuracy_checker/accuracy_checker/metrics/speech_recognition.py
evgeny-izutov/open_model_zoo
2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba
[ "Apache-2.0" ]
4
2019-09-17T13:11:02.000Z
2021-02-22T15:39:15.000Z
tools/accuracy_checker/accuracy_checker/metrics/speech_recognition.py
evgeny-izutov/open_model_zoo
2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba
[ "Apache-2.0" ]
1
2021-11-15T15:52:24.000Z
2021-11-15T15:52:24.000Z
tools/accuracy_checker/accuracy_checker/metrics/speech_recognition.py
evgeny-izutov/open_model_zoo
2cd6145ef342fc9b7ccf32676af73f4a1cb8d9ba
[ "Apache-2.0" ]
1
2022-01-12T03:47:00.000Z
2022-01-12T03:47:00.000Z
""" Copyright (c) 2018-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
33.506494
89
0.718992
from ..representation import ( CharacterRecognitionAnnotation, CharacterRecognitionPrediction, ) from .metric import PerImageEvaluationMetric from ..utils import UnsupportedPackage try: import editdistance except ImportError as import_error: editdistance = UnsupportedPackage("editdistance", import...
true
true
f757cb5829e92adfac9915c1134eb9ec4c530dad
952
py
Python
app/core/tests/test_comands.py
MauricioAntonioMartinez/recipie-api-django
69fd3d097033331cb9531e5ae6220d0931ec40e5
[ "MIT" ]
null
null
null
app/core/tests/test_comands.py
MauricioAntonioMartinez/recipie-api-django
69fd3d097033331cb9531e5ae6220d0931ec40e5
[ "MIT" ]
null
null
null
app/core/tests/test_comands.py
MauricioAntonioMartinez/recipie-api-django
69fd3d097033331cb9531e5ae6220d0931ec40e5
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): with patch('django.db.utils.ConnectionHandler.__getitem__') as gi: gi....
35.259259
76
0.653361
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTests(TestCase): def test_wait_for_db_ready(self): with patch('django.db.utils.ConnectionHandler.__getitem__') as gi: gi....
true
true
f757cb985f072f2cff73c7614f2d2a7f1a71b689
368
py
Python
containers/failures/router/failure3/myapp.py
haizaar/crossbar-examples
a3daffc0348565aa5e989433978dec2913242ea8
[ "Apache-2.0" ]
97
2016-12-14T16:48:49.000Z
2021-09-12T17:48:10.000Z
containers/failures/router/failure3/myapp.py
Weeshlow/crossbarexamples
e392ea2708f52ba322e63808041f9fe6dcfe893e
[ "Apache-2.0" ]
38
2016-12-13T09:42:38.000Z
2020-07-05T11:58:07.000Z
containers/failures/router/failure3/myapp.py
Weeshlow/crossbarexamples
e392ea2708f52ba322e63808041f9fe6dcfe893e
[ "Apache-2.0" ]
118
2016-12-12T21:36:40.000Z
2021-11-17T11:49:33.000Z
from twisted.logger import Logger from autobahn.twisted.wamp import ApplicationSession class MySession(ApplicationSession): log = Logger() def __init__(self, config): a = 1 / 0 self.log.info("MySession.__init__()") ApplicationSession.__init__(self, config) def onJoin(self, detail...
24.533333
52
0.682065
from twisted.logger import Logger from autobahn.twisted.wamp import ApplicationSession class MySession(ApplicationSession): log = Logger() def __init__(self, config): a = 1 / 0 self.log.info("MySession.__init__()") ApplicationSession.__init__(self, config) def onJoin(self, detail...
true
true
f757cc19f5eb1b50efd6dd829422ab8950d85de4
503
py
Python
shellshocker_server/__init__.py
ArchimedesPi/shellshocker
3d00cd3daad0c2e55b62cfccf58e638464d189c7
[ "MIT" ]
2
2021-10-31T12:54:04.000Z
2022-03-29T13:52:02.000Z
shellshocker_server/__init__.py
ArchimedesPi/shellshocker
3d00cd3daad0c2e55b62cfccf58e638464d189c7
[ "MIT" ]
null
null
null
shellshocker_server/__init__.py
ArchimedesPi/shellshocker
3d00cd3daad0c2e55b62cfccf58e638464d189c7
[ "MIT" ]
3
2017-09-19T19:36:49.000Z
2019-08-10T12:59:14.000Z
from flask import Flask from shellshocker_server.saferproxyfix import SaferProxyFix from raven.contrib.flask import Sentry import os app = Flask(__name__) app.config['SECRET_KEY'] = os.environ['SECRET_KEY'] try: if os.environ['SECRET_KEY'] is not None: app.config['USE_SENTRY'] = True app.config['SENTRY_DSN...
21.869565
59
0.759443
from flask import Flask from shellshocker_server.saferproxyfix import SaferProxyFix from raven.contrib.flask import Sentry import os app = Flask(__name__) app.config['SECRET_KEY'] = os.environ['SECRET_KEY'] try: if os.environ['SECRET_KEY'] is not None: app.config['USE_SENTRY'] = True app.config['SENTRY_DSN...
true
true
f757cc8bd60cfc76e1b8237ca16f2153d4331b9c
882
py
Python
tests/terraform/parser/test_plan_parser.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
null
null
null
tests/terraform/parser/test_plan_parser.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
3
2020-02-07T19:51:40.000Z
2022-03-21T05:06:29.000Z
tests/terraform/parser/test_plan_parser.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
null
null
null
import os import unittest from checkov.terraform.plan_parser import parse_tf_plan class TestPlanFileParser(unittest.TestCase): def test_tags_values_are_flattened(self): current_dir = os.path.dirname(os.path.realpath(__file__)) valid_plan_path = current_dir + "/resources/plan_tags/tfplan.json" ...
38.347826
85
0.71542
import os import unittest from checkov.terraform.plan_parser import parse_tf_plan class TestPlanFileParser(unittest.TestCase): def test_tags_values_are_flattened(self): current_dir = os.path.dirname(os.path.realpath(__file__)) valid_plan_path = current_dir + "/resources/plan_tags/tfplan.json" ...
true
true
f757ccc9cef504dc81f74537e588f475160bbe33
1,088
py
Python
day-2/solution.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
day-2/solution.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
day-2/solution.py
DallogFheir/aoc-2020
089bd45d5fbdf98b9729a23f3a142ca3b792567c
[ "MIT" ]
null
null
null
# Advent of Code 2020 # Day 2 from pathlib import Path # input with open(Path(__file__).parent / "input.txt") as f: inp = f.readlines() # part 1 # Find how many passwords are valid according to the policy of at_least-at_most char : password. import re def part_1(): count = 0 for pwd_policy in inp: ...
23.148936
209
0.59375
from pathlib import Path with open(Path(__file__).parent / "input.txt") as f: inp = f.readlines() import re def part_1(): count = 0 for pwd_policy in inp: min_, max_, char, pwd = re.match( r"(\d+)-(\d+) ([a-z]): (.*)", pwd_policy ).groups() if int(min_) <= pwd.count...
true
true
f757cd29c05dcc7d49b2c3d51948f9e335c6ef93
470
py
Python
followbot/config.py
snowwhite-boss/github-follow-bot
d1f9638be0c7631e9fb2cc45ad5a9150b9b0db04
[ "MIT" ]
3
2022-02-24T05:00:55.000Z
2022-03-12T17:09:09.000Z
followbot/config.py
snowwhite-boss/github-follow-bot
d1f9638be0c7631e9fb2cc45ad5a9150b9b0db04
[ "MIT" ]
null
null
null
followbot/config.py
snowwhite-boss/github-follow-bot
d1f9638be0c7631e9fb2cc45ad5a9150b9b0db04
[ "MIT" ]
null
null
null
# Path of your chrome driver # You'll need to download the Chrome driver compatible with # your OS and provide the path here. Find the driver: # https://chromedriver.chromium.org/downloads CHROME_DRIVER_PATH = "./chromedriver_win32/chromedriver" # Put your github user name here YOUR_NAME = "snowwhite-boss" YOUR_PASS =...
33.571429
70
0.778723
# your OS and provide the path here. Find the driver: # https://chromedriver.chromium.org/downloads CHROME_DRIVER_PATH = "./chromedriver_win32/chromedriver" # Put your github user name here YOUR_NAME = "snowwhite-boss" YOUR_PASS = "!1qazqazqaz" # List of people's github usernames whose followers you want to follow TA...
true
true
f757cd64df31cb8be2c76dc4efd50feabae651d3
255
py
Python
insrunner/debug.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
insrunner/debug.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
insrunner/debug.py
MatejKastak/insrunner
6c99b7c4c6768003ea5822d03b916f2f17ee5900
[ "MIT" ]
null
null
null
# Debug helper functions # Author: Matej Kastak from colors import Color from context import Context def debug_print(s): if Context().debug_enabled: Color.print(Color.GREEN, str(s)) def debug_enabled(): return Context().debug_enabled
17
40
0.72549
from colors import Color from context import Context def debug_print(s): if Context().debug_enabled: Color.print(Color.GREEN, str(s)) def debug_enabled(): return Context().debug_enabled
true
true
f757cec9e8bf56b6a12e0405c3fe300fb30f2c7b
22,982
py
Python
finrl/config/config.py
RomanZWang/FinRL
b8a70c31a5430a01654736b3f83364578c2c6c8a
[ "MIT" ]
null
null
null
finrl/config/config.py
RomanZWang/FinRL
b8a70c31a5430a01654736b3f83364578c2c6c8a
[ "MIT" ]
null
null
null
finrl/config/config.py
RomanZWang/FinRL
b8a70c31a5430a01654736b3f83364578c2c6c8a
[ "MIT" ]
null
null
null
import pathlib # import finrl import pandas as pd import datetime import os # pd.options.display.max_rows = 10 # pd.options.display.max_columns = 10 # PACKAGE_ROOT = pathlib.Path(finrl.__file__).resolve().parent # PACKAGE_ROOT = pathlib.Path().resolve().parent TRAINED_MODEL_DIR = f"trained_models" ...
15.444892
115
0.391306
import pathlib import pandas as pd import datetime import os TRAINED_MODEL_DIR = f"trained_models" DATA_SAVE_DIR = f"datasets" TRAINED_MODEL_DIR = f"trained_models" TENSORBOARD_LOG_DIR = f"tensorboard_log" RESULTS_DIR = f"results" START_DATE = "2004-08-11" END_DATE = "2021-06-11" START_...
true
true
f757cff51ea958ae4cb4c2b73583e3baa6d6199b
3,017
py
Python
tests/conftest.py
gatarelib/loguru
4834eb964baa07e67bd71921d7e009ca0e6756df
[ "MIT" ]
null
null
null
tests/conftest.py
gatarelib/loguru
4834eb964baa07e67bd71921d7e009ca0e6756df
[ "MIT" ]
null
null
null
tests/conftest.py
gatarelib/loguru
4834eb964baa07e67bd71921d7e009ca0e6756df
[ "MIT" ]
null
null
null
import loguru import logging import itertools import pytest import py import os import subprocess import datetime import time import calendar default_levels = loguru._logger.Logger._levels.copy() @pytest.fixture(autouse=True) def reset_logger(): def reset(): loguru.logger.stop() loguru.logger.__i...
26.9375
100
0.641697
import loguru import logging import itertools import pytest import py import os import subprocess import datetime import time import calendar default_levels = loguru._logger.Logger._levels.copy() @pytest.fixture(autouse=True) def reset_logger(): def reset(): loguru.logger.stop() loguru.logger.__i...
true
true
f757d16a53c4869852a2a4154e6945e8bbb160b2
876
py
Python
setup.py
unmeshvrije/kge
f2bcbdb47776e6a3b73d07cca28603bbce723f88
[ "MIT" ]
1
2021-06-24T01:46:53.000Z
2021-06-24T01:46:53.000Z
setup.py
healx/kge
e778df91c5612f705de1250fb3f98edf4a6c962c
[ "MIT" ]
null
null
null
setup.py
healx/kge
e778df91c5612f705de1250fb3f98edf4a6c962c
[ "MIT" ]
null
null
null
from setuptools import setup setup( name="libkge", version="0.1", description="A knowledge graph embedding library", url="https://github.com/uma-pi1/kge", author="Universität Mannheim", author_email="rgemulla@uni-mannheim.de", packages=["kge"], install_requires=[ "torch>=1.3.1",...
29.2
83
0.599315
from setuptools import setup setup( name="libkge", version="0.1", description="A knowledge graph embedding library", url="https://github.com/uma-pi1/kge", author="Universität Mannheim", author_email="rgemulla@uni-mannheim.de", packages=["kge"], install_requires=[ "torch>=1.3.1",...
true
true
f757d2294423be5fdf9b530fedd9aae1fc695a8e
575
py
Python
tests/test_utils.py
wandonye/vshare
beea2f71fb7a37d9f9110e16dd3e260ba28bdea1
[ "BSD-3-Clause" ]
null
null
null
tests/test_utils.py
wandonye/vshare
beea2f71fb7a37d9f9110e16dd3e260ba28bdea1
[ "BSD-3-Clause" ]
null
null
null
tests/test_utils.py
wandonye/vshare
beea2f71fb7a37d9f9110e16dd3e260ba28bdea1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from vshare.utils import pretty_date from tests import TestCase class TestPrettyDate(TestCase): def test_func(self): days = [ [timedelta(days=365 * 3), '3 years ago'], [timedelta(days=365), '1 year ago'], ...
25
64
0.553043
from datetime import datetime, timedelta from vshare.utils import pretty_date from tests import TestCase class TestPrettyDate(TestCase): def test_func(self): days = [ [timedelta(days=365 * 3), '3 years ago'], [timedelta(days=365), '1 year ago'], [timedelta(days=30 *...
true
true
f757d2f81e3c537b3f6df798742ec8740564aecd
914
py
Python
luaprettydoc/templates.py
TurtleP/luaprettydoc
658a47cb13a5b277f921f63e86f5a1018f57d03b
[ "MIT" ]
3
2021-11-11T21:33:55.000Z
2022-01-07T18:01:42.000Z
luaprettydoc/templates.py
TurtleP/luaprettydoc
658a47cb13a5b277f921f63e86f5a1018f57d03b
[ "MIT" ]
10
2021-11-10T05:54:12.000Z
2021-12-12T04:17:24.000Z
luaprettydoc/templates.py
TurtleP/luaprettydoc
658a47cb13a5b277f921f63e86f5a1018f57d03b
[ "MIT" ]
null
null
null
from enum import Enum class Templates(str, Enum): TEMPLATE_START = ("# {}" "\n\n" "_{}_" "\n\n" "## Functions" "\n\n") TEMPLATE_DEFINE = ("### {}" "\n\n") TEMPLATE_FUNC = ...
23.435897
56
0.277899
from enum import Enum class Templates(str, Enum): TEMPLATE_START = ("# {}" "\n\n" "_{}_" "\n\n" "## Functions" "\n\n") TEMPLATE_DEFINE = ("### {}" "\n\n") TEMPLATE_FUNC = ...
true
true
f757d3c28b90ee6b73ed0f1eff80aa27c65e5a43
321
py
Python
main.py
BITEWKRER/KeepGoing
2d42c6cd6ad62ff8739183805d5b743dc65910c4
[ "BSD-3-Clause" ]
1
2021-08-10T05:11:19.000Z
2021-08-10T05:11:19.000Z
main.py
BITEWKRER/KeepGoing
2d42c6cd6ad62ff8739183805d5b743dc65910c4
[ "BSD-3-Clause" ]
null
null
null
main.py
BITEWKRER/KeepGoing
2d42c6cd6ad62ff8739183805d5b743dc65910c4
[ "BSD-3-Clause" ]
null
null
null
# encoding : utf-8 # anthor : comi from gameloop import * from pygame import * import pygame,sys,time if __name__ == '__main__': player = game() player.game_start('KEEP-GOING') while player.playing: player.new() player.screen.fill(black) player.game_start('GAME-OVER') time.sleep(1.5) ...
20.0625
35
0.657321
from gameloop import * from pygame import * import pygame,sys,time if __name__ == '__main__': player = game() player.game_start('KEEP-GOING') while player.playing: player.new() player.screen.fill(black) player.game_start('GAME-OVER') time.sleep(1.5)
true
true
f757d4662783a2421a65b5a113e1a17a09a9a354
27,385
py
Python
examples/run_glue.py
rryan/transformers
f382a8decda82062bb6911f05b646f404eacfdd4
[ "Apache-2.0" ]
1
2020-02-22T10:48:20.000Z
2020-02-22T10:48:20.000Z
examples/run_glue.py
rryan/transformers
f382a8decda82062bb6911f05b646f404eacfdd4
[ "Apache-2.0" ]
null
null
null
examples/run_glue.py
rryan/transformers
f382a8decda82062bb6911f05b646f404eacfdd4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
53.590998
163
0.642578
from __future__ import absolute_import, division, print_function import argparse import glob import logging import os import random import numpy as np import torch from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler, TensorDataset) from torch.utils.data.distribute...
true
true
f757d5afad2818e94177a3045052d514ecb82243
7,078
py
Python
tests/components/erosion_deposition/test_general_erodep.py
amanaster2/landlab
ea17f8314eb12e3fc76df66c9b6ff32078caa75c
[ "MIT" ]
257
2015-01-13T16:01:21.000Z
2022-03-29T22:37:43.000Z
tests/components/erosion_deposition/test_general_erodep.py
amanaster2/landlab
ea17f8314eb12e3fc76df66c9b6ff32078caa75c
[ "MIT" ]
1,222
2015-02-05T21:36:53.000Z
2022-03-31T17:53:49.000Z
tests/components/erosion_deposition/test_general_erodep.py
amanaster2/landlab
ea17f8314eb12e3fc76df66c9b6ff32078caa75c
[ "MIT" ]
274
2015-02-11T19:56:08.000Z
2022-03-28T23:31:07.000Z
import numpy as np import pytest from numpy import testing from landlab import RasterModelGrid from landlab.components import ErosionDeposition, FlowAccumulator def test_Ff_too_high_vals(): """ Test that instantiating ErosionDeposition with a F_f value > 1 throws a ValueError. """ # set up a 5x5...
27.118774
88
0.61783
import numpy as np import pytest from numpy import testing from landlab import RasterModelGrid from landlab.components import ErosionDeposition, FlowAccumulator def test_Ff_too_high_vals(): nr = 5 nc = 5 mg = RasterModelGrid((nr, nc), xy_spacing=10.0) mg.add_zeros("topographic__elevation", at="...
true
true
f757d6a033627ced46e23255f44a48a76da6c477
2,571
py
Python
ai_flow/test/cli/commands/test_config_command.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
ai_flow/test/cli/commands/test_config_command.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
ai_flow/test/cli/commands/test_config_command.py
flink-extended/ai-flow
d1427a243097d94d77fedbe1966500ae26975a13
[ "Apache-2.0" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# Copyright 2022 The AI Flow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
41.467742
105
0.695838
import io import logging import os import unittest from contextlib import redirect_stdout from ai_flow.cli import cli_parser from ai_flow.cli.commands.config_command import config_init, config_get_value, config_list from ai_flow.settings import AIFLOW_HOME logger = logging.getLogger(__name__) class TestCliConfig(un...
true
true
f757d710be3b8c459049dbf406dfdc3f3e327210
28,122
py
Python
tensorflow/python/distribute/parameter_server_strategy_v2.py
lasdasdas/tensorflow
7568262b59060ec44474c6d62075e064c492160d
[ "Apache-2.0" ]
1
2020-10-21T12:55:13.000Z
2020-10-21T12:55:13.000Z
tensorflow/python/distribute/parameter_server_strategy_v2.py
wxm620/tensorflow
673b993983f37f332ff70cdb642305f69089337d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/distribute/parameter_server_strategy_v2.py
wxm620/tensorflow
673b993983f37f332ff70cdb642305f69089337d
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
44.356467
82
0.728398
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from tensorflow.python.distribute import distribute_lib from tensorflow.python.distribute import distribute_utils from tensorflow.python.distribute import parameter_server_strategy from tensorflow.p...
true
true
f757d7e69360c015edf58c5401d10ed47a9f43f4
1,596
py
Python
setup.py
refgenie/seqcolapi
82b8ac994a85d63d815f95a87c5950704aea3d51
[ "BSD-2-Clause" ]
null
null
null
setup.py
refgenie/seqcolapi
82b8ac994a85d63d815f95a87c5950704aea3d51
[ "BSD-2-Clause" ]
null
null
null
setup.py
refgenie/seqcolapi
82b8ac994a85d63d815f95a87c5950704aea3d51
[ "BSD-2-Clause" ]
1
2021-12-05T20:55:32.000Z
2021-12-05T20:55:32.000Z
#! /usr/bin/env python from setuptools import setup import sys PACKAGE = "seqcolapi" # Additional keyword arguments for setup(). extra = {} # Ordinary dependencies DEPENDENCIES = [] with open("requirements/requirements-all.txt", 'r') as reqs_file: for line in reqs_file: print(line) if not line.s...
26.6
65
0.629073
from setuptools import setup import sys PACKAGE = "seqcolapi" extra = {} DEPENDENCIES = [] with open("requirements/requirements-all.txt", 'r') as reqs_file: for line in reqs_file: print(line) if not line.strip(): continue DEPENDENCIES.append(line) if sys.version_info >= (3, ...
true
true
f757d8815f5386b96e2da3a50e7913b4a82aa300
18,358
py
Python
python/paddle/fluid/parallel_executor.py
laipaang/Paddle
d7f35434b761707a8479b75636546a624399369a
[ "Apache-2.0" ]
8
2019-06-16T12:36:11.000Z
2021-03-05T05:33:21.000Z
python/paddle/fluid/parallel_executor.py
wozna/Paddle
0ecf441af14d554c85f69a206e3e3a9bdd86fb13
[ "Apache-2.0" ]
1
2020-09-10T09:05:52.000Z
2020-09-10T09:06:22.000Z
python/paddle/fluid/parallel_executor.py
wozna/Paddle
0ecf441af14d554c85f69a206e3e3a9bdd86fb13
[ "Apache-2.0" ]
25
2019-12-07T02:14:14.000Z
2021-12-30T06:16:30.000Z
# Copyright (c) 2018 PaddlePaddle 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 app...
49.085561
104
0.626757
from __future__ import print_function from . import core from . import framework from . import executor from . import compiler from .data_feeder import check_type import sys __all__ = ['ParallelExecutor'] ExecutionStrategy = core.ParallelExecutor.ExecutionStrategy BuildStrategy = core.ParallelExecutor.BuildStrategy ...
true
true
f757d90a26d19778d2ee71d70f0155d684219f7d
11,217
py
Python
demo.py
SeanTater/rsvp
2f136ee8aac2d9401427d4d4f0d78f74eb757f15
[ "Apache-2.0" ]
null
null
null
demo.py
SeanTater/rsvp
2f136ee8aac2d9401427d4d4f0d78f74eb757f15
[ "Apache-2.0" ]
1
2021-03-24T01:04:02.000Z
2021-03-24T01:04:02.000Z
demo.py
SeanTater/rsvp
2f136ee8aac2d9401427d4d4f0d78f74eb757f15
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import cv2 import numpy as np import sqlite3 import time class QualityCheck: def __init__(self): """ Record model runs """ self.db = sqlite3.connect("logs.db", isolation_level=None) self.db.execute(""" CREATE TABLE IF NOT EXISTS ModelRun( run_i...
34.943925
108
0.561023
import cv2 import numpy as np import sqlite3 import time class QualityCheck: def __init__(self): self.db = sqlite3.connect("logs.db", isolation_level=None) self.db.execute(""" CREATE TABLE IF NOT EXISTS ModelRun( run_id INT, num_embed INT, ...
true
true
f757db13e8d2176ac08c7e1b15ab792245dc9967
40,596
py
Python
airavata/model/appcatalog/groupresourceprofile/ttypes.py
DImuthuUpe/airavata_python_sdk
99724b92efb255e779e0265e0be0ef8fe8906314
[ "Apache-2.0" ]
null
null
null
airavata/model/appcatalog/groupresourceprofile/ttypes.py
DImuthuUpe/airavata_python_sdk
99724b92efb255e779e0265e0be0ef8fe8906314
[ "Apache-2.0" ]
null
null
null
airavata/model/appcatalog/groupresourceprofile/ttypes.py
DImuthuUpe/airavata_python_sdk
99724b92efb255e779e0265e0be0ef8fe8906314
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Thrift Compiler (0.10.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException import sys import airavata....
48.386174
575
0.614396
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException import sys import airavata.model.commons.ttypes import airavata.model.appcatalog.computeresource.ttypes import airavata.model.data.movement.ttypes from thrift.transpor...
true
true
f757db97fd411f0249d5f34361763d906d242c6d
5,264
py
Python
domain/network/node.py
HathorNetwork/hathor-explorer-service
81236deceac12ddfd813b33723481421a9064c82
[ "MIT" ]
null
null
null
domain/network/node.py
HathorNetwork/hathor-explorer-service
81236deceac12ddfd813b33723481421a9064c82
[ "MIT" ]
51
2021-05-21T18:58:15.000Z
2022-03-29T17:45:00.000Z
domain/network/node.py
HathorNetwork/hathor-explorer-service
81236deceac12ddfd813b33723481421a9064c82
[ "MIT" ]
1
2022-02-08T21:15:26.000Z
2022-02-08T21:15:26.000Z
from dataclasses import asdict, dataclass from enum import Enum from typing import List class NodeState(str, Enum): # Node is still initializing INITIALIZING = 'INITIALIZING' # Node is ready to establish new connections, sync, and exchange transactions. READY = 'READY' @dataclass class Peer: ""...
29.909091
94
0.640578
from dataclasses import asdict, dataclass from enum import Enum from typing import List class NodeState(str, Enum): INITIALIZING = 'INITIALIZING' READY = 'READY' @dataclass class Peer: id: str app_version: str uptime: float address: str state: NodeState last_message: float ...
true
true
f757dbaa059ae43fee837b7b296c073cc8ee7a92
626
py
Python
setup.py
PokaInc/cfn-get-export-value
b9558e6ed8e6a302a1c9f72e60894463f893df4a
[ "MIT" ]
5
2018-10-10T14:03:54.000Z
2020-07-14T08:52:55.000Z
setup.py
PokaInc/cfn-get-export-value
b9558e6ed8e6a302a1c9f72e60894463f893df4a
[ "MIT" ]
1
2019-11-19T15:35:57.000Z
2019-11-19T15:35:57.000Z
setup.py
PokaInc/cfn-get-export-value
b9558e6ed8e6a302a1c9f72e60894463f893df4a
[ "MIT" ]
1
2017-04-11T14:21:36.000Z
2017-04-11T14:21:36.000Z
from setuptools import setup setup( name='cfn_get_export_value', packages=['cfn_get_export_value'], # this must be the same as the name above version='0.0.4', description='Get an exported value in AWS CloudFormation', author='Simon-Pierre Gingras', author_email='spgingras@poka.io', url='ht...
34.777778
92
0.683706
from setuptools import setup setup( name='cfn_get_export_value', packages=['cfn_get_export_value'], version='0.0.4', description='Get an exported value in AWS CloudFormation', author='Simon-Pierre Gingras', author_email='spgingras@poka.io', url='https://github.com/PokaInc/cfn-get-export-va...
true
true
f757dc93862be840ff7a4d83497fbbcf29cdb10a
735
py
Python
config/urls.py
birkin/fast_reconcile_project
de086e312aae9cd4d2eb847c3a5a5ba94cd68de7
[ "BSD-3-Clause" ]
null
null
null
config/urls.py
birkin/fast_reconcile_project
de086e312aae9cd4d2eb847c3a5a5ba94cd68de7
[ "BSD-3-Clause" ]
null
null
null
config/urls.py
birkin/fast_reconcile_project
de086e312aae9cd4d2eb847c3a5a5ba94cd68de7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView from fast_reconcile_app import views admin.autodiscover() urlpatterns = [ # url( r'^admin/login/', RedirectView.as_view(pattern_name='login_url') ), url( r'^adm...
25.344828
99
0.672109
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView from fast_reconcile_app import views admin.autodiscover() urlpatterns = [ url( r'^admin/', admin.site.urls ), url( r'^info/$', views.info, name='info_url' ), url( r'^v1/reco...
true
true
f757dce3a577af449a3b60e80f325da24f87fb1c
7,748
py
Python
pylot/perception/detection/detection_operator.py
pschafhalter/pylot
712fd504f9e2669cfc9876eaed4954fbf2b31f20
[ "Apache-2.0" ]
null
null
null
pylot/perception/detection/detection_operator.py
pschafhalter/pylot
712fd504f9e2669cfc9876eaed4954fbf2b31f20
[ "Apache-2.0" ]
null
null
null
pylot/perception/detection/detection_operator.py
pschafhalter/pylot
712fd504f9e2669cfc9876eaed4954fbf2b31f20
[ "Apache-2.0" ]
null
null
null
"""Implements an operator that detects obstacles.""" import logging import time import erdos import numpy as np import pylot.utils from pylot.perception.detection.obstacle import Obstacle from pylot.perception.detection.utils import BoundingBox2D, \ OBSTACLE_LABELS, load_coco_bbox_colors, load_coco_labels from p...
44.528736
79
0.600413
import logging import time import erdos import numpy as np import pylot.utils from pylot.perception.detection.obstacle import Obstacle from pylot.perception.detection.utils import BoundingBox2D, \ OBSTACLE_LABELS, load_coco_bbox_colors, load_coco_labels from pylot.perception.messages import ObstaclesMessage imp...
true
true
f757de2b0f73782afa99bdcba4becd69106af1ad
4,069
py
Python
learned_optimization/baselines/run_archive.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
null
null
null
learned_optimization/baselines/run_archive.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
null
null
null
learned_optimization/baselines/run_archive.py
Sohl-Dickstein/learned_optimization
cd929359a51d09444665021387c058aac11b63ba
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
35.382609
123
0.733841
from concurrent import futures import time from typing import Any, Mapping, Optional from absl import app from absl import logging import gin import jax from learned_optimization import setup_experiment from learned_optimization.baselines import hparam_sets from learned_optimization.baselines import utils import num...
true
true
f757df365d80f661e66315f390f1aec550f9f373
4,882
py
Python
kubernetes_asyncio/client/models/v1alpha1_role_ref.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1alpha1_role_ref.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1alpha1_role_ref.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1alpha1Ro...
28.057471
124
0.569644
import pprint import re import six class V1alpha1RoleRef(object): openapi_types = { 'api_group': 'str', 'kind': 'str', 'name': 'str' } attribute_map = { 'api_group': 'apiGroup', 'kind': 'kind', 'name': 'name' } def __init__(self, api_group=No...
true
true
f757e0208758e2dcf3c2339edfea27bd8495b9b9
771
py
Python
others/remove_nth_node_from_end.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
others/remove_nth_node_from_end.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
others/remove_nth_node_from_end.py
sumitsk/leetcode
bb3527b08ca794dea2c9d071efc24b4276bd1c05
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def removeNthFromEnd(self, head, n): """ :type head: ListNode :type n: int :rtype: ListNode """ ptr = head ln...
22.028571
40
0.431907
class Solution: def removeNthFromEnd(self, head, n): ptr = head ln = self.length(head) j = ln - n i = 0 while i < j-1: ptr = ptr.next i += 1 if j==0: head = head.next elif j==ln: ptr.next = None else...
true
true
f757e0c2c5a4d8a475220cbb8f0a97b4b5d1d305
3,846
py
Python
test/unit/test_base_pipeline_step.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
null
null
null
test/unit/test_base_pipeline_step.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
8
2019-10-10T08:03:02.000Z
2022-01-11T11:28:58.000Z
test/unit/test_base_pipeline_step.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
null
null
null
__author__ = 'tinglev@kth.se' import sys import os import subprocess import unittest import mock from modules.steps.base_pipeline_step import BasePipelineStep from modules.steps import base_pipeline_step from modules.util import exceptions, data_defs class ConcreteBPS(BasePipelineStep): def get_required_env_vari...
40.914894
92
0.700468
__author__ = 'tinglev@kth.se' import sys import os import subprocess import unittest import mock from modules.steps.base_pipeline_step import BasePipelineStep from modules.steps import base_pipeline_step from modules.util import exceptions, data_defs class ConcreteBPS(BasePipelineStep): def get_required_env_vari...
true
true
f757e142f2bdb777e0d12909c7f6d6346a03d7bd
251
py
Python
converter/rate_providers/__init__.py
giefferre/convert
4f6dc199d32a7c7d4f531fc70e15865bd448a020
[ "MIT" ]
1
2020-02-28T20:17:19.000Z
2020-02-28T20:17:19.000Z
converter/rate_providers/__init__.py
giefferre/convert
4f6dc199d32a7c7d4f531fc70e15865bd448a020
[ "MIT" ]
null
null
null
converter/rate_providers/__init__.py
giefferre/convert
4f6dc199d32a7c7d4f531fc70e15865bd448a020
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Offers different rate providers meant to be used with the converter package. """ from .interface import RateProviderInterface from .random_provider import RandomRateProvider from .ecb_rate_provider import ECBRateProvider
25.1
76
0.792829
from .interface import RateProviderInterface from .random_provider import RandomRateProvider from .ecb_rate_provider import ECBRateProvider
true
true
f757e195477efc671fdd6f88292cdc5907d38a36
2,877
py
Python
tutorials/2_tensorflow_old/numpy&pandas/17_merge.py
wull566/tensorflow_demo
c2c45050867cb056b8193eb53466d26b80b0ec13
[ "MIT" ]
2
2019-03-24T12:58:17.000Z
2021-05-18T06:21:21.000Z
tutorials/2_tensorflow_old/numpy&pandas/17_merge.py
wull566/tensorflow_demo
c2c45050867cb056b8193eb53466d26b80b0ec13
[ "MIT" ]
null
null
null
tutorials/2_tensorflow_old/numpy&pandas/17_merge.py
wull566/tensorflow_demo
c2c45050867cb056b8193eb53466d26b80b0ec13
[ "MIT" ]
null
null
null
# View more 3_python 2_tensorflow_old on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code is only for 3_python 3+. If you are using 3_python 2+, please modify the code...
40.521127
113
0.498436
from __future__ import print_function import pandas as pd left = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3'], 'A': ['A0', 'A1', 'A2', 'A3'], 'B': ['B0', 'B1', 'B2', 'B3']}) right = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3'], ...
true
true
f757e2e1d652c7c9fa62d2ecbf05fa925c7c7ec0
1,678
py
Python
.config/qtile/my_modules/programs.py
Rolv-Apneseth/my-configs
281f3e301c319ba8775cb5c005bbcef16996dffe
[ "MIT" ]
null
null
null
.config/qtile/my_modules/programs.py
Rolv-Apneseth/my-configs
281f3e301c319ba8775cb5c005bbcef16996dffe
[ "MIT" ]
null
null
null
.config/qtile/my_modules/programs.py
Rolv-Apneseth/my-configs
281f3e301c319ba8775cb5c005bbcef16996dffe
[ "MIT" ]
null
null
null
from os import environ def get_program(environment_variable: str, backup: str) -> str: return environ.get(environment_variable, default=backup) def get_terminal_program(program: str) -> str: return f"{PROGRAMS['terminal']} -e {program}" def get_site(url: str) -> str: return f'{PROGRAMS["browser"]} {ur...
30.509091
89
0.709774
from os import environ def get_program(environment_variable: str, backup: str) -> str: return environ.get(environment_variable, default=backup) def get_terminal_program(program: str) -> str: return f"{PROGRAMS['terminal']} -e {program}" def get_site(url: str) -> str: return f'{PROGRAMS["browser"]} {ur...
true
true