hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72c919a5fbacff307b79548546b94830a8d5ed5
26,995
py
Python
kivymd/uix/list.py
akaminetzkyp/KivyMD
940791ee1217e09184d8916c0eccc7534f097a48
[ "MIT" ]
1
2020-07-01T12:39:51.000Z
2020-07-01T12:39:51.000Z
kivymd/uix/list.py
ayo6706/KivyMD
c67850fd9f505d20a9e86ab89a39918daf34cd43
[ "MIT" ]
null
null
null
kivymd/uix/list.py
ayo6706/KivyMD
c67850fd9f505d20a9e86ab89a39918daf34cd43
[ "MIT" ]
null
null
null
""" Components/List =============== .. seealso:: `Material Design spec, Lists <https://material.io/components/lists>`_ .. rubric:: Lists are continuous, vertical indexes of text or images. .. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/lists.png :align: center The class :...
27.185297
113
0.655195
from kivy.lang import Builder from kivy.metrics import dp from kivy.properties import ( StringProperty, NumericProperty, ListProperty, OptionProperty, BooleanProperty, ) from kivy.uix.behaviors import ButtonBehavior from kivy.uix.floatlayout import FloatLayout from kivy.uix.image import Image impo...
true
true
f72c928677b51e691762e5e54a0552edfcb7fb7d
4,361
py
Python
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py
RomainClaret/msc.ml.labs
4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 12.04.21 # Assignment lab 04 # Master Class: Machine Learning (5MI2018) # Faculty of Economic Science # University of Neuchatel (Switzerland) # Lab 4, see ML21_Exercise_4.pdf for more information # https://github.com/RomainClaret/msc.ml.labs # Authors: # - Romain Claret @RomainClaret # - Sy...
36.341667
167
0.687686
import warnings import pickle import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.metrics import accuracy_score warnings.filterwarnings("ignore") filename = 'adult.test' file_handler = open(filename, 'r').readlines()[1:] prefix_file = "adult_2021_cw_" week_number = 1 spl...
true
true
f72c93dc9d0c650ab8f3bacc646cd04dbfed3888
92
py
Python
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
app/admin/__init__.py
baz1nga/Work-Shift
77df03120c4bc512703f02a653a6bbc982b14857
[ "MIT" ]
null
null
null
from flask import Blueprint bp = Blueprint('admin', __name__) from app.admin import views
15.333333
33
0.771739
from flask import Blueprint bp = Blueprint('admin', __name__) from app.admin import views
true
true
f72c94f9f4bcc67b00da8e6ffb7d26d5bc04f527
1,108
py
Python
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
puzzle14/14a.py
muellerd/advent_of_code20
4d9619de165b584f406ef8a1b136d79355dfe3e1
[ "MIT" ]
null
null
null
rows = [] with open("C:\\Privat\\advent_of_code20\\puzzle14\\input1.txt") as f: for line in f: rows.append(line.strip()) #print(rows) memory = {} currentMask = "" for line in rows: split = line.split(' = ') if 'mask' in split[0]: currentMask = split[1].strip() else: # value in...
21.307692
69
0.525271
rows = [] with open("C:\\Privat\\advent_of_code20\\puzzle14\\input1.txt") as f: for line in f: rows.append(line.strip()) memory = {} currentMask = "" for line in rows: split = line.split(' = ') if 'mask' in split[0]: currentMask = split[1].strip() else: bit = format(...
true
true
f72c9587c2b7459c937e13b276ff7e0feb632297
3,314
py
Python
detect_image.py
YunYang1994/CodeFun
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
150
2019-06-19T03:54:40.000Z
2019-10-21T07:09:02.000Z
detect_image.py
YunYang1994/cv-notebooks
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
7
2019-11-26T07:27:42.000Z
2020-04-02T03:35:29.000Z
detect_image.py
YunYang1994/cv-notebooks
36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068
[ "MIT" ]
25
2019-11-27T11:07:56.000Z
2020-03-19T15:44:20.000Z
#! /usr/bin/env python # coding=utf-8 #================================================================ # Copyright (C) 2020 * Ltd. All rights reserved. # # Editor : VIM # File name : detect_image.py # Author : YunYang1994 # Created date: 2020-03-19 14:05:53 # Description : # #==================...
36.822222
96
0.601992
import os import cv2 import time import numpy as np import tensorflow as tf from PIL import Image, ImageFont, ImageDraw from mtcnn import pnet, rnet, onet from models import IResnet from utils import detect_face, align_face, recognize_face model = IResnet(tflite_model="IResnet.tflite") font = ImageFont....
true
true
f72c966881d67f6b446e37599487a4a5d041df9b
60,197
py
Python
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
heat/engine/resources/openstack/nova/server.py
maestro-hybrid-cloud/heat
91a4bb3170bd81b1c67a896706851e55709c9b5a
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
42.037011
79
0.570842
import copy import uuid from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import uuidutils import six from heat.common import exception from heat.common.i18n import _ from heat.engine import attributes from heat.engine.clients import ...
true
true
f72c9842321b24921292819e0294421b24b2f549
3,305
py
Python
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2020-05-08T09:25:38.000Z
2020-10-04T16:15:29.000Z
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
2
2022-01-13T03:19:24.000Z
2022-03-12T00:48:13.000Z
src/draw.py
lRomul/argus-bengali-ai
e64374230f5390a17305769126ff4bfc9a2a8644
[ "MIT" ]
null
null
null
import time import random import numpy as np from pathlib import Path from PIL import Image, ImageDraw, ImageFont, ImageFilter import torch from torch.utils.data import Dataset from src import config def draw_grapheme(grapheme, font_path, size=(137, 236)): height, width = size image = Image.new('RGB', (widt...
36.318681
112
0.607867
import time import random import numpy as np from pathlib import Path from PIL import Image, ImageDraw, ImageFont, ImageFilter import torch from torch.utils.data import Dataset from src import config def draw_grapheme(grapheme, font_path, size=(137, 236)): height, width = size image = Image.new('RGB', (widt...
true
true
f72c98f625fd6ff9df578e247df919138a312028
1,260
py
Python
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
selectionsort.py
maxProgrammer/Entendendo_Algoritmos
8bc6ef9b7869150ef624333490b68d94b197cb75
[ "MIT" ]
null
null
null
#algoritmo utilizado para ordenação de uma lista. #a cada execução ele percorre toda lista e coloca o menor na posição (n-1) def encontraMenor(lista): #armazena o valor do indice 0 a variavel menorValor = lista[0] #considera que index zero tem o menor valor menorIndex = 0 #percorre lista do indice...
28
74
0.674603
def encontraMenor(lista): menorValor = lista[0] menorIndex = 0 for i in range(1,len(lista) - 1): if lista[i] < menorValor: menorValor = lista[i] menorIndex = i return menorIndex def ordenaSelecao(lista): ordLista = ...
true
true
f72c99bc69fba8eb8ab5186eeff081f18b9e24a7
3,124
py
Python
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
src/dataset_prepare.py
dd-dos/Emotion-detection
23eb94cbceb70890cf6b0f63e84d80eae7336c85
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from PIL import Image from tqdm import tqdm import os # convert string to integer def atoi(s): n = 0 for i in s: n = n*10 + ord(i) - ord("0") return n # making folders outer_names = ['test','train'] inner_names = ['angry', 'disgusted', 'fearful', 'happy', 's...
30.330097
87
0.546735
import numpy as np import pandas as pd from PIL import Image from tqdm import tqdm import os def atoi(s): n = 0 for i in s: n = n*10 + ord(i) - ord("0") return n outer_names = ['test','train'] inner_names = ['angry', 'disgusted', 'fearful', 'happy', 'sad', 'surprised', 'neutral'] os.makedirs('d...
true
true
f72c9a79f61fe1255118ac76e5e76311780f9ee8
1,612
py
Python
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
demos/grouped_mr_heart/demo_predict.py
mathpluscode/DeepReg
80854094feafec998fa6237199066556c73f31f9
[ "Apache-2.0" ]
null
null
null
import argparse from datetime import datetime from deepreg.predict import predict name = "grouped_mr_heart" # parser is used to simplify testing, by default it is not used # please run the script with --no-test flag to ensure non-testing mode # for instance: # python script.py --no-test parser = argparse.ArgumentPar...
26.866667
72
0.628412
import argparse from datetime import datetime from deepreg.predict import predict name = "grouped_mr_heart" parser = argparse.ArgumentParser() parser.add_argument( "--test", help="Execute the script for test purpose", dest="test", action="store_true", ) parser.add_argument( "--no-test", h...
true
true
f72c9cd27adbff3953b5021bda4fe373f564264d
2,110
py
Python
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
null
null
null
core/helper/config.py
caostorm/smng
f1cff4010a0645ae8e1182cd3c961d97cecf4a6e
[ "MIT" ]
1
2019-06-26T13:05:45.000Z
2019-06-26T13:05:45.000Z
#coding=utf-8 import json from core.helper.crypt import pwd_crypt from core.helper.globalvar import global_const import sys class options_config: class ErrorTypeNotSupport(BaseException): def __init__(self): pass def __str__(self): return "This type didn't support" def...
30.142857
90
0.519431
import json from core.helper.crypt import pwd_crypt from core.helper.globalvar import global_const import sys class options_config: class ErrorTypeNotSupport(BaseException): def __init__(self): pass def __str__(self): return "This type didn't support" def __init__(sel...
true
true
f72c9d1c53416fbc1312ed7ced97e6c382733715
12,177
py
Python
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/layers/normalizations.py
tzachar/addons
e352207da32e4670a36a295ea477c476118cb0d9
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
38.292453
79
0.642687
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import tensorflow as tf @tf.keras.utils.register_keras_serializable(package='Addons') class GroupNormalization(tf.keras.layers.Layer): def __init__(self, g...
true
true
f72c9e1c750207443829a4d4625294cef174db04
4,966
py
Python
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
1
2017-08-03T01:40:12.000Z
2017-08-03T01:40:12.000Z
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
null
null
null
restaurants/views.py
sunilsm7/django_resto
b7698653093af7e6f26dd0d0c7b8d6046b402ea4
[ "MIT" ]
null
null
null
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from d...
31.833333
139
0.762384
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from d...
true
true
f72c9ff03b849eba70778f598d05555ab5123a75
1,072
py
Python
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/tests/test_managers/test_project.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
33.5
74
0.767724
import pytest from polyaxon_sdk import V1Project from tests.utils import BaseTestCase from polyaxon.managers.project import ProjectManager @pytest.mark.managers_mark class TestProjectManager(BaseTestCase): def test_default_props(self): assert ProjectManager.is_all_visibility() is True ...
true
true
f72ca02b98c9b0c00c8385d82a02c58fe350bf58
16,524
py
Python
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
src/ner_model/typer/data_translator.py
fracivilization/distant_ner_using_thesaurus
cebfb2bd950123ce3ef18e501314778cc41de71e
[ "Apache-2.0" ]
null
null
null
import dataclasses from enum import unique import click import datasets from datasets import features from datasets.arrow_dataset import Dataset from datasets.dataset_dict import DatasetDict from src.ner_model.chunker.abstract_model import Chunker from src.utils.utils import remove_BIE import dataclasses from seqeval.m...
37.216216
86
0.60633
import dataclasses from enum import unique import click import datasets from datasets import features from datasets.arrow_dataset import Dataset from datasets.dataset_dict import DatasetDict from src.ner_model.chunker.abstract_model import Chunker from src.utils.utils import remove_BIE import dataclasses from seqeval.m...
true
true
f72ca25004c0c4905aca487d4e9c73657cbe9a5d
482
py
Python
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
null
null
null
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
1
2021-06-02T00:33:40.000Z
2021-06-02T00:33:40.000Z
app/http/middleware/HelloWorldMiddleware.py
llaski/masonite-tutorial
f89dc88ccf7924b477dfe971fdb981a82e63d5fe
[ "MIT" ]
null
null
null
"""HelloWorld Middleware.""" from masonite.request import Request class HelloWorldMiddleware: """HelloWorld Middleware.""" def __init__(self, request: Request): """Inject Any Dependencies From The Service Container. Arguments: Request {masonite.request.Request} -- The Masonite r...
21.909091
77
0.636929
from masonite.request import Request class HelloWorldMiddleware: def __init__(self, request: Request): self.request = request def before(self): print('Hello World') def after(self): print('Goodbye World')
true
true
f72ca260e47ced61e897e70195c321f15e9d783d
3,962
py
Python
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
misc/learnpy/k-means/loadiris.py
mutazag/mdsi
efecc8f650ddf6866154389f98d4ce0a9803db18
[ "MIT" ]
null
null
null
import pandas as pd from sklearn import datasets # load iris data set iris = datasets.load_iris() print(iris) species = [iris.target_names[x] for x in iris.target] iris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) iris['Species'] = species iris.head() iri...
29.132353
108
0.694346
import pandas as pd from sklearn import datasets iris = datasets.load_iris() print(iris) species = [iris.target_names[x] for x in iris.target] iris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) iris['Species'] = species iris.head() iris.dtypes iris['co...
true
true
f72ca2f478e2f86936751094fd9d66c1fab0a9ee
1,734
py
Python
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
run-gat-2-8.py
urialon/bottleneck
481fbb95edc6ae711da40b6305b40c12ce6a6d29
[ "MIT" ]
null
null
null
import main from common import Task, STOP, GNN_TYPE from attrdict import AttrDict from experiment import Experiment import torch override_params = { 2: {'batch_size': 64, 'eval_every': 1000}, 3: {'batch_size': 64}, 4: {'batch_size': 1024}, 5: {'batch_size': 1024}, 6: {'batch_size': 1024}, 7: {'...
33.346154
99
0.632641
import main from common import Task, STOP, GNN_TYPE from attrdict import AttrDict from experiment import Experiment import torch override_params = { 2: {'batch_size': 64, 'eval_every': 1000}, 3: {'batch_size': 64}, 4: {'batch_size': 1024}, 5: {'batch_size': 1024}, 6: {'batch_size': 1024}, 7: {'...
true
true
f72ca4cbe79a2f6143b41e5d9b7ad5d70a93a0a8
884
py
Python
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
137
2017-10-20T09:36:32.000Z
2022-03-24T18:49:16.000Z
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
505
2017-10-24T13:14:06.000Z
2022-03-28T20:21:45.000Z
enrich/followthemoney_enrich/cache.py
achievement008/followthemoney
bda06d62c81c82e62cd0c53117d8804939b40f62
[ "MIT" ]
32
2017-12-19T15:22:07.000Z
2022-02-18T11:01:28.000Z
import os import json from redis import Redis from normality import stringify class Cache(object): def get(self, key): return None def has(self, key): return self.get(key) is not None def store(self, key, value): pass class RedisCache(Cache): EXPIRE = 84600 * 90 URL = o...
22.1
62
0.61991
import os import json from redis import Redis from normality import stringify class Cache(object): def get(self, key): return None def has(self, key): return self.get(key) is not None def store(self, key, value): pass class RedisCache(Cache): EXPIRE = 84600 * 90 URL = o...
true
true
f72ca4f157e0f5d299e44df76de3bb9ba9ff45ad
13,454
py
Python
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
null
null
null
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
null
null
null
env/lib/python3.7/encodings/mac_cyrillic.py
JacobMiske/nuclear-database-APIs
bc9fb6afb9aa0d98dde5d744d8f22b2791597e78
[ "MIT" ]
1
2020-05-01T20:23:35.000Z
2020-05-01T20:23:35.000Z
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
43.681818
118
0.549353
import codecs c): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='strict'): return codecs.charmap_decode(input,errors,decoding_table) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, inp...
true
true
f72ca5261e26e28890b2ead99f9ab8ea92310208
9,487
py
Python
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
33
2017-05-09T03:31:38.000Z
2022-03-26T01:29:35.000Z
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
284
2018-03-13T13:57:09.000Z
2022-03-30T21:59:34.000Z
test/fb_cases_util.py
savinshynu/turbo_seti
7d756f130af5a323403affcdcb9f9bfa62325836
[ "MIT" ]
116
2017-08-08T17:27:30.000Z
2022-03-24T21:24:40.000Z
r''' Utility functions for test_fb_cases.py ''' from os import mkdir, remove from os.path import dirname from shutil import rmtree import logging import pandas as pd import numpy as np import setigen as stg from turbo_seti.find_doppler.find_doppler import FindDoppler from fb_cases_def import HERE, DEBUGGING, RTOL_DIFF...
41.792952
101
0.64288
from os import mkdir, remove from os.path import dirname from shutil import rmtree import logging import pandas as pd import numpy as np import setigen as stg from turbo_seti.find_doppler.find_doppler import FindDoppler from fb_cases_def import HERE, DEBUGGING, RTOL_DIFF, TestResultRecord, SetigenParms DF_REFERENCE =...
true
true
f72ca647ec6c0d280fd1a1ba4d668d4a17a782b2
5,517
py
Python
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/course/migrations/0001_initial.py
crowdbotics-apps/utawala-main-altar-29305
f450b7e301bc63a8400e7a9b0e39f4b7f931e2fd
[ "FTL", "AML", "RSA-MD" ]
null
null
null
# Generated by Django 2.2.24 on 2021-07-31 08:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] op...
49.258929
179
0.595251
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f72ca651974209e177cd6e0b852ffe740ce4bc1b
57,027
py
Python
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
2
2021-03-08T23:32:06.000Z
2022-01-13T03:43:49.000Z
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ipu/utils.py
DebeshJha/tensorflow-1
2b5a225c49d25273532d11c424d37ce394d7579a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
37.296926
96
0.668806
import collections from enum import Enum import os import time import numpy as np from tensorflow.compiler.plugin.poplar.driver.config_pb2 import IpuOptions from tensorflow.compiler.plugin.poplar.driver.trace_pb2 import IpuTraceEvent from tensorflow.compiler.plugin.poplar.driver import config_pb2 from t...
true
true
f72ca776ebc6d065e702f3c8cb4da790bde5d2ce
3,892
py
Python
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
null
null
null
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
20
2018-08-13T22:50:46.000Z
2018-11-03T22:29:03.000Z
tests/data/residues/GLN.py
uw-ipd/privileged_residues
78078c22ba537651a1b6bd1404c05246ab73a3e3
[ "Apache-2.0" ]
1
2018-08-25T06:03:43.000Z
2018-08-25T06:03:43.000Z
from tests.util import pick_ray from pyrosetta import Pose from pyrosetta.rosetta.core.import_pose import pose_from_pdbstring name = "GLN" contents = """ ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N ATOM 2 CA ALA A 1 1.458 0.000 0.000 1.00 0.00 C ATOM ...
48.049383
78
0.43705
from tests.util import pick_ray from pyrosetta import Pose from pyrosetta.rosetta.core.import_pose import pose_from_pdbstring name = "GLN" contents = """ ATOM 1 N ALA A 1 0.000 0.000 0.000 1.00 0.00 N ATOM 2 CA ALA A 1 1.458 0.000 0.000 1.00 0.00 C ATOM ...
true
true
f72ca7d3d97e12ab7b405dcff314bdb6c0a78755
3,337
py
Python
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
16,259
2018-05-02T02:31:30.000Z
2022-03-31T21:50:23.000Z
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
3,863
2018-05-02T13:42:39.000Z
2022-03-31T19:03:32.000Z
examples/pointer_generator/preprocess.py
fairseq-FT/fairseq
18725499144c1bba7c151b796ba774e59d36eaa9
[ "MIT" ]
4,796
2018-05-02T07:55:51.000Z
2022-03-31T14:46:45.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse from itertools import zip_longest def replace_oovs(source_in, target_in, vocabulary, source_out, targ...
32.398058
85
0.605034
import argparse from itertools import zip_longest def replace_oovs(source_in, target_in, vocabulary, source_out, target_out): def format_unk(pos): return "<unk-{}>".format(pos) if target_in is None: target_in = [] for seq_num, (source_seq, target_seq) in enumerate( zip_lon...
true
true
f72ca9ee9ae4957b92084a00b5624be329e8478f
349
py
Python
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
Capitulo_02/exercise2_4.py
thiagosouzalink/my_codes-exercices-book-curso_intensivo_de_python
841aa855a7450ad3d0ba65393ba0b6debcd6a770
[ "MIT" ]
null
null
null
""" 2.4 – Letras maiúsculas e minúsculas em nomes: Armazene o nome de uma pessoa em uma variável e então apresente o nome dessa pessoa em letras minúsculas, em letras maiúsculas e somente com a primeira letra maiúscula. """ nome = "José" # Minúsculas print(nome.lower()) # Maiúsculas print(nome.upper()) # Somente a ...
24.928571
215
0.747851
nome = "José" print(nome.lower()) print(nome.upper()) print(nome[0])
true
true
f72caa1cc50710b6f6793c4a96821b65b2e32acb
2,025
py
Python
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
src/routes/users.py
tombrereton/flask-api-starter-kit
2e244bfc4f5659e91fd7cd27388c37bf32baeaec
[ "MIT" ]
null
null
null
from http import HTTPStatus from typing import List from apifairy import body, other_responses, response from flask import Blueprint, jsonify from flask import request from src.config import DefaultConfig from src.dtos.user import UserDto from src.requests.user import CreateUserRequestSchema, CreateUserRequest, Creat...
33.196721
108
0.74963
from http import HTTPStatus from typing import List from apifairy import body, other_responses, response from flask import Blueprint, jsonify from flask import request from src.config import DefaultConfig from src.dtos.user import UserDto from src.requests.user import CreateUserRequestSchema, CreateUserRequest, Creat...
true
true
f72caa4b74837bd62d61442cc130cfd18f4a2cb9
602
py
Python
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
3
2021-03-26T00:48:20.000Z
2022-03-29T22:05:39.000Z
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
1
2017-12-28T04:51:44.000Z
2017-12-28T04:51:44.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
37.625
94
0.465116
from azure.cli.core.help_files import helps helps['find'] = """ type: command short-summary: Find Azure CLI commands. examples: - name: Search for commands containing 'vm' or 'secret' text: > az find -q vm secret """
true
true
f72caa944d2ed0ef2d12c5b7459dddcc53fc9b34
12,347
py
Python
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
19
2022-03-21T10:22:24.000Z
2022-03-30T15:43:46.000Z
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
null
null
null
EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py
Lakonik/EPro-PnP
931df847190ce10eddd1dc3e3168ce1a2f295ffa
[ "Apache-2.0" ]
3
2022-03-26T08:08:24.000Z
2022-03-30T11:17:11.000Z
""" Copyright (C) 2010-2022 Alibaba Group Holding Limited. This file is modified from https://github.com/tjiiv-cprg/MonoRUn """ import math import numpy as np import torch from pytorch3d.structures.meshes import Meshes from epropnp_det.ops.iou3d.iou3d_utils import nms_gpu def gen_unit_noc(num_pts, device=None): ...
37.990769
113
0.53268
import math import numpy as np import torch from pytorch3d.structures.meshes import Meshes from epropnp_det.ops.iou3d.iou3d_utils import nms_gpu def gen_unit_noc(num_pts, device=None): indices = torch.arange(0, num_pts, dtype=torch.float32, device=device) + 0.5 phi = torch.arccos(1 - 2 * indices / num_pts) ...
true
true
f72cab0568521a363e71061115573b79f5eea8ff
22,874
py
Python
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/compute/v20191201/virtual_machine.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
65.354286
1,169
0.707135
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['VirtualMachine'] class VirtualMachine(pulumi.CustomResource): def __init__(__self__...
true
true
f72cab35e960fe08f1ad7e2c27dda165a8cea5a9
352
py
Python
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
4
2019-03-20T14:49:01.000Z
2020-06-19T19:03:54.000Z
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
2
2019-02-05T16:20:44.000Z
2019-02-06T09:50:27.000Z
qualysapi/__init__.py
trolldbois/qualysapi
33de3cda1e1073e5c960740e38864d1f551bfd3d
[ "Apache-2.0" ]
1
2020-06-01T18:57:41.000Z
2020-06-01T18:57:41.000Z
# -*- coding: future_fstrings -*- # This is the version string assigned to the entire egg post # setup.py install # Ownership and Copyright Information. from __future__ import absolute_import __author__ = "Parag Baxi <parag.baxi@gmail.com>" __copyright__ = "Copyright 2011-2013, Parag Baxi" __license__ = "BSD-new" fro...
29.333333
60
0.772727
from __future__ import absolute_import __author__ = "Parag Baxi <parag.baxi@gmail.com>" __copyright__ = "Copyright 2011-2013, Parag Baxi" __license__ = "BSD-new" from qualysapi.util import connect
true
true
f72cab98f8c6d40b4cfe232aace0f320986b5a88
607
py
Python
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
2
2021-06-02T13:26:34.000Z
2021-12-27T23:12:47.000Z
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
102
2020-12-06T19:47:43.000Z
2022-03-31T12:56:17.000Z
biosimulators_utils/sedml/exceptions.py
biosimulators/Biosimulators_utils
c1363467263120bf1166da2b75e38fc7f56dc94f
[ "MIT" ]
4
2021-01-27T19:56:34.000Z
2022-02-03T21:08:20.000Z
""" Exceptions for SED-ML :Author: Jonathan Karr <karr@mssm.edu> :Date: 2021-01-12 :Copyright: 2021, Center for Reproducible Biomedical Modeling :License: MIT """ from ..exceptions import BioSimulatorsException __all__ = [ 'SedmlExecutionError', 'UnsupportedModelLanguageError', ] class SedmlExecutionError(...
24.28
81
0.742998
from ..exceptions import BioSimulatorsException __all__ = [ 'SedmlExecutionError', 'UnsupportedModelLanguageError', ] class SedmlExecutionError(BioSimulatorsException): pass class UnsupportedModelLanguageError(BioSimulatorsException, NotImplementedError): pass
true
true
f72cabca4a5200b7b635654d553d20ae2f30155f
3,356
py
Python
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
34
2021-01-19T21:14:06.000Z
2022-03-31T18:42:58.000Z
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
33
2021-01-12T18:50:16.000Z
2022-03-23T04:49:20.000Z
tests/bindings/test_python.py
mfkiwl/hgdb
6279b2d671b09094b7e69c592fa8f2eca3f6bacd
[ "BSD-2-Clause" ]
2
2021-03-28T06:58:46.000Z
2022-03-31T02:55:53.000Z
import sqlite3 import tempfile import hgdb import os import pytest def get_conn_cursor(db_name): conn = sqlite3.connect(db_name) c = conn.cursor() return conn, c def test_store_instance(): with tempfile.TemporaryDirectory() as temp: db_name = os.path.join(temp, "debug.db") db = hgdb....
31.660377
105
0.61025
import sqlite3 import tempfile import hgdb import os import pytest def get_conn_cursor(db_name): conn = sqlite3.connect(db_name) c = conn.cursor() return conn, c def test_store_instance(): with tempfile.TemporaryDirectory() as temp: db_name = os.path.join(temp, "debug.db") db = hgdb....
true
true
f72cac3af394de7e0476052b87a340105bd5386f
2,482
py
Python
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
1
2021-07-18T01:12:55.000Z
2021-07-18T01:12:55.000Z
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
null
null
null
bot.py
StarkGang/TagChecker
390191a03afc17c9003a046954586532947d10d4
[ "MIT" ]
null
null
null
from pyrogram import filters, Client import logging import os from pyrogram.types import ( ChatPermissions, InlineKeyboardButton, InlineKeyboardMarkup ) logging.basicConfig(level=logging.INFO) API_ID = int(os.environ.get("API_ID", 6)) API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") ...
26.404255
92
0.657937
from pyrogram import filters, Client import logging import os from pyrogram.types import ( ChatPermissions, InlineKeyboardButton, InlineKeyboardMarkup ) logging.basicConfig(level=logging.INFO) API_ID = int(os.environ.get("API_ID", 6)) API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e") ...
true
true
f72cad1a00cbc3a4cfeedd1cef65f5d5f630641b
2,143
py
Python
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/watcher.py
666DZY666/oneflow
2062cb211dd1e0619d610659e6d41598d5f73e17
[ "Apache-2.0" ]
1
2021-11-10T07:57:01.000Z
2021-11-10T07:57:01.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
35.716667
86
0.792814
from __future__ import absolute_import import traceback import oneflow.core.record.record_pb2 as record_util import oneflow.python.framework.local_blob as local_blob_util import oneflow.python.framework.ofblob as ofblob import oneflow.python.framework.remote_blob as remote_blob_util import oneflow.python.framework.se...
true
true
f72cad26cae4ebe6adabb39d7a5dfcd09cf17363
31,637
py
Python
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
4
2018-12-21T23:30:33.000Z
2021-10-12T16:38:27.000Z
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
61
2019-01-09T01:50:19.000Z
2022-03-31T15:27:17.000Z
sdk/python/pulumi_f5bigip/ltm/snat.py
pulumi/pulumi-f5bigip
4bce074f8bd7cb42f359ef4814ca5b437230fd1c
[ "ECL-2.0", "Apache-2.0" ]
1
2019-10-05T10:36:30.000Z
2019-10-05T10:36:30.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
46.939169
535
0.649746
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['SnatArgs', 'Snat'] @pulumi.input_type class SnatArgs: def __init__(__self__, *, name: pul...
true
true
f72cad63668c1a50f31829882512b8a9df77f041
12,170
py
Python
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
1
2019-05-08T06:09:35.000Z
2019-05-08T06:09:35.000Z
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
4
2018-08-22T14:51:02.000Z
2018-10-17T14:04:26.000Z
keystone-moon/keystone/tests/unit/test_backend_endpoint_policy.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
5
2018-08-03T17:19:34.000Z
2019-01-11T15:54:42.000Z
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
48.68
79
0.607313
import uuid from six.moves import range from testtools import matchers from keystone import exception from keystone.tests import unit class PolicyAssociationTests(object): def _assert_correct_policy(self, endpoint, policy): ref = ( self.endpoint_policy_api.get_policy_for_endpo...
true
true
f72cae2c89049bcff133dee51ea839c617f5fd7f
372
py
Python
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
1
2022-03-25T14:36:18.000Z
2022-03-25T14:36:18.000Z
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
null
null
null
supervisely/src/mask_image.py
supervisely-ecosystem/ritm-interactive-segmentation
c86df3c7c95ce20ffd3c9cc5e3f07abe8c162f4c
[ "MIT" ]
1
2022-03-17T06:39:39.000Z
2022-03-17T06:39:39.000Z
import sly_globals as g def get_mask_from_clicks(image_np, clicks_list): g.CONTROLLER.set_image(image_np) for click in clicks_list: g.CONTROLLER.add_click(click.coords[1], click.coords[0], click.is_positive) try: res_mask = g.CONTROLLER.result_mask except Exception(f"Couldn't process i...
28.615385
83
0.712366
import sly_globals as g def get_mask_from_clicks(image_np, clicks_list): g.CONTROLLER.set_image(image_np) for click in clicks_list: g.CONTROLLER.add_click(click.coords[1], click.coords[0], click.is_positive) try: res_mask = g.CONTROLLER.result_mask except Exception(f"Couldn't process i...
true
true
f72caed168c08d84dcc3dd7cb27e247c5df1716d
348
py
Python
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
33
2019-10-14T19:19:43.000Z
2021-11-30T13:40:20.000Z
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
317
2019-10-14T18:35:22.000Z
2020-03-03T17:45:06.000Z
Algorithms/kadane_algorithm/python-kadane-algorithm-O(n).py
omega07/Yet_Another_Algorithms_Repository
7c967e115e96b3c07010a3bf94ca1cdb898a6e82
[ "MIT" ]
332
2019-10-14T18:39:08.000Z
2021-09-02T16:19:11.000Z
def maxSubArraySum(a,size): max_so_far =a[0] curr_max = a[0] for i in range(1,size): curr_max = max(a[i], curr_max + a[i]) max_so_far = max(max_so_far,curr_max) return max_so_far a = [-2, -3, 4, -1, -2, 1, 5, -3] print("Maximum contiguous sum is" , m...
23.2
61
0.531609
def maxSubArraySum(a,size): max_so_far =a[0] curr_max = a[0] for i in range(1,size): curr_max = max(a[i], curr_max + a[i]) max_so_far = max(max_so_far,curr_max) return max_so_far a = [-2, -3, 4, -1, -2, 1, 5, -3] print("Maximum contiguous sum is" , m...
true
true
f72caeec9c99f7dddcbe170095eba9f6591f69ab
910
py
Python
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
dwavebinarycsp/package_info.py
JoelPasvolsky/dwavebinarycsp
ef260bff6d606d8176b287bb6e27a05d6f72de9f
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
43.333333
98
0.661538
__version__ = '0.1.3' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'Solves constraints satisfaction problems with binary quadratic model samplers'
true
true
f72cb12504a8487b6ebb6f694946918cd78f6d7b
267
py
Python
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/integer/schema_instance/nistschema_sv_iv_atomic_integer_total_digits_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_total_digits_2_xsd.nistschema_sv_iv_atomic_integer_total_digits_2 import NistschemaSvIvAtomicIntegerTotalDigits2 __all__ = [ "NistschemaSvIvAtomicIntegerTotalDigits2", ]
44.5
204
0.898876
from output.models.nist_data.atomic.integer.schema_instance.nistschema_sv_iv_atomic_integer_total_digits_2_xsd.nistschema_sv_iv_atomic_integer_total_digits_2 import NistschemaSvIvAtomicIntegerTotalDigits2 __all__ = [ "NistschemaSvIvAtomicIntegerTotalDigits2", ]
true
true
f72cb1f015fcd1360def9463bd8e6047da25b737
11,947
py
Python
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
null
null
null
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
null
null
null
examples/ex_icub_trust_cognitive_architecture/endorsement.py
riccardobrue/SOM-example-1
8a977e73844f9206ee1704be577f8a7521d2b306
[ "MIT" ]
1
2021-03-16T16:02:16.000Z
2021-03-16T16:02:16.000Z
#!/usr/bin/python # The MIT License (MIT) # # Copyright (c) 2017 Massimiliano Patacchiola # # 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 ...
44.913534
133
0.601657
from speech_recognition import SpeechRecognizer from icub import iCub import cv2 import random import time import os import sys def initialise(): my_speech = SpeechRecognizer( hmm_path="/home/massimiliano/pyERA/examples/ex_icub_trust_cognitive_architecture/...
true
true
f72cb22b484e4768378d4a3b0201733382c540d7
2,332
py
Python
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
tests/integration/test_sdv.py
joanvaquer/SDV
83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28
[ "MIT" ]
null
null
null
from sdv import SDV, load_demo def test_sdv(): metadata, tables = load_demo(metadata=True) sdv = SDV() sdv.fit(metadata, tables) # Sample all sampled = sdv.sample_all() assert set(sampled.keys()) == {'users', 'sessions', 'transactions'} assert len(sampled['users']) == 10 # Sample w...
31.945205
87
0.694683
from sdv import SDV, load_demo def test_sdv(): metadata, tables = load_demo(metadata=True) sdv = SDV() sdv.fit(metadata, tables) sampled = sdv.sample_all() assert set(sampled.keys()) == {'users', 'sessions', 'transactions'} assert len(sampled['users']) == 10 sampled = sdv.sam...
true
true
f72cb255bbd9dbaa14f82003586431b14c8cdf93
340
py
Python
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
WebApp/admin.py
divij-pherwani/PythonProject
3ba262be580022cffc840f4cf967363eb7d3417b
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import StudentDetail, UniversityDetail, CourseDetail, CourseName, ApplicationDetail admin.site.register(StudentDetail) admin.site.register(UniversityDetail) admin.site.register(CourseDetail) admin.site.register(CourseName) admin.site.register(ApplicationDetail) # Registe...
28.333333
96
0.844118
from django.contrib import admin from .models import StudentDetail, UniversityDetail, CourseDetail, CourseName, ApplicationDetail admin.site.register(StudentDetail) admin.site.register(UniversityDetail) admin.site.register(CourseDetail) admin.site.register(CourseName) admin.site.register(ApplicationDetail)
true
true
f72cb2583a8f94f5dbbfd81abcd00d5e5a7903fa
2,490
py
Python
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
serpcord/models/guild.py
PgBiel/serpcord
482736dc691027417edcd6500cdfbf9053f92b63
[ "MIT" ]
null
null
null
import typing import datetime from typing import Mapping, Any, Optional, Iterable, List from .model_abc import JsonAPIModel from .snowflake import Snowflake from .user import User from .enums import PermissionFlags from .permissions import Role from serpcord.utils.model import _init_model_from_mapping_json_data if ty...
46.111111
120
0.701606
import typing import datetime from typing import Mapping, Any, Optional, Iterable, List from .model_abc import JsonAPIModel from .snowflake import Snowflake from .user import User from .enums import PermissionFlags from .permissions import Role from serpcord.utils.model import _init_model_from_mapping_json_data if ty...
true
true
f72cb27896211cd7a2fb7552b1e8abcbeb59a726
713
py
Python
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
dns/migrations/0016_autozones_path.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # autozones_path # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party m...
29.708333
92
0.4446
from django.db import models from noc.core.migration.base import BaseMigration class Migration(BaseMigration): def migrate(self): self.db.add_column( "dns_dnsserver", "autozones_path", models.CharField( "Autozones path", max_length=256, blank=T...
true
true
f72cb379e5c099506c5177d3a7d4578f63d14794
8,765
py
Python
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
models/resnet_cifar_quant.py
mengjian0502/GroupLasso_Quant
1c54c940739babf86e362ffc57752c2aa4c8986d
[ "MIT" ]
null
null
null
""" ResNet on CIFAR10 """ import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from .quant import ClippedReLU, int_conv2d, int_linear from .mpdr_score import get_mpdr_score import math class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA,...
37.780172
196
0.650542
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import init from .quant import ClippedReLU, int_conv2d, int_linear from .mpdr_score import get_mpdr_score import math class DownsampleA(nn.Module): def __init__(self, nIn, nOut, stride): super(DownsampleA, self).__init__() asse...
true
true
f72cb40930dc9e29198e8bc1f4a2818b2e161a8f
449
py
Python
util.py
codefordc/us-congress-pizza-flag-tracker
766c72e01e2c01342d4c6dbe2108fded2022ee74
[ "CC0-1.0" ]
5
2021-01-31T14:29:43.000Z
2021-07-15T16:22:30.000Z
util.py
rajindermavi/us-congress-pizza-flag-tracker
10827f3d6f2ef0cc434a475fc9782fc840cb81ab
[ "CC0-1.0" ]
85
2021-05-12T23:31:29.000Z
2022-03-30T21:23:58.000Z
util.py
rajindermavi/us-congress-pizza-flag-tracker
10827f3d6f2ef0cc434a475fc9782fc840cb81ab
[ "CC0-1.0" ]
8
2021-04-11T16:44:15.000Z
2021-10-30T21:14:17.000Z
import json from config import db from models import UserModel def table_record_to_json(record): modelClass = type(record) columns = [record for record in filter(lambda item: not item.startswith('_'),modelClass.__dict__)] json_value = {column_name: str(getattr(record, column_name))for column_name in colu...
28.0625
102
0.752784
import json from config import db from models import UserModel def table_record_to_json(record): modelClass = type(record) columns = [record for record in filter(lambda item: not item.startswith('_'),modelClass.__dict__)] json_value = {column_name: str(getattr(record, column_name))for column_name in colu...
true
true
f72cb478099ad21f4b980eaa5ef8fdbe1740ca81
519
py
Python
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
1
2020-10-27T18:05:26.000Z
2020-10-27T18:05:26.000Z
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
null
null
null
models/utils.py
clabrugere/numpy-basics
81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3
[ "MIT" ]
null
null
null
import numpy as np def confusion_matrix(y_true, y_hat, threshold=.5): def _to_class(y): return np.array([1 if i >= threshold else 0 for i in y]) n_classes = len(np.unique(y_true)) cm = np.zeros((n_classes, n_classes)) y_hat = _to_class(y_hat) for a, p in zip(y_true, y_hat): ...
24.714286
64
0.572254
import numpy as np def confusion_matrix(y_true, y_hat, threshold=.5): def _to_class(y): return np.array([1 if i >= threshold else 0 for i in y]) n_classes = len(np.unique(y_true)) cm = np.zeros((n_classes, n_classes)) y_hat = _to_class(y_hat) for a, p in zip(y_true, y_hat): ...
true
true
f72cb4e3d578253909cb6f62152c5f20859236b5
276
py
Python
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
29
2019-08-04T03:05:23.000Z
2021-12-14T14:09:57.000Z
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
3
2020-10-09T01:35:45.000Z
2021-06-02T12:24:31.000Z
translator/app/modules/speech.py
sharad461/nepali-translator
d35ba1586e4ad14ddae71b24caf49aac66d63a2e
[ "Apache-2.0" ]
9
2019-11-04T10:01:34.000Z
2021-12-20T02:03:40.000Z
import speech_recognition as sr def rec(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: text = r.recognize_google(audio) return(text) except: return("Sorry, couldn't recognize your voice. Please try again.")
21.230769
68
0.666667
import speech_recognition as sr def rec(): r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) try: text = r.recognize_google(audio) return(text) except: return("Sorry, couldn't recognize your voice. Please try again.")
true
true
f72cb63e07c6ebb1781cffd6e5ba78d6f5d59509
1,201
py
Python
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
1
2021-03-15T19:01:43.000Z
2021-03-15T19:01:43.000Z
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
null
null
null
sonata/datamodules/base_datamodule.py
sergevkim/sonata
2250b60174628ee76fb7d54bf50e4b8b07b505d5
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from pathlib import Path import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader class BaseDataModule(ABC): def __init__( self, data_path: Path, batch_size: int, num_workers: int, ): ...
21.836364
48
0.587843
from abc import ABC, abstractmethod from pathlib import Path import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader class BaseDataModule(ABC): def __init__( self, data_path: Path, batch_size: int, num_workers: int, ): ...
true
true
f72cb68570a41741af7a25b02a5d19503e0f3386
3,806
py
Python
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
null
null
null
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
11
2021-07-12T15:20:14.000Z
2022-01-17T09:40:41.000Z
netket/operator/boson.py
gpescia/MyNetKet
958510966a5870d9d491de0628903cf1fc210921
[ "Apache-2.0" ]
1
2021-04-25T15:47:32.000Z
2021-04-25T15:47:32.000Z
# Copyright 2021 The NetKet Authors - All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
29.503876
96
0.672622
from netket.utils.types import DType from netket.hilbert import AbstractHilbert from ._local_operator import LocalOperator as _LocalOperator def destroy( hilbert: AbstractHilbert, site: int, dtype: DType = float ) -> _LocalOperator: import numpy as np N = hilbert.size_at_index(site) ...
true
true
f72cb81ea991aa6ce3d971ea1b6e47347518c4cb
31
py
Python
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
day2/oddno1.py
nikhilsamninan/python-files
15198459081097058a939b40b5e8ef754e578fe0
[ "Apache-2.0" ]
null
null
null
print(tuple(range(201,400,2)))
15.5
30
0.709677
print(tuple(range(201,400,2)))
true
true
f72cb9eb47ac3d1bf036724169c33be5cd5d5d60
338
py
Python
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
13
2018-08-11T01:40:51.000Z
2022-01-02T09:07:43.000Z
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
21
2018-05-28T13:16:23.000Z
2021-08-19T15:43:40.000Z
dogstatsd/__init__.py
ian28223/datadog-unix-agent
09c75778b512361c83ff10e7cdb37b887bcaa8fe
[ "Apache-2.0" ]
15
2018-05-10T15:09:41.000Z
2022-03-21T06:46:21.000Z
# Unless explicitly stated otherwise all files in this repository are licensed # under the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2018 Datadog, Inc. from .server import Server from .reporter import Reporter __all__ = [ "Server", ...
26
83
0.748521
from .server import Server from .reporter import Reporter __all__ = [ "Server", "Reporter", ]
true
true
f72cba691951b7828f5ece31e4d5727f90f7fb13
428
py
Python
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
gallery/migrations/0006_image_image.py
dennis027/Gallery
282c1807087beb2e2a5ea1d51b5b6891145c20a0
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-07-03 12:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0005_remove_image_image'), ] operations = [ migrations.AddField( model_name='image', name='image', ...
21.4
62
0.598131
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0005_remove_image_image'), ] operations = [ migrations.AddField( model_name='image', name='image', field=models.CharField(default=1, max_len...
true
true
f72cbb0f0e9ed11c2ce819bd187907cbc6229269
1,190
py
Python
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
7
2021-04-10T15:03:37.000Z
2021-07-05T02:49:51.000Z
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
null
null
null
examples/pure_jax.py
kingoflolz/DALL-E
d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7
[ "MIT" ]
1
2021-10-01T07:47:41.000Z
2021-10-01T07:47:41.000Z
import io import jax import requests import PIL from PIL import ImageOps import numpy as np import jax.numpy as jnp from dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels target_image_size = 256 def download_image(url): resp = requests.get(url) resp.raise_for_status() return PIL.Ima...
26.444444
110
0.730252
import io import jax import requests import PIL from PIL import ImageOps import numpy as np import jax.numpy as jnp from dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels target_image_size = 256 def download_image(url): resp = requests.get(url) resp.raise_for_status() return PIL.Ima...
true
true
f72cbbad2bdf77b532dac0c510c9856f9ed9388e
12,421
py
Python
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
src/run_joint_confidence_cdcOriginalGan.py
williamsashbee/Confident_classifier
cba3ef862b310afc3af6c4a62b524f032f45549e
[ "MIT" ]
null
null
null
############################################## # This code is based on samples from pytorch # ############################################## # Writer: Kimin Lee from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import d...
37.3003
132
0.622494
h.manual_seed(args.seed) if args.cuda: torch.cuda.manual_seed(args.seed) kwargs = {'num_workers': 1, 'pin_memory': True} if args.cuda else {} print('load data: ', args.dataset) if args.dataset=='mnist': transform = transforms.Compose([ transforms.Scale(32), transforms.ToTensor(), tran...
true
true
f72cbd007d1006b7c1318b34026adba9042de0cd
5,497
py
Python
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
null
null
null
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
null
null
null
tb_rest_client/models/models_ce/page_data_ota_package_info.py
jernkuan/thingsboard-python-rest-client
3fb25272507494e6d494b27ca2380d3c543562e5
[ "Apache-2.0" ]
1
2021-11-26T11:24:56.000Z
2021-11-26T11:24:56.000Z
# coding: utf-8 """ ThingsBoard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. # noqa: E501 OpenAPI spec version: 2.0 Contact: info@thingsboard.io Generated by: https://github.com/swagger-...
29.084656
163
0.593778
import pprint import re import six class PageDataOtaPackageInfo(object): swagger_types = { 'data': 'list[OtaPackageInfo]', 'has_next': 'bool', 'total_elements': 'int', 'total_pages': 'int' } attribute_map = { 'data': 'data', 'has_next': 'hasNext', ...
true
true
f72cbd8032bfba00a07e989b6b537df95ff4361b
8,128
py
Python
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
3
2019-10-10T15:49:42.000Z
2020-05-31T07:39:10.000Z
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
null
null
null
Chapter2/LFM.py
7125messi/rencommend_system_learning
4a8bcef241c4c0357cfbe4d1a9828b847974b69c
[ "Apache-2.0" ]
2
2019-09-18T07:59:48.000Z
2020-01-16T15:00:48.000Z
# 导入包 import random import math import numpy as np import time from tqdm import tqdm from tqdm import trange # 1 通用函数定义 ## 定义装饰器,监控运行时间 def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('Func {},run tim...
29.028571
93
0.506275
import random import math import numpy as np import time from tqdm import tqdm from tqdm import trange nc): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('Func {},run time:{}'.format(func.__name__,stop_time - start...
true
true
f72cbd82ce65ea7deeb9b12673a6fa17f65eaeaa
2,015
py
Python
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
null
null
null
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
1
2019-06-06T15:28:15.000Z
2019-06-06T15:28:15.000Z
intake_questgdal/base.py
Aquaveo/intake_questgdal
c11cd111a53b7270391c6923d0e252c4abbbc56b
[ "BSD-3-Clause" ]
null
null
null
from intake.source.base import DataSource, Schema import rasterio import xarray as xr import warnings # from . import __version__ class quest_gdal_base(DataSource): """Reads an HDF5 table Parameters ---------- path: str File to load. tablename: str Name of table to load. metad...
26.168831
72
0.4933
from intake.source.base import DataSource, Schema import rasterio import xarray as xr import warnings class quest_gdal_base(DataSource): version = '0.0.1' container = 'dataframe' partition_access = False path = '' def _get_schema(self): ...
true
true
f72cbdde941379a53be16076b51cf17c429ca67d
6,353
py
Python
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
null
null
null
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
2
2021-03-05T06:48:11.000Z
2021-03-26T08:14:17.000Z
mooringlicensing/management/commands/approval_renewal_notices.py
jawaidm/mooringlicensing
b22e74209da8655c8ad3af99e00f36d17c8ef73f
[ "Apache-2.0" ]
2
2021-09-19T15:45:19.000Z
2021-10-05T05:07:41.000Z
from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from mooringlicensing.components.approvals.models import ( Approval, WaitingListAllocation, AnnualAdmi...
45.705036
160
0.668346
from django.core.management.base import BaseCommand from django.utils import timezone from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import Q from mooringlicensing.components.approvals.models import ( Approval, WaitingListAllocation, AnnualAdmi...
true
true
f72cbe35893af2f1b2c363e8fe4e587be57b909c
6,321
py
Python
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
1
2021-06-24T19:27:01.000Z
2021-06-24T19:27:01.000Z
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
null
null
null
InterventionsMIP/main.py
haoxiangyang89/COVID_Staged_Alert
4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a
[ "MIT" ]
3
2021-12-15T13:32:25.000Z
2022-02-24T13:57:07.000Z
from InterventionsMIP import project_path, instances_path import multiprocessing as mp from threshold_policy import threshold_policy_search from interventions import Intervension from epi_params import EpiSetup, ParamDistribution from utils import parse_arguments from reporting.plotting import plot_stoch_simulations f...
64.5
150
0.424933
from InterventionsMIP import project_path, instances_path import multiprocessing as mp from threshold_policy import threshold_policy_search from interventions import Intervension from epi_params import EpiSetup, ParamDistribution from utils import parse_arguments from reporting.plotting import plot_stoch_simulations f...
true
true
f72cbe73762b18771ed1651cd35031464722fae9
19,152
py
Python
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
4
2020-03-13T14:01:32.000Z
2021-05-31T17:17:32.000Z
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
10
2019-12-28T21:31:19.000Z
2020-04-12T20:01:58.000Z
official/nlp/transformer/transformer_main.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
8
2020-04-12T04:30:33.000Z
2021-09-17T20:54:44.000Z
# Copyright 2018 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...
38.457831
80
0.688753
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import tempfile from absl import app from absl import flags from absl import logging import tensorflow as tf from official.modeling import performance from official.nlp.transformer imp...
true
true
f72cbea6b5b5fb4a9f0c9efd4d8092605bb087d6
18,884
py
Python
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
8
2019-12-28T23:49:55.000Z
2022-03-02T04:34:18.000Z
src/sentry/models/dsymfile.py
percipient/sentry
84c6f75ab40e12677c81d9210c3fe8ad66d7a0c3
[ "BSD-3-Clause" ]
null
null
null
""" sentry.models.dsymfile ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import shutil import hashlib import six import tempfile from requests.exceptions import Reque...
32.061121
81
0.54157
from __future__ import absolute_import import os import shutil import hashlib import six import tempfile from requests.exceptions import RequestException from jsonfield import JSONField from itertools import chain from django.db import models, router, transaction, connection, IntegrityError from django.utils import ...
true
true
f72cbf17e64a21584865047b98978bd2193a31f9
53,060
py
Python
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
2
2021-09-25T01:20:10.000Z
2021-12-17T18:44:53.000Z
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
null
null
null
graphics/basic_plot_functions.py
JCSDA/mpas-jedi
e0780d1fd295912ee4cfb758854c52b6764d4ab9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from copy import deepcopy import cartopy.crs as ccrs import datetime as dt import logging from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('AGG') import matplotlib.axes as maxes import matplotlib.cm as cm import matplotl...
35.827144
115
0.561006
from copy import deepcopy import cartopy.crs as ccrs import datetime as dt import logging from pandas.plotting import register_matplotlib_converters register_matplotlib_converters() import matplotlib matplotlib.use('AGG') import matplotlib.axes as maxes import matplotlib.cm as cm import matplotlib.colors as colors fr...
true
true
f72cbfd0caae91239053996913ba8621fe6047da
636
py
Python
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
RestaurantReview/manage.py
sehyun-seankim/Django_project_restaurant_review
5d2eb90486f8064aec16538a71c667d830d3db37
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RestaurantReview.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rai...
28.909091
80
0.687107
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'RestaurantReview.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed an...
true
true
f72cbfdf7f7c4f11bbe1601b54f70466e1e3e688
5,321
py
Python
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
slackclient/_response.py
lovexi/CodingMonkey-Bot-Python-version
52561d2b15a78119769099d304a98f80da53a010
[ "MIT" ]
null
null
null
import json import random import math import os from crawling._twitter import twitter_crawling class Response(object): def __init__(self, token): self.name = "" self.token = token self.greetingList = ['Hello {}, welcome to the Equifax Hackathon channel! Have fun :). You can type help for mo...
58.472527
153
0.516256
import json import random import math import os from crawling._twitter import twitter_crawling class Response(object): def __init__(self, token): self.name = "" self.token = token self.greetingList = ['Hello {}, welcome to the Equifax Hackathon channel! Have fun :). You can type help for mo...
true
true
f72cc038fe01f625fd75044fc25d9c661707b934
241
py
Python
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
fabfile/__init__.py
lem-usp/Bio507
67b8f8f677e6c1f39ad257d456f0cc0cac289022
[ "MIT" ]
null
null
null
from fabric.state import output from .development import * # # Fabric configuration # output['debug'] = False # see full command list def help(): ''' Fabfile documentation ''' local('python -c "import fabfile; help(fabfile)"')
16.066667
54
0.680498
from fabric.state import output from .development import * output['debug'] = False def help(): local('python -c "import fabfile; help(fabfile)"')
true
true
f72cc0e34bd07cf91c3cd084ab5e50132bdbe531
5,036
py
Python
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
1
2016-04-13T17:07:05.000Z
2016-04-13T17:07:05.000Z
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
null
null
null
sahara/plugins/vanilla/hadoop2/validation.py
hortonworksqe/sahara
b8edeaf2b6a475728bf9fd2ddc3a860dc6c23270
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
41.619835
79
0.633241
from sahara.plugins.general import exceptions as ex from sahara.plugins.general import utils as u from sahara.plugins.vanilla.hadoop2 import config_helper as cu from sahara.plugins.vanilla import utils as vu from sahara.utils import general as gu def validate_cluster_creating(pctx, cluster): nn_cou...
true
true
f72cc0fbea74a83a8775b2c4a4948f97cf3aff29
5,959
py
Python
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
1
2019-06-13T13:11:52.000Z
2019-06-13T13:11:52.000Z
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
null
null
null
DeepReinforcementLearning/funcs.py
Christoper-Harvey/1st-Capstone
93630a4d5f4a2d939c8b5f74f11b5b33052e3f72
[ "MIT" ]
2
2019-04-30T19:14:11.000Z
2019-06-13T13:11:57.000Z
import numpy as np import random import loggers as lg from game import Game, GameState from model import Residual_CNN from agent import Agent, User import config def playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0): if player1...
41.096552
167
0.545058
import numpy as np import random import loggers as lg from game import Game, GameState from model import Residual_CNN from agent import Agent, User import config def playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0): if player1...
true
true
f72cc221951afaa2a1888c4d748a5068c84f56dc
3,916
py
Python
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
1
2021-12-20T10:56:40.000Z
2021-12-20T10:56:40.000Z
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
null
null
null
topasgraphsim/src/functions/dp.py
sebasj13/topas-create-graphs
5ccdbcbbe39461917cc015aa59805e518421431c
[ "MIT" ]
1
2021-12-26T06:29:22.000Z
2021-12-26T06:29:22.000Z
import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate def calculate_parameters(axis, dose, cax=False): """ A function to calculate the relevant descriptive parameters of dose profiles. """ interpolated_axis = np.linspace(axis[0], axis[-1], len(axis) * 100...
27.77305
88
0.516854
import numpy as np import scipy.integrate as integrate import scipy.interpolate as interpolate def calculate_parameters(axis, dose, cax=False): interpolated_axis = np.linspace(axis[0], axis[-1], len(axis) * 100) akima_dose_interpolator = interpolate.Akima1DInterpolator(axis, dose) interpolated_dose = np...
true
true
f72cc242a75bff056fc4182f50f291db178b0519
5,780
py
Python
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
sonarqube/community/user_groups.py
0x646e78/python-sonarqube-api
c641ab4dd180b4184f2663bd28277aa796b36417
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author: Jialiang Shi from sonarqube.utils.rest_client import RestClient from sonarqube.utils.config import ( API_USER_GROUPS_SEARCH_ENDPOINT, API_USER_GROUPS_CREATE_ENDPOINT, API_USER_GROUPS_DELETE_ENDPOINT, API_USER_GROUPS_UPDATE_ENDPOINT, API_USER_GR...
30.582011
120
0.59654
from sonarqube.utils.rest_client import RestClient from sonarqube.utils.config import ( API_USER_GROUPS_SEARCH_ENDPOINT, API_USER_GROUPS_CREATE_ENDPOINT, API_USER_GROUPS_DELETE_ENDPOINT, API_USER_GROUPS_UPDATE_ENDPOINT, API_USER_GROUPS_USERS_ENDPOINT, API_USER_GROUPS_ADD_USER_ENDPOINT, AP...
true
true
f72cc2a756c43756ba71fb67aa4ae3e1efa74f2f
5,550
py
Python
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-04-10T13:11:46.000Z
2020-04-10T13:11:46.000Z
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/locks.py
RiSecID/Auto
d06ef712666a35ddbf0c123dbb86705096cbbb56
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-12-02T14:59:04.000Z
2020-12-02T14:59:04.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBa...
29.057592
80
0.544505
from telethon.tl.functions.messages import EditChatDefaultBannedRightsRequest from telethon.tl.types import ChatBannedRights from userbot import CMD_HELP from userbot.events import register @register(outgoing=True, pattern=r"^.lock ?(.*)") async def locks(event): input_str = event.pattern_match.gr...
true
true
f72cc345255307326cc2305d9c1b218b5b5aeb6d
4,044
py
Python
qa/rpc-tests/merkle_blocks.py
cryptoandcoffee/DCUMN
85b873a90b3a2df6870d7ea74ea5087945e238bb
[ "MIT" ]
null
null
null
qa/rpc-tests/merkle_blocks.py
cryptoandcoffee/DCUMN
85b873a90b3a2df6870d7ea74ea5087945e238bb
[ "MIT" ]
null
null
null
qa/rpc-tests/merkle_blocks.py
cryptoandcoffee/DCUMN
85b873a90b3a2df6870d7ea74ea5087945e238bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test merkleblock fetch/validation # from test_framework.test_framework import DCUTestFramework from ...
45.438202
120
0.670623
from test_framework.test_framework import DCUTestFramework from test_framework.util import * class MerkleBlockTest(DCUTestFramework): def setup_chain(self): print("Initializing test directory "+self.options.tmpdir) initialize_chain_clean(self.options.tmpdir, 4) def setup_network(self...
false
true
f72cc5c07d47e87c78a7d4236d54674e5f436c66
230
py
Python
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
pycones/sponsorship/managers.py
python-spain/PyConES2015
af78ad7f1d7df747a2f5428be87a5b061457dd24
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level")
23
73
0.726087
from __future__ import unicode_literals from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level")
true
true
f72cc5f2ca3bea87b59576ba3da7939aab82e2af
116
py
Python
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
1
2020-04-14T16:48:16.000Z
2020-04-14T16:48:16.000Z
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
null
null
null
URI/1 - INICIANTE/Python/1759 - HoHoHo.py
william-james-pj/LogicaProgramacao
629f746e34da2e829dc7ea2e489ac36bb1b1fb13
[ "MIT" ]
null
null
null
n = int(input()) for y in range(0, n): if(y == n-1): print('Ho!') else: print('Ho', end=' ')
19.333333
28
0.413793
n = int(input()) for y in range(0, n): if(y == n-1): print('Ho!') else: print('Ho', end=' ')
true
true
f72cc73266bff2259d90cfeb4bc45a0cffcbecaf
834
py
Python
p22.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
p22.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
p22.py
kmark1625/Project-Euler
e80c4f2044fdbff93331117b8f02aa0becbb0706
[ "MIT" ]
null
null
null
def read_from_file(filename): txt = open(filename) string_of_names = txt.read() return string_of_names def string_of_names_to_array(string_of_names): return string_of_names.replace('"','').split(",") def get_alpha_value(string): sum = 0 for char in string: sum += (ord(char) - 64) return sum def mai...
23.166667
60
0.708633
def read_from_file(filename): txt = open(filename) string_of_names = txt.read() return string_of_names def string_of_names_to_array(string_of_names): return string_of_names.replace('"','').split(",") def get_alpha_value(string): sum = 0 for char in string: sum += (ord(char) - 64) return sum def mai...
false
true
f72cc8541c4c9a534a37b3d44f316d2620756960
973
py
Python
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
14
2019-11-03T05:17:46.000Z
2022-02-26T05:37:32.000Z
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
77
2020-05-17T01:56:29.000Z
2021-06-19T02:46:52.000Z
nengo/copter.py
simondlevy/gym-copter
7236769b7586b92026d4b47f12363258c84d9508
[ "MIT" ]
6
2020-01-01T07:22:15.000Z
2021-05-11T17:45:33.000Z
''' Quadcopter class for Nengo adaptive controller Copyright (C) 2021 Xuan Choo, Simon D. Levy MIT License ''' import nengo import gym import numpy as np from adaptive import run class Copter: def __init__(self, seed=None): self.env = gym.make('gym_copter:Hover1D-v0') self.reset(seed) d...
16.775862
63
0.572456
import nengo import gym import numpy as np from adaptive import run class Copter: def __init__(self, seed=None): self.env = gym.make('gym_copter:Hover1D-v0') self.reset(seed) def reset(self, seed): self.state = self.env.reset() def step(self, u): u = np.clip(u, 0, 1...
true
true
f72cc9142cb85a864de5beb77fe66a359cf63d16
18,754
py
Python
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
7
2016-12-07T22:19:37.000Z
2019-01-30T15:04:26.000Z
tools/sr_mapping/bfast_wrapper.py
ramezrawas/galaxy-1
c03748dd49c060a68d07bce56eae33e0ba154414
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """ Runs BFAST on single-end or paired-end data. TODO: more documentation TODO: - auto-detect gzip or bz2 - split options (?) - queue lengths (?) - assumes reference always has been indexed - main and secondary indexes - scoring matrix file ? - read group file ? usage...
53.430199
254
0.571878
import optparse import os import shutil import subprocess import sys import tempfile def stop_err( msg ): sys.stderr.write( '%s\n' % msg ) sys.exit() def __main__(): parser = optparse.OptionParser() parser.add_option( '-r', '--ref', dest='ref', help='The reference genome to index and use' ) pa...
true
true
f72cc9fd6006f3d37d591e4575e98e027bf672c1
11,546
py
Python
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
markovify/text.py
iconesalut/markovify
e82077e2733b7613a6a153194ab1b288a9170e4e
[ "MIT" ]
null
null
null
import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN, END from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text(object): reject_pat = re.compile...
39.406143
177
0.620908
import re import json import random from .splitters import split_into_sentences from .chain import Chain, BEGIN, END from unidecode import unidecode DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_TRIES = 10 class ParamError(Exception): pass class Text(object): reject_pat = re.compile...
true
true
f72ccad3cb20f24ab3326c7cf1774f63675af32d
2,175
py
Python
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
django_remote_submission/signals.py
YeemBoi/django-remote-submission
665daa0701b7da5ac653115712d0c0f0aae041c6
[ "ISC" ]
null
null
null
"""Attach signals to this app's models.""" # -*- coding: utf-8 -*- import json import logging import channels.layers from asgiref.sync import async_to_sync from django.db.models.signals import post_save from django.dispatch import receiver from .models import Job, Log logger = logging.getLogger(__name__) # pylint...
24.715909
76
0.643218
import json import logging import channels.layers from asgiref.sync import async_to_sync from django.db.models.signals import post_save from django.dispatch import receiver from .models import Job, Log logger = logging.getLogger(__name__) def send_message(event): message = event['text'] channel_layer ...
true
true
f72ccbbf32e6e2e0c7f9b522c887b0a968d79192
15,631
py
Python
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
63
2016-11-01T13:06:46.000Z
2018-08-21T08:38:36.000Z
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
28
2016-11-02T01:41:23.000Z
2018-10-19T22:57:06.000Z
guild/external/setuptools/tests/test_wheel.py
msarahan/guildai
99bdd09683291dbc206b6dde1b327d47401d29eb
[ "Apache-2.0" ]
8
2017-01-15T14:58:43.000Z
2018-07-27T11:51:39.000Z
# -*- coding: utf-8 -*- """wheel tests """ from distutils.sysconfig import get_config_var from distutils.util import get_platform import contextlib import glob import inspect import os import shutil import subprocess import sys import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MA...
26.674061
78
0.448852
from distutils.sysconfig import get_config_var from distutils.util import get_platform import contextlib import glob import inspect import os import shutil import subprocess import sys import zipfile import pytest from pkg_resources import Distribution, PathMetadata, PY_MAJOR from setuptools.extern.packaging.utils...
true
true
f72cccf7222dd5cd1076530b8dcc103fb3bb156d
246
py
Python
board/amebaz_dev/ucube.py
jinlongliu/AliOS-Things
ce051172a775f987183e7aca88bb6f3b809ea7b0
[ "Apache-2.0" ]
4
2019-03-12T11:04:48.000Z
2019-10-22T06:06:53.000Z
board/amebaz_dev/ucube.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
3
2018-12-17T13:06:46.000Z
2018-12-28T01:40:59.000Z
board/amebaz_dev/ucube.py
IamBaoMouMou/AliOS-Things
195a9160b871b3d78de6f8cf6c2ab09a71977527
[ "Apache-2.0" ]
2
2018-01-23T07:54:08.000Z
2018-01-23T11:38:59.000Z
linux_only_targets="linuxapp helloworld helloworld_nocli linkkitapp alinkapp networkapp tls uDataapp hdlcapp.hdlcserver wifihalapp coapapp nano linkkit_gateway blink linkkit_sched meshapp acapp netmgrapp mqttapp wifimonitor vflashdemo athostapp"
123
245
0.894309
linux_only_targets="linuxapp helloworld helloworld_nocli linkkitapp alinkapp networkapp tls uDataapp hdlcapp.hdlcserver wifihalapp coapapp nano linkkit_gateway blink linkkit_sched meshapp acapp netmgrapp mqttapp wifimonitor vflashdemo athostapp"
true
true
f72ccd62512051e1b39bfbd0414538acd7914a7b
1,403
py
Python
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
1
2021-04-03T14:21:14.000Z
2021-04-03T14:21:14.000Z
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
null
null
null
Python/textrank/textrank.py
chasingegg/Data_Science
a499866ff92aa1107057b20563564bdd89fc370f
[ "MIT" ]
null
null
null
#!/usr/src/env python # -*- coding: utf-8 -*- # TextRank 博客 http://xiaosheng.me/2017/04/08/article49/ # 从PageRank转变而来,可以用来做关键字的提取。TextRank的计算公式其实跟PageRank可以认为是一样的 # 只不过就是要考虑权重的因素(算PageRank的时候就是均摊权值) # 在TextRank构建的图中,节点是句子,权值就是两个句子的相似程度 # 提取关键字的时候,单词作为图的节点,把权值都设成1,此时其实退化成PageRank # 把文本拆分成单词,将这一些单词设定一个简单的滑动窗口,每个窗口内的任意两...
36.921053
107
0.667142
import sys import pandas as pd import jieba.analyse def textrank(data, topK): idList, titleList, abstractList = data['id'], data['title'], data['abstract'] ids, title, keys = [], [], [] for i in range(len(idList)): text = '%s。%s' % (titleList[i], abstractList[i]) jieba.analyse...
true
true
f72ccf21d93a0540ee9ca7edb99c6b9d48f98ad0
4,043
py
Python
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
KhronosGroup/COLLADA-CTS
61f2a560cbb2a06ee62da8025241f6b08d06bfd9
[ "MIT" ]
20
2015-03-19T08:02:57.000Z
2020-10-16T15:16:11.000Z
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
4
2017-04-19T18:42:05.000Z
2017-06-17T03:03:28.000Z
StandardDataSets/collada/library_geometries/geometry/mesh/vertices/input/position_texcoord_color_normal/position_texcoord_color_normal.py
Acidburn0zzz/COLLADA-CTS
39a36188cf8710bbc003df43ed70b965eb4386bd
[ "MIT" ]
10
2015-03-26T02:52:24.000Z
2022-02-24T08:43:48.000Z
# Copyright (C) 2007 - 2009 Khronos Group # Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the...
51.833333
466
0.73955
from StandardDataSets.scripts import JudgeAssistant tagLst = [] attrName = '' attrVal = '' dataToCheck = '' class SimpleJudgingObject: def __init__(self, _tagLst, _attrName, _attrVal, _data): self.tagList = _tagLst self.attrName = _attrName self.attrVal = _attrVal ...
true
true
f72ccf7bbd22c8e0b01ca0371dd14f7cf18a0601
2,792
py
Python
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/utils.py
canonical/hotsos
1960e80a3f7529045c44798b0d3ac27d75036562
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
import os import shutil import tempfile import unittest # disable for stestr otherwise output is much too verbose from hotsos.core.log import log, logging, setup_logging from hotsos.core.config import setup_config # Must be set prior to other imports TESTS_DIR = os.environ["TESTS_DIR"] DEFAULT_FAKE_ROOT = 'fake_data...
34.469136
79
0.655802
import os import shutil import tempfile import unittest from hotsos.core.log import log, logging, setup_logging from hotsos.core.config import setup_config TESTS_DIR = os.environ["TESTS_DIR"] DEFAULT_FAKE_ROOT = 'fake_data_root/openstack' setup_config(DATA_ROOT=os.path.join(TESTS_DIR, DEFAULT_FAKE_ROOT)) def is_...
true
true
f72cd1215468a583aa37950b7930fb4d28106380
1,428
py
Python
dm_control/mujoco/wrapper/mjbindings/__init__.py
mhauskn/dm_control
b7944e0ed4392924f40a3e5c65b1a93c027b9718
[ "Apache-2.0" ]
2
2021-06-21T05:19:01.000Z
2021-07-02T14:51:16.000Z
dm_control/mujoco/wrapper/mjbindings/__init__.py
akssri/dm_control
1a0914f8df414685f1b336838e39e36fd378e0b9
[ "Apache-2.0" ]
2
2021-10-05T16:03:39.000Z
2022-03-12T01:03:17.000Z
dm_control/mujoco/wrapper/mjbindings/__init__.py
akssri/dm_control
1a0914f8df414685f1b336838e39e36fd378e0b9
[ "Apache-2.0" ]
2
2019-12-10T21:38:03.000Z
2020-12-22T08:42:45.000Z
# Copyright 2017 The dm_control 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 i...
40.8
78
0.736695
from absl import logging from dm_control.mujoco.wrapper.mjbindings import constants from dm_control.mujoco.wrapper.mjbindings import enums from dm_control.mujoco.wrapper.mjbindings import sizes from dm_control.mujoco.wrapper.mjbindings import types from dm_control.mujoco.wrapper.mjbindings import wrap...
true
true
f72cd2c662bd6709a900fab6f8b72a7287014147
16,047
py
Python
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
natlas-server/app/admin/routes.py
rosswsnider/natlas
71482c14213eb6b5e9e18365cde5875ed5441523
[ "Apache-2.0" ]
null
null
null
from flask import render_template, redirect, url_for, current_app, flash, Response, abort, request from flask_login import current_user from app import db from app.admin import bp from app.elastic import Elastic from app.admin.forms import * from app.models import User, ScopeItem, ConfigItem, NatlasServices, AgentConfi...
36.141892
197
0.737334
from flask import render_template, redirect, url_for, current_app, flash, Response, abort, request from flask_login import current_user from app import db from app.admin import bp from app.elastic import Elastic from app.admin.forms import * from app.models import User, ScopeItem, ConfigItem, NatlasServices, AgentConfi...
true
true
f72cd336a36193490a287d751208899587977749
3,822
py
Python
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
71
2020-07-16T01:49:27.000Z
2022-03-27T16:55:00.000Z
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
11
2020-09-18T14:26:25.000Z
2022-02-09T23:49:33.000Z
CAIL2020/cocr/torchocr/datasets/icdar15/ICDAR15CropSave.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
16
2020-07-15T07:24:30.000Z
2022-03-19T05:41:11.000Z
''' @Author: Jeffery Sheng (Zhenfei Sheng) @Time: 2020/5/21 18:34 @File: ICDAR15CropSave.py ''' import os import cv2 from glob import glob from tqdm import tqdm class icdar2015CropSave: def __init__(self, img_dir :str, gt_dir :str, save_data_dir :str, train_val_split_ratio: float or None=0.1...
45.5
107
0.570905
import os import cv2 from glob import glob from tqdm import tqdm class icdar2015CropSave: def __init__(self, img_dir :str, gt_dir :str, save_data_dir :str, train_val_split_ratio: float or None=0.1): self.save_id = 1 self.img_dir = os.path.abspath(img_dir) self.gt_dir = os...
true
true
f72cd357fb91883d347cb40323f2b77a59d3007f
1,228
py
Python
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
couchcrdt/counter.py
drsm79/couch-crdt
1717a8b03a488793984d7209f6da78c395b3477f
[ "Apache-2.0" ]
null
null
null
from crdt import CRDT class DistributedCounter(CRDT): def add(self, number): return self + number def remove(self, number): return self - number def inc(self): """ Increase the counters value by one """ return self + 1 def dec(self): """ ...
23.169811
68
0.545603
from crdt import CRDT class DistributedCounter(CRDT): def add(self, number): return self + number def remove(self, number): return self - number def inc(self): return self + 1 def dec(self): return self - 1 def __abs__(self): if self.state is None: ...
true
true
f72cd35995de0da138e9526f9b56429d06c45c97
359,560
py
Python
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
nova/virt/libvirt/driver_back.py
xuweiliang/Codelibrary
54e45b2daa205132c05b0ff5a2c3db7fca2853a7
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
44.665839
105
0.575309
import string import collections from collections import deque import contextlib import errno import functools import glob import itertools import mmap import operator import os import shutil import tempfile import time import uuid import eventlet from eventlet import greenthread from eventlet impo...
true
true
f72cd4093b6c2735e85a9e0cc06731f3fd380a07
12,960
py
Python
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
null
null
null
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
1
2021-06-02T04:32:03.000Z
2021-06-02T04:32:03.000Z
elastalert/alerts.py
talyian/elastalert
8ff39d485c0babd098ad659b53ce0f8ad456c6c3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import json import logging import subprocess from email.mime.text import MIMEText from smtplib import SMTP from smtplib import SMTPException from socket import error from jira.client import JIRA from jira.exceptions import JIRAError from staticconf.loader import yaml_loader from...
37.028571
121
0.599691
import datetime import json import logging import subprocess from email.mime.text import MIMEText from smtplib import SMTP from smtplib import SMTPException from socket import error from jira.client import JIRA from jira.exceptions import JIRAError from staticconf.loader import yaml_loader from util import EAExceptio...
true
true
f72cd428667980c9fdb4e230f0d8a948590c845d
1,070
py
Python
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_rolling_update_daemon_set.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
23.777778
107
0.738318
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1beta1_rolling_update_daemon_set import V1beta1RollingUpdateDaemonSet class TestV1beta1RollingUpdateDaemonSet(unittest.TestCase): ...
true
true
f72cd49b263b57b7fcb9084dfd4139d1f60dc573
22,741
py
Python
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
null
null
null
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
null
null
null
django/contrib/contenttypes/fields.py
tomviner/django
87fed9444033533ad7105c4b1e4ffc5d7854a2c6
[ "BSD-3-Clause" ]
1
2022-03-26T09:05:09.000Z
2022-03-26T09:05:09.000Z
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
38.873504
116
0.592146
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
true
true
f72cd646013ea6a170a5f979dcbd68b1bc930df2
8,783
py
Python
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
1
2021-04-26T19:23:56.000Z
2021-04-26T19:23:56.000Z
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
null
null
null
nintendo/nnas.py
elsorino/DiscordAndU
70e57bbd55daa2b0e24cff0831867daff05822f8
[ "MIT" ]
null
null
null
from nintendo.common.http import HTTPClient, HTTPRequest from nintendo.common import xml, ssl, util import pkg_resources import collections import hashlib import struct import base64 import urllib.parse import logging logger = logging.getLogger(__name__) CERT = pkg_resources.resource_filename("nintendo", "files/ce...
31.822464
109
0.710919
from nintendo.common.http import HTTPClient, HTTPRequest from nintendo.common import xml, ssl, util import pkg_resources import collections import hashlib import struct import base64 import urllib.parse import logging logger = logging.getLogger(__name__) CERT = pkg_resources.resource_filename("nintendo", "files/ce...
true
true
f72cd64df372a6dea962a0662deef14976f5aa45
507
py
Python
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
7
2020-06-05T20:02:50.000Z
2021-09-22T18:05:02.000Z
accounts/urls.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
from django.contrib.auth import views as auth_views from django.urls import path from . import views app_name = 'accounts' urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.signin, name='login'), path('logout/', views.signout, name='logout'), path('profile/', views.vi...
31.6875
76
0.704142
from django.contrib.auth import views as auth_views from django.urls import path from . import views app_name = 'accounts' urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.signin, name='login'), path('logout/', views.signout, name='logout'), path('profile/', views.vi...
true
true
f72cd66faafd23457f38cf7a6f13260a3caed7b6
2,894
py
Python
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
null
null
null
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
null
null
null
deps/turtlebot/follow_line_tc_pkg/scripts/follow_line_step_basicimage.py
CARMinesDouai/2021-robot_guide
226e3279a710c34d6f7b31e4cba4f047ae8aabee
[ "MIT" ]
1
2020-12-15T10:17:24.000Z
2020-12-15T10:17:24.000Z
#!/usr/bin/env python import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from geometry_msgs.msg import Twist from sensor_msgs.msg import Image class LineFollower(object): def __init__(self): self.bridge_object = CvBridge() self.cmd_vel_pub = rospy.Publisher('/cmd_vel', Twi...
31.456522
95
0.62716
import rospy import cv2 from cv_bridge import CvBridge, CvBridgeError from geometry_msgs.msg import Twist from sensor_msgs.msg import Image class LineFollower(object): def __init__(self): self.bridge_object = CvBridge() self.cmd_vel_pub = rospy.Publisher('/cmd_vel', Twist, queue_size=10) ...
true
true
f72cd747e6808eabbbc492f7c29daeb23eb42ad6
1,816
py
Python
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
null
null
null
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
7
2021-04-08T21:17:18.000Z
2022-01-13T03:39:23.000Z
core/urls.py
saksham1991999/upscbasicfunda
b17e288081cb4ca9dd79d198cd0b22136c0794bb
[ "MIT" ]
null
null
null
from rest_framework.routers import DefaultRouter from . import views from django.urls import path, re_path app_name = 'core' urlpatterns = [ path("search/", views.SearchSubscriptionsView.as_view()), path("general-notification/",views.Notification.as_view()), path("personal-notification/",views.PersonalNotificatio...
42.232558
102
0.786344
from rest_framework.routers import DefaultRouter from . import views from django.urls import path, re_path app_name = 'core' urlpatterns = [ path("search/", views.SearchSubscriptionsView.as_view()), path("general-notification/",views.Notification.as_view()), path("personal-notification/",views.PersonalNotificatio...
true
true
f72cd77e800a0e0719a55ec6af8ef51dcd7cbf46
3,591
py
Python
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
8
2021-12-08T05:33:58.000Z
2022-03-07T00:40:48.000Z
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
34
2021-08-11T03:59:33.000Z
2022-03-10T05:39:26.000Z
src/classes/item.py
kevin3/cwl-ica
cf706ea42993d563f364c0847ee4b882f8fe067c
[ "MIT" ]
1
2022-01-08T07:34:55.000Z
2022-01-08T07:34:55.000Z
#!/usr/bin/env python3 """ Item is a terrible name. I whole-heartedly acknowledge this and apologise for any future maintainer. In this context item represents an element under 'workflow' in workflow.yaml, 'tool' in tool.yaml and so on. An item itself does not contain much information. Just a name, a path (this wil...
32.645455
113
0.624617
from utils.logging import get_logger from ruamel.yaml.comments import CommentedMap as OrderedDict from pathlib import Path from classes.item_version import ItemVersion from utils.errors import ItemCreationError, ItemDirectoryNotFoundError logger = get_logger() class Item: def __init__(self, name, path, root_...
true
true
f72cd844ec376f6444b3a3f87163523a385a0c9f
23,894
py
Python
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
lib/FamaProfiling/FamaProfilingServer.py
aekazakov/FamaProfiling
d9db15ea217e3be2aab65c356564a6d345b4f410
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
37.044961
151
0.545451
import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from jsonrpcbase import JSONRPCService, InvalidParams...
true
true