hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c47dc256aaf34a46737b9baba2f30bbed33feaf
2,184
py
Python
nuagevsdsim/simentities/nusimsapegressqosprofile.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
nuagevsdsim/simentities/nusimsapegressqosprofile.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
nuagevsdsim/simentities/nusimsapegressqosprofile.py
pdellaert/vspk-sim
459a84366a9bdde82d74aca18ea866e3d55d62ee
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2017, Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright no...
39.709091
80
0.755952
from vspk import v5_0 as vsdk from nuagevsdsim.simentities.nusimresource import NUSimResource class NUSimSAPEgressQoSProfile(NUSimResource): __vspk_class__ = vsdk.NUSAPEgressQoSProfile __unique_fields__ = ['externalID'] __mandatory_fields__ = [] __default_fields__ = { } __get_parents...
true
true
1c47dccf6915887e22c7722e4d7c64ee109f4851
10,838
py
Python
CTFd/views.py
ws4/TopCTFd
3b1e25df1318e86ff163a0b546f6e9b7f8305a5a
[ "Apache-2.0" ]
1
2019-06-25T09:24:29.000Z
2019-06-25T09:24:29.000Z
CTFd/views.py
ws4/TopCTFd
3b1e25df1318e86ff163a0b546f6e9b7f8305a5a
[ "Apache-2.0" ]
null
null
null
CTFd/views.py
ws4/TopCTFd
3b1e25df1318e86ff163a0b546f6e9b7f8305a5a
[ "Apache-2.0" ]
null
null
null
import os import re from flask import current_app as app, render_template, request, redirect, abort, jsonify, url_for, session, Blueprint, Response, send_file from flask.helpers import safe_join from jinja2.exceptions import TemplateNotFound from passlib.hash import bcrypt_sha256 from CTFd.models import db, Teams, So...
40.140741
153
0.605462
import os import re from flask import current_app as app, render_template, request, redirect, abort, jsonify, url_for, session, Blueprint, Response, send_file from flask.helpers import safe_join from jinja2.exceptions import TemplateNotFound from passlib.hash import bcrypt_sha256 from CTFd.models import db, Teams, So...
true
true
1c47ddab6db9862eac3c601311b8498882a12edb
1,209
py
Python
test.py
yyht/OpenAttack
637e81a9c60874ec35f923d7c62687cbd6ee3633
[ "MIT" ]
null
null
null
test.py
yyht/OpenAttack
637e81a9c60874ec35f923d7c62687cbd6ee3633
[ "MIT" ]
null
null
null
test.py
yyht/OpenAttack
637e81a9c60874ec35f923d7c62687cbd6ee3633
[ "MIT" ]
1
2020-09-01T11:14:42.000Z
2020-09-01T11:14:42.000Z
import OpenAttack dataset = OpenAttack.loadDataset("SST")[0][:5] clsf = OpenAttack.loadVictim("BiLSTM.SST") rules = OpenAttack.attackers.SEAAttacker.get_rules(clsf, dataset) triggers = OpenAttack.attackers.UATAttacker.get_triggers(clsf, dataset, word2id=clsf.config["word2id"], embedding=clsf.config["embedding"]) att...
36.636364
139
0.74359
import OpenAttack dataset = OpenAttack.loadDataset("SST")[0][:5] clsf = OpenAttack.loadVictim("BiLSTM.SST") rules = OpenAttack.attackers.SEAAttacker.get_rules(clsf, dataset) triggers = OpenAttack.attackers.UATAttacker.get_triggers(clsf, dataset, word2id=clsf.config["word2id"], embedding=clsf.config["embedding"]) att...
true
true
1c47ded1a344d1cd51b13949d45a9106e2b325a5
1,220
py
Python
algos/rl/ppo_ray_random.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
14
2020-04-03T12:41:50.000Z
2022-02-04T00:05:01.000Z
algos/rl/ppo_ray_random.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
2
2020-03-02T04:32:58.000Z
2021-09-15T20:02:25.000Z
algos/rl/ppo_ray_random.py
XiaoSanchez/autophase
3d8d173ad27b9786e36efd22d0ceacbcf1cb1dfb
[ "BSD-3-Clause" ]
8
2020-03-02T10:30:36.000Z
2021-08-03T02:29:38.000Z
import ray import ray.tune as tune from ray.rllib.agents import ppo from gym_hls.envs.hls_env import HLSEnv from gym_hls.envs.hls_multi_env import HLSMultiEnv ray.init() env_configs = {} from gym_hls.envs.random_bm import get_random num_pgms = 1000 bms = get_random(N=num_pgms) for i, bm in enumerate(bms): pgm, file...
27.727273
61
0.568852
import ray import ray.tune as tune from ray.rllib.agents import ppo from gym_hls.envs.hls_env import HLSEnv from gym_hls.envs.hls_multi_env import HLSMultiEnv ray.init() env_configs = {} from gym_hls.envs.random_bm import get_random num_pgms = 1000 bms = get_random(N=num_pgms) for i, bm in enumerate(bms): pgm, file...
true
true
1c47df1a360b94aa764852cc2aa26849ae5db656
178
py
Python
src/users/admin.py
chiliseed/hub
83f29fbdd12e2260397e18e635f508459fa4990e
[ "Apache-2.0" ]
null
null
null
src/users/admin.py
chiliseed/hub
83f29fbdd12e2260397e18e635f508459fa4990e
[ "Apache-2.0" ]
4
2021-04-08T20:10:15.000Z
2021-06-10T20:18:17.000Z
src/users/admin.py
chiliseed/hub
83f29fbdd12e2260397e18e635f508459fa4990e
[ "Apache-2.0" ]
null
null
null
"""Django admin ui for users.""" from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import User admin.site.register(User, UserAdmin)
22.25
47
0.786517
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import User admin.site.register(User, UserAdmin)
true
true
1c47e205f85d9c9e839f341b0ccf620d6cab46cc
421
py
Python
Ejemplos/ejemplo13/src/main2.py
ampotty/uip-pc3
8362680226df6629791e7a4c6cdf1b738eadc5de
[ "MIT" ]
10
2015-10-27T18:29:06.000Z
2019-04-03T04:05:31.000Z
Ejemplos/ejemplo13/src/main2.py
abdelgmartinezl/uip-pc3
8362680226df6629791e7a4c6cdf1b738eadc5de
[ "MIT" ]
5
2015-10-13T01:12:51.000Z
2016-10-08T18:01:17.000Z
Ejemplos/ejemplo13/src/main2.py
ampotty/uip-pc3
8362680226df6629791e7a4c6cdf1b738eadc5de
[ "MIT" ]
25
2015-09-19T00:40:17.000Z
2018-02-08T02:54:55.000Z
total = 0 cont1 = 0 while True: nota = int(input("Calificacion (negativo para salir): ")) if nota < 0: break cont1 += 1 total = total + nota if cont1 != 0: promedio = total / cont1 else: promedio = 0 if promedio >= 91: print("Saca A",promedio) elif promedio >= 81: print("Saca B",...
21.05
61
0.605701
total = 0 cont1 = 0 while True: nota = int(input("Calificacion (negativo para salir): ")) if nota < 0: break cont1 += 1 total = total + nota if cont1 != 0: promedio = total / cont1 else: promedio = 0 if promedio >= 91: print("Saca A",promedio) elif promedio >= 81: print("Saca B",...
true
true
1c47e2bbbb869849f0c26e0f9ceb36f00f7e3eca
671
py
Python
manage.py
Lioncat2002/confession_site
3b1d209b06cb1eac4b43f5c59cb70d2cfb49d25c
[ "MIT" ]
null
null
null
manage.py
Lioncat2002/confession_site
3b1d209b06cb1eac4b43f5c59cb70d2cfb49d25c
[ "MIT" ]
null
null
null
manage.py
Lioncat2002/confession_site
3b1d209b06cb1eac4b43f5c59cb70d2cfb49d25c
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'confession_site.settings') try: from django.core.management import execute_from_command_line exc...
29.173913
79
0.682563
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'confession_site.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 and ...
true
true
1c47e4640389cb25f44fd436d0754a0c9ecffe9f
33,651
py
Python
trax/rl/actor_critic.py
YannickWehr/trax
67dda3b236339a7f6de803a3f84a9e92d0f0442c
[ "Apache-2.0" ]
null
null
null
trax/rl/actor_critic.py
YannickWehr/trax
67dda3b236339a7f6de803a3f84a9e92d0f0442c
[ "Apache-2.0" ]
null
null
null
trax/rl/actor_critic.py
YannickWehr/trax
67dda3b236339a7f6de803a3f84a9e92d0f0442c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The Trax 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 a...
41.238971
109
0.673799
import functools import os import gym import numpy as np import tensorflow as tf from trax import data from trax import fastmath from trax import layers as tl from trax import shapes from trax import supervised from trax.fastmath import numpy as jnp from trax.rl import advantages as rl_advantages from trax.rl impor...
true
true
1c47e51dc09808eb307a0a839a939f5466b84977
576
py
Python
centralized/cbs/EdgeConstraint.py
mengwei1/multi_agent_path_planning
079a4af80c074e571a802af4506d416db5c6946a
[ "MIT" ]
null
null
null
centralized/cbs/EdgeConstraint.py
mengwei1/multi_agent_path_planning
079a4af80c074e571a802af4506d416db5c6946a
[ "MIT" ]
null
null
null
centralized/cbs/EdgeConstraint.py
mengwei1/multi_agent_path_planning
079a4af80c074e571a802af4506d416db5c6946a
[ "MIT" ]
null
null
null
class EdgeConstraint(object): def __init__(self, time, location_1, location_2): self.time = time self.location_1 = location_1 self.location_2 = location_2 def __eq__(self, other): return self.time == other.time and self.location_1 == other.location_1 \ and self.locat...
36
98
0.631944
class EdgeConstraint(object): def __init__(self, time, location_1, location_2): self.time = time self.location_1 = location_1 self.location_2 = location_2 def __eq__(self, other): return self.time == other.time and self.location_1 == other.location_1 \ and self.locat...
true
true
1c47e7970da9d61be8311b50ed64ed5185e5dfd2
4,712
py
Python
tests/test_albumentations_pytorch.py
brandongk-ubco/autoalbument
1735ea4376694c2179ac62ce7d100a10b26f2558
[ "MIT" ]
135
2020-11-03T15:48:30.000Z
2022-03-16T10:52:57.000Z
tests/test_albumentations_pytorch.py
brandongk-ubco/autoalbument
1735ea4376694c2179ac62ce7d100a10b26f2558
[ "MIT" ]
31
2020-11-04T10:20:56.000Z
2022-03-24T13:46:07.000Z
tests/test_albumentations_pytorch.py
brandongk-ubco/autoalbument
1735ea4376694c2179ac62ce7d100a10b26f2558
[ "MIT" ]
16
2020-11-16T08:33:48.000Z
2022-03-17T18:34:24.000Z
import albumentations.augmentations.functional as F import pytest import torch from torch.autograd import gradcheck import autoalbument.albumentations_pytorch.functional as PF from tests.utils import assert_batches_match class Base: def scalar_to_tensor(self, arg, requires_grad=False, dtype=torch.float32): ...
28.215569
105
0.66702
import albumentations.augmentations.functional as F import pytest import torch from torch.autograd import gradcheck import autoalbument.albumentations_pytorch.functional as PF from tests.utils import assert_batches_match class Base: def scalar_to_tensor(self, arg, requires_grad=False, dtype=torch.float32): ...
true
true
1c47e7ea31e47aede41afd960aa65ae5de620bf1
1,379
py
Python
notifications/migrations/0001_initial.py
ABERT-NOLA/App-Instagram
f1394a96baa8e19a5b4b8b1c96917b9da5f3fe43
[ "MIT" ]
1
2020-11-17T09:00:59.000Z
2020-11-17T09:00:59.000Z
notifications/migrations/0001_initial.py
kahenya-anita/Insta-Clone
4894e959c17170505e73aee6dc497aeb29d55a71
[ "MIT" ]
null
null
null
notifications/migrations/0001_initial.py
kahenya-anita/Insta-Clone
4894e959c17170505e73aee6dc497aeb29d55a71
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-15 12:25 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('post', '0001_initial'), migrations.swappable_dependency(setting...
43.09375
154
0.643945
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('post', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
1c47e85f18698ee4a933fa7ead51a9efaadf9d71
6,007
py
Python
views.py
penzance/student_locations
44618a237a9061dbc9d705810ad88d255781f44d
[ "MIT" ]
1
2015-06-12T13:48:42.000Z
2015-06-12T13:48:42.000Z
views.py
penzance/student_locations
44618a237a9061dbc9d705810ad88d255781f44d
[ "MIT" ]
null
null
null
views.py
penzance/student_locations
44618a237a9061dbc9d705810ad88d255781f44d
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect, render_to_response from django.views.decorators.http import require_http_methods from ims_lti_py.tool_config import ToolConfig from django.conf import settings from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth....
37.080247
167
0.715832
from django.shortcuts import render, redirect, render_to_response from django.views.decorators.http import require_http_methods from ims_lti_py.tool_config import ToolConfig from django.conf import settings from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth....
true
true
1c47e8a94158577824e18e7417db7b1bfc6b3d7a
3,111
py
Python
sigeco/settings.py
edusantana/sigeco
5e9e612e2721b170d770b73a36df4b92c94bed6f
[ "MIT" ]
null
null
null
sigeco/settings.py
edusantana/sigeco
5e9e612e2721b170d770b73a36df4b92c94bed6f
[ "MIT" ]
null
null
null
sigeco/settings.py
edusantana/sigeco
5e9e612e2721b170d770b73a36df4b92c94bed6f
[ "MIT" ]
null
null
null
""" Django settings for sigeco project. Generated by 'django-admin startproject' using Django 2.0.5. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os # ...
25.292683
91
0.693346
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '9l%mu66ff)sre+8$(j%&3%(3an+i+-di$o(v^wk0)y)!i92jit' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
1c47e8b8f9a966f714a9afcbcc891fafd92fb95b
1,232
py
Python
tests/models.py
viralogic/py-queryable
12034ee04eaa176676df84cb49665c6a9f741f01
[ "MIT" ]
null
null
null
tests/models.py
viralogic/py-queryable
12034ee04eaa176676df84cb49665c6a9f741f01
[ "MIT" ]
1
2018-10-04T22:13:18.000Z
2018-10-18T04:01:59.000Z
tests/models.py
viralogic/py-queryable
12034ee04eaa176676df84cb49665c6a9f741f01
[ "MIT" ]
null
null
null
from py_queryable import Model from py_queryable import Column, PrimaryKey, ForeignKey class StubModel(Model): __table_name__ = u'test_table' test_int_column = Column(int, 'int_column') class StubModel2(Model): __table_name__ = u'test_table' test_int_column = Column(int) class StubPrimary(Model): ...
25.142857
67
0.722403
from py_queryable import Model from py_queryable import Column, PrimaryKey, ForeignKey class StubModel(Model): __table_name__ = u'test_table' test_int_column = Column(int, 'int_column') class StubModel2(Model): __table_name__ = u'test_table' test_int_column = Column(int) class StubPrimary(Model): ...
true
true
1c47e91ab2f55e136165d27492cfb7b3e29d06ea
2,056
py
Python
scripts/_helpers.py
fneum/core-tso-data
480b1ea7524adc5d5425165668989fc9dd412e90
[ "MIT" ]
null
null
null
scripts/_helpers.py
fneum/core-tso-data
480b1ea7524adc5d5425165668989fc9dd412e90
[ "MIT" ]
1
2022-02-07T14:41:52.000Z
2022-02-07T14:41:52.000Z
scripts/_helpers.py
fneum/core-tso-data
480b1ea7524adc5d5425165668989fc9dd412e90
[ "MIT" ]
4
2022-01-12T17:09:16.000Z
2022-02-07T14:36:21.000Z
# from https://github.com/PyPSA/pypsa-eur/blob/master/scripts/_helpers.py import pypsa from pathlib import Path def mock_snakemake(rulename, **wildcards): """ This function is expected to be executed from the 'scripts'-directory of ' the snakemake project. It returns a snakemake.script.Snakemake object, ...
30.686567
89
0.646401
import pypsa from pathlib import Path def mock_snakemake(rulename, **wildcards): import snakemake as sm import os from pypsa.descriptors import Dict from snakemake.script import Snakemake script_dir = Path(__file__).parent.resolve() assert ( Path.cwd().resolve() == script_dir ), ...
true
true
1c47e955191e482356b4dccd864bc429173b5548
4,999
py
Python
frontend/app/export.py
emsch/femida
48de931c5d563e7fd354e6593a702f2397fd566f
[ "Apache-2.0" ]
null
null
null
frontend/app/export.py
emsch/femida
48de931c5d563e7fd354e6593a702f2397fd566f
[ "Apache-2.0" ]
52
2018-09-16T13:08:09.000Z
2020-06-07T09:30:27.000Z
frontend/app/export.py
emsch/femida
48de931c5d563e7fd354e6593a702f2397fd566f
[ "Apache-2.0" ]
10
2018-09-26T20:06:41.000Z
2020-06-16T17:35:59.000Z
#!/usr/bin/env python3 import datetime import json import xlsxwriter from io import BytesIO from flask import ( Blueprint, send_file ) from bson import json_util from collections import Counter mod_export = Blueprint('export', __name__) from database import mongo # noqa pdfs = mongo.db.pdfs answers = mongo...
32.888158
96
0.561312
import datetime import json import xlsxwriter from io import BytesIO from flask import ( Blueprint, send_file ) from bson import json_util from collections import Counter mod_export = Blueprint('export', __name__) from database import mongo pdfs = mongo.db.pdfs answers = mongo.db.answers class Col: d...
true
true
1c47ea8507d115500d6e829758a110c6bab5ce7d
4,322
py
Python
anima/env/fusion/render_merger.py
MehmetErer/anima
f92ae599b5a4c181fc8e131a9ccdde537e635303
[ "MIT" ]
101
2015-02-08T22:20:11.000Z
2022-03-21T18:56:42.000Z
anima/env/fusion/render_merger.py
Khosiyat/anima
f631c08400547f49ac5f1feeb730f22c255eb771
[ "MIT" ]
23
2016-11-30T08:33:21.000Z
2021-01-26T12:11:12.000Z
anima/env/fusion/render_merger.py
Khosiyat/anima
f631c08400547f49ac5f1feeb730f22c255eb771
[ "MIT" ]
27
2015-01-03T06:49:45.000Z
2021-12-28T03:30:54.000Z
# -*- coding: utf-8 -*- """Merges sliced renders in to one big plate """ try: # for Fusion 6 and 7 import PeyeonScript as bmf except ImportError: # for Fusion 8+ import BlackmagicFusion as bmf from anima.env.fusion.utils import NodeUtils class RenderMerger(object): """A tool to merge sliced rend...
30.013889
93
0.519435
try: import PeyeonScript as bmf except ImportError: import BlackmagicFusion as bmf from anima.env.fusion.utils import NodeUtils class RenderMerger(object): def __init__(self, path="", slices_in_x=5, slices_in_y=5, plate_width=0, plate_height=0): self.fusion = bmf.scriptapp("Fusion") ...
true
true
1c47ea87396ab3c1281919e883bf6c4c9a9cdcd1
757
py
Python
mysite/polls/admin.py
thomasbtf/hello-django
37c5188667d6eeb2043e3bdd45294dd16e754507
[ "MIT" ]
null
null
null
mysite/polls/admin.py
thomasbtf/hello-django
37c5188667d6eeb2043e3bdd45294dd16e754507
[ "MIT" ]
null
null
null
mysite/polls/admin.py
thomasbtf/hello-django
37c5188667d6eeb2043e3bdd45294dd16e754507
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date'],...
26.103448
80
0.630119
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': ['pub_date'],...
true
true
1c47eaf899d1f4ffce8bd8e362130e85c306d2bf
1,239
py
Python
jip/cli/jip_cancel.py
VDBWRAIR/pyjip
dc147afebbabd550828fa51cc052db4aa07c5d3b
[ "BSD-3-Clause" ]
18
2015-05-08T06:39:09.000Z
2020-11-30T10:51:36.000Z
jip/cli/jip_cancel.py
VDBWRAIR/pyjip
dc147afebbabd550828fa51cc052db4aa07c5d3b
[ "BSD-3-Clause" ]
9
2015-01-02T09:55:53.000Z
2016-02-03T18:31:10.000Z
jip/cli/jip_cancel.py
VDBWRAIR/pyjip
dc147afebbabd550828fa51cc052db4aa07c5d3b
[ "BSD-3-Clause" ]
5
2016-02-01T16:52:36.000Z
2021-03-10T12:08:39.000Z
#!/usr/bin/env python """ Cancel jip jobs Usage: jip-cancel [-j <id>...] [-J <cid>...] [--clean] jip-cancel [--help|-h] Options: --clean Remove the logfiles -j, --job <id>... List jobs with specified id -J, --cluster-job <cid>... List jobs with specified cluster id ...
26.934783
67
0.560936
import jip.db import jip.jobs from . import parse_args, parse_job_ids, confirm import sys def main(): args = parse_args(__doc__, options_first=False) job_ids, cluster_ids = parse_job_ids(args) jobs = jip.db.query(job_ids=job_ids, cluster_ids=cluster_ids, archived=None) jobs = ...
true
true
1c47eaffe4e7767186947540b4dc6ce1552877e7
311
py
Python
tests/conftest.py
valr/flask-webhook
864a86ad645a958fa7eee9cc1622ca84a79e5801
[ "MIT" ]
null
null
null
tests/conftest.py
valr/flask-webhook
864a86ad645a958fa7eee9cc1622ca84a79e5801
[ "MIT" ]
null
null
null
tests/conftest.py
valr/flask-webhook
864a86ad645a958fa7eee9cc1622ca84a79e5801
[ "MIT" ]
null
null
null
import os import pytest from application import create_application @pytest.fixture def application(): application = create_application(os.environ.get("INSTANCE_PATH")) application.testing = True return application @pytest.fixture def client(application): return application.test_client()
16.368421
69
0.771704
import os import pytest from application import create_application @pytest.fixture def application(): application = create_application(os.environ.get("INSTANCE_PATH")) application.testing = True return application @pytest.fixture def client(application): return application.test_client()
true
true
1c47ec05d04593b3dbbb896032df03930856074c
40,188
py
Python
core/domain/topic_services.py
sagangwee/oppia
c4bf0673b4d3ec30cff609109241656f71a63a82
[ "Apache-2.0" ]
null
null
null
core/domain/topic_services.py
sagangwee/oppia
c4bf0673b4d3ec30cff609109241656f71a63a82
[ "Apache-2.0" ]
7
2019-08-20T08:30:43.000Z
2022-02-12T18:47:57.000Z
core/domain/topic_services.py
ledriod/oppia
4f8f95c6689cd36f0b65672b80d98a3463b001f8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
38.347328
114
0.685105
import collections import copy import logging from core.domain import role_services from core.domain import subtopic_page_domain from core.domain import subtopic_page_services from core.domain import topic_domain from core.domain import user_services from core.platform import models import feconf (topic_models,) = ...
true
true
1c47ecd35495ebe0a6ee65d47dce77083635a833
36,791
py
Python
stacker/providers/aws/default.py
CityGrid/stacker
87688453c64ef333c48786000f2f890cbe664633
[ "BSD-2-Clause" ]
1
2018-07-17T11:23:47.000Z
2018-07-17T11:23:47.000Z
stacker/providers/aws/default.py
krm731/stacker
87688453c64ef333c48786000f2f890cbe664633
[ "BSD-2-Clause" ]
null
null
null
stacker/providers/aws/default.py
krm731/stacker
87688453c64ef333c48786000f2f890cbe664633
[ "BSD-2-Clause" ]
1
2020-02-29T04:49:04.000Z
2020-02-29T04:49:04.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import range from builtins import object import json import yaml import logging import time import urllib.parse import sys im...
37.850823
80
0.60561
from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import range from builtins import object import json import yaml import logging import time import urllib.parse import sys im...
true
true
1c47eda88b7276191251c02fb6fc7111b8dec436
1,147
py
Python
wxpython/02-temperature-converter.py
kurtmckee/learning
fa8dc08ee0d81b71d3ad569a02b390e7dee35d5a
[ "MIT" ]
null
null
null
wxpython/02-temperature-converter.py
kurtmckee/learning
fa8dc08ee0d81b71d3ad569a02b390e7dee35d5a
[ "MIT" ]
null
null
null
wxpython/02-temperature-converter.py
kurtmckee/learning
fa8dc08ee0d81b71d3ad569a02b390e7dee35d5a
[ "MIT" ]
null
null
null
import wx class Converter(wx.Frame): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) panel = wx.Panel(self) sizer = wx.BoxSizer() panel.SetSizer(sizer) self.input_box = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER) self.i...
26.674419
71
0.558849
import wx class Converter(wx.Frame): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) panel = wx.Panel(self) sizer = wx.BoxSizer() panel.SetSizer(sizer) self.input_box = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER) self.i...
true
true
1c47ee58a2b4e8bd47920723aea259e394c0a8c6
3,278
py
Python
tests/test_edgeql_datatypes.py
mcaramma/edgedb
53b18dbaf7407617ca135d1f8a5047bda6414654
[ "Apache-2.0" ]
2
2019-12-09T12:52:58.000Z
2020-02-20T15:20:22.000Z
tests/test_edgeql_datatypes.py
1st1/edgedb
3e234aede215d4fc517be9397a25bb16e5f1ace3
[ "Apache-2.0" ]
null
null
null
tests/test_edgeql_datatypes.py
1st1/edgedb
3e234aede215d4fc517be9397a25bb16e5f1ace3
[ "Apache-2.0" ]
null
null
null
# # This source file is part of the EdgeDB open source project. # # Copyright 2012-present MagicStack Inc. and the EdgeDB 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...
31.825243
78
0.552776
import unittest from edb.server import _testbase as tb from edb.client import exceptions as exc class TestEdgeQLDT(tb.QueryTestCase): SETUP = ''' CREATE MIGRATION default::m TO eschema $$ scalar type seq_t extending sequence scalar type seq2_t extending sequence ty...
true
true
1c47ee6d294ce288e1a41b88f9ca63742633f99f
37,265
py
Python
tests/testsuite.py
felixxm/unittest-xml-reporting
0ef90a6f2565430c4e8c19b4b4741a971a8b4041
[ "BSD-2-Clause-FreeBSD" ]
212
2015-01-08T13:32:40.000Z
2022-03-31T21:32:23.000Z
tests/testsuite.py
felixxm/unittest-xml-reporting
0ef90a6f2565430c4e8c19b4b4741a971a8b4041
[ "BSD-2-Clause-FreeBSD" ]
169
2015-01-22T20:50:17.000Z
2022-03-23T06:23:08.000Z
tests/testsuite.py
felixxm/unittest-xml-reporting
0ef90a6f2565430c4e8c19b4b4741a971a8b4041
[ "BSD-2-Clause-FreeBSD" ]
104
2015-01-16T19:50:36.000Z
2022-03-18T20:49:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Executable module to test unittest-xml-reporting. """ from __future__ import print_function import contextlib import io import sys from xmlrunner.unittest import unittest import xmlrunner from xmlrunner.result import _DuplicateWriter from xmlrunner.result import _XMLT...
36.109496
131
0.620555
from __future__ import print_function import contextlib import io import sys from xmlrunner.unittest import unittest import xmlrunner from xmlrunner.result import _DuplicateWriter from xmlrunner.result import _XMLTestResult from xmlrunner.result import resolve_filename import doctest import tests.doctest_example fro...
true
true
1c47eee4810990be4161b62e4a305d1fbceda5f0
3,159
py
Python
src/dkn_kg_preprocess.py
andreeaiana/geneg_benchmarking
0b53989c79b8e3771c144c0332fd36587dfe0f4d
[ "MIT" ]
1
2021-12-08T12:02:56.000Z
2021-12-08T12:02:56.000Z
src/dkn_kg_preprocess.py
andreeaiana/geneg_benchmarking
0b53989c79b8e3771c144c0332fd36587dfe0f4d
[ "MIT" ]
null
null
null
src/dkn_kg_preprocess.py
andreeaiana/geneg_benchmarking
0b53989c79b8e3771c144c0332fd36587dfe0f4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # DISCLAIMER # This code file is forked and adapted from https://github.com/hwwang55/DKN/blob/master/data/kg/kg_preprocess.py # import libraries import os import numpy as np from pathlib import Path from typing import Dict, List # import custom code from src.config import DKN_KGE_METHOD, DKN_...
40.5
137
0.703704
import os import numpy as np from pathlib import Path from typing import Dict, List from src.config import DKN_KGE_METHOD, DKN_KGE_ENTITY_EMBEDDING_DIM from src.config import FILENAME_ENTITY2INDEX, FILENAME_ENTITY2ID, FILENAME_TRIPLE2ID from src.config import DATA_DIR from src.util.logger import setup_logging def ...
true
true
1c47f02bbbb62967084bcd65ed4058613766c005
179
py
Python
frappe/core/doctype/user_type/test_user_type.py
ssuda777/frappe
d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e
[ "MIT" ]
1
2021-12-18T18:37:29.000Z
2021-12-18T18:37:29.000Z
frappe/core/doctype/user_type/test_user_type.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
3
2021-02-27T11:50:14.000Z
2021-05-03T06:48:49.000Z
frappe/core/doctype/user_type/test_user_type.py
JMBodz/frappe
eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d
[ "MIT" ]
2
2021-09-02T09:51:55.000Z
2021-09-07T04:55:42.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and Contributors # See license.txt # import frappe import unittest class TestUserType(unittest.TestCase): pass
19.888889
58
0.743017
import unittest class TestUserType(unittest.TestCase): pass
true
true
1c47f12210994a95c7538f1240f7559389bdc3de
1,707
py
Python
watcher.py
yijianduanlang/n95-py
6efefe9497ed95a75c7712323a85daec7eb7f3aa
[ "MIT" ]
357
2020-02-08T07:07:18.000Z
2022-03-26T02:44:53.000Z
watcher.py
tavernier/N95-watcher
6efefe9497ed95a75c7712323a85daec7eb7f3aa
[ "MIT" ]
14
2020-02-10T08:12:58.000Z
2022-03-12T00:15:19.000Z
watcher.py
tavernier/N95-watcher
6efefe9497ed95a75c7712323a85daec7eb7f3aa
[ "MIT" ]
107
2020-02-08T13:26:27.000Z
2022-03-05T04:38:26.000Z
import sys import os, time, json lib_path = os.path.join(os.path.dirname(__file__))[:-3] sys.path.append(lib_path) from selenium import webdriver from log.logger import logger as log from PIL import Image browser = None def check_shop(url, keywords): global browser browser.get(url) time.sleep(5) fi...
28.932203
104
0.589338
import sys import os, time, json lib_path = os.path.join(os.path.dirname(__file__))[:-3] sys.path.append(lib_path) from selenium import webdriver from log.logger import logger as log from PIL import Image browser = None def check_shop(url, keywords): global browser browser.get(url) time.sleep(5) fi...
true
true
1c47f140c05031e8eb49b0a4ff76d0583d02aea8
326
py
Python
trial and error method.py
ankanpramanik/Solve-Equation-wby-Trial-and-Error
f0456354ad447988672bf97422ccf3245b094b6f
[ "MIT" ]
null
null
null
trial and error method.py
ankanpramanik/Solve-Equation-wby-Trial-and-Error
f0456354ad447988672bf97422ccf3245b094b6f
[ "MIT" ]
null
null
null
trial and error method.py
ankanpramanik/Solve-Equation-wby-Trial-and-Error
f0456354ad447988672bf97422ccf3245b094b6f
[ "MIT" ]
1
2021-11-21T10:26:13.000Z
2021-11-21T10:26:13.000Z
N1=int(input("Enter the value of coefficient of n1 ")) N2=int(input("Enter the value of coefficient of n2 ")) N=int(input("Enter the value of constant ")) for n1 in range(101): for n2 in range(101): if N1*n1+ N2*n2 == N: print(n1, n2) elif N1*n1-N2*n2 ==N: print (n1,n...
29.636364
55
0.564417
N1=int(input("Enter the value of coefficient of n1 ")) N2=int(input("Enter the value of coefficient of n2 ")) N=int(input("Enter the value of constant ")) for n1 in range(101): for n2 in range(101): if N1*n1+ N2*n2 == N: print(n1, n2) elif N1*n1-N2*n2 ==N: print (n1,n...
true
true
1c47f24060a389cff1da511978f70c8656a55176
1,646
py
Python
config/urls.py
lalfaro1704/backend_test
b94c8768d50829993f4035d522deb72deedce795
[ "MIT" ]
null
null
null
config/urls.py
lalfaro1704/backend_test
b94c8768d50829993f4035d522deb72deedce795
[ "MIT" ]
null
null
null
config/urls.py
lalfaro1704/backend_test
b94c8768d50829993f4035d522deb72deedce795
[ "MIT" ]
null
null
null
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
32.27451
85
0.63062
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
true
true
1c47f26627f3856f7841720cb5e66db2363667e0
16,289
py
Python
mongo-python-driver/setup.py
dlminvestments/IBM-Python-VM-1
27d06d19d96c170346c03ed4dc66587cbe0bc28f
[ "Apache-2.0" ]
null
null
null
mongo-python-driver/setup.py
dlminvestments/IBM-Python-VM-1
27d06d19d96c170346c03ed4dc66587cbe0bc28f
[ "Apache-2.0" ]
474
2020-12-23T22:22:55.000Z
2022-03-30T18:10:11.000Z
mongo-python-driver/setup.py
dlminvestments/IBM-Python-VM-1
27d06d19d96c170346c03ed4dc66587cbe0bc28f
[ "Apache-2.0" ]
1
2020-12-23T23:56:24.000Z
2020-12-23T23:56:24.000Z
import os import platform import re import sys import warnings if sys.version_info[:2] < (2, 7): raise RuntimeError("Python version >= 2.7 required.") # Hack to silence atexit traceback in some Python versions try: import multiprocessing except ImportError: pass # Don't force people to install setuptoo...
38.783333
92
0.599362
import os import platform import re import sys import warnings if sys.version_info[:2] < (2, 7): raise RuntimeError("Python version >= 2.7 required.") try: import multiprocessing except ImportError: pass # we have to. try: from setuptools import setup, __version__ as _setuptools_version except Impo...
true
true
1c47f334f6f5c914d25a539e1d094e9034d15110
7,149
py
Python
modeling/dynamics/bullet/bdbody.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
23
2021-04-02T09:02:04.000Z
2022-03-22T05:31:03.000Z
modeling/dynamics/bullet/bdbody.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
35
2021-04-12T09:41:05.000Z
2022-03-26T13:32:46.000Z
modeling/dynamics/bullet/bdbody.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
16
2021-03-30T11:55:45.000Z
2022-03-30T07:10:59.000Z
from panda3d.bullet import BulletRigidBodyNode from panda3d.bullet import BulletTriangleMesh from panda3d.bullet import BulletTriangleMeshShape from panda3d.bullet import BulletConvexHullShape, BulletBoxShape from panda3d.core import TransformState, Vec3, GeomVertexRewriter, CollisionBox, Point3 import copy import mode...
44.962264
114
0.615051
from panda3d.bullet import BulletRigidBodyNode from panda3d.bullet import BulletTriangleMesh from panda3d.bullet import BulletTriangleMeshShape from panda3d.bullet import BulletConvexHullShape, BulletBoxShape from panda3d.core import TransformState, Vec3, GeomVertexRewriter, CollisionBox, Point3 import copy import mode...
true
true
1c47f43155595c95ee4e65fc813a2c0e931c4d26
6,564
py
Python
sympy/vector/tests/test_vector.py
FabianBall/sympy
9d849ddfc45427fe7f6733ce4d18fa397d0f43a9
[ "BSD-3-Clause" ]
3
2015-01-17T23:15:04.000Z
2015-05-26T14:11:44.000Z
sympy/vector/tests/test_vector.py
FabianBall/sympy
9d849ddfc45427fe7f6733ce4d18fa397d0f43a9
[ "BSD-3-Clause" ]
1
2017-08-26T01:07:46.000Z
2017-08-26T16:05:49.000Z
sympy/vector/tests/test_vector.py
FabianBall/sympy
9d849ddfc45427fe7f6733ce4d18fa397d0f43a9
[ "BSD-3-Clause" ]
null
null
null
from sympy.core import S from sympy.simplify import simplify, trigsimp from sympy import pi, sqrt, symbols, ImmutableMatrix as Matrix, \ sin, cos, Function, Integral, Derivative, diff from sympy.vector.vector import Vector, BaseVector, VectorAdd, \ VectorMul, VectorZero from sympy.vector.coordsysrect import C...
28.53913
91
0.534735
from sympy.core import S from sympy.simplify import simplify, trigsimp from sympy import pi, sqrt, symbols, ImmutableMatrix as Matrix, \ sin, cos, Function, Integral, Derivative, diff from sympy.vector.vector import Vector, BaseVector, VectorAdd, \ VectorMul, VectorZero from sympy.vector.coordsysrect import C...
true
true
1c47f49ae688340870b158350bc212b335d4eb6d
5,776
py
Python
app/views/navigation.py
tch1bo/viaduct
bfd37b0a8408b2dd66fb01138163b80ce97699ff
[ "MIT" ]
11
2015-04-23T21:57:56.000Z
2019-04-28T12:48:58.000Z
app/views/navigation.py
tch1bo/viaduct
bfd37b0a8408b2dd66fb01138163b80ce97699ff
[ "MIT" ]
1
2016-10-05T14:10:58.000Z
2016-10-05T14:12:23.000Z
app/views/navigation.py
tch1bo/viaduct
bfd37b0a8408b2dd66fb01138163b80ce97699ff
[ "MIT" ]
3
2016-10-05T14:00:42.000Z
2019-01-16T14:33:43.000Z
import json import re from flask import Blueprint, render_template, abort, request, flash, \ redirect, url_for from flask_babel import _ from flask_login import current_user from app import db from app.decorators import require_role from app.forms import init_form from app.forms.navigation import NavigationEntryFo...
38
79
0.630886
import json import re from flask import Blueprint, render_template, abort, request, flash, \ redirect, url_for from flask_babel import _ from flask_login import current_user from app import db from app.decorators import require_role from app.forms import init_form from app.forms.navigation import NavigationEntryFo...
true
true
1c47f7e4b0e586c5810d5893015727706ff08291
1,641
py
Python
aionewton/wrapper.py
AndrielFR/aionewton
0f740851154de0e4f64d7c9f676b0b27eaabeccc
[ "MIT" ]
1
2021-01-27T14:35:33.000Z
2021-01-27T14:35:33.000Z
aionewton/wrapper.py
AndrielFR/aionewton
0f740851154de0e4f64d7c9f676b0b27eaabeccc
[ "MIT" ]
null
null
null
aionewton/wrapper.py
AndrielFR/aionewton
0f740851154de0e4f64d7c9f676b0b27eaabeccc
[ "MIT" ]
null
null
null
"""An asnycio-based wrapper for `https://newton.now.sh`""" import sys from urllib.parse import quote import aiohttp ENDPOINTS = ["simplify", "factor", "derive", "integrate", "zeroes", "tangent", "area", "cos", "sin", "tan", "arccos", "arcsin", "arctan", "abs", "log"] class Result: def ...
27.35
78
0.631322
import sys from urllib.parse import quote import aiohttp ENDPOINTS = ["simplify", "factor", "derive", "integrate", "zeroes", "tangent", "area", "cos", "sin", "tan", "arccos", "arcsin", "arctan", "abs", "log"] class Result: def __init__(self, **kwargs): self.operation = kwargs.g...
true
true
1c47f87cd0eec39b0b393cb0abd277a23b887c5d
1,866
py
Python
examples/basic_simple_color_triangle.py
2dx/moderngl
5f932560a535469626d79d22e4205f400e18f328
[ "MIT" ]
916
2019-03-11T19:15:20.000Z
2022-03-31T19:22:16.000Z
examples/basic_simple_color_triangle.py
2dx/moderngl
5f932560a535469626d79d22e4205f400e18f328
[ "MIT" ]
218
2019-03-11T06:05:52.000Z
2022-03-30T16:59:22.000Z
examples/basic_simple_color_triangle.py
2dx/moderngl
5f932560a535469626d79d22e4205f400e18f328
[ "MIT" ]
110
2019-04-06T18:32:24.000Z
2022-03-21T20:30:47.000Z
''' Renders a traingle that has all RGB combinations ''' import numpy as np from ported._example import Example class SimpleColorTriangle(Example): gl_version = (3, 3) aspect_ratio = 16 / 9 title = "Simple Color Triangle" def __init__(self, **kwargs): super().__init__(**kwargs) ...
25.916667
71
0.478028
import numpy as np from ported._example import Example class SimpleColorTriangle(Example): gl_version = (3, 3) aspect_ratio = 16 / 9 title = "Simple Color Triangle" def __init__(self, **kwargs): super().__init__(**kwargs) self.prog = self.ctx.program( vertex_shader=''' ...
true
true
1c47f8c6afe39da638d403941783b7f752b3f9d1
57,312
py
Python
nova/tests/unit/api/openstack/compute/test_hypervisors.py
mertakozcan/nova
6e4ab9714cc0ca147f61997aa7b68f88185ade5c
[ "Apache-2.0" ]
1
2019-04-22T06:25:26.000Z
2019-04-22T06:25:26.000Z
nova/tests/unit/api/openstack/compute/test_hypervisors.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/api/openstack/compute/test_hypervisors.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
41.231655
79
0.570858
import copy import mock import netaddr from oslo_serialization import jsonutils from oslo_utils.fixture import uuidsentinel as uuids import six from webob import exc from nova.api.openstack.compute import hypervisors \ as hypervisors_v21 from nova import exception from nova import objects from nova import te...
true
true
1c47f98f44be7b87e01c9b1a097b1376b38cc5f4
1,906
py
Python
sdk/python/setup.py
agilecreativity/pulumi-docker
0a6928ef65763f30820837d63d3ad9e59ad993e1
[ "Apache-2.0" ]
45
2018-09-22T07:48:05.000Z
2022-02-15T08:48:26.000Z
sdk/python/setup.py
agilecreativity/pulumi-docker
0a6928ef65763f30820837d63d3ad9e59ad993e1
[ "Apache-2.0" ]
178
2018-09-01T23:59:42.000Z
2022-03-31T22:05:46.000Z
sdk/python/setup.py
agilecreativity/pulumi-docker
0a6928ef65763f30820837d63d3ad9e59ad993e1
[ "Apache-2.0" ]
21
2018-10-11T08:00:17.000Z
2022-01-26T02:28:20.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 errno from setuptools import setup, find_packages from setuptools.command.install import install from subprocess import check_ca...
31.766667
98
0.589717
import errno from setuptools import setup, find_packages from setuptools.command.install import install from subprocess import check_call class InstallPluginCommand(install): def run(self): install.run(self) try: check_call(['pulumi', 'plugin', 'install', 'resource', 'docker', '${PLUG...
true
true
1c47fa0e5e9054dbfe8764c09a2d5ba88af0b2fc
5,622
py
Python
docs/conf.py
tonyseek/python-orphanage
df466c567fda82ef4f6d949b19b5a0b33744513c
[ "MIT" ]
11
2018-05-08T08:05:31.000Z
2021-03-31T08:57:26.000Z
docs/conf.py
tonyseek/python-orphanage
df466c567fda82ef4f6d949b19b5a0b33744513c
[ "MIT" ]
2
2018-05-09T12:01:23.000Z
2019-10-21T17:24:40.000Z
docs/conf.py
tonyseek/python-orphanage
df466c567fda82ef4f6d949b19b5a0b33744513c
[ "MIT" ]
2
2018-06-19T06:28:02.000Z
2021-03-02T01:59:04.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
30.225806
79
0.639808
project = u'orphanage' copyright = u'2018, Jiangge Zhang' author = u'Jiangge Zhang' version = u'' release = u'0.1.0' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' language = No...
true
true
1c47fa3816f95e926ae95ef3681d5bf62a93e19a
1,212
py
Python
LeetCode/python-R1/0049-字母异位词分组D/V2-OverTIme.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
4
2019-08-27T11:28:03.000Z
2020-12-24T07:10:22.000Z
LeetCode/python-R1/0049-字母异位词分组D/V2-OverTIme.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
null
null
null
LeetCode/python-R1/0049-字母异位词分组D/V2-OverTIme.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
4
2019-09-20T09:44:01.000Z
2020-12-24T07:10:23.000Z
""" @Author: huuuuusy @GitHub: https://github.com/huuuuusy 系统: Ubuntu 18.04 IDE: VS Code 1.36 工具: python == 3.7.3 """ """ 思路: 在V1的基础上加了字典对输入进行长度分类,在每一类里循环判断 速度比V1快一些,但仍然超时 结果: 第100个测试用例超时 """ from collections import Counter class Solution: def groupAnagrams(self, strs): res = [] if l...
24.734694
68
0.459571
from collections import Counter class Solution: def groupAnagrams(self, strs): res = [] if len(strs) == 0: return res if len(strs) == 1: return [strs] d = {} for s in strs: d[len(s)] = d.get(len(s),[]) + [s] for key, value in d.it...
true
true
1c47fa676f9225cd4fb2d3c9c868a8eaf56f7c8f
825
py
Python
src/native_bayes/classify.py
zegra1989/ml
ed574ff45d4852d0c93f1ad5d7e0160cd752c9e0
[ "MIT" ]
null
null
null
src/native_bayes/classify.py
zegra1989/ml
ed574ff45d4852d0c93f1ad5d7e0160cd752c9e0
[ "MIT" ]
null
null
null
src/native_bayes/classify.py
zegra1989/ml
ed574ff45d4852d0c93f1ad5d7e0160cd752c9e0
[ "MIT" ]
null
null
null
def NBAccuracy(features_train, labels_train, features_test, labels_test): """ compute the accuracy of your Naive Bayes classifier """ ### import the sklearn module for GaussianNB from sklearn.naive_bayes import GaussianNB from sklearn.metrics import accuracy_score ### create classifier clf = Ga...
39.285714
74
0.727273
def NBAccuracy(features_train, labels_train, features_test, labels_test): from sklearn.naive_bayes import GaussianNB from sklearn.metrics import accuracy_score clf = GaussianNB() clf.fit(features_train, labels_train) pred = clf.predict(features_test) accuracy ...
true
true
1c47fbfef732fe271a24cdb151acef2779e5603d
644
py
Python
tools/telemetry/telemetry/unittest_util/options_for_unittests.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
telemetry/telemetry/testing/options_for_unittests.py
kind-john/catapult
29635376119833f172a58a48a3282d353ce55d2b
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
telemetry/telemetry/testing/options_for_unittests.py
kind-john/catapult
29635376119833f172a58a48a3282d353ce55d2b
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module provides the global variable options_for_unittests. This is set to a BrowserOptions object by the test harness, or None if unit tests are not...
19.515152
72
0.734472
_options = [] def Push(options): _options.append(options) def Pop(): return _options.pop() def GetCopy(): if not AreSet(): return None return _options[-1].Copy() def AreSet(): return bool(_options)
true
true
1c47fc0ab6403bb40623a1044733f8334c1d1740
33,931
py
Python
theano/tensor/var.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
theano/tensor/var.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
theano/tensor/var.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-09-09T18:31:41.000Z
2019-09-09T18:31:41.000Z
from __future__ import absolute_import, print_function, division import collections import copy import traceback as tb import warnings import numpy from six import integer_types from six.moves import xrange import theano from theano.compat import PY3 from theano.scalar import ComplexError, IntegerDivisionError from t...
35.016512
80
0.579529
from __future__ import absolute_import, print_function, division import collections import copy import traceback as tb import warnings import numpy from six import integer_types from six.moves import xrange import theano from theano.compat import PY3 from theano.scalar import ComplexError, IntegerDivisionError from t...
true
true
1c47fc4c54f24031a9b208b6e98961d9867c8432
5,229
py
Python
desktop/libs/indexer/src/indexer/conf.py
10088/hue
802811941dabd015a4fd7a640d349f9d26ac5572
[ "Apache-2.0" ]
null
null
null
desktop/libs/indexer/src/indexer/conf.py
10088/hue
802811941dabd015a4fd7a640d349f9d26ac5572
[ "Apache-2.0" ]
null
null
null
desktop/libs/indexer/src/indexer/conf.py
10088/hue
802811941dabd015a4fd7a640d349f9d26ac5572
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
26.409091
109
0.733601
from future import standard_library standard_library.install_aliases() import logging import os import sys from desktop.lib.conf import Config, coerce_bool from libsolr import conf as libsolr_conf from libzookeeper import conf as libzookeeper_conf if sys.version_info[0] > 2: from urllib.parse import urlparse fro...
true
true
1c47fe26c578435ee60bd4af2a50e86627e1777a
956
py
Python
books/model/UserList.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
9
2015-04-01T08:59:49.000Z
2022-01-27T01:27:45.000Z
books/model/UserList.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
3
2020-05-14T04:22:22.000Z
2021-08-06T11:19:03.000Z
books/model/UserList.py
nudglabs/books-python-wrappers
8844eca8fe681542644a70749b72a6dc4e48c171
[ "MIT" ]
11
2016-04-14T10:59:36.000Z
2020-08-19T13:26:05.000Z
#$Id$ from books.model.PageContext import PageContext class UserList: """This class is used to create object for Users list.""" def __init__(self): """Initialize parameters for users.""" self.users = [] self.page_context = PageContext() def set_users(self, user): """Set u...
19.916667
61
0.560669
from books.model.PageContext import PageContext class UserList: def __init__(self): self.users = [] self.page_context = PageContext() def set_users(self, user): self.users.append(user) def get_users(self): return self.users def set_page_context(self, page_context): ...
true
true
1c47ff9b3f92607d61112ac9b4852bb244a3b137
2,539
py
Python
env/Lib/site-packages/algorithmia_api_client/models/language.py
Vivek-Kamboj/Sargam
0f3ca5c70ddb722dd40a45373abd0e9b3939064e
[ "MIT" ]
2
2020-05-20T23:10:31.000Z
2020-12-09T13:00:06.000Z
env/Lib/site-packages/algorithmia_api_client/models/language.py
Vivek-Kamboj/Sargam
0f3ca5c70ddb722dd40a45373abd0e9b3939064e
[ "MIT" ]
5
2021-04-25T08:16:09.000Z
2022-03-12T00:42:14.000Z
env/Lib/site-packages/algorithmia_api_client/models/language.py
Vivek-Kamboj/Sargam
0f3ca5c70ddb722dd40a45373abd0e9b3939064e
[ "MIT" ]
1
2021-10-01T14:32:25.000Z
2021-10-01T14:32:25.000Z
# coding: utf-8 """ Algorithmia Management APIs APIs for managing actions on the Algorithmia platform # noqa: E501 OpenAPI spec version: 1.0.1 Contact: support@algorithmia.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Language(ob...
25.908163
74
0.550217
import pprint import re import six class Language(object): JAVA = "java" JAVASCRIPT = "javascript" PYTHON2_LANGPACK = "python2-langpack" PYTHON3_1 = "python3-1" R = "r" RUBY = "ruby" RUST = "rust" SCALA = "scala" openapi_types = { } attribute_map = { } def ...
true
true
1c4800c6ae1522e0be0378191ffb0de791b183ba
541
py
Python
api/serializers.py
coder-chris-git/django-react-love_backend
11b7366f6c3c4d9d3b72b145e100b26305c52128
[ "MIT" ]
null
null
null
api/serializers.py
coder-chris-git/django-react-love_backend
11b7366f6c3c4d9d3b72b145e100b26305c52128
[ "MIT" ]
null
null
null
api/serializers.py
coder-chris-git/django-react-love_backend
11b7366f6c3c4d9d3b72b145e100b26305c52128
[ "MIT" ]
null
null
null
from django.db.models.base import Model from rest_framework.fields import IntegerField from rest_framework.relations import StringRelatedField from .models import BoastAndRoastModel from rest_framework.serializers import ModelSerializer,SlugRelatedField class BoastAndRoastSerializer(ModelSerializer): date_created ...
28.473684
102
0.796673
from django.db.models.base import Model from rest_framework.fields import IntegerField from rest_framework.relations import StringRelatedField from .models import BoastAndRoastModel from rest_framework.serializers import ModelSerializer,SlugRelatedField class BoastAndRoastSerializer(ModelSerializer): date_created ...
true
true
1c4801010c3d4e1174d971d52ec35e804cc3f383
7,567
py
Python
conf.py
Mozilla-GitHub-Standards/7c3e4fe1e3e9e45496cb7bc94f1ff8b3ec66eca2e358a0c7231317e53ec1f6bc
057a68a7c76270de37df5e1829af2be047852d01
[ "CC-BY-4.0" ]
4
2016-01-10T19:09:11.000Z
2019-10-01T16:24:33.000Z
conf.py
Mozilla-GitHub-Standards/7c3e4fe1e3e9e45496cb7bc94f1ff8b3ec66eca2e358a0c7231317e53ec1f6bc
057a68a7c76270de37df5e1829af2be047852d01
[ "CC-BY-4.0" ]
13
2015-01-02T19:26:04.000Z
2019-03-29T12:35:23.000Z
conf.py
Mozilla-GitHub-Standards/7c3e4fe1e3e9e45496cb7bc94f1ff8b3ec66eca2e358a0c7231317e53ec1f6bc
057a68a7c76270de37df5e1829af2be047852d01
[ "CC-BY-4.0" ]
16
2015-01-01T16:32:37.000Z
2020-08-18T19:21:41.000Z
# -*- coding: utf-8 -*- # # A-team Bootcamp documentation build configuration file, created by # sphinx-quickstart on Thu May 5 14:21:14 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
33.188596
108
0.722743
import os on_rtd = os.environ.get('READTHEDOCS') == 'True' if not on_rtd: import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] templates_path = ['_templates'] source_suffix = '.rst...
true
true
1c48015d7ae84e2a3dd6ece846052a7d5758efc6
2,174
py
Python
chapter03/python/item_cf.py
coco-in-bluemoon/building-recommendation-engines
b337b2ba75b6c9b08612ab1720a2858e64e9de09
[ "MIT" ]
null
null
null
chapter03/python/item_cf.py
coco-in-bluemoon/building-recommendation-engines
b337b2ba75b6c9b08612ab1720a2858e64e9de09
[ "MIT" ]
null
null
null
chapter03/python/item_cf.py
coco-in-bluemoon/building-recommendation-engines
b337b2ba75b6c9b08612ab1720a2858e64e9de09
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd # 1. load dataset ratings = pd.read_csv('chapter02/data/movie_rating.csv') movie_ratings = pd.pivot_table( ratings, values='rating', index='title', columns='critic' ) # 2. calculate similarity def calcualte_norm(u): norm_u = 0.0 for ui in u: if...
26.839506
73
0.684913
import numpy as np import pandas as pd ratings = pd.read_csv('chapter02/data/movie_rating.csv') movie_ratings = pd.pivot_table( ratings, values='rating', index='title', columns='critic' ) def calcualte_norm(u): norm_u = 0.0 for ui in u: if np.isnan(ui): continue ...
true
true
1c48031ea57f3f19e9314a5f6ec8871aefc6ec8a
3,084
py
Python
mainscenemaker-2015/sku_enc.py
RN-JK/Ubiart-Tape-Serializer
879bfe27b11c290e5653dac8735ddba322bb5716
[ "MIT" ]
null
null
null
mainscenemaker-2015/sku_enc.py
RN-JK/Ubiart-Tape-Serializer
879bfe27b11c290e5653dac8735ddba322bb5716
[ "MIT" ]
null
null
null
mainscenemaker-2015/sku_enc.py
RN-JK/Ubiart-Tape-Serializer
879bfe27b11c290e5653dac8735ddba322bb5716
[ "MIT" ]
null
null
null
import os, struct, json, zlib, shutil print("SKUSCENE ENCRYPTOR BY: JACKLSUMMER15") with open("input.json") as f: sku=json.load(f) mapnames=sku[0]["songs"] map_count=0 try: os.mkdir('output') except: pass skuenc=open("output/skuscene_maps_pc_all.isc.ckd","wb") skudb="skuscene_db" skubas...
39.538462
514
0.703956
import os, struct, json, zlib, shutil print("SKUSCENE ENCRYPTOR BY: JACKLSUMMER15") with open("input.json") as f: sku=json.load(f) mapnames=sku[0]["songs"] map_count=0 try: os.mkdir('output') except: pass skuenc=open("output/skuscene_maps_pc_all.isc.ckd","wb") skudb="skuscene_db" skubas...
true
true
1c48041a87f8e551a67a3f06553241f52dcb0066
32
py
Python
venv/Lib/site-packages/pdoc/test/example_pkg/_relative_import/__init__.py
StavromularBeta/Rover
3030f1521e5a6bc2c6722983ca59a008b3a11400
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pdoc/test/example_pkg/_relative_import/__init__.py
StavromularBeta/Rover
3030f1521e5a6bc2c6722983ca59a008b3a11400
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pdoc/test/example_pkg/_relative_import/__init__.py
StavromularBeta/Rover
3030f1521e5a6bc2c6722983ca59a008b3a11400
[ "MIT" ]
1
2021-02-22T13:55:32.000Z
2021-02-22T13:55:32.000Z
from . import foo # noqa: F401
16
31
0.65625
from . import foo
true
true
1c4804828254777e5f84787506bd650e8ff713f5
785
py
Python
invenio_pure_sync/tests/run_process.py
utnapischtim/pure_sync_rdm
9d465d4f1a2410ba83d09ca691c1655e7daaf113
[ "MIT" ]
null
null
null
invenio_pure_sync/tests/run_process.py
utnapischtim/pure_sync_rdm
9d465d4f1a2410ba83d09ca691c1655e7daaf113
[ "MIT" ]
null
null
null
invenio_pure_sync/tests/run_process.py
utnapischtim/pure_sync_rdm
9d465d4f1a2410ba83d09ca691c1655e7daaf113
[ "MIT" ]
null
null
null
import os command = '/home/bootcamp/.local/share/virtualenvs/pure_sync_rdm-fOqjLk38/bin/python /home/bootcamp/src/pure_sync_rdm/invenio_pure_sync/cli.py ' # os.system(command + 'pages --pageStart=1 --pageEnd=2 --pageSize=1') os.system(command + 'pages --pageStart=7 --pageEnd=8 --pageSize=2') # os.system(command + "g...
41.315789
144
0.713376
import os command = '/home/bootcamp/.local/share/virtualenvs/pure_sync_rdm-fOqjLk38/bin/python /home/bootcamp/src/pure_sync_rdm/invenio_pure_sync/cli.py ' os.system(command + 'pages --pageStart=7 --pageEnd=8 --pageSize=2')
true
true
1c48057c53b2997b5f312ffc1cc0ad73366dcfdd
8,528
py
Python
spira/lpe/structure.py
cloudcalvin/spira
2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c
[ "MIT" ]
null
null
null
spira/lpe/structure.py
cloudcalvin/spira
2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c
[ "MIT" ]
1
2021-10-17T10:18:04.000Z
2021-10-17T10:18:04.000Z
spira/lpe/structure.py
cloudcalvin/spira
2dcaef188f2bc8c3839e1b5ff0be027e0cd4908c
[ "MIT" ]
null
null
null
import spira from spira import param from spira import shapes from spira.lpe.layers import * from spira.lrc.rules import * from spira.lrc.checking import Rules from spira.lpe.containers import __CellContainer__ from spira.lne.graph import Graph from spira.lne.mesh import Mesh from spira.lne.geometry import Geometry ...
30.787004
102
0.553471
import spira from spira import param from spira import shapes from spira.lpe.layers import * from spira.lrc.rules import * from spira.lrc.checking import Rules from spira.lpe.containers import __CellContainer__ from spira.lne.graph import Graph from spira.lne.mesh import Mesh from spira.lne.geometry import Geometry ...
true
true
1c48059513bd64cd768042db01ce8f2c7d15dfeb
1,009
py
Python
hooks/post_gen_project.py
christophedcpm/cookiecutter-pypackage
eaad44b1ae7c049e9e2a868b3b15164cceaf55e2
[ "BSD-3-Clause" ]
null
null
null
hooks/post_gen_project.py
christophedcpm/cookiecutter-pypackage
eaad44b1ae7c049e9e2a868b3b15164cceaf55e2
[ "BSD-3-Clause" ]
null
null
null
hooks/post_gen_project.py
christophedcpm/cookiecutter-pypackage
eaad44b1ae7c049e9e2a868b3b15164cceaf55e2
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os PROJECT_DIRECTORY = os.path.realpath(os.path.curdir) def remove_file(filepath): os.remove(os.path.join(PROJECT_DIRECTORY, filepath)) def remove_dir(filepath): os.removedirs(os.path.join(PROJECT_DIRECTORY, filepath)) if __name__ == "__main__": if "{{ cookiecutter.creat...
28.828571
76
0.654113
import os PROJECT_DIRECTORY = os.path.realpath(os.path.curdir) def remove_file(filepath): os.remove(os.path.join(PROJECT_DIRECTORY, filepath)) def remove_dir(filepath): os.removedirs(os.path.join(PROJECT_DIRECTORY, filepath)) if __name__ == "__main__": if "{{ cookiecutter.create_author_file }}" != "...
true
true
1c4807c8c7b1516bf451ce708684235b30b64ee7
2,410
py
Python
mayan/apps/linking/links.py
garrans/mayan-edms
e95e90cc47447a1ae72629271652824aa9868572
[ "Apache-2.0" ]
null
null
null
mayan/apps/linking/links.py
garrans/mayan-edms
e95e90cc47447a1ae72629271652824aa9868572
[ "Apache-2.0" ]
null
null
null
mayan/apps/linking/links.py
garrans/mayan-edms
e95e90cc47447a1ae72629271652824aa9868572
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from documents.permissions import permission_document_view from navigation import Link from .permissions import ( permission_smart_link_create, permission_smart_link_delete, permission_smart_link_edit, permission_...
37.65625
74
0.772199
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from documents.permissions import permission_document_view from navigation import Link from .permissions import ( permission_smart_link_create, permission_smart_link_delete, permission_smart_link_edit, permission_...
true
true
1c4807f83ad4b502ef47f691ad2b1873e34b1f90
2,506
py
Python
bot.py
chenx6/sec_bot
5ad3427ed62f6dd891bb03afc5b2ebf93ccbb625
[ "MIT" ]
2
2021-02-03T05:36:05.000Z
2022-01-20T05:42:46.000Z
bot.py
chenx6/sec_bot
5ad3427ed62f6dd891bb03afc5b2ebf93ccbb625
[ "MIT" ]
null
null
null
bot.py
chenx6/sec_bot
5ad3427ed62f6dd891bb03afc5b2ebf93ccbb625
[ "MIT" ]
null
null
null
from typing import List from aiocqhttp import CQHttp, Event from quart import request from schedule import every from config import webhook_token, subscribes from utils.limit_counter import LimitCounter from utils.schedule_thread import run_continuously from plugin import (silent, base_bot, anquanke_vuln, ctfhub, dai...
28.157303
90
0.640463
from typing import List from aiocqhttp import CQHttp, Event from quart import request from schedule import every from config import webhook_token, subscribes from utils.limit_counter import LimitCounter from utils.schedule_thread import run_continuously from plugin import (silent, base_bot, anquanke_vuln, ctfhub, dai...
true
true
1c48084185e3f160708426d640c31a058f31937b
811
py
Python
jesse/indicators/rocp.py
The-Makers-of-things/jesse
df061ea21011a3c28f3359f421ec5594216fb708
[ "MIT" ]
null
null
null
jesse/indicators/rocp.py
The-Makers-of-things/jesse
df061ea21011a3c28f3359f421ec5594216fb708
[ "MIT" ]
null
null
null
jesse/indicators/rocp.py
The-Makers-of-things/jesse
df061ea21011a3c28f3359f421ec5594216fb708
[ "MIT" ]
null
null
null
from typing import Union import numpy as np import talib from jesse.helpers import get_candle_source def rocp(candles: np.ndarray, period: int = 10, source_type: str = "close", sequential: bool = False) -> Union[ float, np.ndarray]: """ ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice ...
26.16129
111
0.668311
from typing import Union import numpy as np import talib from jesse.helpers import get_candle_source def rocp(candles: np.ndarray, period: int = 10, source_type: str = "close", sequential: bool = False) -> Union[ float, np.ndarray]: if not sequential and len(candles) > 240: candles = candles[-240:] ...
true
true
1c48092d6bf94bc4d8938233cb16fd7a0011d89c
4,396
py
Python
tests/test_cli.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
tests/test_cli.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
tests/test_cli.py
rddunphy/pwg
47ed13d3a8120e2c21e4ff28af08deeddbbb9d66
[ "MIT" ]
null
null
null
from io import StringIO from unittest import TestCase from unittest.mock import patch from generator.cli import create_parser, gen, confirm, munge, reset, add_chars, remove_chars, save, pronounceable, \ phrase class CLITest(TestCase): def setUp(self): self.parser = create_parser() @patch("built...
34.34375
116
0.628071
from io import StringIO from unittest import TestCase from unittest.mock import patch from generator.cli import create_parser, gen, confirm, munge, reset, add_chars, remove_chars, save, pronounceable, \ phrase class CLITest(TestCase): def setUp(self): self.parser = create_parser() @patch("built...
true
true
1c480a65642aabc05cce235a50ba92cd155f5aa5
3,905
py
Python
controllers/ayarlar_controller.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
5
2020-12-13T20:09:34.000Z
2021-01-05T16:17:01.000Z
controllers/ayarlar_controller.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
null
null
null
controllers/ayarlar_controller.py
pyproject23/kackisivar
752438c51d0d6145ce3a385ca18a471d8b7f3013
[ "MIT" ]
8
2020-12-13T19:09:26.000Z
2020-12-13T21:15:45.000Z
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMessageBox from views.ayarlar_form import Ui_AyarlarForm from models.ayarlar import Ayarlar from models.kullanici import Kullanici # from datetime import time, datetime class AyarlarForm(QtWidgets.QWidget, Ui_AyarlarForm): def __init__(self,...
47.048193
344
0.656338
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMessageBox from views.ayarlar_form import Ui_AyarlarForm from models.ayarlar import Ayarlar from models.kullanici import Kullanici class AyarlarForm(QtWidgets.QWidget, Ui_AyarlarForm): def __init__(self, *args, **kwargs): super().__i...
true
true
1c480b17ae493ad4fe4f5c5c467de99cb0d9fc59
1,192
py
Python
pyvisdk/do/updated_agent_being_restarted_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/updated_agent_being_restarted_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/updated_agent_being_restarted_event.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def UpdatedAgentBeingRestartedEvent(vim, *args, **kwargs): '''This event records that the...
35.058824
124
0.615772
import logging from pyvisdk.exceptions import InvalidArgumentError log = logging.getLogger(__name__) def UpdatedAgentBeingRestartedEvent(vim, *args, **kwargs): obj = vim.client.factory.create('{urn:vim25}UpdatedAgentBeingRestartedEvent') if (len(args) + len(kwargs)) < 4: raise IndexError('Expe...
true
true
1c480b184cf95bb9b7a3ca86aa9f6eb52d29969b
2,678
py
Python
sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_advertised_routes.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_advertised_routes.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_advertised_routes.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
38.257143
189
0.698282
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetVirtualNetworkGatewayAdvertisedRoutesResult', 'AwaitableGetVirtualNetworkGatewayAdvertisedRoutesResult', 'get_virtual_ne...
true
true
1c480b25134b1e54200e0ddb780bd7bb0f122341
7,427
py
Python
tensorflow/contrib/cluster_resolver/python/training/cluster_resolver.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/contrib/cluster_resolver/python/training/cluster_resolver.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/contrib/cluster_resolver/python/training/cluster_resolver.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2017 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 applicable ...
38.481865
80
0.706476
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc from tensorflow.python.training.server_lib import ClusterSpec class ClusterResolver(object): @abc.abstractmethod def cluster_spec(self): raise NotImplementedError( 'cluster_spec ...
true
true
1c480b50f62091e40b64bb5483b4200ef19d237f
24
py
Python
api/__init__.py
hugofer93/aimo-api
fe3cc3f169f7a46d4ba68625a7936f37f55b1aad
[ "MIT" ]
null
null
null
api/__init__.py
hugofer93/aimo-api
fe3cc3f169f7a46d4ba68625a7936f37f55b1aad
[ "MIT" ]
10
2020-09-07T07:23:08.000Z
2022-03-02T05:32:10.000Z
api/__init__.py
hugofer93/aimo-api
fe3cc3f169f7a46d4ba68625a7936f37f55b1aad
[ "MIT" ]
null
null
null
from api.app import app
12
23
0.791667
from api.app import app
true
true
1c480bf2b8efe1f035b8d1c81bfb21a1df0ca5f0
2,546
py
Python
tests/test_factory.py
unt-libraries/aubrey-transcription
0383d67a0ed3f3ddaa306edfb09b2da1364e4178
[ "BSD-3-Clause" ]
null
null
null
tests/test_factory.py
unt-libraries/aubrey-transcription
0383d67a0ed3f3ddaa306edfb09b2da1364e4178
[ "BSD-3-Clause" ]
8
2018-08-22T19:14:38.000Z
2019-11-22T17:12:56.000Z
tests/test_factory.py
unt-libraries/aubrey-transcription
0383d67a0ed3f3ddaa306edfb09b2da1364e4178
[ "BSD-3-Clause" ]
null
null
null
import mock import pytest from aubrey_transcription import create_app, default_settings @mock.patch('aubrey_transcription.os.makedirs') # We don't want 'instance' dirs everywhere. class TestCreateApp: @pytest.fixture(scope="session") def settings_file(self, tmpdir_factory): settings = ( ...
47.148148
94
0.67989
import mock import pytest from aubrey_transcription import create_app, default_settings @mock.patch('aubrey_transcription.os.makedirs') class TestCreateApp: @pytest.fixture(scope="session") def settings_file(self, tmpdir_factory): settings = ( "PAIRTREE_BASE = '/different/path'" ...
true
true
1c480c30b16efe1ba1ddd3320ec4bbc6d27e8a0b
644
py
Python
problems/cop/academic/CoinsGrid.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
28
2019-12-14T09:25:52.000Z
2022-03-24T08:15:13.000Z
problems/cop/academic/CoinsGrid.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
7
2020-04-15T11:02:07.000Z
2022-01-20T12:48:54.000Z
problems/cop/academic/CoinsGrid.py
xcsp3team/pycsp3
a11bc370e34cd3fe37faeae9a5df935fcbd7770d
[ "MIT" ]
3
2020-04-15T08:23:45.000Z
2021-12-07T14:02:28.000Z
""" See 'Constraint Solving and Planning with Picat' (page 43) From Tony Hurlimann, A coin puzzle, SVOR-contest 2007 Some data: (8,4) (8,5) (9,4) (10,4) (31,14) Examples of Execution: python3 CoinsGrid.py python3 CoinsGrid.py -data=[10,4] """ from pycsp3 import * n, c = data or (8, 4) # x[i][j] is 1 if a coin ...
19.515152
70
0.610248
from pycsp3 import * n, c = data or (8, 4) x = VarArray(size=[n, n], dom={0, 1}) satisfy( [Sum(x[i]) == c for i in range(n)], [Sum(x[:, j]) == c for j in range(n)] ) minimize( Sum(x[i][j] * abs(i - j) ** 2 for i in range(n) for j in range(n)) )
true
true
1c480c456a6f3aede1614e5edca57e8015b7bcc5
749
py
Python
test/ppm_to_challenge.py
mrwonko/pwb2015
9e2f82086a72c12150dcd2bd44b52dc7ebb429fc
[ "MIT" ]
null
null
null
test/ppm_to_challenge.py
mrwonko/pwb2015
9e2f82086a72c12150dcd2bd44b52dc7ebb429fc
[ "MIT" ]
null
null
null
test/ppm_to_challenge.py
mrwonko/pwb2015
9e2f82086a72c12150dcd2bd44b52dc7ebb429fc
[ "MIT" ]
null
null
null
import sys with open( sys.argv[ 1 ] ) as f: magic = f.readline() assert( magic == "P3\n" ) comment = f.readline() assert( comment.startswith( "#" ) ) dimensions = f.readline() w, h = map( int, dimensions.split() ) _ = f.readline() # max colors = {} grid = [] for y in...
31.208333
73
0.459279
import sys with open( sys.argv[ 1 ] ) as f: magic = f.readline() assert( magic == "P3\n" ) comment = f.readline() assert( comment.startswith( "#" ) ) dimensions = f.readline() w, h = map( int, dimensions.split() ) _ = f.readline() colors = {} grid = [] for y in range(...
true
true
1c480d61ea3390831e6d2b87dc17df6cf61992b3
3,911
py
Python
tapia/exercise5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
tapia/exercise5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
tapia/exercise5/ex5.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
import sys import networkx as nx def is_valid(line): """ Checks if the content of an edge has a valid format. <vertex vertex weight> :param line: A line of the input text. :type: String :return: A list if edge is valid, None otherwise. """ edge = line.rsplit() wrong_args_number =...
26.605442
106
0.639223
import sys import networkx as nx def is_valid(line): edge = line.rsplit() wrong_args_number = len(edge) != 3 is_comment = line.startswith("#") if wrong_args_number or not edge or is_comment: return None try: int(edge[0]) int(edge[1]) int(edge[2]) except ValueE...
true
true
1c480e0170646c335358d40a83a3d3909901aa65
18,084
py
Python
sphinx/util/logging.py
jessetan/sphinx
4cae0ecf8641551028b1a54168e49d52cb6bc7f3
[ "BSD-2-Clause" ]
null
null
null
sphinx/util/logging.py
jessetan/sphinx
4cae0ecf8641551028b1a54168e49d52cb6bc7f3
[ "BSD-2-Clause" ]
null
null
null
sphinx/util/logging.py
jessetan/sphinx
4cae0ecf8641551028b1a54168e49d52cb6bc7f3
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.util.logging ~~~~~~~~~~~~~~~~~~~ Logging utility functions for Sphinx. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import logging import logging.handlers from collections import defaultdict from contextlib import contextm...
30.444444
95
0.626742
import logging import logging.handlers from collections import defaultdict from contextlib import contextmanager from typing import IO, TYPE_CHECKING, Any, Dict, Generator, List, Tuple, Type, Union from docutils import nodes from docutils.nodes import Node from docutils.utils import get_source_line from sphinx.error...
true
true
1c480ee01fd5c048b152028cc1001c86ca680a28
994
py
Python
trac/upgrades/db27.py
tiagoeckhardt/trac
b18c226195bfed8cd19cba97c6f03bd54dbbc044
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db27.py
tiagoeckhardt/trac
b18c226195bfed8cd19cba97c6f03bd54dbbc044
[ "BSD-3-Clause" ]
null
null
null
trac/upgrades/db27.py
tiagoeckhardt/trac
b18c226195bfed8cd19cba97c6f03bd54dbbc044
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://trac.edgewall.org/wiki/TracLicense. # # This software cons...
34.275862
67
0.698189
from trac.db import Table, Column, DatabaseManager def do_upgrade(env, ver, cursor): cursor.execute("DROP TABLE cache") table = Table('cache', key='id')[ Column('id', type='int'), Column('generation', type='int'), Column('key'), ] db_connector, _ = DatabaseManager(env).get...
true
true
1c48116e567540872eb35d8210fe6c3f7660b7f8
3,913
py
Python
cryptography/hazmat/bindings/utils.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
null
null
null
cryptography/hazmat/bindings/utils.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
null
null
null
cryptography/hazmat/bindings/utils.py
derwolfe/cryptography
a6112133d6797313ea8fe741daf25178b2abe25c
[ "Apache-2.0" ]
3
2017-04-07T12:02:22.000Z
2020-03-23T12:11:55.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
35.899083
79
0.669052
from __future__ import absolute_import, division, print_function import binascii import sys import cffi def build_ffi(module_prefix, modules, pre_include="", post_include="", libraries=[], extra_compile_args=[], extra_link_args=[]): ffi = cffi.FFI() types = [] includes = [] functions...
true
true
1c4812afed716716d770b120fccdcf8bd533a504
584
py
Python
aisapi/const.py
sviete/AIS-api
80694a235b34b99e0ee608e3e3c175732e5be258
[ "MIT" ]
1
2018-01-03T11:26:01.000Z
2018-01-03T11:26:01.000Z
aisapi/const.py
sviete/AIS-api
80694a235b34b99e0ee608e3e3c175732e5be258
[ "MIT" ]
null
null
null
aisapi/const.py
sviete/AIS-api
80694a235b34b99e0ee608e3e3c175732e5be258
[ "MIT" ]
2
2018-08-14T04:30:20.000Z
2018-08-14T04:31:16.000Z
"""Constants.""" AIS_WS_TUNE_IN_URL = "http://opml.radiotime.com/" AIS_WS_AUDIO_TYPE_URL = ( "https://powiedz.co/ords/dom/dom/audio_type?nature={audio_nature}" ) AIS_WS_AUDIO_NAME_URL = ( "https://powiedz.co/ords/dom/dom/audio_name?nature={audio_nature}&type={audio_type}" ) AIS_WS_AUDIOBOOKS_URL = "https://wol...
38.933333
88
0.765411
AIS_WS_TUNE_IN_URL = "http://opml.radiotime.com/" AIS_WS_AUDIO_TYPE_URL = ( "https://powiedz.co/ords/dom/dom/audio_type?nature={audio_nature}" ) AIS_WS_AUDIO_NAME_URL = ( "https://powiedz.co/ords/dom/dom/audio_name?nature={audio_nature}&type={audio_type}" ) AIS_WS_AUDIOBOOKS_URL = "https://wolnelektury.pl/api/...
true
true
1c4812d20adc26bbc3dee861735190b37f283c00
3,500
py
Python
fake_gen/factories/datetimes.py
psafont/fake-gen
a3d74fdb54c3d4171ce2ba6ab0ad15791cf5b7e5
[ "MIT" ]
1
2020-04-14T09:34:58.000Z
2020-04-14T09:34:58.000Z
fake_gen/factories/datetimes.py
psafont/fake-gen
a3d74fdb54c3d4171ce2ba6ab0ad15791cf5b7e5
[ "MIT" ]
1
2018-12-04T10:02:57.000Z
2018-12-04T10:02:57.000Z
fake_gen/factories/datetimes.py
psafont/fake-gen
a3d74fdb54c3d4171ce2ba6ab0ad15791cf5b7e5
[ "MIT" ]
null
null
null
import random import datetime from fake_gen.errors import InvalidFieldType from fake_gen.base import Factory, DependentField class RandomDateFactory(Factory): """ Generates a random dates between 2 dates. :type minimum: datetime.datetime :type maximum: datetime.datetime Example: >>> start = da...
37.634409
100
0.676857
import random import datetime from fake_gen.errors import InvalidFieldType from fake_gen.base import Factory, DependentField class RandomDateFactory(Factory): def __init__(self, minimum, maximum): super(RandomDateFactory, self).__init__() self._maximum = maximum self._minimum = minimum ...
true
true
1c481379434ada17f2a9088c56489beafbf8d172
4,503
py
Python
reconcile/ecr_mirror.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
reconcile/ecr_mirror.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
reconcile/ecr_mirror.py
bhushanthakur93/qontract-reconcile
fd8eea9f92d353224113955d08e3592864e37df8
[ "Apache-2.0" ]
null
null
null
import base64 import logging from sretoolbox.container import Image from sretoolbox.container import Skopeo from sretoolbox.container.skopeo import SkopeoCmdError from sretoolbox.utils import threaded from reconcile import queries from reconcile.utils.aws_api import AWSApi from reconcile.utils.secret_reader import Se...
31.711268
85
0.613147
import base64 import logging from sretoolbox.container import Image from sretoolbox.container import Skopeo from sretoolbox.container.skopeo import SkopeoCmdError from sretoolbox.utils import threaded from reconcile import queries from reconcile.utils.aws_api import AWSApi from reconcile.utils.secret_reader import Se...
true
true
1c4814da9270cbf4960b91df34b13e65e8cb7550
2,195
py
Python
nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_guest_services_delete.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2020-02-07T19:01:36.000Z
2022-02-23T01:41:46.000Z
nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_guest_services_delete.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
1
2021-01-14T12:02:25.000Z
2021-01-14T12:02:25.000Z
nfv/nfv-vim/nfv_vim/instance_fsm/_instance_state_guest_services_delete.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2021-01-13T08:39:21.000Z
2022-02-09T00:21:55.000Z
# # Copyright (c) 2015-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from nfv_common import debug from nfv_common import state_machine from nfv_vim.instance_fsm._instance_defs import INSTANCE_EVENT from nfv_vim.instance_fsm._instance_defs import INSTANCE_STATE from nfv_vim.instance_fsm._insta...
32.279412
79
0.666515
from nfv_common import debug from nfv_common import state_machine from nfv_vim.instance_fsm._instance_defs import INSTANCE_EVENT from nfv_vim.instance_fsm._instance_defs import INSTANCE_STATE from nfv_vim.instance_fsm._instance_tasks import GuestServicesDeleteTask DLOG = debug.debug_get_logger('nfv_vim.state_machine....
true
true
1c481554ae98a5e2b009109d0fcec1bafdec2aec
4,338
py
Python
pc/userInput.py
martinloland/rov
542ca17daeb17109ac686f979ed3bb1dfb64b846
[ "MIT" ]
null
null
null
pc/userInput.py
martinloland/rov
542ca17daeb17109ac686f979ed3bb1dfb64b846
[ "MIT" ]
null
null
null
pc/userInput.py
martinloland/rov
542ca17daeb17109ac686f979ed3bb1dfb64b846
[ "MIT" ]
null
null
null
''' userInput.py - Read input from keyboard and USB-controller - Initiate functions to make the change ''' def getUserInput(): buttons = [] if joystickConnected: buttons = getJoystick(buttons) # Toggle keys for event in GAME_EVENTS.get(): if event.type == GAME_GLOBALS.QUIT: buttons.appen...
22.59375
46
0.620793
def getUserInput(): buttons = [] if joystickConnected: buttons = getJoystick(buttons) for event in GAME_EVENTS.get(): if event.type == GAME_GLOBALS.QUIT: buttons.append('quit') if event.type == pygame.KEYDOWN: if event.key == pygame.K_RETURN: buttons.append('return') if event...
true
true
1c4815d09dda9708289263b84fc70dfe99fb9044
4,006
py
Python
src/py/flwr/server/grpc_server/flower_service_servicer.py
Chris-george-anil/flower
98fb2fcde273c1226cc1f2e1638c1e4d8f35815c
[ "Apache-2.0" ]
895
2020-03-22T20:34:16.000Z
2022-03-31T15:20:42.000Z
src/py/flwr/server/grpc_server/flower_service_servicer.py
Chris-george-anil/flower
98fb2fcde273c1226cc1f2e1638c1e4d8f35815c
[ "Apache-2.0" ]
322
2020-02-19T10:16:33.000Z
2022-03-31T09:49:08.000Z
src/py/flwr/server/grpc_server/flower_service_servicer.py
Chris-george-anil/flower
98fb2fcde273c1226cc1f2e1638c1e4d8f35815c
[ "Apache-2.0" ]
234
2020-03-31T10:52:16.000Z
2022-03-31T14:04:42.000Z
# Copyright 2020 Adap GmbH. 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 ag...
36.418182
81
0.678233
from typing import Callable, Iterator import grpc from flwr.proto import transport_pb2_grpc from flwr.proto.transport_pb2 import ClientMessage, ServerMessage from flwr.server.client_manager import ClientManager from flwr.server.grpc_server.grpc_bridge import GRPCBridge from flwr.server.grpc_server.grpc_client_proxy i...
true
true
1c48168926e014644a7673b353146114eacaca51
808
py
Python
multiprocessing/test_pool_async.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
126
2019-07-19T14:42:41.000Z
2022-03-21T22:22:19.000Z
multiprocessing/test_pool_async.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
38
2019-08-28T01:46:31.000Z
2022-03-17T05:46:51.000Z
multiprocessing/test_pool_async.py
Carglglz/micropython-lib
07102c56aa1087b97ee313cedc1d89fd20452e11
[ "PSF-2.0" ]
55
2019-08-02T09:32:33.000Z
2021-12-22T11:25:51.000Z
import time from multiprocessing import Pool def f(x): return x*x pool = Pool(4) future = pool.apply_async(f, (10,)) assert future.get() == 100 def f2(x): time.sleep(0.5) return x + 1 future = pool.apply_async(f2, (10,)) iter = 0 while not future.ready(): #print("not ready") time.sleep(0.1) ...
16.833333
56
0.564356
import time from multiprocessing import Pool def f(x): return x*x pool = Pool(4) future = pool.apply_async(f, (10,)) assert future.get() == 100 def f2(x): time.sleep(0.5) return x + 1 future = pool.apply_async(f2, (10,)) iter = 0 while not future.ready(): time.sleep(0.1) iter += 1 assert fu...
true
true
1c481af4ae671d17e7ab5377a49f168e82fa6385
5,618
py
Python
charts.py
suryatmodulus/excalidraw-analytics
6cc9ec3800d1ef51e312740a981b656940fb0660
[ "MIT" ]
9
2021-02-07T13:15:06.000Z
2021-11-07T22:09:59.000Z
charts.py
suryatmodulus/excalidraw-analytics
6cc9ec3800d1ef51e312740a981b656940fb0660
[ "MIT" ]
16
2021-02-08T16:10:44.000Z
2022-03-27T01:16:21.000Z
charts.py
suryatmodulus/excalidraw-analytics
6cc9ec3800d1ef51e312740a981b656940fb0660
[ "MIT" ]
3
2021-02-08T15:09:33.000Z
2021-08-06T17:34:49.000Z
from datetime import datetime from datetime import timedelta from opencolor import oc import json import os ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) VERSION_DIR = os.path.join(ROOT_DIR, "version") TEMPLATE_FILE = os.path.join(ROOT_DIR, "template.html") INDEX_FILE = os.path.join(ROOT_DIR, "index.html") M...
29.413613
214
0.559808
from datetime import datetime from datetime import timedelta from opencolor import oc import json import os ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) VERSION_DIR = os.path.join(ROOT_DIR, "version") TEMPLATE_FILE = os.path.join(ROOT_DIR, "template.html") INDEX_FILE = os.path.join(ROOT_DIR, "index.html") M...
true
true
1c481be9d20dfe69d10a24305d2be9deb742efd6
152
py
Python
meiduo_mall/apps/contents/urls.py
yeluoguigen/meiduo_project
f7d416cf9ac433c27e58783f38687a1fbe3df6fe
[ "MIT" ]
null
null
null
meiduo_mall/apps/contents/urls.py
yeluoguigen/meiduo_project
f7d416cf9ac433c27e58783f38687a1fbe3df6fe
[ "MIT" ]
null
null
null
meiduo_mall/apps/contents/urls.py
yeluoguigen/meiduo_project
f7d416cf9ac433c27e58783f38687a1fbe3df6fe
[ "MIT" ]
null
null
null
from django.conf.urls import url from apps.contents import views urlpatterns = [ # 注册 url(r'^$', views.IndexView.as_view(), name="index"), ]
15.2
56
0.664474
from django.conf.urls import url from apps.contents import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name="index"), ]
true
true
1c481cbfa9a98ca0259c24e6baae94b4e74f1854
211
py
Python
erpnext_oralcare/erpnext_oralcare/doctype/labial_mucosa/test_labial_mucosa.py
techlift-tech/erpnext-oralcare
e10a787118c64dcedb7f9d0aedb1fe6c5a00e19e
[ "MIT" ]
null
null
null
erpnext_oralcare/erpnext_oralcare/doctype/labial_mucosa/test_labial_mucosa.py
techlift-tech/erpnext-oralcare
e10a787118c64dcedb7f9d0aedb1fe6c5a00e19e
[ "MIT" ]
165
2019-04-25T12:08:17.000Z
2019-08-09T13:26:03.000Z
erpnext_oralcare/erpnext_oralcare/doctype/labial_mucosa/test_labial_mucosa.py
techlift-tech/erpnext-oralcare
e10a787118c64dcedb7f9d0aedb1fe6c5a00e19e
[ "MIT" ]
2
2019-09-10T16:49:11.000Z
2021-12-03T22:54:21.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Techlift and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestLabialMucosa(unittest.TestCase): pass
19.181818
47
0.772512
from __future__ import unicode_literals import frappe import unittest class TestLabialMucosa(unittest.TestCase): pass
true
true
1c481ccf48bce4f8db10a6511af9ca1646796d16
2,134
py
Python
infinisdk/infinibox/fc_soft_target.py
kobutton/infinisdk
4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2
[ "BSD-3-Clause" ]
5
2019-02-26T20:11:43.000Z
2021-03-10T08:45:38.000Z
infinisdk/infinibox/fc_soft_target.py
kobutton/infinisdk
4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2
[ "BSD-3-Clause" ]
11
2017-11-15T19:20:23.000Z
2021-09-14T18:17:47.000Z
infinisdk/infinibox/fc_soft_target.py
kobutton/infinisdk
4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2
[ "BSD-3-Clause" ]
2
2017-11-16T11:59:05.000Z
2019-02-25T20:44:23.000Z
from urlobject import URLObject as URL from ..core import Field from ..core.bindings import RelatedObjectBinding, RelatedComponentBinding from ..core.system_object import SystemObject from ..core.system_object_utils import get_data_for_object_creation from ..core.translators_and_types import WWNType from ..core.type_b...
35.566667
94
0.685098
from urlobject import URLObject as URL from ..core import Field from ..core.bindings import RelatedObjectBinding, RelatedComponentBinding from ..core.system_object import SystemObject from ..core.system_object_utils import get_data_for_object_creation from ..core.translators_and_types import WWNType from ..core.type_b...
true
true
1c481cf6fa6269a851564b750d3143531073ef45
13,845
py
Python
mne/channels/tests/test_layout.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
null
null
null
mne/channels/tests/test_layout.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
23
2017-09-12T11:08:26.000Z
2019-10-04T11:11:29.000Z
mne/channels/tests/test_layout.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # # License: Simplified BSD import copy import os.path as op import numpy as np from numpy.testing im...
38.245856
79
0.656555
import copy import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_allclose, assert_equal) import pytest import matplotlib.pyplot as plt from mne.channels import (make_eeg_layout, make_grid_layout, read_layout, ...
true
true
1c481d4fefb3cdfdf7173e935ffef9744efd41a5
1,625
py
Python
eppy/tests/EPlusInterfaceFunctions_tests/integration.py
hnagda/eppy
422399ada78eb9f39ae61f96b385fe41a0a19100
[ "MIT" ]
116
2015-04-07T13:58:34.000Z
2022-02-23T15:52:35.000Z
eppy/tests/EPlusInterfaceFunctions_tests/integration.py
hnagda/eppy
422399ada78eb9f39ae61f96b385fe41a0a19100
[ "MIT" ]
324
2015-01-01T04:10:46.000Z
2022-03-16T16:28:13.000Z
eppy/tests/EPlusInterfaceFunctions_tests/integration.py
hnagda/eppy
422399ada78eb9f39ae61f96b385fe41a0a19100
[ "MIT" ]
65
2015-07-14T21:57:02.000Z
2022-02-14T08:39:02.000Z
# Copyright (c) 2016 Santosh Philip # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) """integration tests for EPlusInterfaceFunctions""" from __future__ import absolute_im...
30.092593
83
0.533538
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import eppy.EPlusInterfaceFunctions.iddgroups as iddgroups def test_idd2group(): data = ( ( "./eppy/tests/EPlusInterfaceFunctions_tests/integr...
true
true
1c481da32dcbefeebfd9b534a8ab1eb08416bc0c
1,059
py
Python
datasets/charades.py
rohitgirdhar/ActionVLAD
0d87b69d3069db3fe521923675e353f755c5d765
[ "Apache-2.0" ]
228
2017-05-08T04:50:49.000Z
2021-12-23T10:57:52.000Z
datasets/charades.py
icyzhang0923/ActionVLAD
08d3d65301940991e0a0cdca2c0534edf6749f41
[ "Apache-2.0" ]
39
2017-05-12T05:23:46.000Z
2021-03-21T03:40:02.000Z
datasets/charades.py
icyzhang0923/ActionVLAD
08d3d65301940991e0a0cdca2c0534edf6749f41
[ "Apache-2.0" ]
84
2017-05-08T01:11:25.000Z
2021-06-03T09:37:36.000Z
# ------------------------------------------------------------------------------ # ActionVLAD: Learning spatio-temporal aggregation for action classification # Copyright (c) 2017 Carnegie Mellon University and Adobe Systems Incorporated # Please see LICENSE on https://github.com/rohitgirdhar/ActionVLAD/ for details # -...
39.222222
80
0.614731
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datasets.video_data_utils import gen_dataset def get_split(split_name, dataset_dir, dataset_list_dir='', file_pattern=None, reader=None, modality='rgb', num_samples=1, split_...
true
true
1c481dc560ad3b371654f3a94b66f2aba9d8f20a
7,385
py
Python
python/ccxt/yobit.py
yevsev/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
python/ccxt/yobit.py
yevsev/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
python/ccxt/yobit.py
yevsev/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.liqui import liqui from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.error...
36.559406
126
0.448206
from ccxt.liqui import liqui from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import DDoSProtection class yobit (liqui): def describe(self): return self.deep_extend(super(yobit, self).describe(), { 'id': 'yobit', 'na...
true
true
1c481e042f3cc47722722f39903e65876d4a4f00
979
py
Python
pyleecan/Methods/Mesh/ScalarProductL2/scalar_product.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Methods/Mesh/ScalarProductL2/scalar_product.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Methods/Mesh/ScalarProductL2/scalar_product.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
# -*- coding: utf-8 -*- import numpy as np def scalar_product(self, funca, funcb, detJ, weights, nb_gauss_points): """Scalar product of shape functions with L2 gauss integration Parameters ---------- self : ScalarProductL2 a ScalarProductL2 object funca : ndarray vertice of the c...
23.878049
79
0.622063
import numpy as np def scalar_product(self, funca, funcb, detJ, weights, nb_gauss_points): func_a_w_dJ = np.zeros(funca.shape) for i in range(nb_gauss_points): func_a_w_dJ[i, :] = funca[i, :] * weights[i] * detJ[i] l2_scal_mat = np.squeeze(np.tensordot(func_a_w_dJ, funcb, axes=([0], [0]))) ...
true
true
1c481e4bd46ecaaf5421792b882173bf343bf1cb
12,093
py
Python
tests/python/pants_test/backend/project_info/tasks/test_export_integration.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/project_info/tasks/test_export_integration.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/project_info/tasks/test_export_integration.py
sammy-1234/pants
889016952a248cf229c78c014d9f6c95422d98b8
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import os import re import subprocess from twitter.common.collections import maybe_list from pants.base.build_environment import get_buildroot from pants.build_graph.intermed...
45.633962
111
0.678326
import json import os import re import subprocess from twitter.common.collections import maybe_list from pants.base.build_environment import get_buildroot from pants.build_graph.intermediate_target_factory import hash_target from pants_test.backend.project_info.tasks.resolve_jars_test_mixin import ResolveJarsTestMix...
true
true
1c481e629927a83e32294493a0c2118b75b7d1f9
12,288
py
Python
openpirates-api.py
dhagell/openpirates-api
68e4d626c2fae15d5e95427302e2a97db306591c
[ "MIT" ]
null
null
null
openpirates-api.py
dhagell/openpirates-api
68e4d626c2fae15d5e95427302e2a97db306591c
[ "MIT" ]
null
null
null
openpirates-api.py
dhagell/openpirates-api
68e4d626c2fae15d5e95427302e2a97db306591c
[ "MIT" ]
null
null
null
from flask import Flask, abort from flask import jsonify from google.cloud import storage from google.oauth2 import service_account from PIL import Image import os import mimetypes GOOGLE_STORAGE_PROJECT = os.environ['GOOGLE_STORAGE_PROJECT'] GOOGLE_STORAGE_BUCKET = os.environ['GOOGLE_STORAGE_BUCKET'] app = Flask(__n...
36.035191
128
0.6368
from flask import Flask, abort from flask import jsonify from google.cloud import storage from google.oauth2 import service_account from PIL import Image import os import mimetypes GOOGLE_STORAGE_PROJECT = os.environ['GOOGLE_STORAGE_PROJECT'] GOOGLE_STORAGE_BUCKET = os.environ['GOOGLE_STORAGE_BUCKET'] app = Flask(__n...
true
true
1c481ebd72b3d31925f9e66052d9b12423ea6d1f
5,720
py
Python
src/putty/settings/ssh_host_keys/__init__.py
KalleDK/putty.settings
d8a7803bd6df343f53f6a8d404c8a1ceb7bc2436
[ "MIT" ]
1
2021-05-25T10:42:15.000Z
2021-05-25T10:42:15.000Z
src/putty/settings/ssh_host_keys/__init__.py
KalleDK/putty.settings
d8a7803bd6df343f53f6a8d404c8a1ceb7bc2436
[ "MIT" ]
null
null
null
src/putty/settings/ssh_host_keys/__init__.py
KalleDK/putty.settings
d8a7803bd6df343f53f6a8d404c8a1ceb7bc2436
[ "MIT" ]
null
null
null
import re import paramiko import winreg import pathlib import typing import logging from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa logger = logging.getLevelName(__name__) STORE = winreg.HKEY_CURRENT_USER PUTTY_PATH = pathlib.PureWindowsPath('Software...
33.450292
127
0.651224
import re import paramiko import winreg import pathlib import typing import logging from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa logger = logging.getLevelName(__name__) STORE = winreg.HKEY_CURRENT_USER PUTTY_PATH = pathlib.PureWindowsPath('Software...
true
true
1c481f629295c2319555aad0fd9a68a7fdad9f62
1,209
py
Python
torch_collections/models/_siamese_configs.py
mingruimingrui/torch-collections
f7c20b28b63de76c763983338aa4c825904ef4cd
[ "MIT" ]
3
2018-08-14T19:40:58.000Z
2018-10-22T15:41:39.000Z
torch_collections/models/_siamese_configs.py
mingruimingrui/torch-collections
f7c20b28b63de76c763983338aa4c825904ef4cd
[ "MIT" ]
2
2018-08-14T19:40:41.000Z
2018-10-29T14:46:40.000Z
torch_collections/models/_siamese_configs.py
mingruimingrui/torch-collections
f7c20b28b63de76c763983338aa4c825904ef4cd
[ "MIT" ]
null
null
null
from __future__ import division from copy import deepcopy from ..utils.collections import AttrDict # Define default parameters _c = AttrDict() ################################################################################ #### Start of configurable parameters #### Model configs _c.name = 'encoder' _c.in...
25.723404
80
0.604632
from __future__ import division from copy import deepcopy from ..utils.collections import AttrDict _c = AttrDict() _c.name = 'encoder' _c.input_size = [160, 160] _c.embedding_size = 128 _c.backbone = 'resnet18' _c.freeze_backbone = False _c.l2_norm_alpha = 10 _c.margin = 0.5 _c.dist_type...
true
true
1c4821226a68cf04839da2954c8a4716bab862ee
1,285
py
Python
atividade4.py
cauanicastro/Prog1Ifes
dc0ad7d42d45b837c76e178d43bf608afaab3f02
[ "Apache-2.0" ]
null
null
null
atividade4.py
cauanicastro/Prog1Ifes
dc0ad7d42d45b837c76e178d43bf608afaab3f02
[ "Apache-2.0" ]
null
null
null
atividade4.py
cauanicastro/Prog1Ifes
dc0ad7d42d45b837c76e178d43bf608afaab3f02
[ "Apache-2.0" ]
null
null
null
__author__ = 'cauanicastro' __copyright__ = "Copyright 2015, Cauani Castro" __credits__ = ["Cauani Castro"] __license__ = "Apache License 2.0" __version__ = "1.0" __maintainer__ = "Cauani Castro" __email__ = "cauani.castro@hotmail.com" __status__ = "Examination program" def calculaRaiz(numero, aproximacoes): raiz ...
38.939394
150
0.610117
__author__ = 'cauanicastro' __copyright__ = "Copyright 2015, Cauani Castro" __credits__ = ["Cauani Castro"] __license__ = "Apache License 2.0" __version__ = "1.0" __maintainer__ = "Cauani Castro" __email__ = "cauani.castro@hotmail.com" __status__ = "Examination program" def calculaRaiz(numero, aproximacoes): raiz ...
true
true
1c4821aedc79f26cc40a3c7988e922eba605d9a0
926
py
Python
bomber_monkey/features/bomb/explosion.py
MonkeyPatchIo/bomber-monkey
8a351ef1a0ef18e9d98ad72d7274c41f02c0ed1b
[ "MIT" ]
null
null
null
bomber_monkey/features/bomb/explosion.py
MonkeyPatchIo/bomber-monkey
8a351ef1a0ef18e9d98ad72d7274c41f02c0ed1b
[ "MIT" ]
null
null
null
bomber_monkey/features/bomb/explosion.py
MonkeyPatchIo/bomber-monkey
8a351ef1a0ef18e9d98ad72d7274c41f02c0ed1b
[ "MIT" ]
null
null
null
from enum import IntEnum from python_ecs.ecs import Component class ExplosionDirection(IntEnum): UP = 1 LEFT = 2 RIGHT = 4 DOWN = 8 ALL = UP | LEFT | RIGHT | DOWN @staticmethod def opposed(direction: 'ExplosionDirection'): if direction == ExplosionDirection.UP: return...
27.235294
74
0.653348
from enum import IntEnum from python_ecs.ecs import Component class ExplosionDirection(IntEnum): UP = 1 LEFT = 2 RIGHT = 4 DOWN = 8 ALL = UP | LEFT | RIGHT | DOWN @staticmethod def opposed(direction: 'ExplosionDirection'): if direction == ExplosionDirection.UP: return...
true
true
1c48221e622c65c1bec23b30d4231c02a9a6600d
751
py
Python
setup.py
Tynukua/getManga
8cc5b090ec3dfcc6cfa7db3ce9e5220e7ef54d2b
[ "MIT" ]
3
2021-05-24T07:38:20.000Z
2022-03-30T14:47:23.000Z
setup.py
Tynukua/getManga
8cc5b090ec3dfcc6cfa7db3ce9e5220e7ef54d2b
[ "MIT" ]
1
2021-03-17T08:59:44.000Z
2021-03-17T08:59:44.000Z
setup.py
Tynukua/getManga
8cc5b090ec3dfcc6cfa7db3ce9e5220e7ef54d2b
[ "MIT" ]
1
2019-07-02T20:00:54.000Z
2019-07-02T20:00:54.000Z
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name = 'getmanga', version="0.1.6", author="Tynukua", author_email = 'tynuk.ua@gmail.com', description = 'package for load manga! :)', long_description=long_description, long_descript...
27.814815
50
0.617843
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name = 'getmanga', version="0.1.6", author="Tynukua", author_email = 'tynuk.ua@gmail.com', description = 'package for load manga! :)', long_description=long_description, long_descript...
true
true
1c4822a66e7bd46682a2b852d9f477c93c5099e2
736
py
Python
config/goalpost_default.py
ieu-acm/varipy
55e12c9f854ab0b568495d9bf682476ad182a88b
[ "MIT" ]
null
null
null
config/goalpost_default.py
ieu-acm/varipy
55e12c9f854ab0b568495d9bf682476ad182a88b
[ "MIT" ]
null
null
null
config/goalpost_default.py
ieu-acm/varipy
55e12c9f854ab0b568495d9bf682476ad182a88b
[ "MIT" ]
null
null
null
""" Project configuration parameters """ from imgaug import augmenters as iaa class config: path = "data" # Relative to home directory of repository, # includes "masked" and "original" sub-directories input_shape = (256,256,3) num_workers = 2 val_ratio = 0.2 weights_path = "we...
26.285714
68
0.607337
from imgaug import augmenters as iaa class config: path = "data" input_shape = (256,256,3) num_workers = 2 val_ratio = 0.2 weights_path = "weights" epochs = 50 batch_size = 16 train_transforms = iaa.Sequential([ iaa.Crop(px=(1,16),keep_size=False), ...
true
true
1c482301e0d3e00345447ebf90bd35859d42c3d2
2,271
py
Python
canella/config.py
mush42/Canella-CMS
b5132c271a3b8840f0b165c62d14de6853a3e5ac
[ "MIT" ]
8
2017-01-30T22:46:40.000Z
2018-03-30T21:35:28.000Z
canella/config.py
mush42/Canella-CMS
b5132c271a3b8840f0b165c62d14de6853a3e5ac
[ "MIT" ]
null
null
null
canella/config.py
mush42/Canella-CMS
b5132c271a3b8840f0b165c62d14de6853a3e5ac
[ "MIT" ]
2
2018-01-16T10:31:27.000Z
2020-10-01T19:49:10.000Z
import os from collections import OrderedDict from canella import app from canella.babel import lazy_gettext _BASEDIR = app.root_path HOME_SLUG = 'index' DB_DIR = os.path.join(_BASEDIR, '..', '.ignore.local', 'data.db') DEBUG = True SECRET_KEY = '9bW7b2046be56b4c00b6f10dc2f3c4Ae56SL5PC9' SQLALCHEMY_DATABASE_URI = "s...
39.842105
111
0.72303
import os from collections import OrderedDict from canella import app from canella.babel import lazy_gettext _BASEDIR = app.root_path HOME_SLUG = 'index' DB_DIR = os.path.join(_BASEDIR, '..', '.ignore.local', 'data.db') DEBUG = True SECRET_KEY = '9bW7b2046be56b4c00b6f10dc2f3c4Ae56SL5PC9' SQLALCHEMY_DATABASE_URI = "s...
true
true
1c4823a2bf4002b2e4471898f081ed69d54fd15f
29,184
py
Python
magnum/db/sqlalchemy/api.py
jflower154/magnum
2b0b3f3e4c9888ff323d4be5cb9b3e97fde4a67a
[ "Apache-2.0" ]
null
null
null
magnum/db/sqlalchemy/api.py
jflower154/magnum
2b0b3f3e4c9888ff323d4be5cb9b3e97fde4a67a
[ "Apache-2.0" ]
null
null
null
magnum/db/sqlalchemy/api.py
jflower154/magnum
2b0b3f3e4c9888ff323d4be5cb9b3e97fde4a67a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
38.654305
79
0.636273
from oslo_db import exception as db_exc from oslo_db.sqlalchemy import session as db_session from oslo_db.sqlalchemy import utils as db_utils from oslo_log import log from oslo_utils import importutils from oslo_utils import strutils from oslo_utils import timeutils from oslo_utils import uuidutils import sqlalchemy ...
true
true
1c4823f0ebe1ed95a32f25d097316665a3c42efe
11,938
py
Python
official/nlp/modeling/networks/bert_encoder.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
82,518
2016-02-05T12:07:23.000Z
2022-03-31T23:09:47.000Z
official/nlp/modeling/networks/bert_encoder.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
9,021
2016-03-08T01:02:05.000Z
2022-03-31T08:06:35.000Z
official/nlp/modeling/networks/bert_encoder.py
62theories/tf-flask
c6954f0f3c4082165c92c77bb06d2fec6e75a8c4
[ "Apache-2.0" ]
54,341
2016-02-06T17:19:55.000Z
2022-03-31T10:27:44.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.793333
80
0.714609
from absl import logging import tensorflow as tf from official.nlp.modeling import layers @tf.keras.utils.register_keras_serializable(package='Text') class BertEncoder(tf.keras.Model): def __init__( self, vocab_size, hidden_size=768, num_layers=12, num_attention_heads=12, max...
true
true
1c4824ef58155a24d3da7e3337113da8189f354b
1,975
py
Python
day03/main.py
thetwoj/advent-of-code-2021
87a918e1f8973e3a9e5238248043ec27338939de
[ "MIT" ]
null
null
null
day03/main.py
thetwoj/advent-of-code-2021
87a918e1f8973e3a9e5238248043ec27338939de
[ "MIT" ]
null
null
null
day03/main.py
thetwoj/advent-of-code-2021
87a918e1f8973e3a9e5238248043ec27338939de
[ "MIT" ]
null
null
null
def get_input(filename): data = [] with open(filename, 'r') as i: for x in i.readlines(): data.append(x.strip()) return data def find_gamma_epsilon(report): digit_counts = {} binary_gamma = "" for line in report: for index, letter in enumerate(line): if ...
25.320513
59
0.517975
def get_input(filename): data = [] with open(filename, 'r') as i: for x in i.readlines(): data.append(x.strip()) return data def find_gamma_epsilon(report): digit_counts = {} binary_gamma = "" for line in report: for index, letter in enumerate(line): if ...
true
true
1c4825ac328df0f6c85d36f015aea32324491bf9
2,660
py
Python
pysnmp/MWORKS-E-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MWORKS-E-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MWORKS-E-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module MWORKS-E-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MWORKS-E-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:06:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
95
505
0.749624
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.impo...
true
true
1c48263cc96b9da7e221dfd293fac9cea7534f3f
351
py
Python
apps/authentication/migrations/0018_merge.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
apps/authentication/migrations/0018_merge.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
apps/authentication/migrations/0018_merge.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-30 19:25 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('authentication', '0014_auto_20151214_0117'), ('authentication', '0017_auto_20160128_1719'), ...
20.647059
54
0.675214
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('authentication', '0014_auto_20151214_0117'), ('authentication', '0017_auto_20160128_1719'), ] operations = [ ]
true
true