hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f748000f38c3e96377d06c1b7eafbe6ab67c0bef
3,795
py
Python
napari/layers/labels/_labels_utils.py
marlene09/napari
d3284b5df2efc0fad2664f954cbc52cca9daa105
[ "BSD-3-Clause" ]
null
null
null
napari/layers/labels/_labels_utils.py
marlene09/napari
d3284b5df2efc0fad2664f954cbc52cca9daa105
[ "BSD-3-Clause" ]
null
null
null
napari/layers/labels/_labels_utils.py
marlene09/napari
d3284b5df2efc0fad2664f954cbc52cca9daa105
[ "BSD-3-Clause" ]
null
null
null
from functools import lru_cache import numpy as np def interpolate_coordinates(old_coord, new_coord, brush_size): """Interpolates coordinates depending on brush size. Useful for ensuring painting is continuous in labels layer. Parameters ---------- old_coord : np.ndarray, 1x2 Last posit...
27.904412
77
0.63004
from functools import lru_cache import numpy as np def interpolate_coordinates(old_coord, new_coord, brush_size): num_step = round( max(abs(np.array(new_coord) - np.array(old_coord))) / brush_size * 4 ) coords = [ np.linspace(old_coord[i], new_coord[i], num=int(num_step + 1)) for ...
true
true
f74800bc48577f33020d83a9047e81505032d809
126
py
Python
copilot/admin.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
null
null
null
copilot/admin.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
3
2022-03-10T21:40:58.000Z
2022-03-15T02:14:50.000Z
copilot/admin.py
Feudo-Laranja-ave-do-paraiso-DS-2021-2/copilot-api
3f8c64cc2fafab1902dcd37f624fcff93f9494aa
[ "MIT" ]
null
null
null
from .models import Profile, Group from django.contrib import admin admin.site.register(Profile) admin.site.register(Group)
18
34
0.809524
from .models import Profile, Group from django.contrib import admin admin.site.register(Profile) admin.site.register(Group)
true
true
f74800d965c05a758bceca57982086dca892fdf5
5,127
py
Python
infra/config/scripts/tests/milestones_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
infra/config/scripts/tests/milestones_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
infra/config/scripts/tests/milestones_integration_test.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
#!/usr/bin/env vpython3 # Copyright 2020 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. """Integration test for milestones.py""" import json import os import subprocess import tempfile import textwrap import unittest INF...
31.262195
80
0.566218
import json import os import subprocess import tempfile import textwrap import unittest INFRA_CONFIG_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..')) MILESTONES_PY = os.path.join(INFRA_CONFIG_DIR, 'scripts', 'milestones.py') class MilestonesIntgrationTest(unittest.TestCase): def setUp(self): ...
true
true
f74801a1f3e15a264dc5fa6a5b5d7b1488adc8ca
324
py
Python
eve_swagger/__init__.py
D-stefaang/eve-swagger
23df53ad17f15a6e661ad7ae07733465b02471cf
[ "BSD-3-Clause" ]
103
2017-03-09T17:00:00.000Z
2022-02-22T00:19:29.000Z
eve_swagger/__init__.py
D-stefaang/eve-swagger
23df53ad17f15a6e661ad7ae07733465b02471cf
[ "BSD-3-Clause" ]
82
2017-03-08T08:27:11.000Z
2021-11-07T08:53:42.000Z
eve_swagger/__init__.py
D-stefaang/eve-swagger
23df53ad17f15a6e661ad7ae07733465b02471cf
[ "BSD-3-Clause" ]
45
2017-03-11T20:30:06.000Z
2022-01-26T12:55:01.000Z
# -*- coding: utf-8 -*- """ eve-swagger ~~~~~~~~~~~ swagger.io extension for Eve-powered REST APIs. :copyright: (c) 2015 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ from .swagger import get_swagger_blueprint, add_documentation # noqa from .definitions import INFO, HOST # n...
27
69
0.660494
from .swagger import get_swagger_blueprint, add_documentation from .definitions import INFO, HOST
true
true
f74801d2d44b8efedcfa54ee8db9e4424f39c51c
441
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/emails/tasks.py
marcosgabarda/cookiecutter-backend
1d509b95e60dcf36510e582c4251c2780b6a5c96
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/emails/tasks.py
marcosgabarda/cookiecutter-backend
1d509b95e60dcf36510e582c4251c2780b6a5c96
[ "BSD-3-Clause" ]
1
2021-06-01T22:46:28.000Z
2021-06-01T22:46:28.000Z
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/emails/tasks.py
marcosgabarda/cookiecutter-django-backend
1d509b95e60dcf36510e582c4251c2780b6a5c96
[ "BSD-3-Clause" ]
null
null
null
from celery.task import task from django.core.mail import EmailMultiAlternatives @task(serializer='json') def send_email_asynchronously(subject, message_txt, message, from_email, to): """Sends an email as a asynchronous task.""" email = EmailMultiAlternatives( subject=subject, body=message_txt...
27.5625
77
0.705215
from celery.task import task from django.core.mail import EmailMultiAlternatives @task(serializer='json') def send_email_asynchronously(subject, message_txt, message, from_email, to): email = EmailMultiAlternatives( subject=subject, body=message_txt, from_email=from_email, to=to ...
true
true
f74801f9c674e14b256db3eb764a33d36dc9aecb
873
py
Python
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
myproject/urls.py
felix13/django-signals
24e6b565b5db336e59ff51f41fa3980bc2b98f40
[ "MIT" ]
null
null
null
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
33.576923
77
0.701031
from django.contrib import admin from django.urls import path from mysite import views urlpatterns = [ path('admin/', admin.site.urls), path('', views.home, name = "home"), path('add_book', views.add_book, name="add_book"), ]
true
true
f748031d6a89bd0c601c9fcae7daf8df1de8f2d3
4,043
py
Python
amgut/handlers/base_handlers.py
fedarko/american-gut-web
9dbbbc49e6261f68fcbf18530137edc0d3073cd7
[ "BSD-3-Clause" ]
5
2015-02-10T18:01:12.000Z
2021-01-15T16:19:00.000Z
amgut/handlers/base_handlers.py
fedarko/american-gut-web
9dbbbc49e6261f68fcbf18530137edc0d3073cd7
[ "BSD-3-Clause" ]
346
2015-01-03T00:12:17.000Z
2019-11-20T00:51:16.000Z
amgut/handlers/base_handlers.py
fedarko/american-gut-web
9dbbbc49e6261f68fcbf18530137edc0d3073cd7
[ "BSD-3-Clause" ]
16
2015-11-10T21:53:52.000Z
2019-10-21T18:00:47.000Z
import logging from tornado.web import RequestHandler, StaticFileHandler from amgut import media_locale, text_locale from amgut.connections import ag_data from amgut.lib.config_manager import AMGUT_CONFIG from amgut.lib.mail import send_email class BaseHandler(RequestHandler): def get_current_user(self): ...
34.555556
78
0.60277
import logging from tornado.web import RequestHandler, StaticFileHandler from amgut import media_locale, text_locale from amgut.connections import ag_data from amgut.lib.config_manager import AMGUT_CONFIG from amgut.lib.mail import send_email class BaseHandler(RequestHandler): def get_current_user(self): ...
true
true
f74803eb6df96b8157cca39045da04e404aafe1c
5,752
py
Python
sdk/python/pulumi_aws/alb/target_group_attachment.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/alb/target_group_attachment.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/alb/target_group_attachment.py
johnktims/pulumi-aws
c838bc79043f5376c66fc66275a1e012edd3ab7d
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# 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 json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Target...
54.264151
312
0.700104
import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class TargetGroupAttachment(pulumi.CustomResource): availability_zone: pulumi.Output[str] port: pulumi.Output[float] target_group_arn: pulumi.Output[str] target_id: pulumi.Outpu...
true
true
f748041c14f442af2d068d35f84ec1299dc91699
869
py
Python
prune.py
quenda/icla.online
b641d4cf0a66c2b216e178a325eddba99ff246cc
[ "Apache-2.0" ]
null
null
null
prune.py
quenda/icla.online
b641d4cf0a66c2b216e178a325eddba99ff246cc
[ "Apache-2.0" ]
null
null
null
prune.py
quenda/icla.online
b641d4cf0a66c2b216e178a325eddba99ff246cc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import time import yaml now = time.time() cutoff = now - 86400 # One day ago yml = yaml.safe_load(open('config.yaml').read()) pdfdir = yml['storage']['pdf'] tokdir = yml['storage']['tokens'] rm = 0 if os.path.exists(pdfdir): for file in [x for x in os.listdir(pdfdir) if os.path....
27.15625
91
0.596087
import os import time import yaml now = time.time() cutoff = now - 86400 yml = yaml.safe_load(open('config.yaml').read()) pdfdir = yml['storage']['pdf'] tokdir = yml['storage']['tokens'] rm = 0 if os.path.exists(pdfdir): for file in [x for x in os.listdir(pdfdir) if os.path.isfile(os.path.join(pdfdir, x))]: ...
true
true
f74804789ecb03d60edf30be27c5110fd59c0ada
24,714
py
Python
detect_secrets/core/audit.py
pablosantiagolopez/detect-secrets
847b6255c47c4cb1838b026934d950473c21c656
[ "Apache-2.0" ]
null
null
null
detect_secrets/core/audit.py
pablosantiagolopez/detect-secrets
847b6255c47c4cb1838b026934d950473c21c656
[ "Apache-2.0" ]
null
null
null
detect_secrets/core/audit.py
pablosantiagolopez/detect-secrets
847b6255c47c4cb1838b026934d950473c21c656
[ "Apache-2.0" ]
null
null
null
import codecs import io import json import os import platform import sys import hashlib from builtins import input from collections import defaultdict from copy import deepcopy from functools import lru_cache from detect_secrets.core.baseline import merge_results from detect_secrets.core.bidirectional_iterator import ...
31.971539
141
0.612325
import codecs import io import json import os import platform import sys import hashlib from builtins import input from collections import defaultdict from copy import deepcopy from functools import lru_cache from detect_secrets.core.baseline import merge_results from detect_secrets.core.bidirectional_iterator import ...
true
true
f748047ad6e6ae4fc64e8be0e16a8a7bf138001f
5,176
py
Python
test/test_formulator.py
ari-bou/symro
b49a5578b4e1d95ab5ab92b06bfea2bc6ead2246
[ "MIT" ]
null
null
null
test/test_formulator.py
ari-bou/symro
b49a5578b4e1d95ab5ab92b06bfea2bc6ead2246
[ "MIT" ]
null
null
null
test/test_formulator.py
ari-bou/symro
b49a5578b4e1d95ab5ab92b06bfea2bc6ead2246
[ "MIT" ]
null
null
null
import symro import symro.src.mat as mat from symro.src.prob.problem import Problem from symro.src.parsing.amplparser import AMPLParser import symro.src.handlers.nodebuilder as nb import symro.src.handlers.formulator as frm from symro.test.test_util import * # Scripts # -----------------------------------------------...
33.61039
120
0.543277
import symro import symro.src.mat as mat from symro.src.prob.problem import Problem from symro.src.parsing.amplparser import AMPLParser import symro.src.handlers.nodebuilder as nb import symro.src.handlers.formulator as frm from symro.test.test_util import * SCRIPT = """ set I = 1..3; var x >= 0, <= 1; var y{I} ...
true
true
f748048e11eba1447a229011c8e17498e6ad158f
614
py
Python
abyss_filters/func_colorizer.py
CrackerCat/abyss
3d1e6bcd0b560d78503476dcb1e4868d649bfe05
[ "MIT" ]
1
2021-10-03T02:34:29.000Z
2021-10-03T02:34:29.000Z
abyss_filters/func_colorizer.py
CrackerCat/abyss
3d1e6bcd0b560d78503476dcb1e4868d649bfe05
[ "MIT" ]
null
null
null
abyss_filters/func_colorizer.py
CrackerCat/abyss
3d1e6bcd0b560d78503476dcb1e4868d649bfe05
[ "MIT" ]
null
null
null
from abyss import abyss_filter_t import ida_lines, ida_pro FUNC_NAMES = [ "memcpy", "memmove", "strcpy", "gets", "malloc", "free", "realloc", "sprintf", "system", "popen"] class funcname_colorizer_t(abyss_filter_t): """example filter which makes function names stand out visually""" def proc...
32.315789
98
0.643322
from abyss import abyss_filter_t import ida_lines, ida_pro FUNC_NAMES = [ "memcpy", "memmove", "strcpy", "gets", "malloc", "free", "realloc", "sprintf", "system", "popen"] class funcname_colorizer_t(abyss_filter_t): def process_text(self, vu): pc = vu.cfunc.get_pseudocode() for...
true
true
f74807782be2a8e1993721f107c34aec49215488
4,727
py
Python
helios/store/south_migrations/0002_auto__del_paymentoption.py
panosl/helios
22ceb736709aaa336def81d801797d72321a737e
[ "BSD-3-Clause" ]
2
2021-01-26T02:37:19.000Z
2021-12-02T14:15:22.000Z
helios/store/south_migrations/0002_auto__del_paymentoption.py
panosl/helios
22ceb736709aaa336def81d801797d72321a737e
[ "BSD-3-Clause" ]
null
null
null
helios/store/south_migrations/0002_auto__del_paymentoption.py
panosl/helios
22ceb736709aaa336def81d801797d72321a737e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'PaymentOption' db.delete_table('store_paymentoption') # Removing M2M table for fi...
59.835443
170
0.57838
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.delete_table('store_paymentoption') db.delete_table('store_paymentoption_supported_countries') def back...
true
true
f74808f86465a20c4679b7184c4e8f169bc055ca
15,100
py
Python
code/pygame_ess.py
benwoo1110/cryptography-GUI
72d22e17c4a378212b4bd6bc624b3f74017bcfeb
[ "MIT" ]
2
2020-06-16T15:12:06.000Z
2022-01-14T08:59:59.000Z
code/pygame_ess.py
benwoo1110/cryptography-GUI
72d22e17c4a378212b4bd6bc624b3f74017bcfeb
[ "MIT" ]
null
null
null
code/pygame_ess.py
benwoo1110/cryptography-GUI
72d22e17c4a378212b4bd6bc624b3f74017bcfeb
[ "MIT" ]
null
null
null
# This file is part of Cryptography GUI, licensed under the MIT License. # Copyright (c) 2020 Benedict Woo Jun Kai # See LICENSE.md for more details. ###################################### # Import and initialize the librarys # ###################################### import logging import pygame import glob import os ...
42.296919
218
0.551258
if object.type == 'textfield': pygame_ess.load.text(surface, object) def objects(surface, objects:dict, names:list) -> None: for name in names: try: pygame_ess.load.object(surface, objects[name]) ...
true
true
f7480ba9776d0e1fc5de07cb9379f595d22a0fed
4,174
py
Python
server/services/messaging/smtp_service.py
wildintellect/tasking-manager
373fb231404628e6ae9a1838539b9c3cb23ad73c
[ "BSD-2-Clause" ]
1
2021-08-11T03:03:21.000Z
2021-08-11T03:03:21.000Z
server/services/messaging/smtp_service.py
wildintellect/tasking-manager
373fb231404628e6ae9a1838539b9c3cb23ad73c
[ "BSD-2-Clause" ]
3
2021-02-02T23:00:30.000Z
2021-06-02T02:53:49.000Z
server/services/messaging/smtp_service.py
wildintellect/tasking-manager
373fb231404628e6ae9a1838539b9c3cb23ad73c
[ "BSD-2-Clause" ]
null
null
null
import smtplib import urllib.parse from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from itsdangerous import URLSafeTimedSerializer from flask import current_app from server.services.messaging.template_service import get_template, get_profile_url class SMTPService: @staticmet...
39.752381
113
0.702683
import smtplib import urllib.parse from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from itsdangerous import URLSafeTimedSerializer from flask import current_app from server.services.messaging.template_service import get_template, get_profile_url class SMTPService: @staticmet...
true
true
f7480bc382d7cd9fb90f032ac5190884c99448fd
469
py
Python
feedback_survey/migrations/0015_feedback_name.py
mushahid54/feedback_survey
a568008f0717b52649010286e55e242f083734be
[ "MIT" ]
null
null
null
feedback_survey/migrations/0015_feedback_name.py
mushahid54/feedback_survey
a568008f0717b52649010286e55e242f083734be
[ "MIT" ]
null
null
null
feedback_survey/migrations/0015_feedback_name.py
mushahid54/feedback_survey
a568008f0717b52649010286e55e242f083734be
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-10 17:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('feedback_survey', '0014_auto_20170510_1717'), ] operations = [ migrations.A...
22.333333
62
0.624733
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('feedback_survey', '0014_auto_20170510_1717'), ] operations = [ migrations.AddField( model_name='feedback', name='name', ...
true
true
f7480c112a99a1c6f2bc069cef3af7a96941b6bc
1,039
py
Python
main/templatetags/profile_thumbnail.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
39
2015-06-10T23:18:07.000Z
2021-10-21T04:29:06.000Z
main/templatetags/profile_thumbnail.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
2
2016-08-22T12:38:10.000Z
2017-01-26T18:37:33.000Z
main/templatetags/profile_thumbnail.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
26
2015-06-10T22:09:15.000Z
2021-06-27T15:45:15.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
39.961538
101
0.744947
from django import template from social.apps.django_app.default.models import UserSocialAuth register = template.Library() @register.filter(name='profile_thumbnail') def youtube_embed_url(user): try: return UserSocialAuth.get_social_auth('google-oauth2',user.email).extra_data['image'...
true
true
f7480c11bdf1544d1f0c88773a2875ac5a35d264
660
py
Python
send_email_file.py
jcsumlin/weather-bot
e6c23195bdcf0d1c32dbbd568f4d04c2c00ae19f
[ "MIT" ]
null
null
null
send_email_file.py
jcsumlin/weather-bot
e6c23195bdcf0d1c32dbbd568f4d04c2c00ae19f
[ "MIT" ]
null
null
null
send_email_file.py
jcsumlin/weather-bot
e6c23195bdcf0d1c32dbbd568f4d04c2c00ae19f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Apr 17 18:15:59 2018 @author: Chat """ import smtplib def sendemail(from_addr, to_addr_list, cc_addr_list, subject, message, login, password, smtpserver='smtp.gmail.com:587'): header = 'From: %s\n' % from_addr header += 'To: %s\n' % ','.join(to_a...
25.384615
122
0.624242
import smtplib def sendemail(from_addr, to_addr_list, cc_addr_list, subject, message, login, password, smtpserver='smtp.gmail.com:587'): header = 'From: %s\n' % from_addr header += 'To: %s\n' % ','.join(to_addr_list) header += 'Cc: %s\n' % ','.join(cc_addr_list) header += 'Subject: %s...
true
true
f7480c148b363a327b9b57b539cef2e581117243
23
py
Python
snpy/tspack/__init__.py
emirkmo/snpy
2a0153c84477ba8a30310d7dbca3d5a8f24de3c6
[ "MIT" ]
6
2019-01-14T19:40:45.000Z
2021-06-05T12:19:39.000Z
snpy/tspack/__init__.py
emirkmo/snpy
2a0153c84477ba8a30310d7dbca3d5a8f24de3c6
[ "MIT" ]
3
2017-04-25T20:06:22.000Z
2021-06-09T20:46:41.000Z
snpy/tspack/__init__.py
emirkmo/snpy
2a0153c84477ba8a30310d7dbca3d5a8f24de3c6
[ "MIT" ]
8
2017-04-25T19:57:57.000Z
2021-11-12T11:54:19.000Z
from .tspline import *
11.5
22
0.73913
from .tspline import *
true
true
f7480c604957f714d0a041248410576cb63e4f34
15,737
py
Python
gpgrouper/cli.py
asalt/gpgrouper
88c8d1187efd7d258b87abf615565e632c5bea9c
[ "BSD-3-Clause" ]
null
null
null
gpgrouper/cli.py
asalt/gpgrouper
88c8d1187efd7d258b87abf615565e632c5bea9c
[ "BSD-3-Clause" ]
null
null
null
gpgrouper/cli.py
asalt/gpgrouper
88c8d1187efd7d258b87abf615565e632c5bea9c
[ "BSD-3-Clause" ]
1
2021-12-03T18:36:45.000Z
2021-12-03T18:36:45.000Z
from __future__ import print_function import os import sys import re import shutil import six if six.PY3: from itertools import zip_longest from configparser import ConfigParser elif six.PY2: from itertools import izip_longest as zip_longest from ConfigParser import ConfigParser from getpass import ge...
27.657293
113
0.615556
from __future__ import print_function import os import sys import re import shutil import six if six.PY3: from itertools import zip_longest from configparser import ConfigParser elif six.PY2: from itertools import izip_longest as zip_longest from ConfigParser import ConfigParser from getpass import ge...
true
true
f7480d11a96a5cf7bbe5e21378b0980c4fdc0fc6
179,463
py
Python
test/sql/test_metadata.py
aathan/sqlalchemy
d4c535ee0e7f36f745a336478baec708dec96bc5
[ "MIT" ]
null
null
null
test/sql/test_metadata.py
aathan/sqlalchemy
d4c535ee0e7f36f745a336478baec708dec96bc5
[ "MIT" ]
null
null
null
test/sql/test_metadata.py
aathan/sqlalchemy
d4c535ee0e7f36f745a336478baec708dec96bc5
[ "MIT" ]
null
null
null
from contextlib import contextmanager import pickle import sqlalchemy as tsa from sqlalchemy import ARRAY from sqlalchemy import bindparam from sqlalchemy import BLANK_SCHEMA from sqlalchemy import Boolean from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import column from sqlalchem...
31.808401
79
0.542362
from contextlib import contextmanager import pickle import sqlalchemy as tsa from sqlalchemy import ARRAY from sqlalchemy import bindparam from sqlalchemy import BLANK_SCHEMA from sqlalchemy import Boolean from sqlalchemy import CheckConstraint from sqlalchemy import Column from sqlalchemy import column from sqlalchem...
true
true
f7480ddf94bb276b8220ab9d231ace90f99753f1
13,315
py
Python
allennlp/tools/wikitables_evaluator.py
tony-tong-punchh/allennlp
9a13ab570025a0c1659986009d2abddb2e652020
[ "Apache-2.0" ]
24
2019-09-16T00:10:54.000Z
2021-09-08T19:31:51.000Z
allennlp/tools/wikitables_evaluator.py
DreamerDeo/allennlp
81ae012e1aec7eb5541be613101f1fb48a96b639
[ "Apache-2.0" ]
2
2019-09-13T09:36:40.000Z
2019-09-17T20:49:31.000Z
allennlp/tools/wikitables_evaluator.py
DreamerDeo/allennlp
81ae012e1aec7eb5541be613101f1fb48a96b639
[ "Apache-2.0" ]
10
2019-12-06T11:32:37.000Z
2022-01-06T15:39:09.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is the official evaluator taken from the original dataset. I made minimal changes to make it Python 3 compatible, and conform to our style guidelines. """ #Official Evaluator for WikiTableQuestions Dataset # #There are 3 value types #1. String (unicode) #2. Numbe...
33.2875
103
0.592415
ersion__ = '1.0.2' import sys import os import re import argparse import unicodedata from codecs import open as codecs_open from math import isnan, isinf from abc import ABCMeta, abstractmethod ### Value Types ################ class Value(object): __metaclass__ = ABCMeta #...
true
true
f7480e0ec5fba9f374d6f78289ebdcad359752bb
1,111
py
Python
lab1/lab1a.py
emiliska/python-farms
88efb1af1c7e23cf24f1217479d8ab25a2c7da66
[ "MIT" ]
null
null
null
lab1/lab1a.py
emiliska/python-farms
88efb1af1c7e23cf24f1217479d8ab25a2c7da66
[ "MIT" ]
null
null
null
lab1/lab1a.py
emiliska/python-farms
88efb1af1c7e23cf24f1217479d8ab25a2c7da66
[ "MIT" ]
null
null
null
# Triple-quoted string to output personal information print('Programmer: NAME', 'Course: COSC146, Winter 2019', 'Lab#: 1, part#1', 'Due date: 1-16-2019', sep='\n') # Print "Roses are Red" to console print('\nRoses are Red\n') # Print Poem with Border border = '+++++++++++++++++++++++++++' poem = '+ Ros...
27.775
128
0.50225
print('Programmer: NAME', 'Course: COSC146, Winter 2019', 'Lab#: 1, part#1', 'Due date: 1-16-2019', sep='\n') print('\nRoses are Red\n') border = '+++++++++++++++++++++++++++' poem = '+ Roses are red +\n+ Violets are blue +\n+ "Chocolate" is better +\n+ By a \'pound\' or two!! +'...
true
true
f7480e74b0c8a031f75ac531d921a2e685805f9d
5,785
py
Python
docs/conf.py
harrydrippin/aiortc
1e72b9a752b0c807316cd0bea2c26c7ae00ecdf4
[ "BSD-3-Clause" ]
1
2021-07-23T09:44:11.000Z
2021-07-23T09:44:11.000Z
docs/conf.py
harrydrippin/aiortc
1e72b9a752b0c807316cd0bea2c26c7ae00ecdf4
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
harrydrippin/aiortc
1e72b9a752b0c807316cd0bea2c26c7ae00ecdf4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aiortc documentation build configuration file, created by # sphinx-quickstart on Thu Feb 8 17:22:14 2018. # # 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 # aut...
28.219512
84
0.67675
import sys, os sys.path.insert(0, os.path.abspath('..')) class MockLib: ssrc_undefined = 0 ssrc_specific = 1 ssrc_any_inbound = 2 ssrc_any_outbound = 3 def srtp_init(self): pass class MockBinding: ffi = None lib = MockLib() class MockOpus: ffi = None ...
true
true
f7480ea3e2352ab1e906ab080dd3797cccdfe366
1,606
py
Python
bw_recipe_2016/strategies/names.py
marc-vdm/bw_recipe_2016
ddbb96eba3e7de5cdd16961c19200b9f5f98e3a3
[ "BSD-3-Clause" ]
4
2020-12-07T11:37:15.000Z
2022-03-15T14:29:41.000Z
bw_recipe_2016/strategies/names.py
marc-vdm/bw_recipe_2016
ddbb96eba3e7de5cdd16961c19200b9f5f98e3a3
[ "BSD-3-Clause" ]
8
2020-06-02T14:13:35.000Z
2022-03-11T14:33:58.000Z
bw_recipe_2016/strategies/names.py
marc-vdm/bw_recipe_2016
ddbb96eba3e7de5cdd16961c19200b9f5f98e3a3
[ "BSD-3-Clause" ]
3
2021-05-19T09:51:24.000Z
2022-03-11T13:51:16.000Z
SUBSTITUTIONS = { "ODP20": ("Stratospheric Ozone Depletion", "20 year timescale"), "ODP100": ("Stratospheric Ozone Depletion", "100 year timescale"), "ODPinfinite": ("Stratospheric Ozone Depletion", "Infinite timescale"), "EOFP": ("Ozone Formation", "Damage to Ecosystems"), "HOFP": ("Ozone Formation...
37.348837
75
0.56787
SUBSTITUTIONS = { "ODP20": ("Stratospheric Ozone Depletion", "20 year timescale"), "ODP100": ("Stratospheric Ozone Depletion", "100 year timescale"), "ODPinfinite": ("Stratospheric Ozone Depletion", "Infinite timescale"), "EOFP": ("Ozone Formation", "Damage to Ecosystems"), "HOFP": ("Ozone Formation...
true
true
f7480f0ab25a7f10562fdd0628e41cc61d4b0aba
405
py
Python
pointpillars_with_TANet/second/toy_example/instance_check.py
mjseong0414/TANet
830baa699c990f3f52baa062ab7b196825bf128e
[ "MIT" ]
null
null
null
pointpillars_with_TANet/second/toy_example/instance_check.py
mjseong0414/TANet
830baa699c990f3f52baa062ab7b196825bf128e
[ "MIT" ]
null
null
null
pointpillars_with_TANet/second/toy_example/instance_check.py
mjseong0414/TANet
830baa699c990f3f52baa062ab7b196825bf128e
[ "MIT" ]
null
null
null
import sys import os label_path = "/home/minjae/TANet/pointpillars_with_TANet/second/data/JRDB_to_KITTI/training/label_2/" label_lists = os.listdir(label_path) instance_counts = 0 #import pdb; pdb.set_trace() for i in label_lists: with open(label_path + i,"r") as f: instance_counts += len(f.readlines()) p...
33.75
101
0.745679
import sys import os label_path = "/home/minjae/TANet/pointpillars_with_TANet/second/data/JRDB_to_KITTI/training/label_2/" label_lists = os.listdir(label_path) instance_counts = 0 for i in label_lists: with open(label_path + i,"r") as f: instance_counts += len(f.readlines()) print("The mean of instances ...
true
true
f7480f3e539e6a5a37c384afe5dfd090218811f7
21,016
py
Python
test/test_gmail/test_gmail.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
null
null
null
test/test_gmail/test_gmail.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
2
2021-11-24T19:39:57.000Z
2022-01-03T23:03:35.000Z
test/test_gmail/test_gmail.py
cmc333333/parsons
50804a3627117797570f1e9233c9bbad583f7831
[ "Apache-2.0" ]
null
null
null
from parsons.notifications.gmail import Gmail import json import os import requests_mock import unittest import shutil import base64 import email _dir = os.path.dirname(__file__) class TestGmail(unittest.TestCase): @requests_mock.Mocker() def setUp(self, m): self.tmp_folder = "tmp/" self.cr...
38.774908
95
0.589551
from parsons.notifications.gmail import Gmail import json import os import requests_mock import unittest import shutil import base64 import email _dir = os.path.dirname(__file__) class TestGmail(unittest.TestCase): @requests_mock.Mocker() def setUp(self, m): self.tmp_folder = "tmp/" self.cr...
true
true
f748103d13d72b40d6d0c12d1125957844b4ce58
47,988
py
Python
pyboto3/elasticsearchservice.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
pyboto3/elasticsearchservice.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
pyboto3/elasticsearchservice.py
thecraftman/pyboto3
653a0db2b00b06708334431da8f169d1f7c7734f
[ "MIT" ]
null
null
null
''' The MIT License (MIT) Copyright (c) 2016 WavyCloud Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p...
53.498328
940
0.644536
def add_tags(ARN=None, TagList=None): pass def can_paginate(operation_name=None): pass def create_elasticsearch_domain(DomainName=None, ElasticsearchVersion=None, ElasticsearchClusterConfig=None, EBSOptions=None, AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None): pass def delete_elasticse...
true
true
f74810a2076267aa0825a357ebfb6eac4aa810fe
2,727
py
Python
src/bfgs.py
LouisDumont/Projet-Opti-Controle
7dd9346759e55c62b604ce423c29040b51d83384
[ "MIT" ]
null
null
null
src/bfgs.py
LouisDumont/Projet-Opti-Controle
7dd9346759e55c62b604ce423c29040b51d83384
[ "MIT" ]
null
null
null
src/bfgs.py
LouisDumont/Projet-Opti-Controle
7dd9346759e55c62b604ce423c29040b51d83384
[ "MIT" ]
null
null
null
#!/usr/bin/python import numpy as np from numpy.linalg import norm from time import process_time from .wolfe_skel import * from .visualize import visualize # Resolution d'un probleme d'optimisation sans contrainte # Methode pseudo-newtonienne: BFGS def bfgs(oracle, x0, iter_max = 5000, threshold = 0.000001, visual=...
33.666667
118
0.644664
import numpy as np from numpy.linalg import norm from time import process_time from .wolfe_skel import * from .visualize import visualize def bfgs(oracle, x0, iter_max = 5000, threshold = 0.000001, visual=True, verbose=False): gradient_norm_list = [] gradient_step_list = [] loss_list = [] ...
true
true
f7481282b776f4b639979e15fb935da368d1eb0a
1,150
py
Python
addons14/hr_timesheet_task_domain/models/account_analytic_line.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-06-10T14:59:13.000Z
2021-06-10T14:59:13.000Z
addons14/hr_timesheet_task_domain/models/account_analytic_line.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
null
null
null
addons14/hr_timesheet_task_domain/models/account_analytic_line.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-04-09T09:44:44.000Z
2021-04-09T09:44:44.000Z
# Copyright 2016 Tecnativa - Antonio Espinosa # Copyright 2016 Tecnativa - Sergio Teruel # Copyright 2016-2018 Tecnativa - Pedro M. Baeza # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountAnalyticLine(...
35.9375
66
0.613043
from odoo import api, models class AccountAnalyticLine(models.Model): _inherit = "account.analytic.line" @api.onchange("project_id") def _onchange_project_id(self): task = self.task_id res = super()._onchange_project_id() if res is None: res = {} if self....
true
true
f74813257b9f8a4fa4195d3f33125e6a5d5cf912
4,627
py
Python
yeast/steps/custom_step.py
iuga/Yeast
8800c9df92121be5bbb89eaf30d800fdf274f260
[ "MIT" ]
null
null
null
yeast/steps/custom_step.py
iuga/Yeast
8800c9df92121be5bbb89eaf30d800fdf274f260
[ "MIT" ]
null
null
null
yeast/steps/custom_step.py
iuga/Yeast
8800c9df92121be5bbb89eaf30d800fdf274f260
[ "MIT" ]
null
null
null
from yeast.step import Step from yeast.errors import YeastValidationError class CustomStep(Step): """ Custom Step was designed to extend all the power of Yeast Pipelines and cover all scenarios where the Yeast steps are not adequate. You might need to define your own operations. You could define your ...
32.356643
100
0.643397
from yeast.step import Step from yeast.errors import YeastValidationError class CustomStep(Step): def __init__(self, to_prepare=None, to_bake=None, to_validate=None, role='all'): self.to_prepare = to_prepare self.to_bake = to_bake self.to_validate = to_validate super().__init__(nee...
true
true
f74813f2cdcf7184b6b6af1980de68b7f7c8dc03
4,021
py
Python
huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_sets_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_sets_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-dns/huaweicloudsdkdns/v2/model/update_record_sets_request.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six class UpdateRecordSetsRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the ...
25.611465
78
0.56379
import pprint import re import six class UpdateRecordSetsRequest: sensitive_list = [] openapi_types = { 'zone_id': 'str', 'recordset_id': 'str', 'body': 'UpdateRecordSetsReq' } attribute_map = { 'zone_id': 'zone_id', 'recordset_id': 'recordset_id', ...
true
true
f748151fc7bbc82f778dc126d0d5dd226e8a8728
1,770
py
Python
config/urls.py
NathanQ/flickr-gallery-django-site
1e917acb6b8d7097b4be947d52de8521ea798089
[ "MIT" ]
null
null
null
config/urls.py
NathanQ/flickr-gallery-django-site
1e917acb6b8d7097b4be947d52de8521ea798089
[ "MIT" ]
null
null
null
config/urls.py
NathanQ/flickr-gallery-django-site
1e917acb6b8d7097b4be947d52de8521ea798089
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url 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 urlpat...
40.227273
110
0.689266
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url 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 = [ url(r'^$'...
true
true
f748157be7668969e677156cca3cb3d368150b41
8,233
py
Python
moto/backend_index.py
linuxlewis/moto
e3fc799b95b223bbdf3713958807d1b77a5958f4
[ "Apache-2.0" ]
null
null
null
moto/backend_index.py
linuxlewis/moto
e3fc799b95b223bbdf3713958807d1b77a5958f4
[ "Apache-2.0" ]
1
2022-02-19T02:10:45.000Z
2022-02-19T02:15:52.000Z
moto/backend_index.py
ecumene/moto
c2dc11ddb1d6751523165a74585bfd21666027a6
[ "Apache-2.0" ]
null
null
null
# autogenerated by scripts/update_backend_index.py import re backend_url_patterns = [ ("acm", re.compile("https?://acm\\.(.+)\\.amazonaws\\.com")), ("apigateway", re.compile("https?://apigateway\\.(.+)\\.amazonaws.com")), ( "applicationautoscaling", re.compile("https?://application-autoscal...
53.116129
95
0.535406
import re backend_url_patterns = [ ("acm", re.compile("https?://acm\\.(.+)\\.amazonaws\\.com")), ("apigateway", re.compile("https?://apigateway\\.(.+)\\.amazonaws.com")), ( "applicationautoscaling", re.compile("https?://application-autoscaling\\.(.+)\\.amazonaws.com"), ), ("appsync...
true
true
f74815d760852b6e0b9e3cca39336b43486adaa9
18,358
py
Python
scripts/postProcessFiles.py
louism33/rl-starter-files
032a65ab583aff0dc75e14d2faa897be387a83d6
[ "MIT" ]
null
null
null
scripts/postProcessFiles.py
louism33/rl-starter-files
032a65ab583aff0dc75e14d2faa897be387a83d6
[ "MIT" ]
null
null
null
scripts/postProcessFiles.py
louism33/rl-starter-files
032a65ab583aff0dc75e14d2faa897be387a83d6
[ "MIT" ]
null
null
null
import argparse import collections import math import os import matplotlib.pyplot as plt import pandas as pd def my_plot_function(showGraph=False, x_axis="episodes", algo="ppo", env=''): masterDataFrameList = {} dfs = [] divBy = 0 avg = None for subdir, dirs, files in os.walk(os.path.join(storag...
31.926957
133
0.53301
import argparse import collections import math import os import matplotlib.pyplot as plt import pandas as pd def my_plot_function(showGraph=False, x_axis="episodes", algo="ppo", env=''): masterDataFrameList = {} dfs = [] divBy = 0 avg = None for subdir, dirs, files in os.walk(os.path.join(storag...
true
true
f74815db8dc8898220d8f4e7ee7804cc23b3f538
790
py
Python
class12-bonus/exercise3.py
papri-entropy/pyplus
9791fa6ee0b5414912594e20db0390f8a65c91fc
[ "MIT" ]
null
null
null
class12-bonus/exercise3.py
papri-entropy/pyplus
9791fa6ee0b5414912594e20db0390f8a65c91fc
[ "MIT" ]
null
null
null
class12-bonus/exercise3.py
papri-entropy/pyplus
9791fa6ee0b5414912594e20db0390f8a65c91fc
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ 3a. Create a new directory named "test_ex3". In this directory, create a file named "test_simple.py". In this file, write two simple functions "my_add" and "my_mul" which add two values together and multiply two values together respectively (and then return these values). 3b. Create two ...
37.619048
81
0.764557
true
true
f74815e8fe1acf0580d8f6e57bd76d58194451ce
4,209
py
Python
dvc/ignore.py
amisev/dvc
025de9aeb509a539d5560f82caf47e851162f4a2
[ "Apache-2.0" ]
null
null
null
dvc/ignore.py
amisev/dvc
025de9aeb509a539d5560f82caf47e851162f4a2
[ "Apache-2.0" ]
null
null
null
dvc/ignore.py
amisev/dvc
025de9aeb509a539d5560f82caf47e851162f4a2
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import os from dulwich.ignore import match_pattern, read_ignore_patterns from dvc.utils import relpath from dvc.utils.compat import cast_bytes from dvc.utils.fs import get_parent_dirs_up_to class DvcIgnoreFileHandler(object): def __init__(self, tree): self.tree = ...
30.5
78
0.647897
from __future__ import unicode_literals import os from dulwich.ignore import match_pattern, read_ignore_patterns from dvc.utils import relpath from dvc.utils.compat import cast_bytes from dvc.utils.fs import get_parent_dirs_up_to class DvcIgnoreFileHandler(object): def __init__(self, tree): self.tree = ...
true
true
f74815f4792f313cd05e9b805a92f91b31483dc1
1,086
py
Python
test/test_v1_filesystem_layout_constraints.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
7
2020-12-21T05:24:24.000Z
2022-02-12T20:55:32.000Z
test/test_v1_filesystem_layout_constraints.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
6
2020-09-16T07:23:34.000Z
2022-01-18T12:05:30.000Z
test/test_v1_filesystem_layout_constraints.py
metal-stack/metal-python
cdf40fa86d2b2944f9818cef1c6723b1eecc506e
[ "MIT" ]
null
null
null
# coding: utf-8 """ metal-api API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501 OpenAPI spec version: v0.15.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __futur...
26.487805
156
0.743094
from __future__ import absolute_import import unittest import metal_python from metal_python.models.v1_filesystem_layout_constraints import V1FilesystemLayoutConstraints from metal_python.rest import ApiException class TestV1FilesystemLayoutConstraints(unittest.TestCase): def setUp(self): pass ...
true
true
f74815fcc3c6c7a11a02d03841d2ded53566be91
20,299
py
Python
sdk/python/pulumi_azure_native/network/v20180701/vpn_site.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180701/vpn_site.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20180701/vpn_site.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...
47.206977
2,846
0.657569
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._inputs import * __all__ = ['VpnSiteArgs', 'VpnSite'] @pulumi.input_type class VpnSiteArgs: def __init__(__self__, *, ...
true
true
f74815fcde4203a11a23ff918d000e28845d7098
1,015
py
Python
search/search/captions/views.py
joshuafinkelstein/chimera-education
1930250a71cc787dea492a55883e53c4144897de
[ "Apache-2.0" ]
1
2020-02-02T18:28:45.000Z
2020-02-02T18:28:45.000Z
search/search/captions/views.py
joshuafinkelstein/chimera-education
1930250a71cc787dea492a55883e53c4144897de
[ "Apache-2.0" ]
5
2019-08-29T16:39:55.000Z
2022-02-18T09:23:43.000Z
search/search/captions/views.py
joshuafinkelstein/chimera-education
1930250a71cc787dea492a55883e53c4144897de
[ "Apache-2.0" ]
1
2020-02-02T18:29:22.000Z
2020-02-02T18:29:22.000Z
from captions.models import Caption from captions.serializers import CaptionSerializer, UserSerializer from rest_framework import generics from django.contrib.auth.models import User from rest_framework import permissions from captions.permissions import IsOwnerOrReadOnly class UserList(generics.ListAPIView): que...
31.71875
83
0.803941
from captions.models import Caption from captions.serializers import CaptionSerializer, UserSerializer from rest_framework import generics from django.contrib.auth.models import User from rest_framework import permissions from captions.permissions import IsOwnerOrReadOnly class UserList(generics.ListAPIView): que...
true
true
f7481863bc8175aa34b42a5a6b5bffaf8665067f
4,123
py
Python
examples/smbserver.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
null
null
null
examples/smbserver.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
null
null
null
examples/smbserver.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/env python # SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved. # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Simple SMB Server example. # # Author: # Alberto Sol...
40.821782
139
0.680087
import sys import argparse import logging from impacket.examples import logger from impacket import smbserver, version from impacket.ntlm import compute_lmhash, compute_nthash if __name__ == '__main__': print(version.BANNER) parser = argparse.ArgumentParser(add_help = True, description = "...
true
true
f748196e177ea1a9dd1704e44c6e2ff19a3ed52b
2,401
py
Python
buuctf/156-level5/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/156-level5/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/156-level5/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
from pwn import * from LibcSearcher import LibcSearcher import sys io = -1 ############################ #********修改文件名********** ############################ file_name = 'level3_x64' port = 27974 ###########修改宏########### DEBUG = 1 LOG_PRINT = 1 TMUX = 0 def LOG_ADDR_SUCCESS(name:str, addr:int): ''' 打印地址 ...
22.650943
76
0.586422
from pwn import * from LibcSearcher import LibcSearcher import sys io = -1
true
true
f748197905c2de5e28a2309852dc97ea867fc8b8
3,960
py
Python
quix-backend/quix-modules/quix-python-module/src/main/resources/packages.py
heholek/quix
61d48c7b1657692d6727157c5e9c1ef81fac3125
[ "MIT" ]
null
null
null
quix-backend/quix-modules/quix-python-module/src/main/resources/packages.py
heholek/quix
61d48c7b1657692d6727157c5e9c1ef81fac3125
[ "MIT" ]
null
null
null
quix-backend/quix-modules/quix-python-module/src/main/resources/packages.py
heholek/quix
61d48c7b1657692d6727157c5e9c1ef81fac3125
[ "MIT" ]
null
null
null
class Packages: def __init__(self, dir, index_url, extra_url): self.dir = dir self.index_url = index_url self.extra_url = extra_url def __get_installed_packages(self): try: with open(self.dir + '/packages') as f: return f.read().split(' ') ex...
37.358491
125
0.548232
class Packages: def __init__(self, dir, index_url, extra_url): self.dir = dir self.index_url = index_url self.extra_url = extra_url def __get_installed_packages(self): try: with open(self.dir + '/packages') as f: return f.read().split(' ') ex...
true
true
f7481b1f82e69e61bcac214242e583154bd7b7cc
36
py
Python
j4j_spawner/__init__.py
FZJ-JSC/jupyter-jsc-jupyterhub-collection
3fbb83da6e356df57bbdd24269157944f7fcd2a5
[ "BSD-3-Clause" ]
null
null
null
j4j_spawner/__init__.py
FZJ-JSC/jupyter-jsc-jupyterhub-collection
3fbb83da6e356df57bbdd24269157944f7fcd2a5
[ "BSD-3-Clause" ]
null
null
null
j4j_spawner/__init__.py
FZJ-JSC/jupyter-jsc-jupyterhub-collection
3fbb83da6e356df57bbdd24269157944f7fcd2a5
[ "BSD-3-Clause" ]
null
null
null
from .j4j_spawner import J4J_Spawner
36
36
0.888889
from .j4j_spawner import J4J_Spawner
true
true
f7481b652120f75b206ed510ced37571fb2160e7
1,208
py
Python
test/functional/rpcnamedargs.py
wolfoxonly/qqc
807e67ba65b555ab38a655ae4823fa9af2ae3bc4
[ "MIT" ]
null
null
null
test/functional/rpcnamedargs.py
wolfoxonly/qqc
807e67ba65b555ab38a655ae4823fa9af2ae3bc4
[ "MIT" ]
null
null
null
test/functional/rpcnamedargs.py
wolfoxonly/qqc
807e67ba65b555ab38a655ae4823fa9af2ae3bc4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The QQcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test using named arguments for RPCs.""" from test_framework.test_framework import QQcoinTestFramework f...
34.514286
101
0.678808
from test_framework.test_framework import QQcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class NamedArgumentTest(QQcoinTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): node = self.nodes[0] h =...
true
true
f7481b69180922ea9eeeb10dc5f9d64e3ca0b530
884
bzl
Python
layers/ubuntu1604/gcloud/revisions.bzl
jpoehnelt/layer-definitions
175699becc7a185c389c2c8109bc630139bdd454
[ "Apache-2.0" ]
null
null
null
layers/ubuntu1604/gcloud/revisions.bzl
jpoehnelt/layer-definitions
175699becc7a185c389c2c8109bc630139bdd454
[ "Apache-2.0" ]
null
null
null
layers/ubuntu1604/gcloud/revisions.bzl
jpoehnelt/layer-definitions
175699becc7a185c389c2c8109bc630139bdd454
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.181818
98
0.772624
DEBS_TARBALL = struct( revision = "1585064001", sha256 = "12248f3acb58c4067242457bdaabdb4a79e8b38ee0bcc3fa7f758c3d3ce231b2", )
true
true
f7481bde34299bc0baaa41dde2c068ed75488ed7
1,014
py
Python
model.py
Nilesh-Das/SalaryPredictor
99fa6cb82657457d88d07a52525e507518f5b279
[ "MIT" ]
null
null
null
model.py
Nilesh-Das/SalaryPredictor
99fa6cb82657457d88d07a52525e507518f5b279
[ "MIT" ]
null
null
null
model.py
Nilesh-Das/SalaryPredictor
99fa6cb82657457d88d07a52525e507518f5b279
[ "MIT" ]
null
null
null
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd import pickle dataset = pd.read_csv('hiring.csv') dataset['experience'].fillna(0, inplace=True) dataset['test_score'].fillna(dataset['test_score'].mean(), inplace=True) X = dataset.iloc[:, :3] # Converting words to int...
26.684211
96
0.692308
import numpy as np import matplotlib.pyplot as plt import pandas as pd import pickle dataset = pd.read_csv('hiring.csv') dataset['experience'].fillna(0, inplace=True) dataset['test_score'].fillna(dataset['test_score'].mean(), inplace=True) X = dataset.iloc[:, :3] def convert_to_int(word): word_dict = {'one':...
true
true
f7481d7406370b2904206924837783a64d080c67
3,374
py
Python
python_solutions/CHAIN_INSPECTION/CHAIN_INSPECTION.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/CHAIN_INSPECTION/CHAIN_INSPECTION.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
python_solutions/CHAIN_INSPECTION/CHAIN_INSPECTION.py
joelstanner/codeeval
ef0591fabcad39d45f10287d7a1330f342ab96e0
[ "MIT" ]
null
null
null
""" CHAIN INSPECTION. https://www.codeeval.com/open_challenges/119/ We use special generator to produce chains of elements. Don't ask why we need them, we're not sure that somebody knows the answer for this question. A chain is represented by a string of name-address pairs. So the first element is the name of a pair ...
29.858407
78
0.667161
from sys import argv def make_links(line): link_parts = line.split(";") chain_dict = { k: v for k, v in tuple([x.split('-') for x in link_parts]) } return chain_dict def inspect_chain(chain): next_key = chain.pop('BEGIN') while True: try: next_key = chain.pop(next...
true
true
f7481ecbb30cefba3da16fd24c7fdadca2b86fef
4,086
py
Python
tonic/torch/agents/trpo.py
smallguoan/tonic
245bf781952d418d39dda300e92afc2c47b661a3
[ "MIT" ]
1
2020-09-08T03:38:23.000Z
2020-09-08T03:38:23.000Z
tonic/torch/agents/trpo.py
smallguoan/tonic
245bf781952d418d39dda300e92afc2c47b661a3
[ "MIT" ]
null
null
null
tonic/torch/agents/trpo.py
smallguoan/tonic
245bf781952d418d39dda300e92afc2c47b661a3
[ "MIT" ]
null
null
null
import torch from tonic import logger # noqa from tonic.torch import agents, updaters def default_actor_updater(): return updaters.TrustRegionPolicyGradient( optimizer=updaters.ConjugateGradient( constraint_threshold=0.01, damping_coefficient=0.1, conjugate_gradient_steps=10, bac...
38.914286
78
0.647822
import torch from tonic import logger from tonic.torch import agents, updaters def default_actor_updater(): return updaters.TrustRegionPolicyGradient( optimizer=updaters.ConjugateGradient( constraint_threshold=0.01, damping_coefficient=0.1, conjugate_gradient_steps=10, backtrack...
true
true
f7482077d0b32184dbce3b396ef050f51fe9682a
367
py
Python
neighbor/forms.py
Julia-Agasaro/Neighbourhood
8adab9b4e23e886c5b51eb3ea4df3802f469b22b
[ "MIT" ]
null
null
null
neighbor/forms.py
Julia-Agasaro/Neighbourhood
8adab9b4e23e886c5b51eb3ea4df3802f469b22b
[ "MIT" ]
5
2020-02-12T03:18:14.000Z
2021-09-08T01:23:33.000Z
neighbor/forms.py
Julia-Agasaro/Neighbourhood
8adab9b4e23e886c5b51eb3ea4df3802f469b22b
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import * class HoodForm(forms.ModelForm): class Meta: model = Hood fields = ['name', 'location'] class ProfileForm(forms.ModelForm): class Meta: ...
26.214286
54
0.673025
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from .models import * class HoodForm(forms.ModelForm): class Meta: model = Hood fields = ['name', 'location'] class ProfileForm(forms.ModelForm): class Meta: ...
true
true
f748207f83f8fb793d895e5e11eaad963944a64f
636
py
Python
christmasflix/admin.py
jbettenh/last_christmas
2f861afbdf67ca69df0e7ed815a870c5bb4feb19
[ "MIT" ]
null
null
null
christmasflix/admin.py
jbettenh/last_christmas
2f861afbdf67ca69df0e7ed815a870c5bb4feb19
[ "MIT" ]
1
2021-11-03T20:16:50.000Z
2021-12-22T16:05:44.000Z
christmasflix/admin.py
jbettenh/last_christmas
2f861afbdf67ca69df0e7ed815a870c5bb4feb19
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import MovieList, Movie class MoviesInline(admin.TabularInline): model = Movie extra = 1 fieldsets = [ ('Movies', {'fields': ['title']}), (None, {'fields': ['movielist']}) ] class MovieListAdmin(admin.ModelAdmin): fieldsets = [ ...
21.931034
84
0.619497
from django.contrib import admin from .models import MovieList, Movie class MoviesInline(admin.TabularInline): model = Movie extra = 1 fieldsets = [ ('Movies', {'fields': ['title']}), (None, {'fields': ['movielist']}) ] class MovieListAdmin(admin.ModelAdmin): fieldsets = [ ...
true
true
f74821deaca6377ddb8434f0f78227939836f907
2,941
py
Python
lib/addresses.py
CodingAnarchy/keybase
3e59f3245206691e841f718ac81ed395f4463045
[ "Unlicense" ]
4
2015-01-30T13:38:14.000Z
2020-05-19T01:00:25.000Z
lib/addresses.py
CodingAnarchy/Amon
3e59f3245206691e841f718ac81ed395f4463045
[ "Unlicense" ]
null
null
null
lib/addresses.py
CodingAnarchy/Amon
3e59f3245206691e841f718ac81ed395f4463045
[ "Unlicense" ]
null
null
null
import logging import warnings try: import cPickle as pickle except ImportError: import pickle from lib.error import AddressBookError logger = logging.getLogger(__name__) class AddressBook: def __init__(self, name='primary'): self.name = name try: self.contact_list = pickle.l...
40.287671
115
0.615437
import logging import warnings try: import cPickle as pickle except ImportError: import pickle from lib.error import AddressBookError logger = logging.getLogger(__name__) class AddressBook: def __init__(self, name='primary'): self.name = name try: self.contact_list = pickle.l...
true
true
f748226b99f5f39bf1698466ed19bf607e22a814
13,294
py
Python
3. Adversarial Search/homework3_kky5082.py
yedkk/artificial-intelligence-in-python
8be18e052fcde35f4099900b9ba13fa5dd2c7cd9
[ "MIT" ]
1
2021-06-01T02:39:44.000Z
2021-06-01T02:39:44.000Z
3. Adversarial Search/homework3_kky5082.py
yedkk/artificial-intelligence-in-python
8be18e052fcde35f4099900b9ba13fa5dd2c7cd9
[ "MIT" ]
null
null
null
3. Adversarial Search/homework3_kky5082.py
yedkk/artificial-intelligence-in-python
8be18e052fcde35f4099900b9ba13fa5dd2c7cd9
[ "MIT" ]
null
null
null
############################################################ # CMPSC 442: Homework 3 ############################################################ student_name = "Kangdong Yuan" ############################################################ # Imports ############################################################ # Includ...
33.486146
116
0.505341
true
true
f7482343e9fd2429b206ea33fb3b8f758efc8985
1,354
py
Python
dpkt/ospf.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
924
2015-01-04T01:22:15.000Z
2022-03-28T02:22:46.000Z
dpkt/ospf.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
599
2015-01-02T18:06:52.000Z
2022-03-29T16:00:17.000Z
dpkt/ospf.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
299
2015-02-12T19:50:34.000Z
2022-03-15T00:35:29.000Z
# $Id: ospf.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """Open Shortest Path First.""" from __future__ import absolute_import from . import dpkt AUTH_NONE = 0 AUTH_PASSWORD = 1 AUTH_CRYPTO = 2 class OSPF(dpkt.Packet): """Open Shortest Path First. TODO: Longer class information.... At...
20.830769
65
0.509601
from __future__ import absolute_import from . import dpkt AUTH_NONE = 0 AUTH_PASSWORD = 1 AUTH_CRYPTO = 2 class OSPF(dpkt.Packet): __hdr__ = ( ('v', 'B', 0), ('type', 'B', 0), ('len', 'H', 0), ('router', 'I', 0), ('area', 'I', 0), ('sum', 'H', 0), ('aty...
true
true
f748235b03a77e379a62b710d47f8a964a8cfeba
14,611
py
Python
domain-messages/domain_messages/LFMMarketResult/lfmmarketresult.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
domain-messages/domain_messages/LFMMarketResult/lfmmarketresult.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
domain-messages/domain_messages/LFMMarketResult/lfmmarketresult.py
simcesplatform/static-time-series-resource-forecaster
0f53915d7fe6da543f628487c8e643f2e9bb2652
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2021 Tampere University and VTT Technical Research Centre of Finland # This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus # This source code is licensed under the MIT license. See LICENSE in the repository root directory. # Auth...
39.382749
115
0.642666
from __future__ import annotations from typing import Union, Dict, Any, List from tools.exceptions.messages import MessageValueError from tools.message.abstract import AbstractResultMessage from tools.tools import FullLogger import datetime from tools.datetime_tools import to_iso_format_datetime_string ...
true
true
f74823beac335d547609ec5ff0734696f693141f
1,834
py
Python
tests/integration/test_sso.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
4
2019-05-27T13:55:07.000Z
2021-03-30T07:05:09.000Z
tests/integration/test_sso.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
99
2019-05-20T14:16:33.000Z
2021-01-19T09:25:15.000Z
tests/integration/test_sso.py
withrocks/commonlims
d8a925c917aa26e8205fefb3966a9f49f8f2e2f8
[ "BSD-3-Clause" ]
1
2020-08-10T07:55:40.000Z
2020-08-10T07:55:40.000Z
from __future__ import absolute_import import six from sentry.models import AuthIdentity, AuthProvider from sentry.testutils import AuthProviderTestCase from sentry.utils.auth import SSO_SESSION_KEY class OrganizationAuthLoginTest(AuthProviderTestCase): def test_sso_auth_required(self): user = self.crea...
34.603774
79
0.666848
from __future__ import absolute_import import six from sentry.models import AuthIdentity, AuthProvider from sentry.testutils import AuthProviderTestCase from sentry.utils.auth import SSO_SESSION_KEY class OrganizationAuthLoginTest(AuthProviderTestCase): def test_sso_auth_required(self): user = self.crea...
true
true
f74823d508de7446ffb1f4ad24ef259040981d41
957
py
Python
nrefocus/iface/rf_numpy.py
RI-imaging/nrefocus
18d520ffa3d13a31255fdee30d48258d61adfb6b
[ "BSD-3-Clause" ]
6
2017-04-10T08:24:39.000Z
2022-02-09T02:20:01.000Z
nrefocus/iface/rf_numpy.py
RI-imaging/nrefocus
18d520ffa3d13a31255fdee30d48258d61adfb6b
[ "BSD-3-Clause" ]
12
2017-04-10T08:30:48.000Z
2021-06-21T11:20:08.000Z
nrefocus/iface/rf_numpy.py
RI-imaging/nrefocus
18d520ffa3d13a31255fdee30d48258d61adfb6b
[ "BSD-3-Clause" ]
2
2020-10-04T02:21:48.000Z
2022-01-13T17:14:08.000Z
import numpy as np from .. import pad from .base import Refocus class RefocusNumpy(Refocus): """Refocusing with numpy-based Fourier transform .. versionadded:: 0.3.0 """ def _init_fft(self, field, padding): """Perform initial Fourier transform of the input field Parameters ...
25.184211
63
0.598746
import numpy as np from .. import pad from .base import Refocus class RefocusNumpy(Refocus): def _init_fft(self, field, padding): if padding: field = pad.pad_add(field) return np.fft.fft2(field) def propagate(self, distance): fft_kernel = self.get_kernel(distance=distanc...
true
true
f748244e2a6d17a447204c3cda5b9e294dedc2ff
238
py
Python
exercise_cev97.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
2
2022-01-13T15:55:58.000Z
2022-02-11T23:18:34.000Z
exercise_cev97.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
null
null
null
exercise_cev97.py
iansantana00/Python-Course
43852aa64c93099342ab4765b0fe8729a959449e
[ "MIT" ]
null
null
null
def escreva(nome): print('~' * (len(nome) + 6)) print(f' {nome} ') print('~' * (len(nome) + 6)) nome = 'Ian' escreva(nome) nome = 'Estuda y Estuda' escreva(nome) nome = 'Coding and Conding' escreva(nome)
15.866667
33
0.533613
def escreva(nome): print('~' * (len(nome) + 6)) print(f' {nome} ') print('~' * (len(nome) + 6)) nome = 'Ian' escreva(nome) nome = 'Estuda y Estuda' escreva(nome) nome = 'Coding and Conding' escreva(nome)
true
true
f74825a94946f50e9caa411ac45b42e01cf524af
707
py
Python
src/lesson_email/imaplib_fetch_separately.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
3
2018-08-14T09:33:52.000Z
2022-03-21T12:31:58.000Z
src/lesson_email/imaplib_fetch_separately.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
src/lesson_email/imaplib_fetch_separately.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
import imaplib import pprint import imaplib_connect with imaplib_connect.open_connection() as c: c.select('INBOX', readonly=True) print('HEADER:') typ, msg_data = c.fetch('1', '(BODY.PEEK[HEADER])') for response_part in msg_data: if isinstance(response_part, tuple): print(response_...
27.192308
55
0.646393
import imaplib import pprint import imaplib_connect with imaplib_connect.open_connection() as c: c.select('INBOX', readonly=True) print('HEADER:') typ, msg_data = c.fetch('1', '(BODY.PEEK[HEADER])') for response_part in msg_data: if isinstance(response_part, tuple): print(response_...
true
true
f74826393b125a85bff04a6f2df1e3cb587aae61
3,835
py
Python
sklearn/utils/random.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
13
2020-05-03T18:42:05.000Z
2022-03-23T07:44:19.000Z
sklearn/utils/random.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
29
2021-03-04T02:56:48.000Z
2021-04-06T04:06:45.000Z
sklearn/utils/random.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
12
2021-02-05T20:33:04.000Z
2022-02-17T04:11:25.000Z
# Author: Hamzeh Alsalhi <ha258@cornell.edu> # # License: BSD 3 clause import numpy as np import scipy.sparse as sp import array from . import check_random_state from ._random import sample_without_replacement __all__ = ['sample_without_replacement'] def _random_choice_csc(n_samples, classes, class_probability=None...
39.536082
79
0.575489
import numpy as np import scipy.sparse as sp import array from . import check_random_state from ._random import sample_without_replacement __all__ = ['sample_without_replacement'] def _random_choice_csc(n_samples, classes, class_probability=None, random_state=None): data = array.array(...
true
true
f74827ad25ff8aae39bfa7a91ad2010189009abc
1,979
py
Python
trr265/gbe/sst/data_provider.py
hgzech/trr265
11807677d782ce5ef9e0e59e10be55f1da4e3371
[ "Apache-2.0" ]
null
null
null
trr265/gbe/sst/data_provider.py
hgzech/trr265
11807677d782ce5ef9e0e59e10be55f1da4e3371
[ "Apache-2.0" ]
1
2021-11-18T16:42:24.000Z
2021-11-18T17:11:09.000Z
trr265/gbe/sst/data_provider.py
hgzech/trr265
11807677d782ce5ef9e0e59e10be55f1da4e3371
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/07_gbe.sst.data_provider.ipynb (unless otherwise specified). __all__ = ['SSTDataProvider'] # Cell from fastcore.foundation import patch from ..data_provider import GBEProvider from ...data_provider import get_efficiently import numpy as np # Cell class SSTDataPro...
35.981818
177
0.665488
__all__ = ['SSTDataProvider'] from fastcore.foundation import patch from ..data_provider import GBEProvider from ...data_provider import get_efficiently import numpy as np class SSTDataProvider(GBEProvider): def __init__(self, data_folder_path): GBEProvider.__init__(self, data_folder_path) @patch de...
true
true
f748283581fc9608ba078063bf458cd714b82841
486
py
Python
deliver/ia369/iah2percentile.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
7
2015-02-18T17:21:20.000Z
2016-10-04T19:14:16.000Z
deliver/ia369/iah2percentile.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
null
null
null
deliver/ia369/iah2percentile.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
20
2017-06-26T17:40:28.000Z
2021-09-15T13:47:19.000Z
# -*- encoding: utf-8 -*- # Module iah2percentile def iah2percentile(h,p): import numpy as np s = h.sum() k = ((s-1) * p/100.)+1 dw = np.floor(k) up = np.ceil(k) hc = np.cumsum(h) if isinstance(p, int): k1 = np.argmax(hc>=dw) k2 = np.argmax(hc>=up) else: k1 = np.ar...
22.090909
50
0.514403
def iah2percentile(h,p): import numpy as np s = h.sum() k = ((s-1) * p/100.)+1 dw = np.floor(k) up = np.ceil(k) hc = np.cumsum(h) if isinstance(p, int): k1 = np.argmax(hc>=dw) k2 = np.argmax(hc>=up) else: k1 = np.argmax(hc>=dw[:,np.newaxis],axis=1) k2 = np...
true
true
f748286dbcbad103f8a6a3b3d3729f01fccef119
656
py
Python
packtml/utils/linalg.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
14
2018-08-22T22:12:40.000Z
2021-10-04T16:28:14.000Z
packtml/utils/linalg.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
null
null
null
packtml/utils/linalg.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
14
2018-05-31T20:42:12.000Z
2021-09-15T08:00:14.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from numpy import linalg as la __all__ = [ 'l2_norm' ] def l2_norm(X, axis=0): """Compute the L2 (Euclidean) norm of a matrix. Computes the L2 norm along the specified axis. If axis is 0, computes the norms along the columns. If 1, com...
22.62069
67
0.637195
from __future__ import absolute_import from numpy import linalg as la __all__ = [ 'l2_norm' ] def l2_norm(X, axis=0): return la.norm(X, ord=None, axis=axis)
true
true
f74829cc49825d56474670feeb83880812303fdd
203
pyw
Python
books/tech/py/m_lutz-programming_python-4_ed/code/ch_07/11_callback_scope_issues-arguments_versus_globals/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
books/tech/py/m_lutz-programming_python-4_ed/code/ch_07/11_callback_scope_issues-arguments_versus_globals/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
books/tech/py/m_lutz-programming_python-4_ed/code/ch_07/11_callback_scope_issues-arguments_versus_globals/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
from tkinter import * def handler(A): print(A) if __name__ == '__main__': X = 42 widget = Button(text = 'ni', command = (lambda: handler('spam'))) widget.pack() widget.mainloop()
15.615385
69
0.596059
from tkinter import * def handler(A): print(A) if __name__ == '__main__': X = 42 widget = Button(text = 'ni', command = (lambda: handler('spam'))) widget.pack() widget.mainloop()
true
true
f7482a8c1a9958858a67dfdcf93049026de84999
858
py
Python
backend/auth/tests/test_models.py
yar-kik/Flask-API-bookshop
0a3ec75d3f5af37d80c4104cdcedf0363ffd61a8
[ "MIT" ]
null
null
null
backend/auth/tests/test_models.py
yar-kik/Flask-API-bookshop
0a3ec75d3f5af37d80c4104cdcedf0363ffd61a8
[ "MIT" ]
3
2021-05-24T11:09:57.000Z
2021-06-03T09:38:47.000Z
backend/auth/tests/test_models.py
yar-kik/botforqueue
0a3ec75d3f5af37d80c4104cdcedf0363ffd61a8
[ "MIT" ]
null
null
null
"""Module for test user model""" import unittest from auth.models import User class TestUserModel(unittest.TestCase): """Class for user model testing""" def setUp(self) -> None: """Setting up test data and configs""" self.user = User(password="pass", username="user_name") self.user2 ...
31.777778
66
0.675991
import unittest from auth.models import User class TestUserModel(unittest.TestCase): def setUp(self) -> None: self.user = User(password="pass", username="user_name") self.user2 = User(password="pass") def test_model_str(self): self.assertEqual(str(self.user), "User user_name") ...
true
true
f7482ac691a0fdfdc007363f5bd8272711320b3d
8,449
py
Python
autolrn/encoding/labelenc.py
SimonCarozza/autolrn
d0875844a3e9b4fc22510ef320aa498e339b6192
[ "MIT" ]
null
null
null
autolrn/encoding/labelenc.py
SimonCarozza/autolrn
d0875844a3e9b4fc22510ef320aa498e339b6192
[ "MIT" ]
null
null
null
autolrn/encoding/labelenc.py
SimonCarozza/autolrn
d0875844a3e9b4fc22510ef320aa498e339b6192
[ "MIT" ]
null
null
null
"""Label encode and One-Hot encode dataframes.""" from sklearn.preprocessing import LabelEncoder from pandas import get_dummies from pandas import DataFrame from pandas import Series from pandas import concat from pandas import merge import numpy as np # Auto encodes any dataframe column of type category or object. ...
34.206478
87
0.519233
from sklearn.preprocessing import LabelEncoder from pandas import get_dummies from pandas import DataFrame from pandas import Series from pandas import concat from pandas import merge import numpy as np def dummy_encode(df): columnsToEncode = list( df.select_dtypes(include=['category', 'object'])) ...
true
true
f7482b8b8edf244d5bd67d159b9ceb28f8c4b04d
59,403
py
Python
jax/interpreters/partial_eval.py
mganahl/jax
a6b2c371d28f49a972814ffec03addb6773621b7
[ "ECL-2.0", "Apache-2.0" ]
1
2021-06-18T08:19:12.000Z
2021-06-18T08:19:12.000Z
jax/interpreters/partial_eval.py
yang-song/jax
a6b2c371d28f49a972814ffec03addb6773621b7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/interpreters/partial_eval.py
yang-song/jax
a6b2c371d28f49a972814ffec03addb6773621b7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
43.359854
103
0.691261
import itertools as it from collections import namedtuple import contextlib import functools from typing import (Any, Callable, Dict, NamedTuple, Optional, Sequence, Tuple, List, Union, cast, Type, no_type_check) from weakref import ref import numpy as np from .. import core from .. ...
true
true
f7482bfc288c5e09ed332c989d45f50608da5bc7
4,557
py
Python
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
detect.py
adityapatkar/covid-detection
59797402bb4359d6070558d40597f7fce3958a0d
[ "MIT" ]
null
null
null
import os import torch from torch.utils.data import Dataset, random_split, DataLoader from PIL import Image import torchvision.models as models import matplotlib.pyplot as plt import torchvision.transforms as transforms # from sklearn.metrics import f1_score import torch.nn.functional as F import torch.nn as nn from t...
30.38
88
0.63397
import os import torch from torch.utils.data import Dataset, random_split, DataLoader from PIL import Image import torchvision.models as models import matplotlib.pyplot as plt import torchvision.transforms as transforms import torch.nn.functional as F import torch.nn as nn from torchvision.utils import make_grid from...
true
true
f7482c172b6e0083190fc2fbe4e040d9edaf0b36
2,846
py
Python
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
198
2016-07-14T19:47:52.000Z
2022-03-15T08:45:21.000Z
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
534
2016-07-15T19:12:43.000Z
2022-03-11T23:11:39.000Z
legacy_tests/kernel/bigquery_tests.py
freyrsae/pydatalab
9aba1ac6bbe8e1384e7a4b07c5042af84348797d
[ "Apache-2.0" ]
86
2016-07-13T17:39:05.000Z
2021-11-03T03:39:41.000Z
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
31.977528
99
0.723472
from __future__ import absolute_import from __future__ import unicode_literals import mock import unittest import google.auth import IPython import IPython.core.magic def noop_decorator(func): return func IPython.core.magic.register_line_cell_magic = noop_decorator IPython.core.magic.register_line_m...
true
true
f7482c2375eacce0e8da1a8510194f6a67a28f91
1,592
py
Python
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
python/tests/unit/test_pretty_daml.py
DACH-NY/dazl-client
56c8b1be047415b2bcb35b6558de4a780a402458
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from dazl.damlast import DarFile, daml_types as daml from dazl.damlast.daml_lf_1 import DottedName, ModuleRef, PackageRef, TypeConName from dazl.damlast.lookup import MultiPackag...
30.037736
102
0.72299
from dazl.damlast import DarFile, daml_types as daml from dazl.damlast.daml_lf_1 import DottedName, ModuleRef, PackageRef, TypeConName from dazl.damlast.lookup import MultiPackageLookup from dazl.pretty import DamlPrettyPrinter, PrettyOptions from .dars import Pending def test_render_list_of_party(): type_ = ...
true
true
f7482c855815f0010dcb58d5f7c7f87afbbd2606
385
py
Python
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
boot.py
Deseteral/hogwarts_lights
a3da7091225b92f32cd03aa159ba3739c49bf3af
[ "MIT" ]
null
null
null
import network cred_f = open('wifi_credentials.txt') wifi_credentials = cred_f.read().split('\n'); sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.active(True) sta_if.connect(wifi_credentials[0], wifi_credentials[1]) while not sta_if.isconnec...
27.5
60
0.711688
import network cred_f = open('wifi_credentials.txt') wifi_credentials = cred_f.read().split('\n'); sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.active(True) sta_if.connect(wifi_credentials[0], wifi_credentials[1]) while not sta_if.isconnec...
true
true
f7482c9603f3e3853650fe79b40d0bc4b006a565
6,225
py
Python
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/WindingDW2L.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Machine/WindingDW2L.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Machine/WindingDW2L """ from os import linesep from sys import getsizeof f...
35.775862
110
0.629558
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import...
true
true
f7482cac62d743339c0acdb593b5924dace70277
374
py
Python
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
1
2021-07-11T15:32:09.000Z
2021-07-11T15:32:09.000Z
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
1
2021-10-01T14:23:06.000Z
2021-10-01T14:23:06.000Z
setup.py
AshiqAbdulkhader/Compylex
47ddd011f40c6825b54665ca69e631797838684f
[ "MIT" ]
2
2021-08-18T14:39:40.000Z
2021-10-01T09:32:06.000Z
from setuptools import setup setup(name='compylex', version='1.1', description='Code compiler', url='https://github.com/AshiqAbdulkhader/Compylex', packages=['compylex'], install_requires=[], license='MIT License', author='Muhammed Ashiq Abdul Khader', author_email='ashi...
26.714286
57
0.649733
from setuptools import setup setup(name='compylex', version='1.1', description='Code compiler', url='https://github.com/AshiqAbdulkhader/Compylex', packages=['compylex'], install_requires=[], license='MIT License', author='Muhammed Ashiq Abdul Khader', author_email='ashi...
true
true
f7482e8d52a32298bda776c6e4d2a8291682066f
844
py
Python
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
nanome/_internal/_network/_commands/_serialization/_send_notification.py
rramji/nanome-lib
2806598af31cfb4bb6e16366f0b300d2ddcc9c13
[ "MIT" ]
null
null
null
from nanome._internal._network._serialization import _ContextDeserialization, _ContextSerialization from nanome._internal._util._serializers import _DictionarySerializer, _LongSerializer from nanome._internal._structure._serialization import _WorkspaceSerializer, _AtomSerializer from nanome._internal._util._serializers...
38.363636
99
0.783175
from nanome._internal._network._serialization import _ContextDeserialization, _ContextSerialization from nanome._internal._util._serializers import _DictionarySerializer, _LongSerializer from nanome._internal._structure._serialization import _WorkspaceSerializer, _AtomSerializer from nanome._internal._util._serializers...
true
true
f7482f4cdf51cc54617dabd8193563b54e20e4f3
27
py
Python
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/__init__.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
__version__ = (0, 1, 3, 3)
13.5
26
0.555556
__version__ = (0, 1, 3, 3)
true
true
f7483023fe6a53e465f582b8968ca414ea598a26
1,915
py
Python
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
19
2019-02-16T14:39:38.000Z
2022-03-23T12:27:00.000Z
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
24
2018-10-21T07:31:21.000Z
2022-03-27T17:27:29.000Z
pyravendb/tests/raven_commands_tests/test_patch.py
CDuPlooy/ravendb-python-client
dbe51ee8eea166e0d9e60897ab480dd9a693366b
[ "MIT" ]
14
2018-08-14T07:58:46.000Z
2022-01-05T12:20:08.000Z
import unittest from pyravendb.commands.raven_commands import PutDocumentCommand, PatchCommand from pyravendb.custom_exceptions.exceptions import DocumentDoesNotExistsException from pyravendb.data.patches import PatchRequest from pyravendb.tests.test_base import TestBase class TestPatch(TestBase): def setUp(self)...
44.534884
98
0.684595
import unittest from pyravendb.commands.raven_commands import PutDocumentCommand, PatchCommand from pyravendb.custom_exceptions.exceptions import DocumentDoesNotExistsException from pyravendb.data.patches import PatchRequest from pyravendb.tests.test_base import TestBase class TestPatch(TestBase): def setUp(self)...
true
true
f7483075726840b87d32c2123dd043cd12efa138
5,168
py
Python
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
rasa_core_sdk/__init__.py
saqibahmed515/rasa_core_sdk
e5b7e66b2f4a6937bf9eed995ea70ddc37bb277a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import logging import typing from typing import Dict, Text, Any, Optional, Iterator from typing import List logger = logging.getLogger(__name__) if typing...
31.321212
78
0.581656
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import logging import typing from typing import Dict, Text, Any, Optional, Iterator from typing import List logger = logging.getLogger(__name__) if typing...
true
true
f74831bde1edbf54a42cdffbaf816df45ecddd59
4,040
py
Python
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
navpy/utils/utils.py
adhika/NavPy
57130633adcb611cee0dbdfbbee758ca21552cc9
[ "BSD-3-Clause" ]
null
null
null
""" Utilities Functions. Copyright (c) 2014 NavPy Developers. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in LICENSE.txt """ import numpy as _np import sys def input_check_Nx1(x): """ Check x to be of dimension Nx1 and reshape it as a 1-D array Adhik...
25.56962
79
0.542822
import numpy as _np import sys def input_check_Nx1(x): x = _np.atleast_1d(x) theSize = _np.shape(x) if(len(theSize) > 1): if ((theSize[0] != 1) & (theSize[1] != 1)): raise ValueError('Not an N x 1 array') x = x.reshape(_np.size(x)) elif (theSize[0] == 1):...
true
true
f748340c6d3b40628b286e12ed5528d81346d6d9
1,828
py
Python
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
1
2022-03-09T19:12:22.000Z
2022-03-09T19:12:22.000Z
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
null
null
null
unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py
cbarros7/holbertonschool-machine_learning
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ 4-bayes_opt.py """ import numpy as np from scipy.stats import norm GP = __import__('2-gp').GaussianProcess class BayesianOptimization: """ Class that instantiates a Bayesian optimization on a noiseless 1D Gaussian process """ def __init__(self, f, X_init, Y_init, bounds...
29.483871
77
0.527352
import numpy as np from scipy.stats import norm GP = __import__('2-gp').GaussianProcess class BayesianOptimization: def __init__(self, f, X_init, Y_init, bounds, ac_samples, l=1, sigma_f=1, xsi=0.01, minimize=True): self.f = f self.gp = GP(X_init, Y_init, l, sigma_f) se...
true
true
f748347236d2f7ed1a4774d2dc48c01ba8dd3898
3,884
py
Python
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
701
2018-10-22T11:54:09.000Z
2022-03-31T14:39:30.000Z
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
229
2018-10-24T09:15:31.000Z
2021-12-24T16:51:37.000Z
Lib/objc/_CloudDocs.py
snazari/Pyto
bcea7bbef35cab21ce73087b1a0c00a07d07ec72
[ "MIT" ]
131
2018-11-25T18:33:03.000Z
2022-03-24T03:18:07.000Z
""" Classes from the 'CloudDocs' framework. """ try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None BRZombie = _Class("BRZombie") BRXPCSyncProxy = _Class("BRX...
45.162791
85
0.844748
try: from rubicon.objc import ObjCClass except ValueError: def ObjCClass(name): return None def _Class(name): try: return ObjCClass(name) except NameError: return None BRZombie = _Class("BRZombie") BRXPCSyncProxy = _Class("BRXPCSyncProxy") BRNotificationQueue = _Class("BRNo...
true
true
f74835f3182443e8b2003e77b093fbfc09c67fcf
7,153
py
Python
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
src/anu/constants/amino_acid.py
ankitskvmdam/anu
699598fb60dcc23f6cccd5abb30a03b294d21598
[ "MIT" ]
null
null
null
"""Enum for amino acid.""" from enum import Enum from typing import Dict, TypedDict class AcidityBasicity(Enum): """Enum for acidity and basicity.""" U = 3 # Neutral A = 1 # Acid B = 2 # Base class Charge(Enum): """Enum for charge.""" U = 3 # Neutral P = 1 # Positive N = 2 #...
28.612
57
0.533622
from enum import Enum from typing import Dict, TypedDict class AcidityBasicity(Enum): U = 3 A = 1 B = 2 class Charge(Enum): U = 3 P = 1 N = 2 class Hydropathy(Enum): HL = 1 HB = 2 M = 3 class AminoAcidToInt(Enum): A = 1 C = 2 D = 3 ...
true
true
f74836a59589ecbcca9deb222de2394c05b492b9
376
py
Python
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
2
2021-08-10T18:16:08.000Z
2021-09-26T19:49:26.000Z
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
lesson 4/question 3.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
occasions = { "Christmas":"Merry Christmas!", "Birthday":"Happy Birthday!", "New Years":"Happy New Year!", } occasion = str(input(f"Hi!\nWhat occasion is it? Here are the ones I know:\n{list(occasions.keys())}\n")) try: occasion = occasion.title() print(occasions[occasion]) except: pri...
25.066667
106
0.640957
occasions = { "Christmas":"Merry Christmas!", "Birthday":"Happy Birthday!", "New Years":"Happy New Year!", } occasion = str(input(f"Hi!\nWhat occasion is it? Here are the ones I know:\n{list(occasions.keys())}\n")) try: occasion = occasion.title() print(occasions[occasion]) except: pri...
true
true
f74837658af5f26bfa35d26f6b329c3a2b845ffb
2,481
py
Python
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
crawlers/advert/_utils.py
fostroll/ru_corner
defb681aa9311c2dd6ed98d1b934453c29e9a750
[ "Apache-2.0" ]
null
null
null
#-*- encoding: utf-8 -*- from collections import OrderedDict import os import re from selenium import webdriver from selenium.webdriver.chrome.options import Options ### import sys sys.path.append('../') ### import utils MIN_TEXT_LINES = 1 MIN_CHUNK_LINES = 1 MIN_CHUNK_WORDS = 20 MAX_CHUNK_WORDS = 200 AUTHORS_IGNOR...
35.956522
78
0.593309
from collections import OrderedDict import os import re from selenium import webdriver from selenium.webdriver.chrome.options import Options port sys sys.path.append('../') port utils MIN_TEXT_LINES = 1 MIN_CHUNK_LINES = 1 MIN_CHUNK_WORDS = 20 MAX_CHUNK_WORDS = 200 AUTHORS_IGNORE_FN = os.path.join(utils.PAGES_DIR,...
true
true
f7483846732635e5b5b6f1b88f389f5faba61b80
887
py
Python
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
36
2019-02-28T21:18:39.000Z
2022-03-04T19:58:45.000Z
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
7
2019-04-01T14:48:34.000Z
2022-03-04T16:31:34.000Z
test/test_list_breakdown_values_response.py
moaazsidat/mux-python
3f03b9dd0761fa1a0cd5bdbeac85ccf4f326508c
[ "MIT" ]
9
2019-11-29T03:57:58.000Z
2022-03-02T17:29:25.000Z
# coding: utf-8 """ Mux Python - Copyright 2019 Mux Inc. NOTE: This class is auto generated. Do not edit the class manually. """ from __future__ import absolute_import import unittest import mux_python from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse # noqa: E501 from mux_...
23.972973
110
0.742954
from __future__ import absolute_import import unittest import mux_python from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse from mux_python.rest import ApiException class TestListBreakdownValuesResponse(unittest.TestCase): def setUp(self): pass def tearD...
true
true
f748387ffbb30506777b5c93cb3532b4a502eda5
1,290
py
Python
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
3
2021-11-18T11:41:21.000Z
2022-02-08T22:01:20.000Z
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
20
2019-12-12T11:47:32.000Z
2021-06-02T07:55:18.000Z
moleculegen/callback/__init__.py
sanjaradylov/moleculegen-ml
4acb77244909cf8cfe4fb75461d4bed9b77f29f1
[ "BSD-3-Clause" ]
2
2019-12-23T08:17:01.000Z
2022-02-08T22:01:21.000Z
""" Build callback objects to run during model training. Classes: Callback: Callback ABC. CallbackList: Perform callbacks sequentially and log output messages. BatchMetricScorer: Calculate and log metrics after batch sampling and forward computation. EarlyStopping: Stop...
24.339623
89
0.691473
__all__ = ( 'Callback', 'CallbackList', 'BatchMetricScorer', 'EarlyStopping', 'EpochMetricScorer', 'Generator', 'PhysChemDescriptorPlotter', 'ProgressBar', ) from .base import ( Callback, CallbackList, ) from .callbacks import ( BatchMetricScorer, EarlyStopp...
true
true
f748388c21336444c73f28049facce59b7b6e8d8
503
py
Python
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
87
2015-11-09T07:11:32.000Z
2021-12-16T03:13:09.000Z
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
14
2015-09-28T18:24:18.000Z
2020-04-22T15:17:26.000Z
tests/test_trading_fee.py
lohithn4/NowTrade
ac04499731130297135b3526325191bd2cb36343
[ "MIT" ]
34
2015-10-12T13:26:09.000Z
2022-01-15T20:16:23.000Z
""" Tests for trading_fee.py module. """ import unittest from nowtrade.trading_fee import StaticFee class TestTradingFees(unittest.TestCase): """ Tests trading_fee.py classes. """ def test_trading_fees(self): """ Simple test for all trading fees. """ trading_fee = Static...
23.952381
69
0.654076
import unittest from nowtrade.trading_fee import StaticFee class TestTradingFees(unittest.TestCase): def test_trading_fees(self): trading_fee = StaticFee(5) self.assertEquals(trading_fee.__repr__(), 'StaticFee(fee=5)') self.assertEquals(trading_fee.get_fee(100, 1), 5) if __name__ == "__mai...
true
true
f748391d5aacf30ed6defee704efd85c4061ce33
17,104
py
Python
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors-for-Generalizing-Manipulation-Across-Objects-Configurations-
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
1
2022-03-14T22:25:17.000Z
2022-03-14T22:25:17.000Z
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
null
null
null
pytorch_disco/config_files/hyperparams.py
YunchuZhang/Visually-Grounded-Library-of-Behaviors
896afda942dfc04e4aaad2ee751c32df1eb17913
[ "MIT" ]
null
null
null
import os B = 2 # batch size MB = 1 # batch size for metric learning max_clusters = 2 commitment_cost = 0.25 is_refine_net = False is_init_cluter_with_instance = False top_grasp_only = False H = 240 # height W = 320 # width # BY = 200*2 # bird height (y axis, [-40, 40]) # BX = 176*2 # bird width (x axis, [0, 70.4]) ...
22.86631
91
0.546246
import os B = 2 MB = 1 max_clusters = 2 commitment_cost = 0.25 is_refine_net = False is_init_cluter_with_instance = False top_grasp_only = False H = 240 W = 320 1 S = 2 T = 256 V = 100000 sensor_S = 10 loadname = None emb2D_init = "" feat_init = "" obj_init = "" box_init = "" ort_init = "" inp_init = "" tr...
true
true
f7483af073c23e6259d9dccc6602e4c00935b8ea
9,036
py
Python
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
null
null
null
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
null
null
null
my_db.py
AndriiKuts-U/Lorem-ipsum
e791bddb616980cc3dcc40d5b98ef9c301c7a7bc
[ "MIT" ]
1
2021-04-09T00:03:30.000Z
2021-04-09T00:03:30.000Z
# Copyright (c) [2021] [Andrii Kuts, Oleksandr Tsepkov] import sqlite3 as sq import csv with sq.connect("data/server.db") as con: cur = con.cursor() def create_table_teams(): cur.execute("""CREATE TABLE IF NOT EXISTS teams ( team_id INTEGER PRIMARY KEY, team_name TEXT )""")...
38.126582
293
0.618526
import sqlite3 as sq import csv with sq.connect("data/server.db") as con: cur = con.cursor() def create_table_teams(): cur.execute("""CREATE TABLE IF NOT EXISTS teams ( team_id INTEGER PRIMARY KEY, team_name TEXT )""") con.commit() def create_table_users(): ...
true
true
f7483c140bfc442c473b0da28dcd404919327d25
7,891
py
Python
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
null
null
null
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
null
null
null
flit/init.py
StephenRoille/flit
bc8d8e8905f677c672f90751c4c95c33e1c11a50
[ "BSD-3-Clause" ]
1
2021-06-24T10:21:43.000Z
2021-06-24T10:21:43.000Z
from collections import OrderedDict from datetime import date import json import os from pathlib import Path import re import sys import pytoml as toml def get_data_dir(): """Get the directory path for flit user data files. """ home = os.path.realpath(os.path.expanduser('~')) if sys.platform == 'darwi...
35.545045
104
0.559498
from collections import OrderedDict from datetime import date import json import os from pathlib import Path import re import sys import pytoml as toml def get_data_dir(): home = os.path.realpath(os.path.expanduser('~')) if sys.platform == 'darwin': d = Path(home, 'Library') elif os.name == 'nt': ...
true
true
f7483c3e7e96a28ce8de117fffe3245d030badf6
2,831
py
Python
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
null
null
null
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
1
2019-09-29T07:59:16.000Z
2019-09-29T07:59:16.000Z
z3tracker/items/storage.py
Feneg/z3-tracker
d54c738e19de300ee7de13f333cab8bca93dfa7d
[ "MIT" ]
1
2019-09-29T02:12:09.000Z
2019-09-29T02:12:09.000Z
''' Item/dungeon tracker saving ''' import json import os.path import threading from ..config import CONFIG, CONFIGDIRECTORY from ..version import __version__ as version DATALOCK = threading.RLock() __all__ = ( 'load_items', 'load_dungeons', 'load_locations', 'load_entrances' 'store_items', 'store_dungeons'...
17.054217
79
0.557047
import json import os.path import threading from ..config import CONFIG, CONFIGDIRECTORY from ..version import __version__ as version DATALOCK = threading.RLock() __all__ = ( 'load_items', 'load_dungeons', 'load_locations', 'load_entrances' 'store_items', 'store_dungeons', 'store_locations','store_entrances...
true
true
f7483dad4fb3ba20f6383a16b57ff9bf154fd6f7
22,663
py
Python
tests/test_sansio.py
caseyduquettesc/gidgethub
e751664d95917dbdb856c382bfe2f4655e2a83c1
[ "Apache-2.0" ]
1
2020-08-30T08:52:35.000Z
2020-08-30T08:52:35.000Z
tests/test_sansio.py
caseyduquettesc/gidgethub
e751664d95917dbdb856c382bfe2f4655e2a83c1
[ "Apache-2.0" ]
6
2020-08-30T08:52:48.000Z
2020-10-29T16:00:24.000Z
tests/test_sansio.py
Smirenost/gidgethub
27c104de7a3e1b3052fb252f11b61a8ee01691f1
[ "Apache-2.0" ]
null
null
null
import datetime import http import json import pathlib import pytest from gidgethub import ( BadRequest, BadRequestUnknownError, GitHubBroken, HTTPException, InvalidField, RateLimitExceeded, RedirectionException, ValidationError, ValidationFailure, ) from gidgethub import sansio ...
38.411864
100
0.627234
import datetime import http import json import pathlib import pytest from gidgethub import ( BadRequest, BadRequestUnknownError, GitHubBroken, HTTPException, InvalidField, RateLimitExceeded, RedirectionException, ValidationError, ValidationFailure, ) from gidgethub import sansio ...
true
true
f7483dc41d7e3e1457294dcbb499f8e642d0b5a9
4,130
py
Python
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
pybo/config.py
mikkokotila/pybo
ae921861e3e8c18856f19c59fc4c7da8f2126c1c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """Configuration file to set up Pybo """ from pathlib import Path import yaml default_config = '''tokenizer: trie_files: - &part 'particles.txt' - &ancient ancient.txt - &except exceptions.txt - &uncomp uncompound_lexicon.txt - &tsikchen tsikchen.txt - &oral0 oral_corpus_0.t...
29.29078
107
0.610654
from pathlib import Path import yaml default_config = '''tokenizer: trie_files: - &part 'particles.txt' - &ancient ancient.txt - &except exceptions.txt - &uncomp uncompound_lexicon.txt - &tsikchen tsikchen.txt - &oral0 oral_corpus_0.txt - &oral1 oral_corpus_1.txt - &oral2 oral_corp...
true
true
f7483e5dfd6b57db763ade7fe914981a6b5ebc64
2,790
py
Python
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
1
2020-07-16T00:16:06.000Z
2020-07-16T00:16:06.000Z
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
null
null
null
idm/utils.py
ruslanvolov6667/ID
d2e2e0d8764bb9bc9caad163d69de03972cb5380
[ "MIT" ]
null
null
null
from .objects import DB from vkapi import VkApi, VkApiResponseException import json from flask import render_template import typing import time import re def get_all_history_gen(vk: VkApi, chat_id: int) -> typing.Generator[dict, None, None]: __offset = 0 chat = vk("messages.getHistory", count=1, peer...
35.769231
120
0.62043
from .objects import DB from vkapi import VkApi, VkApiResponseException import json from flask import render_template import typing import time import re def get_all_history_gen(vk: VkApi, chat_id: int) -> typing.Generator[dict, None, None]: __offset = 0 chat = vk("messages.getHistory", count=1, peer...
true
true
f7483ee3be5db3999804cc6a4892f9c98b9db917
285
py
Python
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
6
2020-11-24T15:55:35.000Z
2021-12-31T11:52:56.000Z
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
1
2020-11-24T15:46:15.000Z
2020-11-24T15:46:15.000Z
tests/benchmark/inhib_diameter_modes/__init__.py
mpascucci/AST-image-processing
54111e874237f0c146760d514eea96131177878a
[ "ECL-2.0", "Apache-2.0" ]
3
2021-02-04T10:08:43.000Z
2022-02-21T02:00:47.000Z
from . import nlclsq from . import slopeOP #! REQUIRES THIS PACKAGE https://github.com/vrunge/slopeOP from . import op #! REQUIRES THIS PACKAGE https://github.com/mpascucci/optimalpartitioning from . import count __doc__ = "functions for inhibition diameter measurement"
40.714286
99
0.754386
from . import nlclsq from . import slopeOP from . import op from . import count __doc__ = "functions for inhibition diameter measurement"
true
true
f7483f3934aac500c4e32e3e8f1cb19cdeb79aed
8,742
py
Python
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
MicrosoftLocale.py
ckbx-cakebox/labanotator-shape-library-inspector
91a1d4b5a677488856b85250ecbb2758a935e07c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import ctypes import ctypes.wintypes import functools class I18nText(object): def __init__(self, strings = None): self.__strings = {} if strings != None: self.__strings = strings def __setitem__(self, locale, string): if st...
29.33557
147
0.677648
import ctypes import ctypes.wintypes import functools class I18nText(object): def __init__(self, strings = None): self.__strings = {} if strings != None: self.__strings = strings def __setitem__(self, locale, string): if string == '': del self.__strings[l...
true
true
f7483f93cf86e3764e6994c6d5fb53582b30e48a
2,093
py
Python
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
4
2021-12-17T08:00:28.000Z
2022-02-12T12:25:24.000Z
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
waterworld/pettingzoosislwaterworldDMFGACexecution.py
Sriram94/DMFG
9206d4302350bed165e6812e8874041335ecf8a8
[ "MIT" ]
null
null
null
from pettingzoo.sisl.waterworld import waterworld from RL_dmfgac import Actor import csv import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def run_waterworld(parallel_env): n_actions = 25 num_episode = 0 while num_episode < 100: observation = parallel_env....
24.337209
104
0.581462
from pettingzoo.sisl.waterworld import waterworld from RL_dmfgac import Actor import csv import numpy as np import tensorflow.compat.v1 as tf tf.disable_v2_behavior() def run_waterworld(parallel_env): n_actions = 25 num_episode = 0 while num_episode < 100: observation = parallel_env....
true
true
f7483f948cb7754f719fbbba2541b0d9d65ff4c8
4,372
py
Python
core/create_sII_filelist.py
joselpart/core50
2acd72cb9c0b8ab558561bfd0701e5f3d0c1d637
[ "CC-BY-4.0" ]
null
null
null
core/create_sII_filelist.py
joselpart/core50
2acd72cb9c0b8ab558561bfd0701e5f3d0c1d637
[ "CC-BY-4.0" ]
null
null
null
core/create_sII_filelist.py
joselpart/core50
2acd72cb9c0b8ab558561bfd0701e5f3d0c1d637
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # Copyright (c) 2017. Vincenzo Lomonaco. All rights reserved. # # See the accompanying LICENSE file for terms. # # ...
37.367521
80
0.549405
false
true
f7483f9d3df18b099964e1ffe938a8951d77ad5d
1,484
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_IntegrationsCategory/IntegrationsCheck_Widget_IntegrationsCategory.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import collections import random from typing import Counter import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def parse_data(list_content): lists_data = [] list_collections: Counter = collections.Counter(list_content) top_lists = list_collections.most_common(10) ...
25.586207
110
0.572102
import collections import random from typing import Counter import demistomock as demisto from CommonServerPython import * def parse_data(list_content): lists_data = [] list_collections: Counter = collections.Counter(list_content) top_lists = list_collections.most_common(10) lists_number = len(t...
true
true
f7483fba5c4cf0cbfd7723ca74f926e8ead5e5e9
1,871
py
Python
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
2,962
2016-05-11T15:06:06.000Z
2022-03-27T20:06:16.000Z
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
5,899
2016-05-11T19:21:49.000Z
2022-03-31T18:17:20.000Z
tools/harness-automation/cases_R140/sed_6_1_5.py
AdityaHPatwardhan/openthread
a201e9d5d0273bb51fa20efc8758be20a725018e
[ "BSD-3-Clause" ]
1,113
2016-05-11T15:37:42.000Z
2022-03-31T09:37:04.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
40.673913
77
0.769642
import unittest from autothreadharness.harness_case import HarnessCase class SED_6_1_5(HarnessCase): role = HarnessCase.ROLE_SED case = '6 1 5' golden_devices_required = 3 def on_dialog(self, dialog, title): pass if __name__ == '__main__': unittest.main()
true
true
f7483fc0d4519ce430d1a7f8ad2e63404b8a54d9
119
py
Python
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
2
2020-08-25T13:45:31.000Z
2020-08-25T13:45:37.000Z
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
11
2019-02-06T00:15:05.000Z
2022-02-10T07:35:16.000Z
example/blog/urls.py
Microdisseny/django-ajax-raw-id-fields
8a49039a42f4cdf7b47589af1ef13332f5277f55
[ "MIT" ]
null
null
null
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.index, name='index'), ]
14.875
46
0.672269
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.index, name='index'), ]
true
true