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
f761461f7ba64f343bbf3a98c37974ad9109e53e
907
py
Python
blog/migrations/0001_initial.py
akshirapov/django-project
9c41245270b9fafe6545feae0cf2a3e4429f6351
[ "MIT" ]
null
null
null
blog/migrations/0001_initial.py
akshirapov/django-project
9c41245270b9fafe6545feae0cf2a3e4429f6351
[ "MIT" ]
7
2021-03-18T23:45:38.000Z
2022-03-12T00:16:04.000Z
blog/migrations/0001_initial.py
akshirapov/django-blog
9c41245270b9fafe6545feae0cf2a3e4429f6351
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-02-18 03:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
31.275862
120
0.637266
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
f761466a2fe8556402dba8c836c8bb2872f7af67
17,088
py
Python
osbuild/meta.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
null
null
null
osbuild/meta.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
null
null
null
osbuild/meta.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
1
2021-06-30T07:56:15.000Z
2021-06-30T07:56:15.000Z
"""Introspection and validation for osbuild This module contains utilities that help to introspect parts that constitute the inner parts of osbuild, i.e. its stages, assemblers and sources. Additionally, it provides classes and functions to do schema validation of OSBuild manifests and module options. A central `Inde...
31.069091
73
0.592931
import ast import contextlib import copy import importlib.util import os import pkgutil import json import sys from collections import deque from typing import Dict, Iterable, List, Optional import jsonschema FAILED_TITLE = "JSON Schema validation failed" FAILED_TYPEURI = "https://osbuild.org/validation-error" cla...
true
true
f76147633f7544e3648e276727cf3ea0ef181680
549
py
Python
RealPython tutorial code grid.py
PatDaoust/Tkinter-Beginings
b9ccc30191a9b790c17275ae38d6966a504a9f76
[ "MIT" ]
null
null
null
RealPython tutorial code grid.py
PatDaoust/Tkinter-Beginings
b9ccc30191a9b790c17275ae38d6966a504a9f76
[ "MIT" ]
null
null
null
RealPython tutorial code grid.py
PatDaoust/Tkinter-Beginings
b9ccc30191a9b790c17275ae38d6966a504a9f76
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Sep 15 15:19:16 2021 @author: catal """ import tkinter as tk window = tk.Tk() for i in range(3): window.columnconfigure(i, weight=1, minsize=75) window.rowconfigure(i, weight=1, minsize=50) for j in range(3): frame = tk.Frame( master=windo...
19.607143
67
0.57377
import tkinter as tk window = tk.Tk() for i in range(3): window.columnconfigure(i, weight=1, minsize=75) window.rowconfigure(i, weight=1, minsize=50) for j in range(3): frame = tk.Frame( master=window, relief=tk.RAISED, borderwidth=1 ) frame.g...
true
true
f7614866ecfbda3613a7178e616738d787156fea
1,497
py
Python
tests/nn/test_loss.py
JudyJin/torchTS
2856e1bae8be3b9fdc23dcc2e8339674f1558ba5
[ "MIT" ]
58
2021-05-04T14:42:15.000Z
2022-03-02T15:29:17.000Z
tests/nn/test_loss.py
JudyJin/torchTS
2856e1bae8be3b9fdc23dcc2e8339674f1558ba5
[ "MIT" ]
189
2021-04-24T20:59:45.000Z
2022-03-13T05:55:54.000Z
tests/nn/test_loss.py
JudyJin/torchTS
2856e1bae8be3b9fdc23dcc2e8339674f1558ba5
[ "MIT" ]
25
2021-06-17T00:08:51.000Z
2022-03-08T12:44:11.000Z
import pytest import torch from torchts.nn.loss import masked_mae_loss, mis_loss, quantile_loss @pytest.fixture def y_true(): data = [1, 2, 3] return torch.tensor(data) @pytest.fixture def y_pred(): data = [1.1, 1.9, 3.1] return torch.tensor(data) def test_masked_mae_loss(y_true, y_pred): """...
28.788462
74
0.579158
import pytest import torch from torchts.nn.loss import masked_mae_loss, mis_loss, quantile_loss @pytest.fixture def y_true(): data = [1, 2, 3] return torch.tensor(data) @pytest.fixture def y_pred(): data = [1.1, 1.9, 3.1] return torch.tensor(data) def test_masked_mae_loss(y_true, y_pred): los...
true
true
f76148c3bfd531fc42ed11dc255740ff48d3186f
7,507
py
Python
flicks/videos/tests/test_models.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
1
2015-07-13T03:29:04.000Z
2015-07-13T03:29:04.000Z
flicks/videos/tests/test_models.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2015-03-03T23:02:19.000Z
2019-03-30T04:45:51.000Z
flicks/videos/tests/test_models.py
Mozilla-GitHub-Standards/6f0d85288b5b0ef8beecb60345173dc14c98e40f48e1307a444ab1e08231e695
bf6a382913901ad193d907f022086931df0de8c4
[ "BSD-3-Clause" ]
2
2016-04-15T11:43:05.000Z
2016-04-15T11:43:15.000Z
from mock import ANY, Mock, patch from nose.tools import eq_, ok_ from requests.exceptions import RequestException from flicks.base.tests import TestCase from flicks.users.tests import UserProfileFactory from flicks.videos.models import Video2013 from flicks.videos.tests import Video2013Factory from flicks.videos.vime...
38.896373
80
0.655655
from mock import ANY, Mock, patch from nose.tools import eq_, ok_ from requests.exceptions import RequestException from flicks.base.tests import TestCase from flicks.users.tests import UserProfileFactory from flicks.videos.models import Video2013 from flicks.videos.tests import Video2013Factory from flicks.videos.vime...
true
true
f7614ab4d2cb7c82e65703a9824d1d9456aee5d7
345
py
Python
CN/SocketProgramming/UDPclient.py
shaansubbaiah/CSE-3rd-Year-Labs
a173ef1dbed061471dcb6b2fe2d9db0a5bdbd165
[ "MIT" ]
2
2021-07-02T14:47:20.000Z
2021-09-25T13:43:35.000Z
CN/SocketProgramming/UDPclient.py
shaansubbaiah/CSE-3rd-Year-Labs
a173ef1dbed061471dcb6b2fe2d9db0a5bdbd165
[ "MIT" ]
null
null
null
CN/SocketProgramming/UDPclient.py
shaansubbaiah/CSE-3rd-Year-Labs
a173ef1dbed061471dcb6b2fe2d9db0a5bdbd165
[ "MIT" ]
5
2020-09-23T17:09:34.000Z
2022-01-22T12:02:16.000Z
from socket import * serverName = "127.0.0.1" serverPort = 12000 clientSocket = socket(AF_INET, SOCK_DGRAM) sentence = input("Enter file name: ") clientSocket.sendto(bytes(sentence, "utf-8"), (serverName, serverPort)) filecontents, serverAddress = clientSocket.recvfrom(2048) print("From Server: ", filecontents.decode...
28.75
71
0.75942
from socket import * serverName = "127.0.0.1" serverPort = 12000 clientSocket = socket(AF_INET, SOCK_DGRAM) sentence = input("Enter file name: ") clientSocket.sendto(bytes(sentence, "utf-8"), (serverName, serverPort)) filecontents, serverAddress = clientSocket.recvfrom(2048) print("From Server: ", filecontents.decode...
true
true
f7614aedb652105c2d17f1d57debfd9a1c1a215f
4,683
py
Python
cifar10_train.py
vic0777/kubernetes-hyperparam-exp
b888b20436f02cb6e6fcaa38bd8a83c874161258
[ "MIT" ]
null
null
null
cifar10_train.py
vic0777/kubernetes-hyperparam-exp
b888b20436f02cb6e6fcaa38bd8a83c874161258
[ "MIT" ]
null
null
null
cifar10_train.py
vic0777/kubernetes-hyperparam-exp
b888b20436f02cb6e6fcaa38bd8a83c874161258
[ "MIT" ]
null
null
null
from utils import * #Network definition def conv_bn(c_in, c_out, bn_weight_init=1.0, **kw): if kw['use_bn']: conv_block = { 'conv': nn.Conv2d(c_in, c_out, kernel_size=3, stride=1, padding=1, bias=False), 'bn': batch_norm(c_out, bn_weight_init=bn_weight_init, **kw), 're...
39.025
118
0.612214
from utils import * def conv_bn(c_in, c_out, bn_weight_init=1.0, **kw): if kw['use_bn']: conv_block = { 'conv': nn.Conv2d(c_in, c_out, kernel_size=3, stride=1, padding=1, bias=False), 'bn': batch_norm(c_out, bn_weight_init=bn_weight_init, **kw), 'relu': nn.ReLU(True), ...
true
true
f7614b4c6ed716f14fee8254247959d2a5efe741
917
py
Python
leetcode/sort/179.py
1lch2/PythonExercise
9adbe5fc2bce71f4c09ccf83079c44699c27fce4
[ "MIT" ]
1
2020-08-19T09:26:20.000Z
2020-08-19T09:26:20.000Z
leetcode/sort/179.py
1lch2/PythonExercise
9adbe5fc2bce71f4c09ccf83079c44699c27fce4
[ "MIT" ]
null
null
null
leetcode/sort/179.py
1lch2/PythonExercise
9adbe5fc2bce71f4c09ccf83079c44699c27fce4
[ "MIT" ]
null
null
null
# 给定一组非负整数,重新排列它们的顺序使之组成一个最大的整数。 # 示例 1: # 输入: [10,2] # 输出: 210 # 示例 2: # 输入: [3,30,34,5,9] # 输出: 9534330 # 说明: 输出结果可能非常大,所以你需要返回一个字符串而不是整数。 from typing import List class Solution: def largestNumber(self, nums: List[int]) -> str: nums = self.bubble_sort_mod(nums) return "".join([str(x) ...
24.131579
71
0.495093
from typing import List class Solution: def largestNumber(self, nums: List[int]) -> str: nums = self.bubble_sort_mod(nums) return "".join([str(x) for x in nums]) if nums[0] != 0 else "0" def compare(self, a: int, b: int) -> bool: return str(a) + str(b) < str(b) + str(a...
true
true
f7614bf4f909089401bf2379148dc3570ce8046f
402
py
Python
predict.py
djyangguang/yolov4-pytorch-master
231bed60b07554eba4c269c5324c847d0f7ddd39
[ "MIT" ]
2
2020-12-02T11:50:02.000Z
2022-01-11T02:44:45.000Z
predict.py
djyangguang/yolov4-pytorch-master
231bed60b07554eba4c269c5324c847d0f7ddd39
[ "MIT" ]
null
null
null
predict.py
djyangguang/yolov4-pytorch-master
231bed60b07554eba4c269c5324c847d0f7ddd39
[ "MIT" ]
null
null
null
#-------------------------------------# # 对单张图片进行预测 #-------------------------------------# from yolo import YOLO from PIL import Image # aaa yolo = YOLO() while True: img = input('Input image filename:') try: image = Image.open(img) except: print('Open Error! Try again!') con...
21.157895
42
0.472637
from yolo import YOLO from PIL import Image yolo = YOLO() while True: img = input('Input image filename:') try: image = Image.open(img) except: print('Open Error! Try again!') continue else: r_image = yolo.detect_image(image) r_image.show()
true
true
f7614c1ead00c3c0a8c67d8cd3881ae4c19dac5c
2,788
py
Python
datapack/compiler.py
emorgan00/EasyDatapacks
535bf30a23e4e8fa22ff827bc6c223f91a0228ed
[ "MIT" ]
35
2019-06-23T22:35:56.000Z
2022-02-23T18:09:25.000Z
datapack/compiler.py
emorgan00/EasyDatapacks
535bf30a23e4e8fa22ff827bc6c223f91a0228ed
[ "MIT" ]
5
2019-07-08T04:54:21.000Z
2022-03-24T12:44:19.000Z
datapack/compiler.py
emorgan00/EasyDatapacks
535bf30a23e4e8fa22ff827bc6c223f91a0228ed
[ "MIT" ]
5
2019-06-24T04:09:15.000Z
2022-02-22T03:50:41.000Z
import os import shutil from .namespace import * from .function import CompilationError MCMETA = '''{ "pack" : { "pack_format" : 3, "description" : "data pack generated by EasyDatapacks" } } ''' LOADTICK = '''{ "values" : [ %s ] }''' def compile(destination, files, verbose=False...
29.347368
106
0.577475
import os import shutil from .namespace import * from .function import CompilationError MCMETA = '''{ "pack" : { "pack_format" : 3, "description" : "data pack generated by EasyDatapacks" } } ''' LOADTICK = '''{ "values" : [ %s ] }''' def compile(destination, files, verbose=False...
true
true
f7614cb58756867bfdf97b4a1e1cb4d8180871b7
635
py
Python
backend/manage.py
crowdbotics-apps/amara-app-32756
2456b8bf26189d78d8d9f8af74076d535cded44a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/amara-app-32756
2456b8bf26189d78d8d9f8af74076d535cded44a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/amara-app-32756
2456b8bf26189d78d8d9f8af74076d535cded44a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'amara_app_32756.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rais...
28.863636
79
0.686614
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'amara_app_32756.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and ...
true
true
f7614e3bdc378297999968a4290fc0f391c8705b
4,298
py
Python
mercury_ml/common/providers/data_wrappers/pandas.py
gabrieloexle/mercury-ml
cc663f84a26ee66ae105bbfc0cd1cbd5629031cd
[ "MIT" ]
null
null
null
mercury_ml/common/providers/data_wrappers/pandas.py
gabrieloexle/mercury-ml
cc663f84a26ee66ae105bbfc0cd1cbd5629031cd
[ "MIT" ]
null
null
null
mercury_ml/common/providers/data_wrappers/pandas.py
gabrieloexle/mercury-ml
cc663f84a26ee66ae105bbfc0cd1cbd5629031cd
[ "MIT" ]
null
null
null
class PandasDataWrapper(): """ A DataWrapper with a Pandas DataFrame as its underlying data """ def __init__(self, underlying, field_names): self.underlying = underlying self.field_names = field_names def slice_on_column_names(self, column_names): """ Returns a Pand...
38.720721
132
0.692182
class PandasDataWrapper(): def __init__(self, underlying, field_names): self.underlying = underlying self.field_names = field_names def slice_on_column_names(self, column_names): return self.underlying[column_names] def to_h2o(self, factor_columns_list=None): from mercur...
true
true
f7614f9e768d7da22fc9d219fb743586ac558044
1,181
py
Python
test/test_eridium_main.py
HPENetworking/eridium
a2e76d1b0e1d37256a18e065c61350abddd11edd
[ "Apache-2.0" ]
null
null
null
test/test_eridium_main.py
HPENetworking/eridium
a2e76d1b0e1d37256a18e065c61350abddd11edd
[ "Apache-2.0" ]
null
null
null
test/test_eridium_main.py
HPENetworking/eridium
a2e76d1b0e1d37256a18e065c61350abddd11edd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) Hewlett Packard Enterprise Development LP # # 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 # # Unles...
27.465116
75
0.746825
from __future__ import unicode_literals, absolute_import from __future__ import print_function, division import pytest from eridium import args, main def setup_module(module): print('setup_module({})'.format(module.__name__)) def teardown_module(module): print('teardown_module({})'.format(module.__name...
true
true
f76150431f076e163ca2c03032a17d7fbc983cc6
3,522
py
Python
Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/system_importer/test_system_importer_file_csv_create_cron_meta_views.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
1
2021-07-24T17:22:50.000Z
2021-07-24T17:22:50.000Z
Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/system_importer/test_system_importer_file_csv_create_cron_meta_views.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
2
2022-02-28T03:40:31.000Z
2022-02-28T03:40:52.000Z
Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/system_importer/test_system_importer_file_csv_create_cron_meta_views.py
sn0b4ll/Incident-Playbook
cf519f58fcd4255674662b3620ea97c1091c1efb
[ "MIT" ]
2
2022-02-25T08:34:51.000Z
2022-03-16T17:29:44.000Z
from django.contrib.auth.models import User from django.test import TestCase from dfirtrack.settings import BASE_DIR from dfirtrack_config.models import SystemImporterFileCsvConfigModel from dfirtrack_main.tests.system_importer.config_functions import set_csv_import_filename, set_csv_import_path import os import urllib...
51.043478
167
0.736797
from django.contrib.auth.models import User from django.test import TestCase from dfirtrack.settings import BASE_DIR from dfirtrack_config.models import SystemImporterFileCsvConfigModel from dfirtrack_main.tests.system_importer.config_functions import set_csv_import_filename, set_csv_import_path import os import urllib...
true
true
f761505a94be9cb656be9d4aecc6b442283809af
13,335
py
Python
venv/lib/python2.7/site-packages/openpyxl/reader/worksheet.py
BlueMoon3000/election-2016
9e8f130605bf02ef85391f203381f518e673e183
[ "FSFAP" ]
null
null
null
venv/lib/python2.7/site-packages/openpyxl/reader/worksheet.py
BlueMoon3000/election-2016
9e8f130605bf02ef85391f203381f518e673e183
[ "FSFAP" ]
null
null
null
venv/lib/python2.7/site-packages/openpyxl/reader/worksheet.py
BlueMoon3000/election-2016
9e8f130605bf02ef85391f203381f518e673e183
[ "FSFAP" ]
null
null
null
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Reader for a single worksheet.""" from io import BytesIO # compatibility imports from openpyxl.xml.functions import iterparse # package imports from openpyxl.cell import Cell from openpyxl.worksheet import Worksheet, ColumnDimension, RowDim...
40.904908
106
0.6027
from __future__ import absolute_import from io import BytesIO from openpyxl.xml.functions import iterparse from openpyxl.cell import Cell from openpyxl.worksheet import Worksheet, ColumnDimension, RowDimension from openpyxl.worksheet.iter_worksheet import IterableWorksheet from openpyxl.worksheet.page import PageMar...
true
true
f76150c07dc958addebcb1092fa4038e7c90bea3
2,327
py
Python
day_13/day_13.py
furgerf/advent-of-code-2019
f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac
[ "Apache-2.0" ]
null
null
null
day_13/day_13.py
furgerf/advent-of-code-2019
f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac
[ "Apache-2.0" ]
null
null
null
day_13/day_13.py
furgerf/advent-of-code-2019
f2c6ad9d401c91a7b04bb699d233a7d6ec9da2ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from enum import Enum, unique import numpy as np from day import Day from intcode import Intcode class Day13(Day): @unique class TileType(Enum): NOTHING = 0 WALL = 1 BLOCK = 2 PADDLE = 3 BALL = 4 class GameMap: def __init__(self): ...
23.505051
78
0.646755
from enum import Enum, unique import numpy as np from day import Day from intcode import Intcode class Day13(Day): @unique class TileType(Enum): NOTHING = 0 WALL = 1 BLOCK = 2 PADDLE = 3 BALL = 4 class GameMap: def __init__(self): self._game_map = None self._paddle_x = ...
true
true
f76150dd679bb775035a3a600ff2414e6e7fe132
2,723
py
Python
app/recipe/tests/test_ingredients_api.py
shutkiyasir/recipe-app-api
b094ae92aea950d5028ebf85c78a857be433cde4
[ "MIT" ]
1
2021-08-19T17:43:39.000Z
2021-08-19T17:43:39.000Z
app/recipe/tests/test_ingredients_api.py
shutkiyasir/recipe-app-api
b094ae92aea950d5028ebf85c78a857be433cde4
[ "MIT" ]
null
null
null
app/recipe/tests/test_ingredients_api.py
shutkiyasir/recipe-app-api
b094ae92aea950d5028ebf85c78a857be433cde4
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingredi...
36.306667
75
0.688579
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Ingredient from recipe.serializers import IngredientSerializer INGREDIENTS_URL = reverse('recipe:ingredi...
true
true
f7615185d6362a5f684e308ac10e4e383a613f31
3,150
py
Python
isi_sdk_8_0/isi_sdk_8_0/models/ads_provider_domains.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_0/isi_sdk_8_0/models/ads_provider_domains.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_0/isi_sdk_8_0/models/ads_provider_domains.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 3 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_0.models.ads_provi...
27.391304
102
0.577778
import pprint import re import six from isi_sdk_8_0.models.ads_provider_domains_domain import AdsProviderDomainsDomain class AdsProviderDomains(object): swagger_types = { 'domains': 'list[AdsProviderDomainsDomain]' } attribute_map = { 'domains': 'domains' } def __init__(s...
true
true
f7615205021bd871e363727e5c65fe55ee3068f6
3,668
py
Python
tools/cardiff/compare_sets.py
lebauce/edeploy
a0fe832817a3a39575df50405044c7c4c5b515a5
[ "Apache-2.0" ]
null
null
null
tools/cardiff/compare_sets.py
lebauce/edeploy
a0fe832817a3a39575df50405044c7c4c5b515a5
[ "Apache-2.0" ]
null
null
null
tools/cardiff/compare_sets.py
lebauce/edeploy
a0fe832817a3a39575df50405044c7c4c5b515a5
[ "Apache-2.0" ]
null
null
null
import collections import pprint import os import glob class Machine: def __init__(self, name, value): self.name = name self.value = value def compare(sets): machines = [] for current_set in sets: my_string = repr(sets[current_set]) machines.append(Machine(current_set, my...
33.345455
76
0.5747
import collections import pprint import os import glob class Machine: def __init__(self, name, value): self.name = name self.value = value def compare(sets): machines = [] for current_set in sets: my_string = repr(sets[current_set]) machines.append(Machine(current_set, my...
false
true
f7615329e513a77037b553c287fd1a4ed70427a3
786
py
Python
Example/1/main.py
ayieko168/word-searching-script
5004a3cb9fcb0eb3c485d720887b018595e17c2c
[ "MIT" ]
null
null
null
Example/1/main.py
ayieko168/word-searching-script
5004a3cb9fcb0eb3c485d720887b018595e17c2c
[ "MIT" ]
null
null
null
Example/1/main.py
ayieko168/word-searching-script
5004a3cb9fcb0eb3c485d720887b018595e17c2c
[ "MIT" ]
null
null
null
import csv from serach_function import search_the_word search_word = "antony" # the word to be searched names = [] # Create a "names" list that is used as the search list with open("baby-names.csv", "r") as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: ...
23.117647
55
0.627226
import csv from serach_function import search_the_word search_word = "antony" names = [] with open("baby-names.csv", "r") as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: if line_count == 0: print("line one") line_count += ...
true
true
f761534e883a2b621933e073476b1f00d6b2b3e8
6,302
py
Python
tests/corpus/io/test_musan.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
tests/corpus/io/test_musan.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
tests/corpus/io/test_musan.py
toddrme2178/audiomate
14e932ce9c0b0bebb895d496cb6054521fc80ab1
[ "MIT" ]
null
null
null
import unittest import pytest import requests_mock import os from audiomate import corpus from audiomate.corpus import io from audiomate.corpus.io import musan from audiomate.corpus import assets from tests import resources @pytest.fixture() def tar_data(): with open(resources.get_resource_path(['sample_files', ...
46.338235
110
0.678197
import unittest import pytest import requests_mock import os from audiomate import corpus from audiomate.corpus import io from audiomate.corpus.io import musan from audiomate.corpus import assets from tests import resources @pytest.fixture() def tar_data(): with open(resources.get_resource_path(['sample_files', ...
true
true
f7615392a09088e5a71c5d72f83a5f94c34f8326
9,436
py
Python
parliament/__init__.py
xen0l/parliament
b90db4e89f014a9b74debae815d639742701f867
[ "BSD-3-Clause" ]
null
null
null
parliament/__init__.py
xen0l/parliament
b90db4e89f014a9b74debae815d639742701f867
[ "BSD-3-Clause" ]
null
null
null
parliament/__init__.py
xen0l/parliament
b90db4e89f014a9b74debae815d639742701f867
[ "BSD-3-Clause" ]
null
null
null
""" This library is a linter for AWS IAM policies. """ __version__ = "0.4.6" import os import json import yaml import re import fnmatch import pkg_resources # On initialization, load the IAM data iam_definition_path = pkg_resources.resource_filename(__name__, "iam_definition.json") iam_definition = json.load(open(iam...
36.153257
204
0.624099
__version__ = "0.4.6" import os import json import yaml import re import fnmatch import pkg_resources iam_definition_path = pkg_resources.resource_filename(__name__, "iam_definition.json") iam_definition = json.load(open(iam_definition_path, "r")) config_path = pkg_resources.resource_filename(__name__, "config.yaml"...
true
true
f7615400d183e1958b116d436020f1f1fe2fbcc9
352
py
Python
apps/base/migrations/0053_auto_20190820_1850.py
gvizquel/pyerp
c859f7293cabd1003f79112463cee93ac89fccba
[ "MIT" ]
null
null
null
apps/base/migrations/0053_auto_20190820_1850.py
gvizquel/pyerp
c859f7293cabd1003f79112463cee93ac89fccba
[ "MIT" ]
11
2020-06-05T22:50:37.000Z
2022-02-10T09:05:56.000Z
apps/base/migrations/0053_auto_20190820_1850.py
gvizquel/pyerp
c859f7293cabd1003f79112463cee93ac89fccba
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-20 22:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0052_pylog'), ] operations = [ migrations.DeleteModel( name='PyArticle', ), migrations.DeleteModel( ...
17.6
47
0.556818
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0052_pylog'), ] operations = [ migrations.DeleteModel( name='PyArticle', ), migrations.DeleteModel( name='PyLead', ), ]
true
true
f7615489073b530f1890cebbb9c1bbf67d1f5207
7,542
py
Python
androguard/core/androgen.py
yathindrakodithuwakku/Android-Malware-Detection
37fb44692d3165da7cee135774474627b7a5f924
[ "MIT" ]
22
2019-11-10T06:03:07.000Z
2022-02-28T07:37:07.000Z
androguard/core/androgen.py
yathindrakodithuwakku/Android-Malware-Detection
37fb44692d3165da7cee135774474627b7a5f924
[ "MIT" ]
2
2018-11-22T05:31:02.000Z
2019-05-12T01:50:42.000Z
androguard/core/androgen.py
yathindrakodithuwakku/Android-Malware-Detection
37fb44692d3165da7cee135774474627b7a5f924
[ "MIT" ]
10
2018-10-16T08:18:50.000Z
2022-03-15T08:23:17.000Z
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
28.896552
168
0.575709
from androguard.core import androconf from androguard.core.bytecodes import dvm from androguard.core.bytecodes import apk from androguard.core.analysis import analysis from androguard.core.analysis import ganalysis from androguard.util import read class BC(object): def __init__(self, bc): self.__bc = bc ...
true
true
f761548af52257bee1f231a75bb339fc4280b362
8,820
py
Python
docs/conf.py
WGBH/django-textplusstuff
008b0dfd86a44f0e894272f15d8c61a68ea7b705
[ "MIT" ]
5
2015-02-09T15:14:45.000Z
2016-07-17T02:29:38.000Z
docs/conf.py
WGBH/django-textplusstuff
008b0dfd86a44f0e894272f15d8c61a68ea7b705
[ "MIT" ]
4
2015-02-10T16:10:51.000Z
2021-06-10T20:35:10.000Z
docs/conf.py
WGBH/django-textplusstuff
008b0dfd86a44f0e894272f15d8c61a68ea7b705
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # django-textplusstuff documentation build configuration file, created by # sphinx-quickstart on Mon Feb 9 09:12:04 2015. # # 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 # autogenerate...
32.189781
93
0.722222
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'django-textplusstuff' copyright = u'2018, WGBH Educational Foundation' # |version| and |release|, als...
true
true
f76154c1b8265a401751f030b5fe5650eedc9377
13,636
py
Python
src/external-functions/main_ui.py
Zbomb2000/IXL-Bot
2d8c5aad5222d6e002f7970c6ed3bbf91cb65619
[ "Unlicense" ]
1
2021-09-02T18:07:30.000Z
2021-09-02T18:07:30.000Z
src/external-functions/main_ui.py
Zbomb2000/IXL-Bot
2d8c5aad5222d6e002f7970c6ed3bbf91cb65619
[ "Unlicense" ]
6
2021-10-16T22:29:03.000Z
2021-11-04T13:15:03.000Z
src/external-functions/main_ui.py
Zbomb2000/IXL-Bot
2d8c5aad5222d6e002f7970c6ed3bbf91cb65619
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 import PIL from PIL import ImageTk import sys import os import json import re from validate_email_address import validate_email # Checks for libraries that might not be installed try: try: import tkinter as tk except: import Tkinter as tk except: print("You need to instal...
31.711628
154
0.553828
import PIL from PIL import ImageTk import sys import os import json import re from validate_email_address import validate_email try: try: import tkinter as tk except: import Tkinter as tk except: print("You need to install the tkinter module (sudo apt-get install python3-tk python3-dev).") ...
true
true
f76155671d609034cee340b00cb426fe45133ba1
933
py
Python
src/visions/application/summaries/series/numerical_summary.py
ieaves/tenzing
92d39c1c3a5633d8074e0ffe8c2687c465aebbc8
[ "MIT" ]
null
null
null
src/visions/application/summaries/series/numerical_summary.py
ieaves/tenzing
92d39c1c3a5633d8074e0ffe8c2687c465aebbc8
[ "MIT" ]
null
null
null
src/visions/application/summaries/series/numerical_summary.py
ieaves/tenzing
92d39c1c3a5633d8074e0ffe8c2687c465aebbc8
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def numerical_summary(series: pd.Series) -> dict: """ Args: series: series to summarize Returns: """ aggregates = [ "mean", "std", "var", "max", "min", "median", "kurt", "skew", ...
23.923077
83
0.565916
import numpy as np import pandas as pd def numerical_summary(series: pd.Series) -> dict: aggregates = [ "mean", "std", "var", "max", "min", "median", "kurt", "skew", "sum", "mad", ] summary = series.agg(aggregates).to_dict() ...
true
true
f76155b48a84f750729a6e4a750b91f368163bc0
10,836
py
Python
ptest/main.py
KarlGong/ptest
a17e82ff64465daeadcc8b73a44650a4044901d4
[ "Apache-2.0" ]
65
2015-05-22T12:35:35.000Z
2022-01-12T10:14:32.000Z
ptest/main.py
KarlGong/ptest
a17e82ff64465daeadcc8b73a44650a4044901d4
[ "Apache-2.0" ]
3
2019-07-24T23:21:08.000Z
2020-10-28T12:14:50.000Z
ptest/main.py
KarlGong/ptest
a17e82ff64465daeadcc8b73a44650a4044901d4
[ "Apache-2.0" ]
10
2017-06-26T06:05:03.000Z
2021-12-08T07:50:10.000Z
import importlib import os import shlex import traceback from xml.dom import minidom from .util import make_dirs, remove_tree def get_rerun_targets(xml_file: str): test_targets = [] doc = minidom.parse(xml_file) if doc.documentElement.nodeName == "testsuites": root = doc.documentElement else:...
40.736842
135
0.678848
import importlib import os import shlex import traceback from xml.dom import minidom from .util import make_dirs, remove_tree def get_rerun_targets(xml_file: str): test_targets = [] doc = minidom.parse(xml_file) if doc.documentElement.nodeName == "testsuites": root = doc.documentElement else:...
true
true
f76155c116a91e220143eb6f49fe7e0f006e0558
3,329
py
Python
webapp.py
baszoetekouw/SurfChange
e3f8fe00be3391fb66df6f3410154ef7b75c6e26
[ "MIT" ]
null
null
null
webapp.py
baszoetekouw/SurfChange
e3f8fe00be3391fb66df6f3410154ef7b75c6e26
[ "MIT" ]
null
null
null
webapp.py
baszoetekouw/SurfChange
e3f8fe00be3391fb66df6f3410154ef7b75c6e26
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import flask import surfagenda import exchangelib import exchangelib.errors import json import configparser import base64 from pprint import pprint def read_config(): config = configparser.ConfigParser() config.read('webapp.config') if not ( config.has_section('config') and config....
30.541284
112
0.704416
import flask import surfagenda import exchangelib import exchangelib.errors import json import configparser import base64 from pprint import pprint def read_config(): config = configparser.ConfigParser() config.read('webapp.config') if not ( config.has_section('config') and config.has_option('config', 'u...
true
true
f761564c5dcf60efc0dbcb4c5c6094e373d66173
1,620
py
Python
synergine/lib/factory/factory.py
buxx/synergine
da05d762cdbc993362807d4851e1ca74784438ae
[ "Apache-2.0" ]
6
2015-04-03T08:04:22.000Z
2016-11-13T22:47:11.000Z
synergine/lib/factory/factory.py
buxx/synergine
da05d762cdbc993362807d4851e1ca74784438ae
[ "Apache-2.0" ]
2
2019-10-21T15:41:39.000Z
2021-06-10T14:15:27.000Z
synergine/lib/factory/factory.py
buxx/synergine
da05d762cdbc993362807d4851e1ca74784438ae
[ "Apache-2.0" ]
2
2015-02-27T12:05:51.000Z
2016-05-11T07:25:20.000Z
class Factory: class __Factory: def __init__(self): self._extend_registry = {} self._class_registry = {} def extend(self, object_name, extend_class, parent_class): if object_name not in self._extend_registry: self._extend_registry[object_name] = [...
45
103
0.603704
class Factory: class __Factory: def __init__(self): self._extend_registry = {} self._class_registry = {} def extend(self, object_name, extend_class, parent_class): if object_name not in self._extend_registry: self._extend_registry[object_name] = [...
true
true
f76156701ce9fcf45bbeab5e4afeea00d85cc7a8
240
py
Python
basepy/more/yaml_config.py
pyflow/insightpy
d80f11277a7903f0ca679ceae1def0037ca2d920
[ "MIT" ]
null
null
null
basepy/more/yaml_config.py
pyflow/insightpy
d80f11277a7903f0ca679ceae1def0037ca2d920
[ "MIT" ]
null
null
null
basepy/more/yaml_config.py
pyflow/insightpy
d80f11277a7903f0ca679ceae1def0037ca2d920
[ "MIT" ]
null
null
null
import yaml from basepy.config import Settings def load_yaml(content_str): ret = yaml.safe_load(content_str) return ret def load(): Settings.register_loader('.yaml', load_yaml) Settings.register_loader('.yml', load_yaml)
20
48
0.7375
import yaml from basepy.config import Settings def load_yaml(content_str): ret = yaml.safe_load(content_str) return ret def load(): Settings.register_loader('.yaml', load_yaml) Settings.register_loader('.yml', load_yaml)
true
true
f76156e344618938fb8a94da34c405b94ba0bc34
2,614
py
Python
Python exercicios/pratico-03.py
andrelopes1977/python-exercicios
06f9b5aa0defeda3030a861a0a9f16b4769bc810
[ "MIT" ]
null
null
null
Python exercicios/pratico-03.py
andrelopes1977/python-exercicios
06f9b5aa0defeda3030a861a0a9f16b4769bc810
[ "MIT" ]
null
null
null
Python exercicios/pratico-03.py
andrelopes1977/python-exercicios
06f9b5aa0defeda3030a861a0a9f16b4769bc810
[ "MIT" ]
null
null
null
#Equação de Segundo grau #CLS def cls(): import os os.system('cls') #FUNÇÕES def delta(a,b,c): delta = (b**2) - (4*a*c) return {"delta":delta} def raizes(a,b,c,delta): x1 = (-b+ delta**(1.0/2.0)) / (2.0*a) x2 = (-b- delta**(1.0/2.0)) / (2.0*a) return {"x1":x1,"x2":x2} def vertices(a,b,delta)...
29.370787
108
0.519128
def cls(): import os os.system('cls') def delta(a,b,c): delta = (b**2) - (4*a*c) return {"delta":delta} def raizes(a,b,c,delta): x1 = (-b+ delta**(1.0/2.0)) / (2.0*a) x2 = (-b- delta**(1.0/2.0)) / (2.0*a) return {"x1":x1,"x2":x2} def vertices(a,b,delta): xv = (-(b))/ (2.0*a) yv = (-(...
true
true
f7615703df505d06d8fbccbf4d9d44c157658d83
3,279
py
Python
data_analysis/conv_att2npz.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
data_analysis/conv_att2npz.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
null
null
null
data_analysis/conv_att2npz.py
KaidongLi/pytorch-LatticePointClassifier
5c00bb0f808a928ea57acb8a79364d62eb955cee
[ "MIT" ]
1
2022-03-29T21:03:38.000Z
2022-03-29T21:03:38.000Z
import os import pdb import argparse import numpy as np PEND_ORIG = 'orig' # PEND_NEW = 'splat' PEND_ATT = 'adv' PEND_ATT_FAIL = 'adv_f' PEND_ATT2D = '2dimg' PEND_PRED = 'pred' parser = argparse.ArgumentParser( description='test shape net show image') parser.add_argument('--img_dir', default='../log', type=str)...
33.121212
133
0.590729
import os import pdb import argparse import numpy as np PEND_ORIG = 'orig' PEND_ATT = 'adv' PEND_ATT_FAIL = 'adv_f' PEND_ATT2D = '2dimg' PEND_PRED = 'pred' parser = argparse.ArgumentParser( description='test shape net show image') parser.add_argument('--img_dir', default='../log', type=str) args = parser.parse...
true
true
f7615708662db623276cad7e34f70bf60768ced2
1,218
py
Python
mashumaro/serializer/yaml.py
LegartisTech/mashumaro
522965c1d3d85d48b76df929bba890a25a39423a
[ "Apache-2.0" ]
null
null
null
mashumaro/serializer/yaml.py
LegartisTech/mashumaro
522965c1d3d85d48b76df929bba890a25a39423a
[ "Apache-2.0" ]
null
null
null
mashumaro/serializer/yaml.py
LegartisTech/mashumaro
522965c1d3d85d48b76df929bba890a25a39423a
[ "Apache-2.0" ]
1
2021-01-04T16:09:46.000Z
2021-01-04T16:09:46.000Z
from typing import Union, Optional, Callable, Dict, Mapping, TypeVar, Type from types import MappingProxyType import yaml from mashumaro.serializer.base import DataClassDictMixin DEFAULT_DICT_PARAMS = { 'use_bytes': False, 'use_enum': False, 'use_datetime': False } EncodedData = Union[str, bytes] Encode...
28.325581
74
0.632184
from typing import Union, Optional, Callable, Dict, Mapping, TypeVar, Type from types import MappingProxyType import yaml from mashumaro.serializer.base import DataClassDictMixin DEFAULT_DICT_PARAMS = { 'use_bytes': False, 'use_enum': False, 'use_datetime': False } EncodedData = Union[str, bytes] Encode...
true
true
f76157546a0bbb257c3dacd2d2a82690a893e748
296
py
Python
3-Stacks and Queues/p96_queue.py
ThomasCaud/go-tests
585b397df6f82a3972dba5da42dc6f3279236e51
[ "MIT" ]
null
null
null
3-Stacks and Queues/p96_queue.py
ThomasCaud/go-tests
585b397df6f82a3972dba5da42dc6f3279236e51
[ "MIT" ]
null
null
null
3-Stacks and Queues/p96_queue.py
ThomasCaud/go-tests
585b397df6f82a3972dba5da42dc6f3279236e51
[ "MIT" ]
null
null
null
class Queue: def __init__(self): self.items = [] def add(self): self.items.append(item) def remove(self): self.items = self.items[1:] def peek(self): return self.items[0] def isEmpty(self): return self.items == [] def
16.444444
35
0.52027
class Queue: def __init__(self): self.items = [] def add(self): self.items.append(item) def remove(self): self.items = self.items[1:] def peek(self): return self.items[0] def isEmpty(self): return self.items == [] def
false
true
f76158a2e6921bf19251d152d7094c978411c3f4
1,277
py
Python
megafon_phones/megafon_phones/spiders/megafon.py
suvit/scrapy-megafon-phones
3270f29aefe062c8c68afd0235f99312340718be
[ "MIT" ]
1
2015-09-10T22:54:23.000Z
2015-09-10T22:54:23.000Z
megafon_phones/megafon_phones/spiders/megafon.py
suvit/scrapy-megafon-phones
3270f29aefe062c8c68afd0235f99312340718be
[ "MIT" ]
null
null
null
megafon_phones/megafon_phones/spiders/megafon.py
suvit/scrapy-megafon-phones
3270f29aefe062c8c68afd0235f99312340718be
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from urllib import quote, urlencode from urlparse import urljoin, urlsplit, parse_qs from scrapy.spider import Spider from scrapy.http import Request from scrapy.selector import Selector from megafon_phones.items import PhoneItem class PhoneSpider(Spider): name = "megafon_phones" all...
33.605263
93
0.643696
from urllib import quote, urlencode from urlparse import urljoin, urlsplit, parse_qs from scrapy.spider import Spider from scrapy.http import Request from scrapy.selector import Selector from megafon_phones.items import PhoneItem class PhoneSpider(Spider): name = "megafon_phones" allowed_domains = ["svr.sho...
true
true
f761593a3d6f2b3ee73ae2310f1051beb1ab1782
438
py
Python
Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/fmi/__init__.py
marient/PelePhysics
e6ad1839d77b194e09ab44ff850c9489652e5d81
[ "BSD-3-Clause-LBNL" ]
1
2019-04-24T13:32:23.000Z
2019-04-24T13:32:23.000Z
Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/fmi/__init__.py
marient/PelePhysics
e6ad1839d77b194e09ab44ff850c9489652e5d81
[ "BSD-3-Clause-LBNL" ]
null
null
null
Support/Fuego/Pythia/pythia-0.4/packages/fuego/fuego/fmi/__init__.py
marient/PelePhysics
e6ad1839d77b194e09ab44ff850c9489652e5d81
[ "BSD-3-Clause-LBNL" ]
null
null
null
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2003 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~...
24.333333
83
0.280822
__id__ = "$Id$"
true
true
f7615a3b81dc66b8fe8af382099173fd5abc7d6d
5,968
py
Python
tensorflow_recommenders/layers/loss.py
Noba1anc3/recommenders
c793b31f64f515d93bbfd3358b9aab4123a01d69
[ "Apache-2.0" ]
1
2022-03-28T07:48:16.000Z
2022-03-28T07:48:16.000Z
tensorflow_recommenders/layers/loss.py
xiechunHonor/recommenders
fb886881137ca3add05bb0d478a4751207ca5559
[ "Apache-2.0" ]
null
null
null
tensorflow_recommenders/layers/loss.py
xiechunHonor/recommenders
fb886881137ca3add05bb0d478a4751207ca5559
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The TensorFlow Recommenders Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
37.534591
82
0.710791
from typing import Tuple import numpy as np import tensorflow as tf MAX_FLOAT = np.finfo(np.float32).max / 100.0 MIN_FLOAT = np.finfo(np.float32).min / 100.0 def _gather_elements_along_row(data: tf.Tensor, column_indices: tf.Tensor) -> tf.Tensor: with tf.control_dependencies( ...
true
true
f7615ab1f7875a3640e070e380b7b2cd9dbe6951
103
py
Python
graphite_feeder/handler/event/appliance/sound/player/fade_in/__init__.py
majamassarini/automate-graphite-feeder
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
[ "MIT" ]
null
null
null
graphite_feeder/handler/event/appliance/sound/player/fade_in/__init__.py
majamassarini/automate-graphite-feeder
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
[ "MIT" ]
null
null
null
graphite_feeder/handler/event/appliance/sound/player/fade_in/__init__.py
majamassarini/automate-graphite-feeder
0f17f99bbdaab86e10e0b7d424d055ff44fc4ca0
[ "MIT" ]
null
null
null
from graphite_feeder.handler.event.appliance.sound.player.fade_in import ( volume, playlist, )
20.6
74
0.757282
from graphite_feeder.handler.event.appliance.sound.player.fade_in import ( volume, playlist, )
true
true
f7615b3eb29fddee9503c14c029be7a01f89a0c3
1,174
py
Python
pykage/command/base_cmd.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
pykage/command/base_cmd.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
pykage/command/base_cmd.py
antoineB24/pykage
472bd9b80f93b3a1c61851370915b843ff2719c9
[ "MIT" ]
null
null
null
import abc def yad(decorators): def decorator(f): for d in reversed(decorators): f = d(f) return f return decorator class Callable(object): def __init__(self, f): self.f = f self.__name__ = f.__name__ def __call__(self, *args, **kwargs): return s...
19.898305
74
0.546848
import abc def yad(decorators): def decorator(f): for d in reversed(decorators): f = d(f) return f return decorator class Callable(object): def __init__(self, f): self.f = f self.__name__ = f.__name__ def __call__(self, *args, **kwargs): return s...
true
true
f7615babae8a28ebf381e786ec512e8d6e9333a5
5,201
py
Python
saas/backend/account/backends.py
Chace-wang/bk-iam-saas
b06b3c8dae4a86546f58228db70809be4166fac4
[ "MIT" ]
null
null
null
saas/backend/account/backends.py
Chace-wang/bk-iam-saas
b06b3c8dae4a86546f58228db70809be4166fac4
[ "MIT" ]
null
null
null
saas/backend/account/backends.py
Chace-wang/bk-iam-saas
b06b3c8dae4a86546f58228db70809be4166fac4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with th...
39.70229
115
0.609498
import logging import traceback from django.contrib.auth.backends import ModelBackend from django.db import IntegrityError from backend.account import get_user_model from backend.component import login logger = logging.getLogger("app") ROLE_TYPE_ADMIN = "1" class TokenBackend(ModelBackend): def authenticate(s...
true
true
f7615ce64cbae4a48da9725ec36db8714ea48dd8
250
py
Python
test_1E.py
Jihwankim818/NumbPie6-9
c40747c09369d69a3f1ec5a746c17445c85db77b
[ "MIT" ]
null
null
null
test_1E.py
Jihwankim818/NumbPie6-9
c40747c09369d69a3f1ec5a746c17445c85db77b
[ "MIT" ]
null
null
null
test_1E.py
Jihwankim818/NumbPie6-9
c40747c09369d69a3f1ec5a746c17445c85db77b
[ "MIT" ]
1
2022-01-24T16:55:49.000Z
2022-01-24T16:55:49.000Z
from floodsystem.stationdata import build_station_list from floodsystem.geo import rivers_by_station_number stations = build_station_list() def test_rivers_by_station_number(): x = rivers_by_station_number(stations, 9) assert len(x) > 0
31.25
54
0.804
from floodsystem.stationdata import build_station_list from floodsystem.geo import rivers_by_station_number stations = build_station_list() def test_rivers_by_station_number(): x = rivers_by_station_number(stations, 9) assert len(x) > 0
true
true
f7615cf5def70979bd4eca5568bbb685b21e8712
410
py
Python
compartment/Node.py
buaacjw/Epidemic-Modeling-survey
d0065a2dd4c43eb1fe724d1facde2ec577ecfa94
[ "Apache-2.0" ]
4
2021-09-15T06:39:10.000Z
2022-01-21T03:47:15.000Z
compartment/Node.py
buaacjw/Epidemic-Modeling-survey
d0065a2dd4c43eb1fe724d1facde2ec577ecfa94
[ "Apache-2.0" ]
null
null
null
compartment/Node.py
buaacjw/Epidemic-Modeling-survey
d0065a2dd4c43eb1fe724d1facde2ec577ecfa94
[ "Apache-2.0" ]
1
2021-10-31T01:30:12.000Z
2021-10-31T01:30:12.000Z
ERRCODE = { 'SUCCEED': 0, 'NO_DUPLICATED_EDGE': 4 } class Node: name = '' next_name_list = {} def __init__(self, name: str): self.name = name self.next_name_list = {} def add_next(self, name: str): if name in self.next_name_list.keys(): return ERRCODE['NO_...
20.5
48
0.582927
ERRCODE = { 'SUCCEED': 0, 'NO_DUPLICATED_EDGE': 4 } class Node: name = '' next_name_list = {} def __init__(self, name: str): self.name = name self.next_name_list = {} def add_next(self, name: str): if name in self.next_name_list.keys(): return ERRCODE['NO_...
true
true
f7615d96b1f684e6e6ee6831d2e86fcadaf75a00
179
py
Python
featuretools/tests/entry_point_tests/add-ons/featuretools_primitives/featuretools_primitives/new_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
4,299
2017-09-09T02:41:29.000Z
2019-10-10T05:41:11.000Z
featuretools/tests/entry_point_tests/add-ons/featuretools_primitives/featuretools_primitives/new_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
729
2017-09-22T01:54:48.000Z
2019-10-09T15:36:17.000Z
featuretools/tests/entry_point_tests/add-ons/featuretools_primitives/featuretools_primitives/new_primitive.py
Featuretools/featuretools
365abd9519d2eec8eec75936644a7b865d4ef40a
[ "BSD-3-Clause" ]
532
2017-09-13T14:18:22.000Z
2019-10-08T06:13:46.000Z
from featuretools.primitives.base import TransformPrimitive class NewPrimitive(TransformPrimitive): """A primitive that should not currently exist for testing.""" pass
22.375
66
0.782123
from featuretools.primitives.base import TransformPrimitive class NewPrimitive(TransformPrimitive): pass
true
true
f7615e210552707c60d43296814370a25ef14bab
12,698
py
Python
smac_widgets/smac_layouts.py
initio-smac/smac_kivy
deb37e34fdc9df8e6629f418b662b5a001ffe1b4
[ "Apache-2.0" ]
null
null
null
smac_widgets/smac_layouts.py
initio-smac/smac_kivy
deb37e34fdc9df8e6629f418b662b5a001ffe1b4
[ "Apache-2.0" ]
null
null
null
smac_widgets/smac_layouts.py
initio-smac/smac_kivy
deb37e34fdc9df8e6629f418b662b5a001ffe1b4
[ "Apache-2.0" ]
null
null
null
from kivy.animation import Animation from kivy.app import App from kivy.core.text import DEFAULT_FONT from kivy.metrics import dp from kivy.uix.boxlayout import BoxLayout from kivy.uix.behaviors import ButtonBehavior from kivy.uix.button import Button from kivy.uix.checkbox import CheckBox from kivy.uix.gridlayout impo...
30.305489
108
0.653883
from kivy.animation import Animation from kivy.app import App from kivy.core.text import DEFAULT_FONT from kivy.metrics import dp from kivy.uix.boxlayout import BoxLayout from kivy.uix.behaviors import ButtonBehavior from kivy.uix.button import Button from kivy.uix.checkbox import CheckBox from kivy.uix.gridlayout impo...
true
true
f7615e38ee83b381a4bd4051991ac6c5b0caeb7e
7,786
py
Python
segmentation_models_pytorch/losses/lovasz.py
MikePham05/segmentation_models.pytorch
f61acfedf5e5b122430abb71181126bf1a288a94
[ "MIT" ]
18
2021-08-16T01:13:53.000Z
2022-03-14T17:38:52.000Z
segmentation_models_pytorch/losses/lovasz.py
MikePham05/segmentation_models.pytorch
f61acfedf5e5b122430abb71181126bf1a288a94
[ "MIT" ]
20
2021-10-06T06:08:08.000Z
2022-03-28T09:49:44.000Z
segmentation_models_pytorch/losses/lovasz.py
MikePham05/segmentation_models.pytorch
f61acfedf5e5b122430abb71181126bf1a288a94
[ "MIT" ]
8
2021-06-29T10:01:28.000Z
2022-02-16T13:31:02.000Z
""" Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License) """ from __future__ import print_function, division from typing import Optional import torch import torch.nn.functional as F from torch.autograd import Variable from torch.nn.modules.loss import _Loss from .constan...
34.149123
112
0.619702
from __future__ import print_function, division from typing import Optional import torch import torch.nn.functional as F from torch.autograd import Variable from torch.nn.modules.loss import _Loss from .constants import BINARY_MODE, MULTICLASS_MODE, MULTILABEL_MODE try: from itertools import ifilterfalse except ...
true
true
f7615f033c928becc51b59e5951ba8d81425210d
8,054
py
Python
fastai/conv_learner.py
antibalas/fastai
5fd909e394d8644a61c648c07b8177c14ffd0965
[ "Apache-2.0" ]
17
2018-07-07T01:39:57.000Z
2021-01-20T19:24:03.000Z
fastai/conv_learner.py
antibalas/fastai
5fd909e394d8644a61c648c07b8177c14ffd0965
[ "Apache-2.0" ]
2
2021-11-10T19:44:03.000Z
2022-01-13T03:49:58.000Z
fastai/conv_learner.py
PiotrCzapla/fastai
848405510b9f3c36eff9af1666514babd8cf165e
[ "Apache-2.0" ]
4
2018-04-18T05:14:38.000Z
2021-06-14T17:19:43.000Z
from .core import * from .layers import * from .learner import * from .initializers import * model_meta = { resnet18:[8,6], resnet34:[8,6], resnet50:[8,6], resnet101:[8,6], resnet152:[8,6], vgg16:[0,22], vgg19:[0,22], resnext50:[8,6], resnext101:[8,6], resnext101_64:[8,6], wrn:[8,6], inceptionresnet_2:...
40.472362
117
0.634592
from .core import * from .layers import * from .learner import * from .initializers import * model_meta = { resnet18:[8,6], resnet34:[8,6], resnet50:[8,6], resnet101:[8,6], resnet152:[8,6], vgg16:[0,22], vgg19:[0,22], resnext50:[8,6], resnext101:[8,6], resnext101_64:[8,6], wrn:[8,6], inceptionresnet_2:...
true
true
f7615f224e654060ca28d57619ea832340cc64c4
4,924
py
Python
instructor10/test.py
alpdenizz/PythonPlayground
74ae5c93fe47d057bfec0aa56110dee7e8674e01
[ "MIT" ]
null
null
null
instructor10/test.py
alpdenizz/PythonPlayground
74ae5c93fe47d057bfec0aa56110dee7e8674e01
[ "MIT" ]
null
null
null
instructor10/test.py
alpdenizz/PythonPlayground
74ae5c93fe47d057bfec0aa56110dee7e8674e01
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse, sys, os, datetime from smartcard.CardType import AnyCardType from smartcard.CardRequest import CardRequest from smartcard.CardConnection import CardConnection from smartcard.util import toHexString, HexListToBinString # parse arguments parser = argparse.ArgumentParser(add_help=F...
32.826667
144
0.64805
import argparse, sys, os, datetime from smartcard.CardType import AnyCardType from smartcard.CardRequest import CardRequest from smartcard.CardConnection import CardConnection from smartcard.util import toHexString, HexListToBinString parser = argparse.ArgumentParser(add_help=False) parser.add_argument('--keysize', r...
false
true
f761600730202620a6a2a4f161003cec42103847
1,764
py
Python
ardana_installer_server/util.py
rsalevsky/ardana-installer-server
1360a4d9365c743528a8d586a664be6d1634d923
[ "Apache-2.0" ]
1
2017-12-12T16:07:26.000Z
2017-12-12T16:07:26.000Z
ardana_installer_server/util.py
rsalevsky/ardana-installer-server
1360a4d9365c743528a8d586a664be6d1634d923
[ "Apache-2.0" ]
9
2017-12-14T22:15:25.000Z
2018-10-17T19:18:45.000Z
ardana_installer_server/util.py
rsalevsky/ardana-installer-server
1360a4d9365c743528a8d586a664be6d1634d923
[ "Apache-2.0" ]
2
2017-12-14T07:56:31.000Z
2018-05-18T13:32:11.000Z
# (c) Copyright 2017-2018 SUSE 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
28.918033
79
0.677438
import datetime from flask import abort from flask.json import JSONEncoder import requests import socket import sys if sys.version_info.major < 3: from xmlrpclib import DateTime else: from xmlrpc.client import DateTime TIMEOUT = 2 class CustomJSONEncoder(JSONEncoder): def default(self, obj): try...
true
true
f76161a681e9477dc9b1ad7f3d25d261c65baac8
7,866
py
Python
scrapy/utils/deprecate.py
jesuslosada/scrapy
8be28fe4ca8b1cd011d5f7e03661da8a6bb3217b
[ "BSD-3-Clause" ]
22
2018-03-13T13:51:41.000Z
2022-02-19T07:27:48.000Z
scrapy/utils/deprecate.py
jesuslosada/scrapy
8be28fe4ca8b1cd011d5f7e03661da8a6bb3217b
[ "BSD-3-Clause" ]
1
2016-10-20T13:15:22.000Z
2016-11-21T09:21:26.000Z
scrapy/utils/deprecate.py
jesuslosada/scrapy
8be28fe4ca8b1cd011d5f7e03661da8a6bb3217b
[ "BSD-3-Clause" ]
5
2018-03-28T09:07:03.000Z
2020-02-23T12:49:52.000Z
"""Some helpers for deprecation messages""" import warnings import inspect from scrapy.exceptions import ScrapyDeprecationWarning def attribute(obj, oldattr, newattr, version='0.12'): cname = obj.__class__.__name__ warnings.warn("%s.%s attribute is deprecated and will be no longer supported " "in Scr...
41.183246
110
0.614035
import warnings import inspect from scrapy.exceptions import ScrapyDeprecationWarning def attribute(obj, oldattr, newattr, version='0.12'): cname = obj.__class__.__name__ warnings.warn("%s.%s attribute is deprecated and will be no longer supported " "in Scrapy %s, use %s.%s attribute instead" % \ ...
true
true
f761636e64b22361821bdaa49b5a3e40cf888cf5
298
py
Python
molecool/tests/test_molecule.py
jamesluo274/molecool2
664ca06527a3767003f1fdf2697b1f1ff6d0cd23
[ "MIT" ]
null
null
null
molecool/tests/test_molecule.py
jamesluo274/molecool2
664ca06527a3767003f1fdf2697b1f1ff6d0cd23
[ "MIT" ]
1
2020-12-18T02:23:38.000Z
2020-12-18T02:23:38.000Z
molecool/tests/test_molecule.py
jamesluo274/molecool2
664ca06527a3767003f1fdf2697b1f1ff6d0cd23
[ "MIT" ]
null
null
null
""" Tests for the molecule module. """ import pytest import molecool def test_molecular_mass(): symbols = ['C', 'H', 'H', 'H', 'H'] calculated_mass = molecool.calculate_molecular_mass(symbols) actual_mass = 16.04 assert pytest.approx(actual_mass, abs=1e-2) == calculated_mass
18.625
66
0.684564
import pytest import molecool def test_molecular_mass(): symbols = ['C', 'H', 'H', 'H', 'H'] calculated_mass = molecool.calculate_molecular_mass(symbols) actual_mass = 16.04 assert pytest.approx(actual_mass, abs=1e-2) == calculated_mass
true
true
f76163bb08cc32efdc6d46d7dfada76249f7a41e
1,799
py
Python
python_scripts/trees_ex_02.py
miwojc/scikit-learn-mooc
1dd1e6110ee037c2ce9b9597d769de5eb25fcffb
[ "CC-BY-4.0" ]
2
2021-09-30T11:07:28.000Z
2021-09-30T11:07:31.000Z
python_scripts/trees_ex_02.py
datagistips/scikit-learn-mooc
9eb67c53173218b5cd3061712c827c6a663e425a
[ "CC-BY-4.0" ]
null
null
null
python_scripts/trees_ex_02.py
datagistips/scikit-learn-mooc
9eb67c53173218b5cd3061712c827c6a663e425a
[ "CC-BY-4.0" ]
1
2021-06-16T16:54:59.000Z
2021-06-16T16:54:59.000Z
# %% [markdown] # # 📝 Exercise M5.02 # # The aim of this exercise is to find out whether a decision tree # model is able to extrapolate. # # By extrapolation, we refer to values predicted by a model outside of the # range of feature values seen during the training. # # We will first load the regression data. # %% imp...
27.257576
76
0.728738
import pandas as pd penguins = pd.read_csv("../datasets/penguins_regression.csv") data_columns = ["Flipper Length (mm)"] target_column = "Body Mass (g)" data_train, target_train = penguins[data_columns], penguins[target_column]
true
true
f7616597beefecb3d5063acf1dd494aeaaab4b97
269
py
Python
every_election/apps/elections/views/sync.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
8
2017-06-29T10:11:33.000Z
2019-12-16T16:17:51.000Z
every_election/apps/elections/views/sync.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
1,300
2017-01-08T14:02:24.000Z
2022-03-31T09:11:30.000Z
every_election/apps/elections/views/sync.py
DemocracyClub/EveryElection
da8a561cb4a84d9b432b1508a68f8cfada3d9515
[ "BSD-3-Clause" ]
11
2017-02-04T10:48:04.000Z
2021-01-27T15:07:55.000Z
import os from django.conf import settings from django.http import HttpResponse def get_election_fixture(request): out = open(os.path.join(settings.BASE_DIR, "data/elections.json")).read() return HttpResponse(out, status=200, content_type="application/json")
29.888889
77
0.776952
import os from django.conf import settings from django.http import HttpResponse def get_election_fixture(request): out = open(os.path.join(settings.BASE_DIR, "data/elections.json")).read() return HttpResponse(out, status=200, content_type="application/json")
true
true
f761662861a03d78204f81f63c91b34d9a82f430
12,267
py
Python
build/lacros/lacros_resource_sizes.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2,219
2018-03-26T02:57:34.000Z
2022-03-31T00:27:59.000Z
build/lacros/lacros_resource_sizes.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
250
2018-02-02T23:16:57.000Z
2022-03-21T06:09:53.000Z
build/lacros/lacros_resource_sizes.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
473
2019-03-24T16:34:23.000Z
2022-03-31T02:01:05.000Z
#!/usr/bin/env python # 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. """Reports binary size metrics for LaCrOS build artifacts. More information at //docs/speed/binary_size/metrics.md. """ import argpars...
34.948718
80
0.683378
import argparse import collections import contextlib import json import logging import os import subprocess import sys import tempfile @contextlib.contextmanager def _SysPath(path): if path and path not in sys.path: sys.path.insert(0, path) else: path = None try: yield finally: if path: ...
true
true
f76166949447fc622af1dcae212f55bcfb8dd1b0
144
py
Python
codes/Ex010.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
3
2021-08-17T14:02:14.000Z
2021-08-19T02:37:30.000Z
codes/Ex010.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
codes/Ex010.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
print("___Real Convertor___") x = float(input("How many Dollar do you have? ")) y = x* 3.27 print('You have U${} can buy R${} now'.format(x, y))
36
52
0.645833
print("___Real Convertor___") x = float(input("How many Dollar do you have? ")) y = x* 3.27 print('You have U${} can buy R${} now'.format(x, y))
true
true
f7616786c155a99c1fcb53dd9c3ae57f21c7781b
2,898
py
Python
test/test.py
khadgarmage/proto3parser
4f67d7fb24ee500720ada53b6493b696b7c96646
[ "Apache-2.0" ]
10
2020-06-19T09:11:56.000Z
2021-12-29T12:37:03.000Z
test/test.py
khadgarmage/proto3parser
4f67d7fb24ee500720ada53b6493b696b7c96646
[ "Apache-2.0" ]
3
2021-03-25T14:10:20.000Z
2022-01-09T22:14:49.000Z
test/test.py
khadgarmage/proto3parser
4f67d7fb24ee500720ada53b6493b696b7c96646
[ "Apache-2.0" ]
5
2020-08-14T11:32:18.000Z
2022-01-09T22:47:26.000Z
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
24.559322
88
0.636301
import protoparser content = '''syntax = "proto3"; package service; option go_package = "bitbucket.org/funplus/sandwichgmt/backend/pkg/gen/service"; import "msg/job_file.proto"; import "google/api/annotations.proto"; // message MessageItem { string Title = 1; string Content = 2;//你好啊 } //背包类型 enum BagType ...
true
true
f76167e96d0543915362f4987f7edc8f7afd05be
1,865
py
Python
setup.py
joshthoward/amundsenfrontendlibrary
1c6c16d335587ef6d231c1a5d3d886608ff18931
[ "Apache-2.0" ]
null
null
null
setup.py
joshthoward/amundsenfrontendlibrary
1c6c16d335587ef6d231c1a5d3d886608ff18931
[ "Apache-2.0" ]
51
2020-12-11T23:23:55.000Z
2022-03-18T23:38:04.000Z
setup.py
joshthoward/amundsenfrontendlibrary
1c6c16d335587ef6d231c1a5d3d886608ff18931
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import logging import os import subprocess from setuptools import setup, find_packages BASE_DIR = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DIR = os.path.join(BASE_DIR, 'amundsen_application', 'static') def is_npm_inst...
27.835821
97
0.692225
import logging import os import subprocess from setuptools import setup, find_packages BASE_DIR = os.path.abspath(os.path.dirname(__file__)) PACKAGE_DIR = os.path.join(BASE_DIR, 'amundsen_application', 'static') def is_npm_installed() -> bool: try: subprocess.check_call(['npm --version'], shell=True) ...
true
true
f761685985c8bbd6e4ce82f4f17b724477541ce2
13
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Force/One kilogram force in newtons.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Force/One kilogram force in newtons.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/Units/Force/One kilogram force in newtons.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
constants.kgf
13
13
0.923077
constants.kgf
true
true
f761692e8f9f98b2319e5b2d8bbb11bf4ad231b7
12,938
py
Python
zephyr/Dispatcher.py
bsmithyman/zephyr
ef74caadd74cc357b503560c3800e26c49587e61
[ "MIT" ]
1
2019-04-06T18:31:16.000Z
2019-04-06T18:31:16.000Z
zephyr/Dispatcher.py
bsmithyman/zephyr
ef74caadd74cc357b503560c3800e26c49587e61
[ "MIT" ]
null
null
null
zephyr/Dispatcher.py
bsmithyman/zephyr
ef74caadd74cc357b503560c3800e26c49587e61
[ "MIT" ]
5
2015-02-24T15:03:54.000Z
2020-12-08T20:18:56.000Z
import numpy as np from IPython.parallel import Reference, interactive from SimPEG import Survey, Problem, Mesh, Solver as SimpegSolver from SimPEG.Parallel import RemoteInterface, SystemSolver from SimPEG.Utils import CommonReducer from zephyr.Survey import SurveyHelm from zephyr.Problem import ProblemHelm import netw...
29.205418
141
0.608054
import numpy as np from IPython.parallel import Reference, interactive from SimPEG import Survey, Problem, Mesh, Solver as SimpegSolver from SimPEG.Parallel import RemoteInterface, SystemSolver from SimPEG.Utils import CommonReducer from zephyr.Survey import SurveyHelm from zephyr.Problem import ProblemHelm import netw...
true
true
f76169c68e691caf84194894049e762323f5f2a0
1,673
py
Python
venv/lib/python3.5/site-packages/airflow/minihivecluster.py
mesodiar/bello-airflow
afede57f214774b50e6a4c083ca096ca2c060d31
[ "MIT" ]
1
2021-04-05T11:25:36.000Z
2021-04-05T11:25:36.000Z
airflow/minihivecluster.py
fvlankvelt/airflow
6cbe4a475f773bf32e1d7743718f7ae1a7dd9c91
[ "Apache-2.0" ]
null
null
null
airflow/minihivecluster.py
fvlankvelt/airflow
6cbe4a475f773bf32e1d7743718f7ae1a7dd9c91
[ "Apache-2.0" ]
1
2019-12-12T06:44:14.000Z
2019-12-12T06:44:14.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2016 Bolke de Bruin # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.142857
93
0.651524
import os import subprocess import select import re class MiniHiveCluster(object): def __init__(self): self._minicluster_home = os.environ['MINICLUSTER_HOME'] self._minicluster_class = "com.ing.minicluster.MiniCluster" self._start_mini_cluster() self._is_started() def _start_m...
true
true
f76169c84b6ac991221a10674952b83400208b98
48
py
Python
app/src/testfile.py
Hugo54x/vscode-devcontainer-sample
9a3a8bb5448cc35a54d19c09c4c2733e38d37bc2
[ "MIT" ]
null
null
null
app/src/testfile.py
Hugo54x/vscode-devcontainer-sample
9a3a8bb5448cc35a54d19c09c4c2733e38d37bc2
[ "MIT" ]
null
null
null
app/src/testfile.py
Hugo54x/vscode-devcontainer-sample
9a3a8bb5448cc35a54d19c09c4c2733e38d37bc2
[ "MIT" ]
1
2022-03-20T01:03:58.000Z
2022-03-20T01:03:58.000Z
def add(num1, num2): return num1 + num2
16
22
0.583333
def add(num1, num2): return num1 + num2
true
true
f7616a2909ffa25d2308a97d52e4e3b0361ebdda
814
py
Python
get_lyrics.py
danielgrijalva/steven-wilson-analysis
6b27f37f66482504f9bdf11f3a13fc4897f122f8
[ "MIT" ]
2
2017-11-19T03:01:54.000Z
2017-11-22T01:47:18.000Z
get_lyrics.py
danielgrijalva/steven-wilson-analysis
6b27f37f66482504f9bdf11f3a13fc4897f122f8
[ "MIT" ]
null
null
null
get_lyrics.py
danielgrijalva/steven-wilson-analysis
6b27f37f66482504f9bdf11f3a13fc4897f122f8
[ "MIT" ]
null
null
null
import pandas as pd import lyricwikia sw = pd.read_csv('Steven Wilson.csv') pt = pd.read_csv('Porcupine Tree.csv') sw_songs = sw['name'] pt_songs = pt['name'] sw_lyrics = [] pt_lyrics = [] for song in sw_songs: try: lyrics = lyricwikia.get_lyrics('Steven Wilson', song) clean = lyrics.replace('\...
24.666667
80
0.625307
import pandas as pd import lyricwikia sw = pd.read_csv('Steven Wilson.csv') pt = pd.read_csv('Porcupine Tree.csv') sw_songs = sw['name'] pt_songs = pt['name'] sw_lyrics = [] pt_lyrics = [] for song in sw_songs: try: lyrics = lyricwikia.get_lyrics('Steven Wilson', song) clean = lyrics.replace('\...
true
true
f7616b37bedc8f4d5420952dad66213355227d3d
568
py
Python
matplotlib/gallery_python/text_labels_and_annotations/fancytextbox_demo.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
matplotlib/gallery_python/text_labels_and_annotations/fancytextbox_demo.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
matplotlib/gallery_python/text_labels_and_annotations/fancytextbox_demo.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
""" ================= Fancytextbox Demo ================= """ import matplotlib.pyplot as plt plt.text(0.6, 0.7, "eggs", size=50, rotation=30., ha="center", va="center", bbox=dict(boxstyle="round", ec=(1., 0.5, 0.5), fc=(1., 0.8, 0.8), ) ...
21.846154
51
0.373239
import matplotlib.pyplot as plt plt.text(0.6, 0.7, "eggs", size=50, rotation=30., ha="center", va="center", bbox=dict(boxstyle="round", ec=(1., 0.5, 0.5), fc=(1., 0.8, 0.8), ) ) plt.text(0.55, 0.6, "spam", size=50, rotation=-25., ...
true
true
f7616b6a0684fec38896a1cc4ddcfcbbdd952964
3,199
py
Python
octavia/amphorae/backends/agent/api_server/udp_listener_base.py
sapcc/octavia
1714d612f3416b96a195f941e526b0146daebce4
[ "Apache-2.0" ]
null
null
null
octavia/amphorae/backends/agent/api_server/udp_listener_base.py
sapcc/octavia
1714d612f3416b96a195f941e526b0146daebce4
[ "Apache-2.0" ]
10
2020-09-18T12:17:59.000Z
2022-03-14T15:45:38.000Z
octavia/amphorae/backends/agent/api_server/udp_listener_base.py
sapcc/octavia
1714d612f3416b96a195f941e526b0146daebce4
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
28.5625
78
0.669272
import abc import six from oslo_config import cfg from stevedore import driver as stevedore_driver CONF = cfg.CONF UDP_SERVER_NAMESPACE = 'octavia.amphora.udp_api_server' @six.add_metaclass(abc.ABCMeta) class UdpListenerApiServerBase(object): _SUBSCRIBED_AMP_COMPILE = [] SERVER_INSTANCE = None @cla...
true
true
f7616b88799a1f44f764ba1778849395a92a38de
1,453
py
Python
preprocess/source_DW-video.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
1
2017-04-26T07:00:34.000Z
2017-04-26T07:00:34.000Z
preprocess/source_DW-video.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
11
2015-06-09T08:59:42.000Z
2017-11-24T14:32:45.000Z
preprocess/source_DW-video.py
EUMSSI/EUMSSI-platform
9a88354f9baa1f4b4ddd2eee7e7273b0f2678056
[ "Apache-2.0" ]
1
2018-11-27T17:38:08.000Z
2018-11-27T17:38:08.000Z
#!/usr/bin/env python import datetime import json from eumssi_converter import EumssiConverter import click def transf_date(x): '''convert from string in DD.MM.YYYY (or YYYY-MM-DD) format''' try: return datetime.datetime.strptime(x, "%d.%m.%Y") except ValueError: return datetime.datetime.s...
27.942308
107
0.620785
import datetime import json from eumssi_converter import EumssiConverter import click def transf_date(x): try: return datetime.datetime.strptime(x, "%d.%m.%Y") except ValueError: return datetime.datetime.strptime(x, "%Y-%m-%d") def transf_lang(x): lang_map = { 'german': 'de', ...
true
true
f7616c123189d492ceabf8697d148a19c68de32f
42,001
py
Python
tests/test_pabot.py
krizm/pabot
49d4b3b0c5b5d661af7c1bfd24d8e6aedb4aa64a
[ "Apache-2.0" ]
null
null
null
tests/test_pabot.py
krizm/pabot
49d4b3b0c5b5d661af7c1bfd24d8e6aedb4aa64a
[ "Apache-2.0" ]
null
null
null
tests/test_pabot.py
krizm/pabot
49d4b3b0c5b5d661af7c1bfd24d8e6aedb4aa64a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import time import os import tempfile import shutil import random import codecs from pabot import pabot from robot.utils import PY2 from robot import __version__ as ROBOT_VERSION s = pabot.SuiteItem t = pabot.TestItem class PabotTests(unittest.TestCase): ...
49.181499
141
0.580939
import unittest import time import os import tempfile import shutil import random import codecs from pabot import pabot from robot.utils import PY2 from robot import __version__ as ROBOT_VERSION s = pabot.SuiteItem t = pabot.TestItem class PabotTests(unittest.TestCase): def setUp(self): self._options, se...
true
true
f7616c355595e7dc47c1a4cf0e711d41525986de
605
py
Python
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/arm_ldr_label.py
tum-i4/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
15
2021-12-08T09:53:35.000Z
2022-03-07T10:13:37.000Z
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/arm_ldr_label.py
archercreat/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
null
null
null
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/arm_ldr_label.py
archercreat/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
1
2021-12-27T18:01:41.000Z
2021-12-27T18:01:41.000Z
#!/usr/bin/python # Ingmar Steen, 2016 # This tests the LDR Rd, =label pseudo-instruction on ARM. # Github issue: #46 # Author: Ingmar Steen from keystone import * import regress class TestARM(regress.RegressTest): def runTest(self): # Initialize Keystone engine ks = Ks(KS_ARCH_ARM, KS_MODE_ARM...
25.208333
86
0.661157
from keystone import * import regress class TestARM(regress.RegressTest): def runTest(self): ks = Ks(KS_ARCH_ARM, KS_MODE_ARM) encoding, count = ks.asm(b"ldr r0, =data; data:") self.assertEqual(encoding, [ 0x04, 0x00, 0x1f, 0xe5, 0x04, 0x00, 0x00, 0x00 ]) if __n...
true
true
f7616c8fb90720376d01c74b7bc957713f77239f
27,683
py
Python
aws/solutions/StackSetsResource/FunctionCode/lambda_function.py
sarathpotru22/aws-cloudformation-templates
5e6212c7dca08dd20e0b395cb5180606aadf0c6f
[ "Apache-2.0" ]
5
2018-02-01T06:53:50.000Z
2021-09-12T11:45:42.000Z
aws/solutions/StackSetsResource/FunctionCode/lambda_function.py
sarathpotru22/aws-cloudformation-templates
5e6212c7dca08dd20e0b395cb5180606aadf0c6f
[ "Apache-2.0" ]
null
null
null
aws/solutions/StackSetsResource/FunctionCode/lambda_function.py
sarathpotru22/aws-cloudformation-templates
5e6212c7dca08dd20e0b395cb5180606aadf0c6f
[ "Apache-2.0" ]
4
2018-02-01T06:53:53.000Z
2021-09-12T11:45:44.000Z
""" StackSet via CloudFormation """ # Next ToDo: # Allow for stack Retention import boto3 from time import sleep from botocore.exceptions import ClientError import os import crhelper # initialise logger logger = crhelper.log_config({"RequestId": "CONTAINER_INIT"}) logger.info('Logging configured') # set global to t...
40.062229
161
0.613012
import boto3 from time import sleep from botocore.exceptions import ClientError import os import crhelper logger = crhelper.log_config({"RequestId": "CONTAINER_INIT"}) logger.info('Logging configured') init_failed = False try: logger.info("Container initialization completed") except Exception as e: log...
true
true
f7616cb272159cf8142b3874985d64b95840d16c
9,370
py
Python
zentral/contrib/mdm/urls.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
null
null
null
zentral/contrib/mdm/urls.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
null
null
null
zentral/contrib/mdm/urls.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
null
null
null
from django.urls import path from django.views.decorators.csrf import csrf_exempt from . import views app_name = "mdm" urlpatterns = [ # setup views path('', views.IndexView.as_view(), name='index'), path('root_ca/', views.RootCAView.as_view(), name='root_ca'), # p...
39.205021
116
0.659445
from django.urls import path from django.views.decorators.csrf import csrf_exempt from . import views app_name = "mdm" urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('root_ca/', views.RootCAView.as_view(), name='root_ca'), path('push_ce...
true
true
f7616d3ccd82a8f27ab8e7518c3b596bfbd8d1f0
1,705
py
Python
lib/libcontact.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
null
null
null
lib/libcontact.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-07-03T13:32:38.000Z
2019-07-03T13:32:38.000Z
lib/libcontact.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-05-15T16:01:31.000Z
2019-05-15T16:01:31.000Z
#! /usr/bin/python # -*- coding: iso-8859-1 -*- # Copyright (C) 2013 Dr. Ralf Schlatterbeck Open Source Consulting. # Reichergasse 131, A-3411 Weidling. # Web: http://www.runtux.com Email: office@runtux.com # All rights reserved # **************************************************************************** # This progr...
33.431373
78
0.590029
def cid (db, ct) : x = ''.join (x for x in ct if x.isdigit ()) if ct.startswith ('+') : x = '+' + x cc = getattr (db.config.ext, 'TELEPHONY_COUNTRY_CODE', '43') ac = getattr (db.config.ext, 'TELEPHONY_AREA_CODE', '2243') if ac and x.startswith ('+' + cc + ac) : x = x [len (cc+ac...
true
true
f7616e33d7817a2d3820f1635b1c54c50c5a9545
3,178
py
Python
docs/conf.py
hndgzkn/dicodile
799f3fe244609d4699109a42956bf1ab97778e6c
[ "BSD-3-Clause" ]
15
2019-02-04T19:55:41.000Z
2021-12-28T14:27:42.000Z
docs/conf.py
hndgzkn/dicodile
799f3fe244609d4699109a42956bf1ab97778e6c
[ "BSD-3-Clause" ]
47
2021-01-12T09:41:15.000Z
2022-03-10T10:33:48.000Z
docs/conf.py
hndgzkn/dicodile
799f3fe244609d4699109a42956bf1ab97778e6c
[ "BSD-3-Clause" ]
7
2019-05-06T15:21:55.000Z
2021-04-22T09:53:45.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.452632
79
0.65922
from datetime import datetime, timezone import sphinx_bootstrap_theme project = 'dicodile' td = datetime.now(tz=timezone.utc) copyright = ( '2020-%(year)s, Dicodile Developers. Last updated %(short)s' ) % dict(year=td.year, iso=td.isoformat(), short=td.strftime('%Y-%m-%d %H:%M %Z')) author = 'dicodil...
true
true
f7616e6652a0fbaa0b12e5cbafbeda14a789e384
3,141
py
Python
dataworkspace/dataworkspace/apps/api_v1/datasets/serializers.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
1
2019-06-10T08:22:56.000Z
2019-06-10T08:22:56.000Z
dataworkspace/dataworkspace/apps/api_v1/datasets/serializers.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
2
2019-05-17T13:10:42.000Z
2019-06-17T10:48:46.000Z
dataworkspace/dataworkspace/apps/api_v1/datasets/serializers.py
uktrade/jupyterhub-data-auth-admin
91544f376209a201531f4dbfb8faad1b8ada18c9
[ "MIT" ]
null
null
null
from django.utils.html import strip_tags from rest_framework import serializers from dataworkspace.apps.datasets.constants import DataSetType from dataworkspace.apps.datasets.models import ( SourceTable, ToolQueryAuditLog, ToolQueryAuditLogTable, ) _PURPOSES = { DataSetType.DATACUT: "Data cut", Da...
33.063158
80
0.671761
from django.utils.html import strip_tags from rest_framework import serializers from dataworkspace.apps.datasets.constants import DataSetType from dataworkspace.apps.datasets.models import ( SourceTable, ToolQueryAuditLog, ToolQueryAuditLogTable, ) _PURPOSES = { DataSetType.DATACUT: "Data cut", Da...
true
true
f7616eec508da0e6b0e8e2e4bbbead6617c0ac77
13,834
py
Python
memcnn/models/tests/test_revop.py
hzy5660251/memcnn
1293468e4ee4ed83fcf9da36940065bbe72dd54b
[ "MIT" ]
1
2019-12-13T07:40:11.000Z
2019-12-13T07:40:11.000Z
memcnn/models/tests/test_revop.py
hzy5660251/memcnn
1293468e4ee4ed83fcf9da36940065bbe72dd54b
[ "MIT" ]
null
null
null
memcnn/models/tests/test_revop.py
hzy5660251/memcnn
1293468e4ee4ed83fcf9da36940065bbe72dd54b
[ "MIT" ]
null
null
null
import pytest import torch import torch.nn import numpy as np import copy from memcnn.models.affine import AffineAdapterNaive, AffineAdapterSigmoid from memcnn import ReversibleBlock def set_seeds(seed): np.random.seed(seed) torch.manual_seed(seed) @pytest.mark.parametrize('coupling', ['additive', 'affine']...
44.339744
120
0.567659
import pytest import torch import torch.nn import numpy as np import copy from memcnn.models.affine import AffineAdapterNaive, AffineAdapterSigmoid from memcnn import ReversibleBlock def set_seeds(seed): np.random.seed(seed) torch.manual_seed(seed) @pytest.mark.parametrize('coupling', ['additive', 'affine']...
true
true
f7616eefa45cdc4de7cf725adf9ff8176f54c198
150
py
Python
carberretta/utils/converters.py
namanyt/Carberretta
182733caeff3da475f052bfc7fa6090244d5f2dc
[ "BSD-3-Clause" ]
21
2020-09-30T11:15:40.000Z
2022-03-11T09:46:48.000Z
carberretta/utils/converters.py
namanyt/Carberretta
182733caeff3da475f052bfc7fa6090244d5f2dc
[ "BSD-3-Clause" ]
110
2020-09-27T14:37:05.000Z
2021-12-17T17:21:33.000Z
carberretta/utils/converters.py
namanyt/Carberretta
182733caeff3da475f052bfc7fa6090244d5f2dc
[ "BSD-3-Clause" ]
26
2020-09-21T19:38:12.000Z
2022-02-08T18:41:58.000Z
from discord.ext.commands import Converter class Command(Converter): async def convert(self, ctx, arg): return ctx.bot.get_command(arg)
21.428571
42
0.726667
from discord.ext.commands import Converter class Command(Converter): async def convert(self, ctx, arg): return ctx.bot.get_command(arg)
true
true
f7616f38f27e46cb5f330ca29552cd65eb752f99
12,127
py
Python
ants/core/ants_image.py
ncullen93/ANTsPy
a4c990dcd5b7445a45ce7b366ee018c7350e7d9f
[ "Apache-2.0" ]
3
2018-06-07T19:11:47.000Z
2019-06-10T05:24:06.000Z
ants/core/ants_image.py
ncullen93/ANTsPy
a4c990dcd5b7445a45ce7b366ee018c7350e7d9f
[ "Apache-2.0" ]
null
null
null
ants/core/ants_image.py
ncullen93/ANTsPy
a4c990dcd5b7445a45ce7b366ee018c7350e7d9f
[ "Apache-2.0" ]
1
2019-04-04T06:18:44.000Z
2019-04-04T06:18:44.000Z
__all__ = ['copy_image_info', 'set_origin', 'get_origin', 'set_direction', 'get_direction', 'set_spacing', 'get_spacing', 'image_physical_space_consistency', 'image_type_cast'] import os import numpy as np from functools import p...
31.417098
158
0.617135
__all__ = ['copy_image_info', 'set_origin', 'get_origin', 'set_direction', 'get_direction', 'set_spacing', 'get_spacing', 'image_physical_space_consistency', 'image_type_cast'] import os import numpy as np from functools import p...
true
true
f761702894be178774ebc3689215edecfc502364
1,490
py
Python
OLD_FILES/MultithreadedWebcam.py
rishavnathpati/Realtime-Gesture-Controlled-GUI
dee973da1fca7060e35fa9453acb976ddc6d4591
[ "Apache-2.0" ]
3
2021-04-20T14:49:54.000Z
2021-11-25T16:56:52.000Z
OLD_FILES/MultithreadedWebcam.py
rishavnathpati/Realtime-Gesture-Controlled-GUI
dee973da1fca7060e35fa9453acb976ddc6d4591
[ "Apache-2.0" ]
null
null
null
OLD_FILES/MultithreadedWebcam.py
rishavnathpati/Realtime-Gesture-Controlled-GUI
dee973da1fca7060e35fa9453acb976ddc6d4591
[ "Apache-2.0" ]
1
2021-04-18T10:39:12.000Z
2021-04-18T10:39:12.000Z
import threading import cv2 # src = "http://192.168.0.4:8080/video" class VideoCaptureThreading: def __init__( self, src="http://192.168.0.4:8080/video", # Enter current the url from ip webcam or enter ) or 1 to use local pc webcam width=1920, height=1080): ...
28.113208
127
0.579866
import threading import cv2 class VideoCaptureThreading: def __init__( self, src="http://192.168.0.4:8080/video", width=1920, height=1080): self.src = src self.cap = cv2.VideoCapture(self.src) self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, width) ...
true
true
f761722901a8be672390c6dc84399fe6c3050fab
2,959
py
Python
tkge/models/loss/MarginRankingLoss.py
tkg-framework/TKG-framework
98586b7199bda0e96d74b2ea02c62226901822cc
[ "MIT", "Unlicense" ]
null
null
null
tkge/models/loss/MarginRankingLoss.py
tkg-framework/TKG-framework
98586b7199bda0e96d74b2ea02c62226901822cc
[ "MIT", "Unlicense" ]
null
null
null
tkge/models/loss/MarginRankingLoss.py
tkg-framework/TKG-framework
98586b7199bda0e96d74b2ea02c62226901822cc
[ "MIT", "Unlicense" ]
null
null
null
from tkge.models.loss import Loss import torch @Loss.register(name="margin_ranking_loss") class MarginRankingLoss(Loss): def __init__(self, config): super().__init__(config) self.margin = self.config.get("train.loss.margin") self.reduction = self.config.get("train.loss.reduction") ...
43.514706
169
0.626563
from tkge.models.loss import Loss import torch @Loss.register(name="margin_ranking_loss") class MarginRankingLoss(Loss): def __init__(self, config): super().__init__(config) self.margin = self.config.get("train.loss.margin") self.reduction = self.config.get("train.loss.reduction") ...
true
true
f76172322cd3ea9dd933528d7073a7f7a6c43c8d
1,545
py
Python
venv/Lib/site-packages/PygameLord/Loads.py
apoorv-x12/SpaceInvadersClassicGame-Myfirst-game
5a4ac187c19a7decfb900b392c3fb897f6613a2c
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PygameLord/Loads.py
apoorv-x12/SpaceInvadersClassicGame-Myfirst-game
5a4ac187c19a7decfb900b392c3fb897f6613a2c
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PygameLord/Loads.py
apoorv-x12/SpaceInvadersClassicGame-Myfirst-game
5a4ac187c19a7decfb900b392c3fb897f6613a2c
[ "MIT" ]
null
null
null
#LordLynx #Part of PygameLord import pygame,os from pygame.locals import* pygame.init() #Loading Objects ''' Parse_Locations(file) file: Your text file, use a .txt # Like in Python will be ingored thusly follow this example #Coment ./File/File ./File/Other File ... ''' def Parse_Locations(file): file = open(file,...
27.105263
122
0.629126
import pygame,os from pygame.locals import* pygame.init() def Parse_Locations(file): file = open(file, 'r') lines = [] folders = [] for text_line in file: lines.append(text_line) file.close() moding = [] for i in lines: s =i.strip('\n') moding.append(s) for i in modi...
true
true
f76172af7019bb86cb50104826b67a4d6ce11055
4,407
py
Python
homeassistant/components/toon/climate.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
1
2021-11-25T20:58:33.000Z
2021-11-25T20:58:33.000Z
homeassistant/components/toon/climate.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
null
null
null
homeassistant/components/toon/climate.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
null
null
null
"""Support for Toon thermostat.""" from datetime import timedelta import logging from typing import Any, Dict, List from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_HEAT, PRESET_AWAY, PRESET_COMFORT, PRESET_HOME, PRESET_SLEEP, SUPPORT_PR...
31.478571
79
0.674155
from datetime import timedelta import logging from typing import Any, Dict, List from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_HEAT, PRESET_AWAY, PRESET_COMFORT, PRESET_HOME, PRESET_SLEEP, SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATU...
true
true
f76172dafd4e84ce971e669bd6b3edcc0fb23aea
5,602
py
Python
frameworks/kafka/tests/test_sanity.py
vibhujain/dcos-commons
dad8ebdf5c9a21988dad054a77e775e55e499bd1
[ "Apache-2.0" ]
null
null
null
frameworks/kafka/tests/test_sanity.py
vibhujain/dcos-commons
dad8ebdf5c9a21988dad054a77e775e55e499bd1
[ "Apache-2.0" ]
null
null
null
frameworks/kafka/tests/test_sanity.py
vibhujain/dcos-commons
dad8ebdf5c9a21988dad054a77e775e55e499bd1
[ "Apache-2.0" ]
null
null
null
import json import pytest import sdk_cmd import sdk_hosts import sdk_install import sdk_marathon import sdk_metrics import sdk_networks import sdk_plan import sdk_tasks import sdk_upgrade import sdk_utils from tests import config, test_utils @pytest.fixture(scope="module", autouse=True) def configure_package(config...
32.569767
118
0.724206
import json import pytest import sdk_cmd import sdk_hosts import sdk_install import sdk_marathon import sdk_metrics import sdk_networks import sdk_plan import sdk_tasks import sdk_upgrade import sdk_utils from tests import config, test_utils @pytest.fixture(scope="module", autouse=True) def configure_package(config...
true
true
f7617353a662f1f7c9e86e658f254fda06c19249
3,437
py
Python
src/fonts/inter-ui/misc/rf-scripts/ChangeUPM.py
OpenBazaar/openbazaar-css
2033034d205e7b5004018f7f786c3718fe62fc16
[ "MIT" ]
20
2018-02-04T19:18:27.000Z
2022-03-01T18:49:38.000Z
src/fonts/inter-ui/misc/rf-scripts/ChangeUPM.py
OpenBazaar/openbazaar-css
2033034d205e7b5004018f7f786c3718fe62fc16
[ "MIT" ]
34
2018-02-13T16:24:33.000Z
2021-06-15T15:39:58.000Z
src/fonts/inter/misc/rf-scripts/ChangeUPM.py
ipfs-shipyard/ipfs-css
4a1da7a3838a20137beb35fe030618aeda48b5c0
[ "MIT" ]
7
2018-02-16T13:19:22.000Z
2021-04-24T19:55:49.000Z
# Change upm # Jens Kutilek 2013-01-02 from mojo.roboFont import version def scalePoints(glyph, factor): if version == "1.4": # stupid workaround for bug in RoboFont 1.4 for contour in glyph: for point in contour.points: point.x *= factor point.y *= fact...
31.824074
101
0.582776
from mojo.roboFont import version def scalePoints(glyph, factor): if version == "1.4": for contour in glyph: for point in contour.points: point.x *= factor point.y *= factor glyph.width *= factor else: glyph *= factor def scaleGlyph(...
false
true
f761738eb74f34f1c7bafa0d1f7d88f1db1172d8
9,963
py
Python
app/github.py
f5devcentral/fdc_org_mgmt
001042f1aba4c5afb58e0f862f94659f408a3eb8
[ "Apache-2.0" ]
1
2020-11-13T19:43:35.000Z
2020-11-13T19:43:35.000Z
app/github.py
f5devcentral/fdc_org_mgmt
001042f1aba4c5afb58e0f862f94659f408a3eb8
[ "Apache-2.0" ]
5
2020-10-28T00:49:01.000Z
2021-09-02T15:25:43.000Z
app/github.py
f5devcentral/fdc_org_mgmt
001042f1aba4c5afb58e0f862f94659f408a3eb8
[ "Apache-2.0" ]
null
null
null
import app_config import jwt import time import os import requests from flask import Flask # Define the Flask app app = Flask(__name__) # Load configuration app.config.from_object(app_config) def add_org_member(username): """ Add a user to the GitHub Organization Parameters ---------- access_tok...
27.370879
154
0.623407
import app_config import jwt import time import os import requests from flask import Flask app = Flask(__name__) app.config.from_object(app_config) def add_org_member(username): access_token = get_access_token('{"members": "write"}') headers = { "Authorization": "Token {}".format(access_token), ...
true
true
f76173f7d5f8e905db6967fce5e2e397f7f6d8ca
695
py
Python
hops/features/data/util/csv2json.py
harmslab/hops
2a157d2d27c2036a37a525406e186724f490b9e1
[ "Unlicense" ]
5
2020-05-12T03:59:31.000Z
2021-06-22T13:08:04.000Z
hops/features/data/util/csv2json.py
harmslab/hops
2a157d2d27c2036a37a525406e186724f490b9e1
[ "Unlicense" ]
null
null
null
hops/features/data/util/csv2json.py
harmslab/hops
2a157d2d27c2036a37a525406e186724f490b9e1
[ "Unlicense" ]
2
2019-04-17T21:45:08.000Z
2019-11-21T03:58:17.000Z
# hacked script for converting my original csv format data to json import sys, copy, json f = open(sys.argv[1],'r') lines = f.readlines() f.close() data_types = lines[0].split() aa_dict = {aa:0.0 for aa in "ACDEFGHIKLMNPQRSTVWY"} data = {k:{"values":copy.deepcopy(aa_dict)} for k in data_types} for l in lines[1:]...
21.71875
67
0.601439
import sys, copy, json f = open(sys.argv[1],'r') lines = f.readlines() f.close() data_types = lines[0].split() aa_dict = {aa:0.0 for aa in "ACDEFGHIKLMNPQRSTVWY"} data = {k:{"values":copy.deepcopy(aa_dict)} for k in data_types} for l in lines[1:]: if l.startswith("Nterm"): break col = l.split...
true
true
f761742d244dd49e82500d77a9f40ce634e57753
558
py
Python
networkx-d3-v2/networkx/vis_conf.py
suraj-testing2/Clock_Websites
0e65331da40cfd3766f1bde17f0a9c7ff6666dea
[ "Apache-2.0" ]
null
null
null
networkx-d3-v2/networkx/vis_conf.py
suraj-testing2/Clock_Websites
0e65331da40cfd3766f1bde17f0a9c7ff6666dea
[ "Apache-2.0" ]
null
null
null
networkx-d3-v2/networkx/vis_conf.py
suraj-testing2/Clock_Websites
0e65331da40cfd3766f1bde17f0a9c7ff6666dea
[ "Apache-2.0" ]
null
null
null
from django.conf import settings MAX_IMPORTANCE = getattr(settings, 'MAX_IMPORTANCE', 30) MIN_IMPORTANCE = getattr(settings, 'MAX_IMPORTANCE', 1) ERROR_MESSAGES = { 'required': 'This field is required.', 'max_value': 'Ensure this value is less than or equal to %(limit_value)s.', 'min_value': 'Ensure this ...
42.923077
94
0.707885
from django.conf import settings MAX_IMPORTANCE = getattr(settings, 'MAX_IMPORTANCE', 30) MIN_IMPORTANCE = getattr(settings, 'MAX_IMPORTANCE', 1) ERROR_MESSAGES = { 'required': 'This field is required.', 'max_value': 'Ensure this value is less than or equal to %(limit_value)s.', 'min_value': 'Ensure this ...
true
true
f76174c7a1d940678862dfa4721c02d786d493e5
6,563
py
Python
numpy/distutils/fcompiler/intel.py
gmabey/numpy
9e9ec3821c1d6a055543e54336ecb2c98ec42c5f
[ "BSD-3-Clause" ]
39
2016-11-08T11:24:30.000Z
2021-11-18T06:50:21.000Z
numpy/distutils/fcompiler/intel.py
gmabey/numpy
9e9ec3821c1d6a055543e54336ecb2c98ec42c5f
[ "BSD-3-Clause" ]
1
2015-09-30T05:26:54.000Z
2016-03-22T15:09:56.000Z
numpy/distutils/fcompiler/intel.py
gmabey/numpy
9e9ec3821c1d6a055543e54336ecb2c98ec42c5f
[ "BSD-3-Clause" ]
13
2017-04-08T08:03:12.000Z
2021-08-25T08:38:52.000Z
# http://developer.intel.com/software/products/compilers/flin/ from __future__ import division, absolute_import, print_function import sys from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file compilers = ['IntelFCompiler', 'IntelVisualFCompile...
31.859223
86
0.584641
from __future__ import division, absolute_import, print_function import sys from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file compilers = ['IntelFCompiler', 'IntelVisualFCompiler', 'IntelItaniumFCompiler', 'IntelItaniumVisualFC...
true
true
f76177ba4b8ccf63716a7489883754ea60923e6f
36,282
py
Python
pynetdicom/tests/test_dimse_c.py
howardpchen/pynetdicom
a67ad0422dbbc8b7c196da2b2c5fd38e7caf8d47
[ "MIT" ]
null
null
null
pynetdicom/tests/test_dimse_c.py
howardpchen/pynetdicom
a67ad0422dbbc8b7c196da2b2c5fd38e7caf8d47
[ "MIT" ]
null
null
null
pynetdicom/tests/test_dimse_c.py
howardpchen/pynetdicom
a67ad0422dbbc8b7c196da2b2c5fd38e7caf8d47
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Test DIMSE-C operations.""" from io import BytesIO import logging import pytest from pydicom.dataset import Dataset from pydicom.uid import UID from pynetdicom.dimse_messages import ( C_STORE_RQ, C_STORE_RSP,C_MOVE_RQ, C_MOVE_RSP, C_ECHO_RQ, C_ECHO_RSP, C_FIND_RQ, C_FIND_RSP, C_GET_...
34.325449
84
0.65363
from io import BytesIO import logging import pytest from pydicom.dataset import Dataset from pydicom.uid import UID from pynetdicom.dimse_messages import ( C_STORE_RQ, C_STORE_RSP,C_MOVE_RQ, C_MOVE_RSP, C_ECHO_RQ, C_ECHO_RSP, C_FIND_RQ, C_FIND_RSP, C_GET_RQ, C_GET_RSP ) from pynetdicom.dimse_primitives impo...
true
true
f76177e937d55fa02fc80c6deb06b1ca63da6a42
3,414
py
Python
dali/utils/misc.py
JonathanRaiman/dali-cython-stub
e258469aeb1d4cb3e4cdf5c07e8948f461a038f1
[ "MIT" ]
7
2016-06-20T17:50:06.000Z
2019-12-13T17:27:46.000Z
dali/utils/misc.py
JonathanRaiman/dali-cython
e258469aeb1d4cb3e4cdf5c07e8948f461a038f1
[ "MIT" ]
6
2015-08-04T07:25:38.000Z
2015-08-13T22:06:22.000Z
dali/utils/misc.py
JonathanRaiman/dali-cython
e258469aeb1d4cb3e4cdf5c07e8948f461a038f1
[ "MIT" ]
2
2016-07-04T21:38:14.000Z
2016-08-31T02:53:19.000Z
import dill as pickle import inspect import numpy as np import types from os import makedirs, listdir from os.path import join, exists import dali.core as D class RunningAverage(object): def __init__(self, alpha=0.95): self.alpha = alpha self.value = None def update(self, measurement): ...
30.482143
134
0.630053
import dill as pickle import inspect import numpy as np import types from os import makedirs, listdir from os.path import join, exists import dali.core as D class RunningAverage(object): def __init__(self, alpha=0.95): self.alpha = alpha self.value = None def update(self, measurement): ...
true
true
f7617805b8860af74c8ce9d1d0cdf60dcdf0c6e4
72,383
py
Python
test/torch_test.py
jjmachan/PySyft
5403658ec2d9a9ea2043c4b3bf09fa23e957735d
[ "Apache-2.0" ]
1
2019-09-01T19:18:58.000Z
2019-09-01T19:18:58.000Z
test/torch_test.py
ashgreat/PySyft
41a525443881bfd94ccb488d7a24765c1778ac05
[ "Apache-2.0" ]
null
null
null
test/torch_test.py
ashgreat/PySyft
41a525443881bfd94ccb488d7a24765c1778ac05
[ "Apache-2.0" ]
null
null
null
# python -m unittest -v test/torch_test.py import unittest from unittest import TestCase import random import syft as sy import numpy as np from syft.core.frameworks.torch import utils as torch_utils from syft.core.frameworks import encode from syft.core.frameworks.torch.tensor import _GeneralizedPointerTensor impo...
36.77998
100
0.549507
import unittest from unittest import TestCase import random import syft as sy import numpy as np from syft.core.frameworks.torch import utils as torch_utils from syft.core.frameworks import encode from syft.core.frameworks.torch.tensor import _GeneralizedPointerTensor import torch import torch.nn.functional as F fro...
true
true
f7617890cad785daf706f6afe966af4ea0ea3b33
9,854
py
Python
src/test/hooks/ads_ssd_hook_test.py
phbaudin/TaglessCRM
bed8b75cbb4585d5a50c9cefba015fe99d61cf61
[ "Apache-2.0" ]
null
null
null
src/test/hooks/ads_ssd_hook_test.py
phbaudin/TaglessCRM
bed8b75cbb4585d5a50c9cefba015fe99d61cf61
[ "Apache-2.0" ]
null
null
null
src/test/hooks/ads_ssd_hook_test.py
phbaudin/TaglessCRM
bed8b75cbb4585d5a50c9cefba015fe99d61cf61
[ "Apache-2.0" ]
null
null
null
# python3 # coding=utf-8 # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
34.943262
80
0.725594
import copy import hashlib import unittest from unittest import mock from google.auth.exceptions import RefreshError from googleads import adwords from plugins.pipeline_plugins.hooks import ads_ssd_hook from plugins.pipeline_plugins.utils import blob _RETRIABLE_ERR = 'RETRIABLE' _NON_RETRIABLE_ERR = 'NON_RETRIABLE'...
true
true
f76178a20b540ae9330805393f9323b66a6ceeef
143
py
Python
re_python_4.py
Yoon-D-G/re_python_4
9ffde8fb29378a5923bec919b34d1b60aafe4e8e
[ "MIT" ]
null
null
null
re_python_4.py
Yoon-D-G/re_python_4
9ffde8fb29378a5923bec919b34d1b60aafe4e8e
[ "MIT" ]
null
null
null
re_python_4.py
Yoon-D-G/re_python_4
9ffde8fb29378a5923bec919b34d1b60aafe4e8e
[ "MIT" ]
null
null
null
import re test_string = 'hello123' pattern = re.compile(r'_?\d') matches = pattern.finditer(test_string) for match in matches: print(match)
15.888889
39
0.741259
import re test_string = 'hello123' pattern = re.compile(r'_?\d') matches = pattern.finditer(test_string) for match in matches: print(match)
true
true
f76178d1987527eca0587beeeea30eb50fef8791
3,583
py
Python
main.py
mfraezz/osfpreprints-feed
8e9061aad6f23c4beefd2df220babc7ee0a10b85
[ "MIT" ]
null
null
null
main.py
mfraezz/osfpreprints-feed
8e9061aad6f23c4beefd2df220babc7ee0a10b85
[ "MIT" ]
null
null
null
main.py
mfraezz/osfpreprints-feed
8e9061aad6f23c4beefd2df220babc7ee0a10b85
[ "MIT" ]
null
null
null
from dateutil import parser from flask import Flask, request, Response from feedgen.feed import FeedGenerator from unidecode import unidecode import requests import json import re app = Flask(__name__) # This mapping doesn't need to exist, but it does make the app more robust, i.e., url.com/feed/EngrXiv would work # ...
30.109244
113
0.551772
from dateutil import parser from flask import Flask, request, Response from feedgen.feed import FeedGenerator from unidecode import unidecode import requests import json import re app = Flask(__name__) # even though the actual term is engriXiv. # TODO: SHARE reallly just needs to make these terms case-insensitive. se...
true
true
f761793b25fa07944976dffe78f1174d07b428cf
2,877
py
Python
OpenGL/circle_with_legs.py
umedoblock/umatobi
d0c6bcb350dc951e8f57a0c03389082902803165
[ "MIT" ]
3
2019-08-18T19:02:57.000Z
2020-02-17T03:23:24.000Z
OpenGL/circle_with_legs.py
umedoblock/umatobi
d0c6bcb350dc951e8f57a0c03389082902803165
[ "MIT" ]
227
2018-11-25T12:04:42.000Z
2019-12-26T14:18:32.000Z
OpenGL/circle_with_legs.py
umedoblock/umatobi
d0c6bcb350dc951e8f57a0c03389082902803165
[ "MIT" ]
null
null
null
import math import datetime try: from OpenGL.GLUT import * from OpenGL.GL import * from OpenGL.GLU import * except: print(''' ERROR: PyOpenGL not installed properly. ''') sys.exit() def glutBitmapCharacters(font, ss): # print('ord(j) =', ord('j')) # print('s =', ss) for c in ss: # prin...
20.697842
64
0.568995
import math import datetime try: from OpenGL.GLUT import * from OpenGL.GL import * from OpenGL.GLU import * except: print(''' ERROR: PyOpenGL not installed properly. ''') sys.exit() def glutBitmapCharacters(font, ss): for c in ss: ch = ord(c) glutBitmapCharacter(font, c...
true
true
f7617ab3dc25bd27b0a70379d6ddb87b6c5752d8
2,801
py
Python
Software/Python/setup.py
usc-ee250-spring2021/lab02-haotianxu2021
40b49ad313e7f7d12e1881507e0314b8dfac34f4
[ "MIT" ]
4
2020-08-12T23:20:15.000Z
2021-03-25T03:10:48.000Z
Software/Python/setup.py
dfbrione/GrovePi-EE250
1be1f20f03d0f9da3f732db7777eb72b7da6ed9f
[ "MIT" ]
null
null
null
Software/Python/setup.py
dfbrione/GrovePi-EE250
1be1f20f03d0f9da3f732db7777eb72b7da6ed9f
[ "MIT" ]
38
2020-08-24T23:05:49.000Z
2021-01-28T05:47:28.000Z
#!/usr/bin/python #!/usr/bin/env python # # GrovePi Python Setup # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask on the forums here: http://forum.dexterindustries.com/c/grovepi # '...
37.851351
139
0.732953
try: with open('package_description.rst', 'r') as file_description: description = file_description.read() except IOError: description = "Check more on https://pypi.python.org/pypi/grovepi" import setuptools setuptools.setup( name = "grovepi", version = "1.0.0", description = "Drivers for using the G...
true
true
f7617bc089101f8f6d74fb1f628fd54d17752c4f
1,012
py
Python
test/test_show_pickle.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
206
2020-11-28T22:56:38.000Z
2022-03-27T02:33:04.000Z
test/test_show_pickle.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
19
2020-12-09T23:13:14.000Z
2022-01-24T23:24:08.000Z
test/test_show_pickle.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
28
2020-11-29T15:25:12.000Z
2022-01-20T02:16:27.000Z
import unittest import io import tempfile import torch import torch.utils.show_pickle from torch.testing._internal.common_utils import IS_WINDOWS class TestShowPickle(unittest.TestCase): @unittest.skipIf(IS_WINDOWS, "Can't re-open temp file on Windows") def test_scripted_model(self): class MyCoolModu...
28.914286
91
0.617589
import unittest import io import tempfile import torch import torch.utils.show_pickle from torch.testing._internal.common_utils import IS_WINDOWS class TestShowPickle(unittest.TestCase): @unittest.skipIf(IS_WINDOWS, "Can't re-open temp file on Windows") def test_scripted_model(self): class MyCoolModu...
true
true
f7617bd0075ee83bab13c654c4221f855bd00ec1
2,560
py
Python
homeassistant/components/weather/demo.py
mbs-technologie/home-assistant
71fc446425cbb1c0d4670c261ce8ea3bfd83a73d
[ "MIT" ]
13
2017-02-01T13:25:34.000Z
2022-01-26T01:30:39.000Z
homeassistant/components/weather/demo.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
9
2017-07-26T18:05:32.000Z
2021-12-05T14:16:34.000Z
homeassistant/components/weather/demo.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
21
2017-07-26T17:09:40.000Z
2022-03-27T22:37:22.000Z
""" Demo platform that offers fake meteorological data. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.weather import WeatherEntity from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT) CONDITION_CLASSES = ...
26.947368
79
0.615234
from homeassistant.components.weather import WeatherEntity from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT) CONDITION_CLASSES = { 'cloudy': [], 'fog': [], 'hail': [], 'lightning': [], 'lightning-rainy': [], 'partlycloudy': [], 'pouring': [], 'rainy': ['shower rain'], ...
true
true
f7617c3cfd4be1e85e7376d2ce6ae6e779351b16
5,746
py
Python
riptide_vision/scripts/riptide_vision/oculus.py
clabough2/riptide_software
3ac70fac9e2fb6a5a7f761939a9b5c401605ad27
[ "BSD-2-Clause" ]
null
null
null
riptide_vision/scripts/riptide_vision/oculus.py
clabough2/riptide_software
3ac70fac9e2fb6a5a7f761939a9b5c401605ad27
[ "BSD-2-Clause" ]
null
null
null
riptide_vision/scripts/riptide_vision/oculus.py
clabough2/riptide_software
3ac70fac9e2fb6a5a7f761939a9b5c401605ad27
[ "BSD-2-Clause" ]
1
2019-08-29T03:39:56.000Z
2019-08-29T03:39:56.000Z
#!/usr/bin/env python # oculus.py # Subscribes to camera output, publishes data about what it sees. # Determines what to look for based on what is being subscribed to. import rospy from cv_bridge import CvBridge from sensor_msgs.msg import Image, CompressedImage from riptide_vision import RiptideVision from gate_proce...
35.251534
104
0.626349
import rospy from cv_bridge import CvBridge from sensor_msgs.msg import Image, CompressedImage from riptide_vision import RiptideVision from gate_processor import GateProcessor from pole_processor import PoleProcessor from riptide_msgs.msg import TaskAlignment, BoundingBox from geometry_msgs.msg import Point import ti...
false
true
f7617c8e904532ca89ee02c737800ef5e0c3487a
815
py
Python
core/lib.py
itsnamgyu/bcdf
5f7ba7905e12a35d5dbcf74f62e856db2504a1ba
[ "MIT" ]
null
null
null
core/lib.py
itsnamgyu/bcdf
5f7ba7905e12a35d5dbcf74f62e856db2504a1ba
[ "MIT" ]
2
2018-10-11T06:38:58.000Z
2018-12-27T15:07:21.000Z
core/lib.py
itsnamgyu/bcdf
5f7ba7905e12a35d5dbcf74f62e856db2504a1ba
[ "MIT" ]
null
null
null
import sys sys.path.append('..') import subprocess from load.lib import auto_decode def execute(args, stdin='', timeout=1) -> dict: ''' Pass stdin input to executable w/ args and get return code, stdout, stderr string ''' with subprocess.Popen(args, stdin=subprocess.PIPE, ...
29.107143
85
0.543558
import sys sys.path.append('..') import subprocess from load.lib import auto_decode def execute(args, stdin='', timeout=1) -> dict: with subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as ...
true
true
f7617d40fc2820e1d17f42b30542cbaea73a6965
1,686
py
Python
d3/tree-encounters-v2.py
pgreze/adventofcode
16baf05bc0717ea231e62bc4801b3ea3847df0bb
[ "Apache-2.0" ]
null
null
null
d3/tree-encounters-v2.py
pgreze/adventofcode
16baf05bc0717ea231e62bc4801b3ea3847df0bb
[ "Apache-2.0" ]
null
null
null
d3/tree-encounters-v2.py
pgreze/adventofcode
16baf05bc0717ea231e62bc4801b3ea3847df0bb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys from functools import reduce tree_encounter_check = lambda pos: 1 if pos == "#" else 0 def main(forest): slope_mode = [ (1, 1), (3, 1), (5, 1), (7, 1), (1, 2), ] mode_to_result = [(mode, resolve_encounters(forest, *mode)) for mode ...
35.87234
110
0.609727
import sys from functools import reduce tree_encounter_check = lambda pos: 1 if pos == "#" else 0 def main(forest): slope_mode = [ (1, 1), (3, 1), (5, 1), (7, 1), (1, 2), ] mode_to_result = [(mode, resolve_encounters(forest, *mode)) for mode in slope_mode] for ...
true
true
f7617d4b34b52c34efe49c963bb7daea38c05d17
77,808
py
Python
mne/label.py
ARudiuk/mne-python
63feb683cd1f8ddd598a78d12c8ef522f9ca2d78
[ "BSD-3-Clause" ]
1
2016-05-26T19:37:19.000Z
2016-05-26T19:37:19.000Z
mne/label.py
ARudiuk/mne-python
63feb683cd1f8ddd598a78d12c8ef522f9ca2d78
[ "BSD-3-Clause" ]
null
null
null
mne/label.py
ARudiuk/mne-python
63feb683cd1f8ddd598a78d12c8ef522f9ca2d78
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) from collections import defaultdict from colorsys import hsv_to_rgb, rgb_to_hsv from os import path as op impor...
37.697674
79
0.576496
from collections import defaultdict from colorsys import hsv_to_rgb, rgb_to_hsv from os import path as op import os import copy as cp import re import numpy as np from scipy import linalg, sparse from .fixes import digitize, in1d from .utils import (get_subjects_dir, _check_subject, logger, verbose, warn, ...
true
true
f7617d528766d12511aa13d809f1e62e7bf6de6c
7,119
py
Python
libvxshare/apiv2.py
chapinb/libvxshare
1e1fdcc2232c373f6e6f83a6a5ebb6b23b57c6b4
[ "MIT" ]
4
2020-08-12T14:01:45.000Z
2021-11-16T17:47:41.000Z
libvxshare/apiv2.py
chapinb/libvxshare
1e1fdcc2232c373f6e6f83a6a5ebb6b23b57c6b4
[ "MIT" ]
2
2020-08-11T12:37:18.000Z
2020-08-11T12:40:28.000Z
libvxshare/apiv2.py
chapinb/libvxshare
1e1fdcc2232c373f6e6f83a6a5ebb6b23b57c6b4
[ "MIT" ]
1
2021-11-09T15:00:47.000Z
2021-11-09T15:00:47.000Z
""" VirusShare API v2 ================= Support for version 2 of the VirusShare API. This API is fully documented here: https://virusshare.com/apiv2_reference An exception is raised in the case the status code is not 200 (Success) or 204 (Rate limited). Please add try/except clauses around calls to this library to ...
41.631579
119
0.663857
from time import sleep import datetime import requests class VirusShare: def __init__(self, api_key=None, requests_per_minute=4): self.api_key = api_key self.uri = "https://virusshare.com/apiv2" self.requests_per_minute = requests_per_minute self.rate_limit_buffer = 0.01 ...
true
true