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
1c2707f2ed25cb9864535d3293fba3b140f413f6
2,301
py
Python
ucscsdk/mometa/adaptor/AdaptorIpV4RssHashProfile.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/adaptor/AdaptorIpV4RssHashProfile.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/adaptor/AdaptorIpV4RssHashProfile.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for AdaptorIpV4RssHashProfile ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class AdaptorIpV4RssHashProfileConsts(): pass class AdaptorIpV4RssHashProfile(M...
48.957447
276
0.670143
from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class AdaptorIpV4RssHashProfileConsts(): pass class AdaptorIpV4RssHashProfile(ManagedObject): consts = AdaptorIpV4RssHashProfileConsts() naming_props = set([]) m...
true
true
1c27086223de1d90837976c1fb446b0754f65d77
1,331
py
Python
scripts/capture_the_flag/default_config.py
UserXXX/CuBoltScripts
471d575d8664f0e3827600f19eb0da8bb080e206
[ "MIT" ]
null
null
null
scripts/capture_the_flag/default_config.py
UserXXX/CuBoltScripts
471d575d8664f0e3827600f19eb0da8bb080e206
[ "MIT" ]
2
2015-01-12T18:55:16.000Z
2015-01-14T17:32:16.000Z
scripts/capture_the_flag/default_config.py
UserXXX/CuBoltScripts
471d575d8664f0e3827600f19eb0da8bb080e206
[ "MIT" ]
null
null
null
# Relation between matches. Possible values are: # 10: friendly players # 11: friendly # 12: friendly, named # 13: players, but can damage each other # 14: hostile # 15: friendly, but can damage each other relation_between_matches = 10 # Whether or not the speedcap is enabled speed_cap = True # Whether players gain x...
24.648148
75
0.772352
relation_between_matches = 10 speed_cap = True xp_on_kill = False xp_on_same_level = 25.0 xp_on_win = True loot = True item_chance = 85 spirit_chance = 10 mana_cube_chance = 5 weapon_chance = 25 armor_chance = 15 gloves_chance = 10 boots_chance = 10 shoulder_armor_chance = 10 amulet_chance = 10 ...
true
true
1c27090c88789e0ecd5d80bbfb0e6335f2814e40
1,521
py
Python
setup.py
saxieyu/GitHubPoster
5a3c2ce6c901862589ef35a8efbdf765bff9b170
[ "MIT" ]
null
null
null
setup.py
saxieyu/GitHubPoster
5a3c2ce6c901862589ef35a8efbdf765bff9b170
[ "MIT" ]
null
null
null
setup.py
saxieyu/GitHubPoster
5a3c2ce6c901862589ef35a8efbdf765bff9b170
[ "MIT" ]
1
2021-10-13T06:31:36.000Z
2021-10-13T06:31:36.000Z
from os import path from setuptools import find_packages, setup loc = path.abspath(path.dirname(__file__)) with open(loc + "/requirements.txt") as f: requirements = f.read().splitlines() required = [] dependency_links = [] # Do not add to required lines pointing to Git repositories EGG_MARK = "#egg=" for line ...
30.42
75
0.641026
from os import path from setuptools import find_packages, setup loc = path.abspath(path.dirname(__file__)) with open(loc + "/requirements.txt") as f: requirements = f.read().splitlines() required = [] dependency_links = [] EGG_MARK = "#egg=" for line in requirements: if ( line.startswith("-e git:"...
true
true
1c27090e416082bd82c8c5f89269254318467ce0
5,917
py
Python
video_er/video_er_models/rga_pair/rga_branches.py
lzzppp/DERT
e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6
[ "MIT" ]
7
2020-08-21T02:19:15.000Z
2021-12-30T02:02:40.000Z
video_er/video_er_models/rga_pair/rga_branches.py
lzzppp/DERT
e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6
[ "MIT" ]
1
2021-04-21T13:50:53.000Z
2021-04-25T02:34:48.000Z
video_er/video_er_models/rga_pair/rga_branches.py
lzzppp/DERT
e1f9ee2489f76e2ed741d6637fd2b1e8bb225fb6
[ "MIT" ]
1
2020-12-02T07:15:13.000Z
2020-12-02T07:15:13.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math import sys import os sys.path.append(os.path.dirname(__file__)) import torch import...
31.142105
101
0.708636
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math import sys import os sys.path.append(os.path.dirname(__file__)) import torch import torch as th from torch import nn from torch.autograd import Variable ...
true
true
1c2709b32d57af43101c55641e36268afda03d73
40,387
py
Python
pymongo/client_session.py
henrifroese/mongo-python-driver
a37e28b84f539da72e7b0b09b9d9881812bbbe60
[ "Apache-2.0" ]
null
null
null
pymongo/client_session.py
henrifroese/mongo-python-driver
a37e28b84f539da72e7b0b09b9d9881812bbbe60
[ "Apache-2.0" ]
null
null
null
pymongo/client_session.py
henrifroese/mongo-python-driver
a37e28b84f539da72e7b0b09b9d9881812bbbe60
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
38.684866
80
0.647585
import collections import time import uuid from collections.abc import Mapping as _Mapping from bson.binary import Binary from bson.int64 import Int64 from bson.son import SON from bson.timestamp import Timestamp from pymongo.cursor import _SocketManager from pymongo.errors import (ConfigurationError,...
true
true
1c270ad47f497ba7514f4b1aa5ce6aa86c4c5cdb
6,756
py
Python
retic/lib/router/router.py
reticpy/retic
033c2a67d1895780d7c561988121ec5615d5bf91
[ "MIT" ]
3
2020-06-02T04:11:11.000Z
2021-12-29T14:38:17.000Z
retic/lib/router/router.py
reticpy/retic
033c2a67d1895780d7c561988121ec5615d5bf91
[ "MIT" ]
null
null
null
retic/lib/router/router.py
reticpy/retic
033c2a67d1895780d7c561988121ec5615d5bf91
[ "MIT" ]
1
2020-12-08T22:39:16.000Z
2020-12-08T22:39:16.000Z
# Werkzeug from werkzeug.routing import RequestRedirect # Httpmethods from httpmethods import get_http_methods # Inspect from inspect import getfile # Traceback import traceback # Sys import sys # Os import os # Retic from retic.lib.api.routes import Request, Response, Next from retic.lib.router.httpmethod import...
33.117647
141
0.590438
from werkzeug.routing import RequestRedirect from httpmethods import get_http_methods from inspect import getfile import traceback import sys import os from retic.lib.api.routes import Request, Response, Next from retic.lib.router.httpmethod import HttpMethod from retic.lib.router.route import Route from r...
true
true
1c270ae5b27980069359489c6e714be39ba6fe2c
278
py
Python
scrape_workspace/my_scraper/scraper_app/items.py
jasonlmann/new-coder
4f407df39c6d7e023880d44cab82a202387d66e4
[ "Zlib" ]
null
null
null
scrape_workspace/my_scraper/scraper_app/items.py
jasonlmann/new-coder
4f407df39c6d7e023880d44cab82a202387d66e4
[ "Zlib" ]
null
null
null
scrape_workspace/my_scraper/scraper_app/items.py
jasonlmann/new-coder
4f407df39c6d7e023880d44cab82a202387d66e4
[ "Zlib" ]
null
null
null
from scrapy.item import Item, Field class LivingSocialDeal(Item): """Livingsocial container (dictionary-like object) for scraped data""" title = Field() link = Field() location = Field() original_price = Field() price = Field() end_date = Field()
23.166667
74
0.658273
from scrapy.item import Item, Field class LivingSocialDeal(Item): title = Field() link = Field() location = Field() original_price = Field() price = Field() end_date = Field()
true
true
1c270bd9807b51f2b968f78b67ef47ba150beb42
5,475
py
Python
beep/structure/neware.py
abillscmu/beep
5509a93f012047791111940a418ee9e8542aa813
[ "Apache-2.0" ]
55
2020-04-22T00:12:08.000Z
2022-02-19T20:58:21.000Z
beep/structure/neware.py
lewis2222/beep
39c4cb952294d3e5ebcd2c85877d538f50d91979
[ "Apache-2.0" ]
253
2020-03-18T23:27:18.000Z
2022-03-30T04:02:38.000Z
beep/structure/neware.py
lewis2222/beep
39c4cb952294d3e5ebcd2c85877d538f50d91979
[ "Apache-2.0" ]
33
2020-03-30T23:52:27.000Z
2022-03-15T15:03:05.000Z
"""Classes and functions for handling Neware battery cycler data. """ import numpy as np import pandas as pd from monty.tempfile import ScratchDir from beep.structure.base import BEEPDatapath from beep.structure.maccor import MaccorDatapath from beep.conversion_schemas import NEWARE_CONFIG class NewareDatapath(BEE...
39.388489
90
0.522009
import numpy as np import pandas as pd from monty.tempfile import ScratchDir from beep.structure.base import BEEPDatapath from beep.structure.maccor import MaccorDatapath from beep.conversion_schemas import NEWARE_CONFIG class NewareDatapath(BEEPDatapath): @classmethod def from_file(cls, filename): ...
true
true
1c270d48e11a6f9949ca0ea49f10df82f5cbc330
1,322
py
Python
tools/data/ucf101/vis_detection.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
20
2021-03-31T02:25:20.000Z
2022-03-11T11:45:59.000Z
tools/data/ucf101/vis_detection.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
6
2021-05-27T18:08:39.000Z
2022-03-23T14:00:51.000Z
tools/data/ucf101/vis_detection.py
vt-vl-lab/video-data-aug
01667cdbd1b952f2510af3422beeeb76e0d9e15a
[ "Apache-2.0" ]
4
2021-03-31T03:11:45.000Z
2021-08-22T11:11:45.000Z
import numpy as np from skvideo.io import ffprobe, vreader, vwrite import os import pdb import glob as gb import cv2 split = 'val' src_det_file_path = '/home/jinchoi/src/rehab/dataset/action/kinetics/detectron_results/{}/full_kinetics_detection_{}_rearranged_org_spatial_dim.npy'.format(split,split) # src_det_file_pat...
33.897436
168
0.69289
import numpy as np from skvideo.io import ffprobe, vreader, vwrite import os import pdb import glob as gb import cv2 split = 'val' src_det_file_path = '/home/jinchoi/src/rehab/dataset/action/kinetics/detectron_results/{}/full_kinetics_detection_{}_rearranged_org_spatial_dim.npy'.format(split,split) videos_root = '/...
false
true
1c270e41d41e54f5382e10e28913272ce2da627d
3,208
py
Python
Woningnet inschrijver.py
NickSiegert/Huren-in-Holland-inschrijver
39fc7cab5a554913b246a0360141ef5165c24655
[ "MIT" ]
2
2021-01-02T23:26:33.000Z
2021-01-07T21:12:59.000Z
Woningnet inschrijver.py
NickSiegert/Huren-in-Holland-inschrijver
39fc7cab5a554913b246a0360141ef5165c24655
[ "MIT" ]
null
null
null
Woningnet inschrijver.py
NickSiegert/Huren-in-Holland-inschrijver
39fc7cab5a554913b246a0360141ef5165c24655
[ "MIT" ]
null
null
null
import time from tkinter import messagebox, Tk from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from bs4 import BeautifulSoup...
40.607595
160
0.708229
import time from tkinter import messagebox, Tk from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from bs4 import BeautifulSoup...
true
true
1c270effdc161519c8fcaa0ca2511748526c10b6
751
py
Python
django_app/backend/mist_smtp/mist_qrcode.py
tmunzer/mist_psk
fde9834172072aba2e034afc0c822f11cc2c4bad
[ "MIT" ]
1
2020-11-04T18:14:21.000Z
2020-11-04T18:14:21.000Z
mist_smtp/mist_qrcode.py
tmunzer/mist_psk_rotate
4eeb1e72102edc7045e42cb5bbb7037b831737a9
[ "MIT" ]
null
null
null
mist_smtp/mist_qrcode.py
tmunzer/mist_psk_rotate
4eeb1e72102edc7045e42cb5bbb7037b831737a9
[ "MIT" ]
1
2021-01-25T14:48:50.000Z
2021-01-25T14:48:50.000Z
import qrcode def get_qrcode(ssid, psk): qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=10, border=4, ) qr.add_data("WIFI:S:{0};T:WPA;P:{1};;".format(ssid, psk)) qr.make(fit=True) return qr.get_matrix() def get_qrcode...
27.814815
133
0.568575
import qrcode def get_qrcode(ssid, psk): qr = qrcode.QRCode( version=1, error_correction=qrcode.constants.ERROR_CORRECT_L, box_size=10, border=4, ) qr.add_data("WIFI:S:{0};T:WPA;P:{1};;".format(ssid, psk)) qr.make(fit=True) return qr.get_matrix() def get_qrcode...
true
true
1c270f1fa93fdfe02bb67f9ce1f7e0d55f5b0cf0
106
py
Python
jesse_live/src/jesse_live/drivers/__init__.py
Sebastiencreoff/jesse-stack-docker
baf36d8f2d97fc2f02448dfae618fbbb829f4efb
[ "MIT" ]
1
2021-12-17T10:20:58.000Z
2021-12-17T10:20:58.000Z
jesse_live/src/jesse_live/drivers/__init__.py
Sebastiencreoff/jesse-stack-docker
baf36d8f2d97fc2f02448dfae618fbbb829f4efb
[ "MIT" ]
null
null
null
jesse_live/src/jesse_live/drivers/__init__.py
Sebastiencreoff/jesse-stack-docker
baf36d8f2d97fc2f02448dfae618fbbb829f4efb
[ "MIT" ]
2
2021-12-17T10:52:59.000Z
2022-01-21T11:19:32.000Z
#! /usr/bin/env import pathlib from .binance import Binance from .testnet_binance import TestNetBinance
15.142857
43
0.801887
import pathlib from .binance import Binance from .testnet_binance import TestNetBinance
true
true
1c27103cfcf5b7bff28d654df8c771110f295ac6
1,601
py
Python
starthinker/task/dcm_api/schema/userDefinedVariableConfiguration.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
null
null
null
starthinker/task/dcm_api/schema/userDefinedVariableConfiguration.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
6
2021-03-19T12:00:18.000Z
2022-02-10T09:43:42.000Z
starthinker/task/dcm_api/schema/userDefinedVariableConfiguration.py
viohman/starthinker
20bd2d7fd1e541eb8a2c9b7159941f667e22e38e
[ "Apache-2.0" ]
null
null
null
########################################################################### # # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/...
41.051282
512
0.576515
true
true
1c2710fd41cfd10a98bd334965847bdf3a2ddcdb
1,641
py
Python
owlbot.py
JorgeTC/google-api-python-client
cbe7effd575a56b79414aaf261dd470cf460a9b7
[ "Apache-2.0" ]
1
2022-03-21T16:06:04.000Z
2022-03-21T16:06:04.000Z
owlbot.py
JorgeTC/google-api-python-client
cbe7effd575a56b79414aaf261dd470cf460a9b7
[ "Apache-2.0" ]
null
null
null
owlbot.py
JorgeTC/google-api-python-client
cbe7effd575a56b79414aaf261dd470cf460a9b7
[ "Apache-2.0" ]
null
null
null
# 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 or agreed to in writing, ...
35.673913
78
0.616088
import synthtool as s from synthtool import gcp from synthtool.languages import python common = gcp.CommonTemplates() templated_files = common.py_library() s.move(templated_files / '.kokoro', excludes=['**/docs/*', 'publish-docs.sh']) s.move(templated_files / '.trampolinerc') s.move(templated...
true
true
1c27120088324db9f08438754b2eeac536865f50
2,068
py
Python
posts/forms/admin.py
NakolenkeDevelopment/rustockholm.club
1b347180d58e63a11c9d3c05fea9f10d753b7732
[ "MIT" ]
1
2021-09-14T07:01:45.000Z
2021-09-14T07:01:45.000Z
posts/forms/admin.py
NakolenkeDevelopment/rustockholm.club
1b347180d58e63a11c9d3c05fea9f10d753b7732
[ "MIT" ]
1
2020-12-07T19:27:17.000Z
2020-12-07T19:28:37.000Z
posts/forms/admin.py
NakolenkeDevelopment/rustockholm.club
1b347180d58e63a11c9d3c05fea9f10d753b7732
[ "MIT" ]
1
2021-10-04T13:45:58.000Z
2021-10-04T13:45:58.000Z
from django import forms from common.data.labels import LABELS from posts.models.post import Post class PostCuratorForm(forms.Form): change_type = forms.ChoiceField( label="Сменить тип поста", choices=[(None, "---")] + Post.TYPES, required=False, ) new_label = forms.ChoiceField( ...
22
95
0.588008
from django import forms from common.data.labels import LABELS from posts.models.post import Post class PostCuratorForm(forms.Form): change_type = forms.ChoiceField( label="Сменить тип поста", choices=[(None, "---")] + Post.TYPES, required=False, ) new_label = forms.ChoiceField( ...
true
true
1c2712d370eeb3fccc196f1a87c5d50cdc978b79
1,164
py
Python
eoreader/products/optical/l3_product.py
sertit/eoreader
da6b1ba4055adba6e8a266552c29003f59d0e51a
[ "Apache-2.0" ]
47
2021-04-27T06:24:51.000Z
2022-03-29T19:23:19.000Z
eoreader/products/optical/l3_product.py
sertit/eoreader
da6b1ba4055adba6e8a266552c29003f59d0e51a
[ "Apache-2.0" ]
27
2021-07-02T15:13:27.000Z
2022-03-31T13:45:29.000Z
eoreader/products/optical/l3_product.py
sertit/eoreader
da6b1ba4055adba6e8a266552c29003f59d0e51a
[ "Apache-2.0" ]
3
2021-05-22T07:09:28.000Z
2022-01-25T05:46:09.000Z
# -*- coding: utf-8 -*- # Copyright 2022, SERTIT-ICube - France, https://sertit.unistra.fr/ # This file is part of eoreader project # https://github.com/sertit/eoreader # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
34.235294
74
0.701031
from eoreader.products import LandsatProduct class L3Product(LandsatProduct): def _set_resolution(self) -> float: return 60.0 def _set_product_type(self) -> None: self._set_mss_product_type(version=3)
true
true
1c2712d3d4434e6298ea05a5bc35600c3c1b3632
201
py
Python
error_handling/user_not_found.py
mansamusa14/the-pig-dice-game
fef85d279b1420a3e217eda51b45f675b2c3b0e4
[ "MIT" ]
null
null
null
error_handling/user_not_found.py
mansamusa14/the-pig-dice-game
fef85d279b1420a3e217eda51b45f675b2c3b0e4
[ "MIT" ]
null
null
null
error_handling/user_not_found.py
mansamusa14/the-pig-dice-game
fef85d279b1420a3e217eda51b45f675b2c3b0e4
[ "MIT" ]
null
null
null
"""Return a message when a user is not found in the player_list.""" class UserNotFound(Exception): """Raise when user is not found during login.""" msg = "User not found! Please try again."
25.125
67
0.686567
class UserNotFound(Exception): msg = "User not found! Please try again."
true
true
1c27132022402089a278546afa220396868dc645
67,931
py
Python
acitoolkit/acibaseobject.py
noironetworks/acitoolkit
922c1d7999142295af16ee40d264e583c96e066e
[ "Apache-2.0" ]
null
null
null
acitoolkit/acibaseobject.py
noironetworks/acitoolkit
922c1d7999142295af16ee40d264e583c96e066e
[ "Apache-2.0" ]
2
2018-05-07T19:40:50.000Z
2020-04-02T14:43:15.000Z
acitoolkit/acibaseobject.py
noironetworks/acitoolkit
922c1d7999142295af16ee40d264e583c96e066e
[ "Apache-2.0" ]
null
null
null
################################################################################ # _ ____ ___ # # / \ / ___|_ _| # # / _ \| | | | ...
37.593248
120
0.56787
return resp return def _instance_has_events(self, session, extension=''): urls = self._get_instance_subscription_urls() return any(session.has_events(url + extension) for url in urls) def _instance_get_event(self, session, extension=''): urls = self._get_instance_subscription_...
true
true
1c2714173c57cad9715e139b5e771127a72defea
1,054
py
Python
models/temporal_link/update_temporal_links.py
zankner/DNC
2596fa3a1ee9bf0a9f160f3f953639e70bb25fe7
[ "MIT" ]
3
2020-03-20T17:46:33.000Z
2020-03-23T16:48:59.000Z
models/temporal_link/update_temporal_links.py
zankner/DNC
2596fa3a1ee9bf0a9f160f3f953639e70bb25fe7
[ "MIT" ]
null
null
null
models/temporal_link/update_temporal_links.py
zankner/DNC
2596fa3a1ee9bf0a9f160f3f953639e70bb25fe7
[ "MIT" ]
1
2020-03-20T17:55:55.000Z
2020-03-20T17:55:55.000Z
import tensorflow as tf def update_temporal_links(temporal_links, write_weights, precedence): summed_write_weights = tf.math.reduce_sum(write_weights, 0) write_weight_j = tf.broadcast_to( summed_write_weights, [write_weights.shape[1], write_weights.shape[1]]) write_weight_i = tf.transpose(write_weig...
42.16
72
0.78463
import tensorflow as tf def update_temporal_links(temporal_links, write_weights, precedence): summed_write_weights = tf.math.reduce_sum(write_weights, 0) write_weight_j = tf.broadcast_to( summed_write_weights, [write_weights.shape[1], write_weights.shape[1]]) write_weight_i = tf.transpose(write_weig...
true
true
1c27141a62218b5c0455efe020670e852538de01
442
py
Python
edgelm/fairseq/data/id_dataset.py
guotao0628/DeepNet
1ae74d8b44d715bf67c7d64a8efafff4b7c7937a
[ "MIT" ]
1
2021-11-07T00:30:05.000Z
2021-11-07T00:30:05.000Z
edgelm/fairseq/data/id_dataset.py
guotao0628/DeepNet
1ae74d8b44d715bf67c7d64a8efafff4b7c7937a
[ "MIT" ]
null
null
null
edgelm/fairseq/data/id_dataset.py
guotao0628/DeepNet
1ae74d8b44d715bf67c7d64a8efafff4b7c7937a
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from . import FairseqDataset class IdDataset(FairseqDataset): def __getitem__(self, index): return ind...
22.1
66
0.674208
import torch from . import FairseqDataset class IdDataset(FairseqDataset): def __getitem__(self, index): return index def __len__(self): return 0 def collater(self, samples): return torch.tensor(samples)
true
true
1c27141c0ecd9bb538d645b9ec3ab5f5bc2213cc
552
py
Python
estrutura2/model.py
adrianosantospb/estrutura_base_pytorch
36a6a45d39c312513645337802dea95b78cdb9ab
[ "MIT" ]
null
null
null
estrutura2/model.py
adrianosantospb/estrutura_base_pytorch
36a6a45d39c312513645337802dea95b78cdb9ab
[ "MIT" ]
null
null
null
estrutura2/model.py
adrianosantospb/estrutura_base_pytorch
36a6a45d39c312513645337802dea95b78cdb9ab
[ "MIT" ]
null
null
null
# Estrutura básica para projetos de Machine Learning e Deep Learning # Por Adriano Santos. from torch import nn, relu class Model(nn.Module): def __init__(self, input_size, hidden_1, hidden_2, output_size): super(Model, self).__init__() self.entry = nn.Linear(input_size, hidden_1) self.hid...
32.470588
68
0.657609
from torch import nn, relu class Model(nn.Module): def __init__(self, input_size, hidden_1, hidden_2, output_size): super(Model, self).__init__() self.entry = nn.Linear(input_size, hidden_1) self.hidden = nn.Linear(hidden_1, hidden_2) self.out = nn.Linear(hidden_2, output_size) ...
true
true
1c271471230df5fc246477b6df18bbb1f86f7489
11,409
py
Python
project/settings.py
lookit/lookit-api
0037445b084a14fc902e7b8ff499d11d12b7a1d8
[ "MIT" ]
9
2018-06-26T17:15:27.000Z
2021-11-21T17:19:01.000Z
project/settings.py
lookit/lookit-api
0037445b084a14fc902e7b8ff499d11d12b7a1d8
[ "MIT" ]
496
2018-02-19T19:18:24.000Z
2022-03-31T17:01:16.000Z
project/settings.py
lookit/lookit-api
0037445b084a14fc902e7b8ff499d11d12b7a1d8
[ "MIT" ]
16
2018-07-06T23:35:39.000Z
2021-11-21T17:52:58.000Z
""" Django settings for project project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os from...
33.457478
118
0.715575
import os from pathlib import Path from django.contrib.messages import constants as messages ENVIRONMENT = os.environ.get("ENVIRONMENT", "develop") BASE_DIR = str((Path(__file__) / "..").resolve()) EMBER_BUILD_ROOT_PATH = str(Path(BASE_DIR, "..", "ember_build").resolve()) SECRET_KEY = os.environ.get( "SE...
true
true
1c2715ca4e8c221712c7fac9110db78d95d217e4
401
py
Python
RasPi_Dev/ros_ws/build/third_packages/joystick_drivers/joy/catkin_generated/pkg.installspace.context.pc.py
QianheYu/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
1
2022-03-11T03:31:15.000Z
2022-03-11T03:31:15.000Z
RasPi_Dev/ros_ws/build/third_packages/joystick_drivers/joy/catkin_generated/pkg.installspace.context.pc.py
bravetree/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
null
null
null
RasPi_Dev/ros_ws/build/third_packages/joystick_drivers/joy/catkin_generated/pkg.installspace.context.pc.py
bravetree/xtark_driver_dev
1708888161cf20c0d1f45c99d0da4467d69c26c8
[ "BSD-3-Clause" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;diagnostic_updater;sensor_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "...
44.555556
82
0.720698
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;diagnostic_updater;sensor_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "joy" PROJECT_SPACE_DIR = "/home/xtark/ros_ws/install" PR...
true
true
1c2716ca662b0869fc0bf2d3a99f6415e9960627
3,892
py
Python
small-algorithm/sebastian/Path.py
Sebastian-Hojas/indoor-localiser
4dfbdb8452ab36b4657135e980ff8e076e816949
[ "MIT" ]
4
2016-09-06T07:38:40.000Z
2017-10-17T09:02:05.000Z
small-algorithm/sebastian/Path.py
Sebastian-Hojas/indoor-localiser
4dfbdb8452ab36b4657135e980ff8e076e816949
[ "MIT" ]
null
null
null
small-algorithm/sebastian/Path.py
Sebastian-Hojas/indoor-localiser
4dfbdb8452ab36b4657135e980ff8e076e816949
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ----------------------------------------------------- # Author: Sebastian Hojas # Date: 27-11-2015 # Comment: Container for path # ----------------------------------------------------- import Config import math class Point: def __init__(self,x_display,y_display,z_display): self.x = floa...
26.47619
95
0.605858
import Config import math class Point: def __init__(self,x_display,y_display,z_display): self.x = float(x_display) * Config.DISPLAY_SCALE_FACTOR self.y = float(y_display) * Config.DISPLAY_SCALE_FACTOR self.z = float(z_display) * Config.FLOOR_MEASUREMENT_SCALE def setRealCoordinates(self, x,y,z...
true
true
1c2717319af41d31bb3a2d44faa3ab959f68a5c9
181
py
Python
rendezvous/env/Scripts/django-admin.py
gazh1987/Rendezvous
4e58a18b6599f9255252f86cb2c36338d39e9780
[ "MIT" ]
null
null
null
rendezvous/env/Scripts/django-admin.py
gazh1987/Rendezvous
4e58a18b6599f9255252f86cb2c36338d39e9780
[ "MIT" ]
null
null
null
rendezvous/env/Scripts/django-admin.py
gazh1987/Rendezvous
4e58a18b6599f9255252f86cb2c36338d39e9780
[ "MIT" ]
null
null
null
#!C:\Users\G\Documents\GitHub\Rendezvous\rendezvous\env\Scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
30.166667
74
0.79558
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
1c27173e6a69225709236f0372e894f06ce4bb58
1,545
py
Python
batch_rl/tests/atari_init_test.py
jzitovsky/batch_rl
ded5703784f896c0f3c31cfcf84514abe7f59606
[ "Apache-2.0" ]
349
2019-07-25T00:25:39.000Z
2022-03-29T11:13:57.000Z
batch_rl/tests/atari_init_test.py
jzitovsky/batch_rl
ded5703784f896c0f3c31cfcf84514abe7f59606
[ "Apache-2.0" ]
26
2020-01-06T22:55:45.000Z
2022-03-24T05:00:08.000Z
batch_rl/tests/atari_init_test.py
jzitovsky/batch_rl
ded5703784f896c0f3c31cfcf84514abe7f59606
[ "Apache-2.0" ]
59
2019-12-30T19:19:24.000Z
2022-03-15T13:31:27.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
28.611111
74
0.721036
import datetime import os import shutil from absl import flags from batch_rl.baselines import train import tensorflow.compat.v1 as tf FLAGS = flags.FLAGS class AtariInitTest(tf.test.TestCase): def setUp(self): super(AtariInitTest, self).setUp() FLAGS.base_dir = os.path.join( '/t...
true
true
1c27175855f8664850db40e36fb50027b5d3dac5
446
py
Python
app/install.py
renatobanzai/iris_satellite_plantation
0f4ef871e2de32c393371be10b090f806dd25d1a
[ "MIT" ]
1
2021-08-02T21:31:57.000Z
2021-08-02T21:31:57.000Z
app/install.py
renatobanzai/iris_satellite_plantation
0f4ef871e2de32c393371be10b090f806dd25d1a
[ "MIT" ]
null
null
null
app/install.py
renatobanzai/iris_satellite_plantation
0f4ef871e2de32c393371be10b090f806dd25d1a
[ "MIT" ]
null
null
null
import sys import subprocess # installing requirements subprocess.check_call([sys.executable, '-m', 'pip', 'install','opencv-python']) subprocess.check_call([sys.executable, '-m', 'pip', 'install','pyproj']) subprocess.check_call([sys.executable, '-m', 'pip', 'install','rasterio']) subprocess.check_call([sys.executabl...
37.166667
79
0.710762
import sys import subprocess subprocess.check_call([sys.executable, '-m', 'pip', 'install','opencv-python']) subprocess.check_call([sys.executable, '-m', 'pip', 'install','pyproj']) subprocess.check_call([sys.executable, '-m', 'pip', 'install','rasterio']) subprocess.check_call([sys.executable, '-m', 'pip', 'install'...
true
true
1c2717adb8ec7f6d5f062ebed3cba01f3e837f2d
10,645
py
Python
uuv_control/uuv_trajectory_control/scripts/rov_nmb_sm_controller.py
MoMagDii/VAUV-simulator
56f55f9349e38e0a327a40feb5a437fcad511b00
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
uuv_control/uuv_trajectory_control/scripts/rov_nmb_sm_controller.py
MoMagDii/VAUV-simulator
56f55f9349e38e0a327a40feb5a437fcad511b00
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
uuv_control/uuv_trajectory_control/scripts/rov_nmb_sm_controller.py
MoMagDii/VAUV-simulator
56f55f9349e38e0a327a40feb5a437fcad511b00
[ "Apache-2.0", "BSD-3-Clause" ]
2
2021-04-10T18:17:43.000Z
2021-04-10T21:07:56.000Z
#!/usr/bin/env python3 # Copyright (c) 2020 The Plankton Authors. # All rights reserved. # # This source code is derived from UUV Simulator # (https://github.com/uuvsimulator/uuv_simulator) # Copyright (c) 2016-2019 The UUV Simulator Authors # licensed under the Apache license, Version 2.0 # cf. 3rd-party-licenses.txt ...
38.154122
100
0.578018
import rclpy import numpy as np import traceback from utils.transform import get_world_ned_to_enu from uuv_control_interfaces import DPControllerBase from uuv_control_msgs.srv import * from plankton_utils.time import time_in_float_sec from plankton_utils.time import is_sim_time class ROV_NMB_SMC...
true
true
1c271822ba1784fd5bb1ba5c4505b1189665af7e
3,808
py
Python
flask_admin/contrib/sqla/filters.py
psykzz/flask-admin
9137d70996fd2adf67f46a91bb4aaa5501e170f3
[ "BSD-3-Clause" ]
1
2019-02-19T22:35:13.000Z
2019-02-19T22:35:13.000Z
flask_admin/contrib/sqla/filters.py
xelez/flask-admin
a671952f498d9a355d15ec332d4e01e621bf1e6d
[ "BSD-3-Clause" ]
null
null
null
flask_admin/contrib/sqla/filters.py
xelez/flask-admin
a671952f498d9a355d15ec332d4e01e621bf1e6d
[ "BSD-3-Clause" ]
null
null
null
import warnings from flask.ext.admin.babel import gettext from flask.ext.admin.model import filters from flask.ext.admin.contrib.sqla import tools class BaseSQLAFilter(filters.BaseFilter): """ Base SQLAlchemy filter. """ def __init__(self, column, name, options=None, data_type=None): """ ...
29.068702
92
0.649685
import warnings from flask.ext.admin.babel import gettext from flask.ext.admin.model import filters from flask.ext.admin.contrib.sqla import tools class BaseSQLAFilter(filters.BaseFilter): def __init__(self, column, name, options=None, data_type=None): super(BaseSQLAFilter, self).__init__(name, options, ...
true
true
1c271a307c5d2fcb74aafb3f733e9648d61dffc4
1,033
py
Python
tests/test_articles.py
jumbamathews/newsgram
5e53ce590433d05b3ca36530c836270a2dd802bb
[ "MIT" ]
2
2018-06-14T08:50:44.000Z
2019-06-19T09:24:34.000Z
tests/test_articles.py
jumbamathews/newsgram
5e53ce590433d05b3ca36530c836270a2dd802bb
[ "MIT" ]
9
2021-03-19T08:27:22.000Z
2022-03-29T21:57:33.000Z
tests/test_articles.py
jumbamathews/newsgram
5e53ce590433d05b3ca36530c836270a2dd802bb
[ "MIT" ]
14
2018-06-24T09:45:34.000Z
2020-05-15T04:44:08.000Z
import unittest from app.models import Articles class TestArticles(unittest.TestCase): ''' Test class to test the behavior of the articles class ''' def setUp(self): ''' Test class to run before other tests ''' self.new_article = Articles('Richard','Tech is great','Advan...
43.041667
171
0.696031
import unittest from app.models import Articles class TestArticles(unittest.TestCase): def setUp(self): self.new_article = Articles('Richard','Tech is great','Advanced technology improving life','https://google.com','https://google.com/images','2018-05-12T13:31:03Z') def test_instance(self): ...
true
true
1c271a4eb5a4f4b45e62be470858f266be014045
1,526
py
Python
fuocore/local/schemas.py
AmyLewis/feeluown-core
0aecb39ce49504b04fa54a391260e9976220a288
[ "MIT" ]
null
null
null
fuocore/local/schemas.py
AmyLewis/feeluown-core
0aecb39ce49504b04fa54a391260e9976220a288
[ "MIT" ]
null
null
null
fuocore/local/schemas.py
AmyLewis/feeluown-core
0aecb39ce49504b04fa54a391260e9976220a288
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import base64 from marshmallow import Schema, post_load, fields from fuocore.schemas import SongSchema from fuocore.utils import elfhash SOURCE = 'local' class EasyMP3MetadataSongSchema(Schema): """EasyMP3 metadata""" url = fields.Str(required=True) title_list = fields.List(fie...
35.488372
80
0.596986
import base64 from marshmallow import Schema, post_load, fields from fuocore.schemas import SongSchema from fuocore.utils import elfhash SOURCE = 'local' class EasyMP3MetadataSongSchema(Schema): url = fields.Str(required=True) title_list = fields.List(fields.Str(), load_from='title', required=True) d...
true
true
1c271aaaf2a45eddf145a4ce25e6fda6ccb7b1d7
3,640
py
Python
src/overlay_handler.py
TRex22/picam
591ffe3aaccb648e470f2335506f402f94fb34f4
[ "MIT" ]
1
2021-07-17T23:08:55.000Z
2021-07-17T23:08:55.000Z
src/overlay_handler.py
TRex22/picam
591ffe3aaccb648e470f2335506f402f94fb34f4
[ "MIT" ]
5
2021-05-01T03:06:46.000Z
2022-01-15T11:51:59.000Z
src/overlay_handler.py
TRex22/picam
591ffe3aaccb648e470f2335506f402f94fb34f4
[ "MIT" ]
null
null
null
import numpy as np from PIL import Image import math from picamerax import mmal # Modules import mmal_handler def compute_shutter_speed_from_us(us): one_second = 1000000 if us == 0: return 'auto' converted_seconds = math.ceil(one_second/us) if us > one_second: return f'{convert...
34.018692
142
0.688736
import numpy as np from PIL import Image import math from picamerax import mmal import mmal_handler def compute_shutter_speed_from_us(us): one_second = 1000000 if us == 0: return 'auto' converted_seconds = math.ceil(one_second/us) if us > one_second: return f'{converted_seconds...
true
true
1c271acaddbd442fead1f788c9316a081ee5dd72
140
py
Python
dvc/dependency/https.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
dvc/dependency/https.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
dvc/dependency/https.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
from .http import HTTPDependency from dvc.remote.https import HTTPSRemote class HTTPSDependency(HTTPDependency): REMOTE = HTTPSRemote
20
40
0.814286
from .http import HTTPDependency from dvc.remote.https import HTTPSRemote class HTTPSDependency(HTTPDependency): REMOTE = HTTPSRemote
true
true
1c271c5e769a30a2bdf133a48afcecc7e858ec57
16,977
py
Python
qatrack/accounts/backends.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
20
2021-03-11T18:37:32.000Z
2022-03-23T19:38:07.000Z
qatrack/accounts/backends.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
75
2021-02-12T02:37:33.000Z
2022-03-29T20:56:16.000Z
qatrack/accounts/backends.py
crcrewso/qatrackplus
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
[ "MIT" ]
5
2021-04-07T15:46:53.000Z
2021-09-18T16:55:00.000Z
try: import ldap except ImportError: pass import logging from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import Group, User from django.core.exceptions import PermissionDenied from django_auth_adfs.backend import AdfsAuthCodeBackend from ...
39.481395
118
0.620545
try: import ldap except ImportError: pass import logging from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import Group, User from django.core.exceptions import PermissionDenied from django_auth_adfs.backend import AdfsAuthCodeBackend from ...
true
true
1c271cc32a93d797e0fda4a41d0c00dbcacb4445
2,822
py
Python
arsenal/vulnscan.py
PowderKegTech/mushikago-femto
48ace7c20dfd15a117d923eadab224aa71f3d26d
[ "Apache-2.0" ]
1
2022-01-25T11:31:08.000Z
2022-01-25T11:31:08.000Z
arsenal/vulnscan.py
PowderKegTech/mushikago-femto
48ace7c20dfd15a117d923eadab224aa71f3d26d
[ "Apache-2.0" ]
null
null
null
arsenal/vulnscan.py
PowderKegTech/mushikago-femto
48ace7c20dfd15a117d923eadab224aa71f3d26d
[ "Apache-2.0" ]
null
null
null
from database import mushilogger import subprocess import re import copy import pprint class VulnScan(): def __init__(self): print("init VulnScan") self.mlogger = mushilogger.MushiLogger() def execute_vulnscan(self, ip_addr, node_num, node, proxy): openport_vuln_list = [] pattern = '(.*)(CVE:)(....
37.131579
139
0.616938
from database import mushilogger import subprocess import re import copy import pprint class VulnScan(): def __init__(self): print("init VulnScan") self.mlogger = mushilogger.MushiLogger() def execute_vulnscan(self, ip_addr, node_num, node, proxy): openport_vuln_list = [] pattern = '(.*)(CVE:)(....
true
true
1c271cde926b0ce058111e5d9d2e3d70da42adfc
1,369
py
Python
codes/string/karp_rabin.py
NilLau/NilLau.github.io
e55768be0be4d6549b24c702554c11e64958d4c7
[ "MIT" ]
null
null
null
codes/string/karp_rabin.py
NilLau/NilLau.github.io
e55768be0be4d6549b24c702554c11e64958d4c7
[ "MIT" ]
6
2019-06-20T10:05:10.000Z
2019-07-08T04:53:01.000Z
codes/string/karp_rabin.py
117ami/117ami.github.io
e55768be0be4d6549b24c702554c11e64958d4c7
[ "MIT" ]
null
null
null
import string def rabin_karp(s: string, pat: string): '''Implementation of Rabin-Karp Algorithm to find all occurrence of pat in s. ''' m, n = len(s), len(pat) h_pat = 0 # Hash value for pat h_sub = 0 # Hash value for substring (with length n) of s prime_modulus = 997 # A prime number s...
31.837209
108
0.599708
import string def rabin_karp(s: string, pat: string): m, n = len(s), len(pat) h_pat = 0 h_sub = 0 prime_modulus = 997 d = 256 base_offset = 1 for i in range(n - 1): base_offset = (d * base_offset) % prime_modulus for i in range(n): h_pat ...
true
true
1c271cf5bbafc18a7616c28f444ff15c2059bf2f
3,505
py
Python
infra/repo_manager_test.py
alexcrichton/oss-fuzz
e82397baf623b69e17f29115817c5415f52df32b
[ "Apache-2.0" ]
2
2020-01-23T10:31:30.000Z
2020-01-23T17:34:20.000Z
infra/repo_manager_test.py
alexcrichton/oss-fuzz
e82397baf623b69e17f29115817c5415f52df32b
[ "Apache-2.0" ]
1
2020-01-23T10:31:32.000Z
2020-01-23T10:31:32.000Z
infra/repo_manager_test.py
alexcrichton/oss-fuzz
e82397baf623b69e17f29115817c5415f52df32b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
42.228916
79
0.750071
import os import unittest import tempfile import repo_manager class TestRepoManager(unittest.TestCase): curl_repo = 'https://github.com/curl/curl' def test_clone_correctly(self): with tempfile.TemporaryDirectory() as tmp_dir: test_repo_manager = repo_manager.RepoManager(self.curl_repo, ...
true
true
1c271d3be6289af53c1c16de9bccdf01aa30c5e6
3,328
py
Python
kibom/columns.py
ferdymercury/KiBoM
e19ace97e2a0fe05a27d8285786588aacf3011ea
[ "MIT" ]
4
2020-07-29T05:44:49.000Z
2021-11-10T17:16:17.000Z
kibom/columns.py
ferdymercury/KiBoM
e19ace97e2a0fe05a27d8285786588aacf3011ea
[ "MIT" ]
1
2021-11-09T12:31:38.000Z
2021-11-09T12:31:38.000Z
kibom/columns.py
ferdymercury/KiBoM
e19ace97e2a0fe05a27d8285786588aacf3011ea
[ "MIT" ]
3
2020-09-08T13:17:41.000Z
2021-11-09T23:59:26.000Z
# -*- coding: utf-8 -*- class ColumnList: # Default columns (immutable) COL_REFERENCE = 'References' COL_REFERENCE_L = COL_REFERENCE.lower() COL_DESCRIPTION = 'Description' COL_DESCRIPTION_L = COL_DESCRIPTION.lower() COL_VALUE = 'Value' COL_VALUE_L = COL_VALUE.lower() COL_FP = 'Footpr...
26.412698
74
0.616587
class ColumnList: COL_REFERENCE = 'References' COL_REFERENCE_L = COL_REFERENCE.lower() COL_DESCRIPTION = 'Description' COL_DESCRIPTION_L = COL_DESCRIPTION.lower() COL_VALUE = 'Value' COL_VALUE_L = COL_VALUE.lower() COL_FP = 'Footprint' COL_FP_L = COL_FP.lower() COL_FP_LIB = ...
true
true
1c271e3e1d6a2c72b46a3c6a50f1fe36f149a5e3
83,831
py
Python
cinder/tests/unit/test_solidfire.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/test_solidfire.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/test_solidfire.py
ISCAS-VDI/cinder-base
9529102548beef074264aaef31fa8267db99df61
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
46.213341
79
0.506793
import datetime import mock from oslo_utils import timeutils from oslo_utils import units from cinder import context from cinder import exception from cinder.objects import fields from cinder import test from cinder.volume import configuration as conf from cinder.volume.drivers import solidfire from c...
true
true
1c271ee87345f18b73f59cdb913f06e6533baf3f
192
py
Python
src/main.py
itsnubby/radish-pi
095676b661b32a5bff382573cfc499fef489d8bf
[ "Apache-2.0" ]
2
2018-01-31T03:56:47.000Z
2020-01-29T03:20:37.000Z
src/main.py
harrychowjackson/automated-radishes
acb6509506bef3c55ecbff3e5f7ea965b8460b94
[ "Apache-2.0" ]
1
2020-07-31T00:25:58.000Z
2020-07-31T00:25:58.000Z
src/main.py
nubbysaurus/radish-pi
095676b661b32a5bff382573cfc499fef489d8bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import sys import os from sensor import print_ADS1115_sensor_data def main(argv): print_ADS1115_sensor_data.blockA() if __name__ == "__main__": main(sys.argv)
17.454545
44
0.755208
import sys import os from sensor import print_ADS1115_sensor_data def main(argv): print_ADS1115_sensor_data.blockA() if __name__ == "__main__": main(sys.argv)
true
true
1c271f3acf071440a751b0e1d0e32833396928a1
1,597
py
Python
var/spack/repos/builtin/packages/w3nco/package.py
mark-a-potts/ncep-spack
271e515e99b0160ffe95fcddaf799cb5a0748900
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/w3nco/package.py
mark-a-potts/ncep-spack
271e515e99b0160ffe95fcddaf799cb5a0748900
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/w3nco/package.py
mark-a-potts/ncep-spack
271e515e99b0160ffe95fcddaf799cb5a0748900
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) # ---------------------------------------------------------------------------- # If you submit this package back to Spack ...
33.978723
78
0.634314
# next to all the things you'll want to change. Once you've handled # them, you can save this file and test your package like this: # # spack install w3nco # # You can edit this file again by typing: # # spack edit w3nco # # See the Spack documentation for more information on packaging. # ------------...
true
true
1c271f5bca43357264e45624e32564dc41260172
987
py
Python
sharingen_run.py
SethuEapen/Real_life_Sharingan
fb7d7e2b29137a44ef396395a8e77177d0ebffc7
[ "MIT" ]
null
null
null
sharingen_run.py
SethuEapen/Real_life_Sharingan
fb7d7e2b29137a44ef396395a8e77177d0ebffc7
[ "MIT" ]
null
null
null
sharingen_run.py
SethuEapen/Real_life_Sharingan
fb7d7e2b29137a44ef396395a8e77177d0ebffc7
[ "MIT" ]
null
null
null
import cv2 import tensorflow as tf font = cv2.FONT_HERSHEY_SIMPLEX org = (50, 50) fontScale = 1 color = (255, 0, 0) thickness = 2 CATEGORIES = ["boar", "ox"] IMG_SIZE = 50 def prepare(image): #img_array = cv2.imread(image, cv2.IMREAD_GRAYSCALE) new_array = cv2.resize(image, (IMG_SIZE, IMG_SIZE)) return new_arra...
25.973684
78
0.66768
import cv2 import tensorflow as tf font = cv2.FONT_HERSHEY_SIMPLEX org = (50, 50) fontScale = 1 color = (255, 0, 0) thickness = 2 CATEGORIES = ["boar", "ox"] IMG_SIZE = 50 def prepare(image): new_array = cv2.resize(image, (IMG_SIZE, IMG_SIZE)) return new_array.reshape(-1, IMG_SIZE, IMG_SIZE, 1) model = tf.ker...
true
true
1c27208989a474fed4c1ede417b4868850b90769
47,890
py
Python
test/orm/test_lazy_relations.py
graingert/sqlalchemy
b289fb032ead703eb131ad1b0d0e0dcba8617ca3
[ "MIT" ]
null
null
null
test/orm/test_lazy_relations.py
graingert/sqlalchemy
b289fb032ead703eb131ad1b0d0e0dcba8617ca3
[ "MIT" ]
null
null
null
test/orm/test_lazy_relations.py
graingert/sqlalchemy
b289fb032ead703eb131ad1b0d0e0dcba8617ca3
[ "MIT" ]
null
null
null
"""basic tests of lazy loaded attributes""" import datetime import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import Boolean from sqlalchemy import ForeignKey from sqlalchemy import ForeignKeyConstraint from sqlalchemy import Integer from sqlalchemy import orm from s...
28.642344
79
0.489267
import datetime import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import Boolean from sqlalchemy import ForeignKey from sqlalchemy import ForeignKeyConstraint from sqlalchemy import Integer from sqlalchemy import orm from sqlalchemy import select from sqlalchemy impo...
true
true
1c2720e9730ffcf8d42db1b101ed531b4e80804c
95,774
py
Python
venv/Lib/site-packages/tensorflow/python/ops/math_ops.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
16
2018-01-30T22:16:13.000Z
2021-07-18T10:00:55.000Z
venv/Lib/site-packages/tensorflow/python/ops/math_ops.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
3
2018-05-09T11:31:58.000Z
2021-01-27T12:26:21.000Z
venv/Lib/site-packages/tensorflow/python/ops/math_ops.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
11
2018-04-02T03:37:08.000Z
2020-10-20T09:32:12.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.866337
113
0.654081
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange from tensorflow.python.eager import context from tensorflow.python.framework import common_shapes from tensorflow.python.framework import constan...
true
true
1c2722c7ba999d67e665c4dcd0ac59e18a3fdc95
595
py
Python
qcloudsdkmqiot/DeleteTopicRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmqiot/DeleteTopicRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
qcloudsdkmqiot/DeleteTopicRequest.py
f3n9/qcloudcli
b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class DeleteTopicRequest(Request): def __init__(self): super(DeleteTopicRequest, self).__init__( 'mqiot', 'qcloudcliV1', 'DeleteTopic', 'mqiot.api.qcloud.com') def get_instanceId(self): return self.get_params().get...
27.045455
74
0.67395
from qcloudsdkcore.request import Request class DeleteTopicRequest(Request): def __init__(self): super(DeleteTopicRequest, self).__init__( 'mqiot', 'qcloudcliV1', 'DeleteTopic', 'mqiot.api.qcloud.com') def get_instanceId(self): return self.get_params().get('instanceId') def...
true
true
1c27244edcd98d23c6dadd2e486f725715ac19d9
50,240
py
Python
ipyvolume/pylab.py
mgeier/ipyvolume
16ab04eaf7e27801aec1a43cbdcdb6a6063a9145
[ "MIT" ]
null
null
null
ipyvolume/pylab.py
mgeier/ipyvolume
16ab04eaf7e27801aec1a43cbdcdb6a6063a9145
[ "MIT" ]
null
null
null
ipyvolume/pylab.py
mgeier/ipyvolume
16ab04eaf7e27801aec1a43cbdcdb6a6063a9145
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division _last_figure = None import ipywidgets from IPython.display import display import IPython import ipyvolume as ipv import ipyvolume.embed import os import numpy as np from . import utils import time from . import examples import warnings import PIL.Im...
39.559055
194
0.609952
from __future__ import absolute_import from __future__ import division _last_figure = None import ipywidgets from IPython.display import display import IPython import ipyvolume as ipv import ipyvolume.embed import os import numpy as np from . import utils import time from . import examples import warnings import PIL.Im...
true
true
1c2728015d3ffe510a3cb8d5862343224b60ec7f
1,307
py
Python
app-api/recipe_app/serializers.py
atranscendence/recipe-api
83dea7e680f2454ecbea02be5ad8835b3254919c
[ "MIT" ]
null
null
null
app-api/recipe_app/serializers.py
atranscendence/recipe-api
83dea7e680f2454ecbea02be5ad8835b3254919c
[ "MIT" ]
null
null
null
app-api/recipe_app/serializers.py
atranscendence/recipe-api
83dea7e680f2454ecbea02be5ad8835b3254919c
[ "MIT" ]
null
null
null
from rest_framework import serializers from main_app.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): """Serializer for tag objects""" class Meta: model = Tag fields = ('id', 'name') class IngredientSerializer(serializers.ModelSerializer): """Seria...
26.14
71
0.657995
from rest_framework import serializers from main_app.models import Tag, Ingredient, Recipe class TagSerializer(serializers.ModelSerializer): class Meta: model = Tag fields = ('id', 'name') class IngredientSerializer(serializers.ModelSerializer): class Meta: model = Ingredient ...
true
true
1c27281c9376c4609ce3f93e312471a358c726a6
516
py
Python
YAML RW.py
MohanSha/Python-Code-Sessions
608d995a252e9ea5346e13c0387a068fc5b15615
[ "MIT" ]
null
null
null
YAML RW.py
MohanSha/Python-Code-Sessions
608d995a252e9ea5346e13c0387a068fc5b15615
[ "MIT" ]
null
null
null
YAML RW.py
MohanSha/Python-Code-Sessions
608d995a252e9ea5346e13c0387a068fc5b15615
[ "MIT" ]
null
null
null
import yaml import io # Define data data = {'a list': [1, 42, 3.141, 1337, 'help', u'€'], 'a string': 'bla', 'another dict': {'foo': 'bar', 'key': 'value', 'the answer': 42}} # Write YAML file with io.open('data.yaml', 'w', encoding='utf8') as outfile:...
27.157895
74
0.567829
import yaml import io data = {'a list': [1, 42, 3.141, 1337, 'help', u'€'], 'a string': 'bla', 'another dict': {'foo': 'bar', 'key': 'value', 'the answer': 42}} with io.open('data.yaml', 'w', encoding='utf8') as outfile: yaml.dump(data, outfile, ...
true
true
1c27282d441f3d8b638a597dd20de7aa3860583c
101
py
Python
raon/reservation/apps.py
rookie0806/raon2
332e748c88d03c2264c3527f30dc2d7ecac94c9a
[ "MIT" ]
null
null
null
raon/reservation/apps.py
rookie0806/raon2
332e748c88d03c2264c3527f30dc2d7ecac94c9a
[ "MIT" ]
null
null
null
raon/reservation/apps.py
rookie0806/raon2
332e748c88d03c2264c3527f30dc2d7ecac94c9a
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ReservationConfig(AppConfig): name = 'raon.reservation'
16.833333
35
0.782178
from django.apps import AppConfig class ReservationConfig(AppConfig): name = 'raon.reservation'
true
true
1c272969f8ac4c283103a48ed15cac5a1b5901c7
23,542
py
Python
main.py
kalinochkind/worldroulette-bot
436b38ca3223fda28e0632ab0c3c629f69dba904
[ "MIT" ]
3
2016-08-09T21:29:37.000Z
2018-08-08T01:57:22.000Z
main.py
kalinochkind/worldroulette-bot
436b38ca3223fda28e0632ab0c3c629f69dba904
[ "MIT" ]
1
2019-06-28T19:21:35.000Z
2019-06-29T11:54:36.000Z
main.py
kalinochkind/worldroulette-bot
436b38ca3223fda28e0632ab0c3c629f69dba904
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import signal from engineio.client import original_signal_handler signal.signal(signal.SIGINT, original_signal_handler) try: import readline except ImportError: pass import argparse import json import time import random import sys import math import re import os import threading from ...
33.873381
159
0.534874
import signal from engineio.client import original_signal_handler signal.signal(signal.SIGINT, original_signal_handler) try: import readline except ImportError: pass import argparse import json import time import random import sys import math import re import os import threading from collections import def...
true
true
1c2729b493489667ba3e9c34975d7b3cb12f49ea
333,559
py
Python
pywikibot/site.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
pywikibot/site.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
pywikibot/site.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Objects representing MediaWiki sites (wikis). This module also includes functions to load families, which are groups of wikis on the same topic in different languages. """ # # (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute...
40.514879
92
0.563034
from __future__ import absolute_import, division, unicode_literals import copy import datetime import functools import heapq import itertools import json import mimetypes import os import re import sys import threading import time import uuid try: from collections.abc import Iterable, Container, Mapping exc...
true
true
1c272a0d17ee4c9ad2139134b94879a120bc6b27
1,063
py
Python
onlinecourse/urls.py
adrianrejas/final-cloud-app-with-database
393f4e8bb771f3c98c5b03d1a9a65aabfa282d97
[ "Apache-2.0" ]
null
null
null
onlinecourse/urls.py
adrianrejas/final-cloud-app-with-database
393f4e8bb771f3c98c5b03d1a9a65aabfa282d97
[ "Apache-2.0" ]
null
null
null
onlinecourse/urls.py
adrianrejas/final-cloud-app-with-database
393f4e8bb771f3c98c5b03d1a9a65aabfa282d97
[ "Apache-2.0" ]
null
null
null
from django.urls import path from django.conf import settings from django.conf.urls.static import static from . import views app_name = 'onlinecourse' urlpatterns = [ # route is a string contains a URL pattern # view refers to the view function # name the URL path(route='', view=views.CourseListView.as...
39.37037
115
0.707432
from django.urls import path from django.conf import settings from django.conf.urls.static import static from . import views app_name = 'onlinecourse' urlpatterns = [ path(route='', view=views.CourseListView.as_view(), name='index'), path('registration/', views.registration_request, name='regist...
true
true
1c272a42510288fa5599beb679fb65c7831c0e93
524
py
Python
tests/result_py3/result_10.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
18
2018-08-27T11:39:14.000Z
2021-12-10T08:48:29.000Z
tests/result_py3/result_10.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
18
2018-10-26T12:32:16.000Z
2021-11-17T06:01:34.000Z
tests/result_py3/result_10.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
7
2018-10-19T10:28:05.000Z
2021-04-09T15:44:16.000Z
('test_precisely', [('F821', 12, 14, "undefined name 'LdbModel'", ' >>> ldb = LdbModel(corpus=mm, id2word=id2word, num_topics=100, distributed=True)\n'), ('F821', 12, 30, "undefined name 'mm'", ' >>> ldb = LdbModel(corpus=mm, id2word=id2word, num_topics=100, distributed=True)\n'), ('F...
29.111111
94
0.601145
('test_precisely', [('F821', 12, 14, "undefined name 'LdbModel'", ' >>> ldb = LdbModel(corpus=mm, id2word=id2word, num_topics=100, distributed=True)\n'), ('F821', 12, 30, "undefined name 'mm'", ' >>> ldb = LdbModel(corpus=mm, id2word=id2word, num_topics=100, distributed=True)\n'), ('F...
true
true
1c272a476edd52965db56da4f875516443b413d0
357
py
Python
datacatalog/linkedstores/experiment/mappings/gdrive/errors.py
SD2E/python-datacatalog
51ab366639505fb6e8a14cd6b446de37080cd20d
[ "CNRI-Python" ]
null
null
null
datacatalog/linkedstores/experiment/mappings/gdrive/errors.py
SD2E/python-datacatalog
51ab366639505fb6e8a14cd6b446de37080cd20d
[ "CNRI-Python" ]
2
2019-07-25T15:39:04.000Z
2019-10-21T15:31:46.000Z
datacatalog/linkedstores/experiment_design/mappings/gdrive/errors.py
SD2E/python-datacatalog
51ab366639505fb6e8a14cd6b446de37080cd20d
[ "CNRI-Python" ]
1
2019-10-15T14:33:44.000Z
2019-10-15T14:33:44.000Z
class UnsupportedMapping(NotImplementedError): pass class ExperimentReferenceError(Exception): pass class MappingNotFound(ExperimentReferenceError): pass class IncorrectConfiguration(ExperimentReferenceError): pass class LookupNotPopulated(ExperimentReferenceError): pass class GoogleSheetsError...
19.833333
55
0.817927
class UnsupportedMapping(NotImplementedError): pass class ExperimentReferenceError(Exception): pass class MappingNotFound(ExperimentReferenceError): pass class IncorrectConfiguration(ExperimentReferenceError): pass class LookupNotPopulated(ExperimentReferenceError): pass class GoogleSheetsError...
true
true
1c272abe2a49579fc9c3a6bdd920bb9c18012277
2,621
py
Python
astropy/table/tests/test_bst.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
null
null
null
astropy/table/tests/test_bst.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
1
2018-05-08T13:59:56.000Z
2018-05-08T13:59:56.000Z
astropy/table/tests/test_bst.py
jbkalmbach/astropy
88ae8c615533efd1e60de4aded204943f66f881c
[ "BSD-3-Clause" ]
1
2018-08-02T09:33:21.000Z
2018-08-02T09:33:21.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from ..bst import BST def get_tree(TreeType): b = TreeType([], []) for val in [5, 2, 9, 3, 4, 1, 6, 10, 8, 7]: b.add(val) return b @pytest.fixture def tree(): return get_tree(BST) r''' 5 / \...
24.268519
65
0.560092
import pytest from ..bst import BST def get_tree(TreeType): b = TreeType([], []) for val in [5, 2, 9, 3, 4, 1, 6, 10, 8, 7]: b.add(val) return b @pytest.fixture def tree(): return get_tree(BST) @pytest.fixture def bst(): return tree() def test_bst_add(bst): root = bst.root ...
true
true
1c272b27a953902b8a44b727bf78537d0be110e7
20,916
py
Python
conans/test/functional/command/export/export_test.py
sigmunjr/conan
ce173d25640d5c9cdd62b1c67598291be003633d
[ "MIT" ]
1
2020-11-07T21:25:57.000Z
2020-11-07T21:25:57.000Z
conans/test/functional/command/export/export_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
conans/test/functional/command/export/export_test.py
ttencate/conan
3dc4fb35cc3be9865f0ae480c89e6a58813d5076
[ "MIT" ]
null
null
null
import os import stat import textwrap import unittest from parameterized import parameterized from conans.model.manifest import FileTreeManifest from conans.model.ref import ConanFileReference from conans.paths import CONANFILE, CONAN_MANIFEST from conans.test.utils.cpp_test_files import cpp_hello_conan_files from co...
44.88412
100
0.62512
import os import stat import textwrap import unittest from parameterized import parameterized from conans.model.manifest import FileTreeManifest from conans.model.ref import ConanFileReference from conans.paths import CONANFILE, CONAN_MANIFEST from conans.test.utils.cpp_test_files import cpp_hello_conan_files from co...
true
true
1c272c17a0693517319738863cbcb89794d66af4
675
py
Python
src/clarityv2/crm/migrations/0011_auto_20190711_2054.py
Clarity-89/clarityv2
7c4af765c5473778fc0750d1505f8b5f1724e5c5
[ "MIT" ]
null
null
null
src/clarityv2/crm/migrations/0011_auto_20190711_2054.py
Clarity-89/clarityv2
7c4af765c5473778fc0750d1505f8b5f1724e5c5
[ "MIT" ]
1
2022-03-11T23:38:16.000Z
2022-03-11T23:38:16.000Z
src/clarityv2/crm/migrations/0011_auto_20190711_2054.py
Clarity-89/clarityv2
7c4af765c5473778fc0750d1505f8b5f1724e5c5
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2019-07-11 17:54 from django.db import migrations import django_countries.fields class Migration(migrations.Migration): dependencies = [ ('crm', '0010_auto_20171126_2024'), ] operations = [ migrations.AlterField( model_name='client', ...
27
107
0.625185
from django.db import migrations import django_countries.fields class Migration(migrations.Migration): dependencies = [ ('crm', '0010_auto_20171126_2024'), ] operations = [ migrations.AlterField( model_name='client', name='country', field=django_coun...
true
true
1c272c60dcbddbb05b7e30cbd3c83a02031839e9
7,258
py
Python
s3contents/gcs/gcs_fs.py
ziprjoe/s3contents
5f2458a8f167e139f7e61f04ffc037188466753c
[ "Apache-2.0" ]
null
null
null
s3contents/gcs/gcs_fs.py
ziprjoe/s3contents
5f2458a8f167e139f7e61f04ffc037188466753c
[ "Apache-2.0" ]
null
null
null
s3contents/gcs/gcs_fs.py
ziprjoe/s3contents
5f2458a8f167e139f7e61f04ffc037188466753c
[ "Apache-2.0" ]
null
null
null
import base64 import os import gcsfs from tornado.web import HTTPError from s3contents.genericfs import GenericFS, NoSuchFile from s3contents.ipycompat import Unicode class GCSFS(GenericFS): project = Unicode( help="GCP Project", allow_none=True, default_value=None ).tag(config=True, env="JPYNB_GCS...
34.235849
120
0.552907
import base64 import os import gcsfs from tornado.web import HTTPError from s3contents.genericfs import GenericFS, NoSuchFile from s3contents.ipycompat import Unicode class GCSFS(GenericFS): project = Unicode( help="GCP Project", allow_none=True, default_value=None ).tag(config=True, env="JPYNB_GCS...
true
true
1c272ca5280a8deb3ddbdc89a088c8248b1cae0c
68,419
py
Python
labelImg.py
chjeong530/labelImage
0c94cd7f5d80fc9945d0e7ab84b29de11591d550
[ "MIT" ]
null
null
null
labelImg.py
chjeong530/labelImage
0c94cd7f5d80fc9945d0e7ab84b29de11591d550
[ "MIT" ]
null
null
null
labelImg.py
chjeong530/labelImage
0c94cd7f5d80fc9945d0e7ab84b29de11591d550
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import distutils.spawn import os.path import platform import re import sys import subprocess from functools import partial from collections import defaultdict try: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import *...
40.412877
157
0.606484
import codecs import distutils.spawn import os.path import platform import re import sys import subprocess from functools import partial from collections import defaultdict try: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * except ImportError: ...
true
true
1c272dd21c03593d9040f1857b50a85bbbaf9485
3,584
py
Python
Chapter10/myproject_docker/apps/ideas/migrations/0001_initial.py
PacktPublishing/Django-2-Web-Development-Cookbook-Third-Edition
f129613e2b1d00f5c76649025ae4d568f6286f2c
[ "MIT" ]
75
2018-12-03T02:35:29.000Z
2021-11-08T13:13:34.000Z
Chapter11/virtualenvs/myproject_env/project/django-myproject/ideas/migrations/0001_initial.py
PacktPublishing/Django-2-Web-Development-Cookbook-Third-Edition
f129613e2b1d00f5c76649025ae4d568f6286f2c
[ "MIT" ]
3
2019-08-11T13:35:01.000Z
2020-09-29T06:52:36.000Z
Chapter09/virtualenvs/myproject_env/project/django-myproject/ideas/migrations/0001_initial.py
PacktPublishing/Django-2-Web-Development-Cookbook-Third-Edition
f129613e2b1d00f5c76649025ae4d568f6286f2c
[ "MIT" ]
45
2018-11-03T14:03:22.000Z
2021-08-25T07:39:33.000Z
# Generated by Django 2.1.2 on 2018-10-02 04:52 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField...
61.793103
138
0.618583
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize...
true
true
1c272df3491eeab5364ed47ec5fd553491be473f
15,508
py
Python
PyHyphen-2.0.5/2.x/textwrap2.py
GraceJonn123/github-resources
fc2364b6ca6412138909ad15994da403bb326f0c
[ "MIT" ]
null
null
null
PyHyphen-2.0.5/2.x/textwrap2.py
GraceJonn123/github-resources
fc2364b6ca6412138909ad15994da403bb326f0c
[ "MIT" ]
null
null
null
PyHyphen-2.0.5/2.x/textwrap2.py
GraceJonn123/github-resources
fc2364b6ca6412138909ad15994da403bb326f0c
[ "MIT" ]
null
null
null
"""Text wrapping and filling with optional hyphenation. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> # Optional hyphenation added by Dr. Leo <fhaxbox66@googlemail.com> __revision__ = "$Id: textwrap.py 46863 2006-06-11 ...
40.176166
96
0.60659
"""Text wrapping and filling with optional hyphenation. """ __revision__ = "$Id: textwrap.py 46863 2006-06-11 19:42:51Z tim.peters $" import string, re # 2.3, e.g. Optik and Docutils). try: True, False except NameError: (True, False) = (1, 0) __all__ = ['TextWrapper', 'wrap', 'fill'] # Hardcode the...
false
true
1c272e0619544b90ebd337abcf0b353dfef0385c
340
py
Python
pt-1/sem_2/7.sem2_extra1-invoice-collection.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_2/7.sem2_extra1-invoice-collection.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
pt-1/sem_2/7.sem2_extra1-invoice-collection.py
lucaszarza/python_coursera-usp-pt1
eaf8d32ec09b82755f9716237ffadb0cf8d46169
[ "Apache-2.0" ]
null
null
null
client_name = input("Digite o nome do cliente: ") due_day = input("Digite o dia de vencimento: ") due_month = input("Digite o mês de vencimento: ") invoice_amout = input("Digite o valor da fatura: ") print(f'Olá, {client_name}') print(f'A sua fatura com vencimento em {due_day} de {due_month} no valor de R$ {invoice_am...
48.571429
110
0.726471
client_name = input("Digite o nome do cliente: ") due_day = input("Digite o dia de vencimento: ") due_month = input("Digite o mês de vencimento: ") invoice_amout = input("Digite o valor da fatura: ") print(f'Olá, {client_name}') print(f'A sua fatura com vencimento em {due_day} de {due_month} no valor de R$ {invoice_am...
true
true
1c272f7634ef7020497338b329410493e6c05126
911
py
Python
Commented/dfirwizard.py
dlcowen/dfirwizard
75b8fae0981bb07a7ae7c547e0865b47e385a976
[ "Apache-2.0" ]
60
2015-02-20T00:27:58.000Z
2022-01-26T18:47:59.000Z
Commented/dfirwizard.py
N4rr34n6/dfirwizard
75b8fae0981bb07a7ae7c547e0865b47e385a976
[ "Apache-2.0" ]
1
2016-11-18T17:33:34.000Z
2016-12-08T02:32:09.000Z
Commented/dfirwizard.py
N4rr34n6/dfirwizard
75b8fae0981bb07a7ae7c547e0865b47e385a976
[ "Apache-2.0" ]
12
2015-02-23T20:46:19.000Z
2019-03-01T13:12:55.000Z
#!/usr/bin/python # Sample program or step 1 in becoming a DFIR Wizard! # No license as this code is simple and free! import sys import pytsk3 # Hardcode the name of the image file, without path info has to be in the same directory imagefile = "Stage2.vhd" # Creates image object using Img_Info function from TSK and st...
53.588235
108
0.778266
import sys import pytsk3 imagefile = "Stage2.vhd" imagehandle = pytsk3.Img_Info(imagefile) partitionTable = pytsk3.Volume_Info(imagehandle) for partition in partitionTable: print partition.addr, partition.desc, '%ss(%s)' % (partition.start, partition.start * 512), partition.len
false
true
1c272f7cf1582a92c659b72f7f06787f5b16fc7e
883
py
Python
setup.py
IAmPara0x/yuno
fed42b29254a45c5be4622d0bba03c92d8331024
[ "Apache-2.0" ]
349
2021-11-24T06:22:58.000Z
2022-03-29T09:37:18.000Z
setup.py
IAmPara0x/yuno
fed42b29254a45c5be4622d0bba03c92d8331024
[ "Apache-2.0" ]
4
2021-12-15T18:10:33.000Z
2022-02-16T12:17:53.000Z
setup.py
IAmPara0x/yuno
fed42b29254a45c5be4622d0bba03c92d8331024
[ "Apache-2.0" ]
18
2021-12-15T11:14:02.000Z
2022-02-16T08:47:11.000Z
from setuptools import setup, find_packages VERSION = '0.0.1' DESCRIPTION = 'Content based search engine for anime.' LONG_DESCRIPTION = 'Library that creates search engine and searches through queries to get desired anime.' setup( name="Yuno", version=VERSION, author="IAmParadox", auth...
31.535714
106
0.612684
from setuptools import setup, find_packages VERSION = '0.0.1' DESCRIPTION = 'Content based search engine for anime.' LONG_DESCRIPTION = 'Library that creates search engine and searches through queries to get desired anime.' setup( name="Yuno", version=VERSION, author="IAmParadox", auth...
true
true
1c273048df4e307198690c493668457411e8326d
2,024
py
Python
examples/esp32spi_localtime.py
Neradoc/Adafruit_CircuitPython_ESP32SPI
971d361d9c8c114bfc61ce925d5a149b6e83495a
[ "MIT" ]
72
2019-02-01T04:45:47.000Z
2022-03-22T20:29:16.000Z
examples/esp32spi_localtime.py
Neradoc/Adafruit_CircuitPython_ESP32SPI
971d361d9c8c114bfc61ce925d5a149b6e83495a
[ "MIT" ]
122
2019-02-09T07:04:10.000Z
2022-03-30T03:18:56.000Z
examples/esp32spi_localtime.py
Neradoc/Adafruit_CircuitPython_ESP32SPI
971d361d9c8c114bfc61ce925d5a149b6e83495a
[ "MIT" ]
69
2019-02-09T18:39:14.000Z
2022-03-21T23:58:00.000Z
# SPDX-FileCopyrightText: 2019 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import busio from digitalio import DigitalInOut import neopixel import rtc from adafruit_esp32spi import adafruit_esp32spi from adafruit_esp32spi import adafruit_esp32spi_wifimanager # Get wifi detai...
28.914286
88
0.73913
import time import board import busio from digitalio import DigitalInOut import neopixel import rtc from adafruit_esp32spi import adafruit_esp32spi from adafruit_esp32spi import adafruit_esp32spi_wifimanager try: from secrets import secrets except ImportError: print("WiFi secrets are kept in secrets.py, pl...
true
true
1c27318c3cab57ef8dbbc5271fbb6a638278cdd3
5,079
py
Python
src/apetest/decode.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
6
2019-04-01T09:42:31.000Z
2020-05-20T15:23:17.000Z
src/apetest/decode.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
31
2019-02-04T11:38:32.000Z
2022-03-03T02:51:15.000Z
src/apetest/decode.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause """ Text decode functions. These functions can be used to get Unicode strings from a series of bytes. """ from codecs import ( BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE, CodecInfo, lookup as lookup_codec, ) from collections im...
30.596386
88
0.620398
from codecs import ( BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE, CodecInfo, lookup as lookup_codec, ) from collections import OrderedDict from typing import Dict, Iterable, Optional, Tuple from apetest.typing import LoggerT def encoding_from_bom(data: bytes) -> Op...
true
true
1c2731fa3f1dca4ea45bb05008752828ef563152
565
py
Python
Demos/Brick_Demo.py
Voelz04/LEGORoboticsPython
9710005b4f1746c2751f9f5404d42a18ee3053fa
[ "MIT" ]
null
null
null
Demos/Brick_Demo.py
Voelz04/LEGORoboticsPython
9710005b4f1746c2751f9f5404d42a18ee3053fa
[ "MIT" ]
null
null
null
Demos/Brick_Demo.py
Voelz04/LEGORoboticsPython
9710005b4f1746c2751f9f5404d42a18ee3053fa
[ "MIT" ]
null
null
null
#!/usr/bin/env pybricks-micropython from pybricks import ev3brick as brick from pybricks.parameters import Button, Color from pybricks.tools import (wait, print) #Püfe ob der untere Button gedrückt wurde down_pressed = Button.DOWN in brick.buttons() #Spiele einen Ton brick.sound.beep() #Lösche alles was vorher auf ...
23.541667
66
0.775221
from pybricks import ev3brick as brick from pybricks.parameters import Button, Color from pybricks.tools import (wait, print) down_pressed = Button.DOWN in brick.buttons() brick.sound.beep() brick.display.clear() brick.display.text("Hallo", (0, 50)) brick.light(Color.RED) print(down_pressed) wait(10000)
true
true
1c2732139a508dc2c661a3f4142ba912c93a0249
11,194
py
Python
tests/datastore.py
yagosys/substra
fc2d50f2f80be14c0c80546451cdf458034dbf78
[ "Apache-2.0" ]
null
null
null
tests/datastore.py
yagosys/substra
fc2d50f2f80be14c0c80546451cdf458034dbf78
[ "Apache-2.0" ]
null
null
null
tests/datastore.py
yagosys/substra
fc2d50f2f80be14c0c80546451cdf458034dbf78
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Owkin, inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
30.501362
94
0.594783
OBJECTIVE = { "description": { "checksum": "7a90514f88c70002608a9868681dd1589ea598e78d00a8cd7783c3ea0f9ceb09", "storage_address": "", }, "key": "d5002e1c-d50b-d5de-5341-df8a7b7d11b6", "metrics": { "checksum": "750f622262854341bd44f55c1018949e9c119606ef5068bd7d137040a...
true
true
1c27330639f4560a9d40e27ebf063229eece98e5
1,550
py
Python
yoti_python_sdk/tests/dynamic_sharing_service/policy/test_wanted_attribute_builder.py
MrBurtyyy/yoti-python-sdk
8a3147e8bd93d736c2ae0e29ffcb8878d979dd6c
[ "MIT" ]
null
null
null
yoti_python_sdk/tests/dynamic_sharing_service/policy/test_wanted_attribute_builder.py
MrBurtyyy/yoti-python-sdk
8a3147e8bd93d736c2ae0e29ffcb8878d979dd6c
[ "MIT" ]
null
null
null
yoti_python_sdk/tests/dynamic_sharing_service/policy/test_wanted_attribute_builder.py
MrBurtyyy/yoti-python-sdk
8a3147e8bd93d736c2ae0e29ffcb8878d979dd6c
[ "MIT" ]
null
null
null
from yoti_python_sdk.dynamic_sharing_service.policy.wanted_attribute_builder import ( WantedAttributeBuilder, ) from yoti_python_sdk.dynamic_sharing_service.policy.source_constraint_builder import ( SourceConstraintBuilder, ) def test_build(): NAME = "Test name" DERIVATION = "Test derivation" bui...
26.724138
86
0.696774
from yoti_python_sdk.dynamic_sharing_service.policy.wanted_attribute_builder import ( WantedAttributeBuilder, ) from yoti_python_sdk.dynamic_sharing_service.policy.source_constraint_builder import ( SourceConstraintBuilder, ) def test_build(): NAME = "Test name" DERIVATION = "Test derivation" bui...
true
true
1c273308857cca53224e340e9f0ae8be6efb5ec5
68,901
py
Python
salt/grains/core.py
tinyclues/salt
6c69077b7a6f56fb48b127b938464f25cc91d764
[ "Apache-2.0" ]
null
null
null
salt/grains/core.py
tinyclues/salt
6c69077b7a6f56fb48b127b938464f25cc91d764
[ "Apache-2.0" ]
null
null
null
salt/grains/core.py
tinyclues/salt
6c69077b7a6f56fb48b127b938464f25cc91d764
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' The static grains, these are the core, or built in grains. When grains are loaded they are not loaded in the same way that modules are loaded, grain functions are detected and executed, the functions MUST return a dict which will be applied to the main grains dict. This module will always b...
36.727612
107
0.528715
from __future__ import absolute_import import os import socket import sys import re import platform import logging import locale import salt.exceptions __proxyenabled__ = ['*'] from platform import _supported_dists _supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64', 'sla...
true
true
1c2734c0ec6395dc44a15e48f1427d86262cac8f
3,924
py
Python
nova/objects/security_group_rule.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
2
2018-11-18T16:03:18.000Z
2019-05-15T04:34:55.000Z
nova/objects/security_group_rule.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
null
null
null
nova/objects/security_group_rule.py
tbreeds/nova
3f8c69b2ef3eef886e36c0b7f397b83a36a7beb8
[ "Apache-2.0" ]
2
2015-12-28T14:36:29.000Z
2018-11-18T16:03:20.000Z
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.851485
78
0.673038
from nova import db from nova import exception from nova import objects from nova.objects import base from nova.objects import fields OPTIONAL_ATTRS = ['parent_group', 'grantee_group'] @base.NovaObjectRegistry.register class SecurityGroupRule(base.NovaPersistentObject, base.NovaObject, ...
true
true
1c2735c5c82318e209e0dcdfe60a4bc7e5a49e9d
28,414
py
Python
service/routes.py
devops-spring2022-customers/customers
8ea8bbfa7606e8706dd49d264cc9e996bffd26ff
[ "Apache-2.0" ]
null
null
null
service/routes.py
devops-spring2022-customers/customers
8ea8bbfa7606e8706dd49d264cc9e996bffd26ff
[ "Apache-2.0" ]
26
2022-02-17T21:08:19.000Z
2022-03-29T00:38:29.000Z
service/routes.py
devops-spring2022-customers/customers
8ea8bbfa7606e8706dd49d264cc9e996bffd26ff
[ "Apache-2.0" ]
null
null
null
""" Customer Service Paths: ------ GET /customers - Returns a list all of all Customers GET /customers/{id} - Returns the Customer with a given id number POST /customers - creates a new Customer record in the database PUT /customers/{id} - updates a Customer record in the database DELETE /customers/{id} - deletes a Cu...
41.846834
114
0.557401
import os import sys import logging from functools import wraps import json from werkzeug.exceptions import NotFound from flask import Flask, jsonify, request, url_for, make_response, abort, render_template from flask_restx import Api, Resource, fields, reqparse, inputs from . import status # variety of backends i...
true
true
1c2735cac7d5d5a4cb9aa44958c038b50bdbaf37
3,356
py
Python
utils/test/test_measurement_model.py
Bazs/graph_slam
0f26f21280b08a883d1bc8e1095ea1f3591db30e
[ "MIT" ]
4
2018-12-02T04:11:32.000Z
2022-02-04T21:21:35.000Z
utils/test/test_measurement_model.py
Bazs/graph_slam
0f26f21280b08a883d1bc8e1095ea1f3591db30e
[ "MIT" ]
null
null
null
utils/test/test_measurement_model.py
Bazs/graph_slam
0f26f21280b08a883d1bc8e1095ea1f3591db30e
[ "MIT" ]
2
2019-04-30T15:49:17.000Z
2020-01-23T07:26:52.000Z
from utils.measurement_model import get_landmarks_in_range, \ calculate_measurement_vector_for_detection, LandmarkDistanceIndex import numpy as np import math import unittest import doctest class TestMeasurementModel(unittest.TestCase): def test_get_landmarks_and_distances_in_range(self): ground_t...
41.432099
120
0.650775
from utils.measurement_model import get_landmarks_in_range, \ calculate_measurement_vector_for_detection, LandmarkDistanceIndex import numpy as np import math import unittest import doctest class TestMeasurementModel(unittest.TestCase): def test_get_landmarks_and_distances_in_range(self): ground_t...
true
true
1c2735d3e9ccb981c60350edbf125f03d2513b2e
305,534
py
Python
jacket/compute/cloud/manager.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/cloud/manager.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/compute/cloud/manager.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
46.153172
99
0.579215
"""Handles all processes relating to instances (guest vms). The :py:class:`ComputeManager` class is a :py:class:`cloud.manager.Manager` that handles RPC calls relating to creating instances. It is responsible for building a disk image, launching it via the underlying virtualization driver, responding...
false
true
1c2736ae6c6524905c0a067ef5057a0fb2c174f6
734
py
Python
06-pandas-data-wrangling/iris_data_processing.py
johnehunt/PythonDataScienceIntro
73dc6938c65c6b64486d3e6c6f968fa99976d90a
[ "Apache-2.0" ]
1
2021-09-20T11:22:53.000Z
2021-09-20T11:22:53.000Z
06-pandas-data-wrangling/iris_data_processing.py
johnehunt/PythonDataScienceIntro
73dc6938c65c6b64486d3e6c6f968fa99976d90a
[ "Apache-2.0" ]
null
null
null
06-pandas-data-wrangling/iris_data_processing.py
johnehunt/PythonDataScienceIntro
73dc6938c65c6b64486d3e6c6f968fa99976d90a
[ "Apache-2.0" ]
null
null
null
import pandas as pd iris_df = pd.read_csv('iris.csv') print(iris_df.head()) print(iris_df.shape) print('-' * 25) # find out information about unique values in the sample print(iris_df.sepallength.unique()) # give the unique values print(iris_df.sepallength.nunique()) # count the unique values print('-' * 25) # D...
21.588235
63
0.715259
import pandas as pd iris_df = pd.read_csv('iris.csv') print(iris_df.head()) print(iris_df.shape) print('-' * 25) print(iris_df.sepallength.unique()) print(iris_df.sepallength.nunique()) print('-' * 25) print(iris_df.duplicated()) iris_df.drop_duplicates(keep="first", inplace=True) print(iris_df.duplicated(...
true
true
1c2736ffffe5e0141d72fc13d2fb64dadb0f7c7d
43,976
py
Python
src/api/handlers/job_api.py
VAN-QIAN/InfraBox
1fa9214f4b2014ee62346f9ce0c941a6ad6eefe3
[ "Apache-2.0" ]
null
null
null
src/api/handlers/job_api.py
VAN-QIAN/InfraBox
1fa9214f4b2014ee62346f9ce0c941a6ad6eefe3
[ "Apache-2.0" ]
null
null
null
src/api/handlers/job_api.py
VAN-QIAN/InfraBox
1fa9214f4b2014ee62346f9ce0c941a6ad6eefe3
[ "Apache-2.0" ]
null
null
null
#pylint: disable=too-many-lines,too-few-public-methods,too-many-locals,too-many-statements,too-many-branches import os import json import uuid import copy import urllib import random import tempfile from datetime import datetime from io import BytesIO import requests from flask import jsonify, request, send_file, g, ...
33.723926
242
0.468915
import os import json import uuid import copy import urllib import random import tempfile from datetime import datetime from io import BytesIO import requests from flask import jsonify, request, send_file, g, after_this_request, abort from flask_restx import Resource from werkzeug.datastructures import FileStorage ...
true
true
1c2737d48010dcb199ec6a34d9de0c972669306d
2,247
py
Python
backend/billowing_fire_30263/urls.py
crowdbotics-apps/billowing-fire-30263
09e4fd118aa1052f68eef547c50da0c1d833e2b6
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/billowing_fire_30263/urls.py
crowdbotics-apps/billowing-fire-30263
09e4fd118aa1052f68eef547c50da0c1d833e2b6
[ "FTL", "AML", "RSA-MD" ]
26
2021-09-02T03:02:14.000Z
2022-03-06T15:33:31.000Z
backend/billowing_fire_30263/urls.py
crowdbotics-apps/billowing-fire-30263
09e4fd118aa1052f68eef547c50da0c1d833e2b6
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""billowing_fire_30263 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home'...
35.666667
87
0.714731
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
1c27393f7e477236cfe332b3e72b3e0d6b4dcea0
6,456
py
Python
examples/qaoa.py
muneerqu/Cirq
729d993312467d8ea9127103f9e15ae2391e7d85
[ "Apache-2.0" ]
1
2020-07-14T19:43:54.000Z
2020-07-14T19:43:54.000Z
examples/qaoa.py
1eedaegon/Cirq
de0c5e855069bba71e55b070fc9b06f58c07a861
[ "Apache-2.0" ]
null
null
null
examples/qaoa.py
1eedaegon/Cirq
de0c5e855069bba71e55b070fc9b06f58c07a861
[ "Apache-2.0" ]
null
null
null
"""Runs the Quantum Approximate Optimization Algorithm on Max-Cut. === EXAMPLE OUTPUT === Example QAOA circuit: 0 1 2 3 4 5 │ │ │ │ │ │ H H H H H H │ ...
40.35
80
0.402881
import itertools import numpy as np import networkx import scipy.optimize import cirq def main(repetitions=1000, maxiter=50): n = 6 p = 2 graph = networkx.random_regular_graph(3, n) qubits = cirq.LineQubit.range(n) betas = np.random.uniform(-np.pi, np.pi, size=p) gamm...
true
true
1c2739a1402c4e60db0f3e1defe28366bc31df13
5,022
py
Python
StockTracker/position.py
FCOS/StockTracker-TaxCalculator
ca10a9e9146d5d1eba07c7b93da366a0fcc8cb83
[ "MIT" ]
null
null
null
StockTracker/position.py
FCOS/StockTracker-TaxCalculator
ca10a9e9146d5d1eba07c7b93da366a0fcc8cb83
[ "MIT" ]
null
null
null
StockTracker/position.py
FCOS/StockTracker-TaxCalculator
ca10a9e9146d5d1eba07c7b93da366a0fcc8cb83
[ "MIT" ]
null
null
null
from collections import deque import logging class Position: def __init__(self, transaction): logging.debug('Creating new position') self.validate_args(transaction) self.name = transaction.name self.value = transaction.amount * transaction.price self.amount = transaction....
43.293103
165
0.5908
from collections import deque import logging class Position: def __init__(self, transaction): logging.debug('Creating new position') self.validate_args(transaction) self.name = transaction.name self.value = transaction.amount * transaction.price self.amount = transaction....
true
true
1c2739ce7ff7344455f0a5f2a4bf1e9b0329f48a
4,745
py
Python
test/unittests/audio/test_simple_backend.py
PureTryOut/mycroft-core
fd12c88da532fe5f1f37c8f73690ff4501ac6886
[ "Apache-2.0" ]
6,099
2016-05-17T19:41:56.000Z
2022-03-31T15:34:48.000Z
test/unittests/audio/test_simple_backend.py
PureTryOut/mycroft-core
fd12c88da532fe5f1f37c8f73690ff4501ac6886
[ "Apache-2.0" ]
2,567
2016-05-20T16:23:11.000Z
2022-03-23T01:54:39.000Z
test/unittests/audio/test_simple_backend.py
PureTryOut/mycroft-core
fd12c88da532fe5f1f37c8f73690ff4501ac6886
[ "Apache-2.0" ]
1,563
2016-05-20T15:06:21.000Z
2022-03-30T01:28:12.000Z
import signal from threading import Thread import time import unittest import unittest.mock as mock import mycroft.audio.services.simple as simple from mycroft.messagebus import Message """Tests for the simple audio service backend.""" config = { 'backends': { 'test_simple': { 'type': 'simple...
30.612903
79
0.605901
import signal from threading import Thread import time import unittest import unittest.mock as mock import mycroft.audio.services.simple as simple from mycroft.messagebus import Message config = { 'backends': { 'test_simple': { 'type': 'simple', 'active': True } } } ...
true
true
1c2739e2893de718b90c8a5ed70e9ad36d0f6fec
1,266
py
Python
test/sampleData/i2c-device/TCS3472.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
70
2019-03-15T03:38:00.000Z
2022-03-16T20:31:10.000Z
test/sampleData/i2c-device/TCS3472.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
193
2019-03-15T21:33:40.000Z
2021-06-04T22:19:02.000Z
test/sampleData/i2c-device/TCS3472.py
polfeliu/cyanobyte
94fb8b8ea6c226e7e5f2a42d39356c75693d4093
[ "Apache-2.0" ]
40
2019-03-15T21:41:51.000Z
2021-06-18T14:56:33.000Z
# Copyright (C) 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.315789
74
0.723539
from i2cdevice import Device, Register, BitField I2C_ADDR = 41 BLUE = Register('BLUE', 186, read_only=True, bitwidth=16) CLEAR = Register('CLEAR', 180, read_only=True, bitwidth=16) ENABLE = Register('ENABLE', 128, fields=( BitField('init', 0b0000000011111111, bitwidth=8, values_map={ Power...
true
true
1c273aef5f076fdf0385cf72b56e9de1d603c482
329
py
Python
firesong/__init__.py
TGarfield17/FIRESONG
ad9e3688ed88563cfdb81b9f25aaa63850cc99f9
[ "BSD-3-Clause" ]
null
null
null
firesong/__init__.py
TGarfield17/FIRESONG
ad9e3688ed88563cfdb81b9f25aaa63850cc99f9
[ "BSD-3-Clause" ]
null
null
null
firesong/__init__.py
TGarfield17/FIRESONG
ad9e3688ed88563cfdb81b9f25aaa63850cc99f9
[ "BSD-3-Clause" ]
null
null
null
"""Welcome to FIRESONG, the FIRst Extragalactic Simulation Of Neutrinos and Gamma-rays""" __author__ = 'C.F. Tung, T. Glauch, M. Larson, A. Pizzuto, R. Reimann, I. Taboada' __email__ = '' __version__ = '1.8' __all__ = ['Firesong', 'Evolution', 'distance', 'FluxPDF', 'input_out', 'Luminosity', 'sampling', '...
41.125
89
0.665653
__author__ = 'C.F. Tung, T. Glauch, M. Larson, A. Pizzuto, R. Reimann, I. Taboada' __email__ = '' __version__ = '1.8' __all__ = ['Firesong', 'Evolution', 'distance', 'FluxPDF', 'input_out', 'Luminosity', 'sampling', 'Legend']
true
true
1c273cf6dcf8fce89afbdba0eae97e78b5bb827e
64
py
Python
reflex/exceptions.py
immunda/reflex-py
5a1136233c4602876283dc4646943a7385a6cc32
[ "Apache-2.0" ]
null
null
null
reflex/exceptions.py
immunda/reflex-py
5a1136233c4602876283dc4646943a7385a6cc32
[ "Apache-2.0" ]
null
null
null
reflex/exceptions.py
immunda/reflex-py
5a1136233c4602876283dc4646943a7385a6cc32
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- class BatchError(Exception): pass
10.666667
28
0.59375
class BatchError(Exception): pass
true
true
1c27404fffc31ca1ea68c38b0b45d2ed5fbb75f6
4,814
py
Python
ctypesgencore/printer_json/printer.py
borgified/ctypesgen
59682c4b452cc8bf907f336c177b71c1726070a3
[ "BSD-3-Clause" ]
null
null
null
ctypesgencore/printer_json/printer.py
borgified/ctypesgen
59682c4b452cc8bf907f336c177b71c1726070a3
[ "BSD-3-Clause" ]
null
null
null
ctypesgencore/printer_json/printer.py
borgified/ctypesgen
59682c4b452cc8bf907f336c177b71c1726070a3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os, sys, time, json from ctypesgencore.descriptions import * from ctypesgencore.ctypedescs import * from ctypesgencore.messages import * import ctypesgencore.libraryloader # So we can get the path to it import test # So we can find the path to local files in the printer package def pa...
34.385714
100
0.583299
import os, sys, time, json from ctypesgencore.descriptions import * from ctypesgencore.ctypedescs import * from ctypesgencore.messages import * import ctypesgencore.libraryloader import test def path_to_local_file(name, known_local_module=test): basedir = os.path.dirname(known_local_module.__file__) re...
true
true
1c27407d49fe139c438b592ebd7cb17cb591ccc7
462
py
Python
orchestra/contrib/webapps/migrations/0006_auto_20210330_1049.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
null
null
null
orchestra/contrib/webapps/migrations/0006_auto_20210330_1049.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
4
2021-01-30T14:26:46.000Z
2022-03-18T16:28:39.000Z
orchestra/contrib/webapps/migrations/0006_auto_20210330_1049.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
3
2022-02-06T04:35:59.000Z
2022-03-17T00:40:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2021-03-30 10:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapps', '0005_auto_20200204_1218'), ] operations = [ migrations.AlterFiel...
22
59
0.614719
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('webapps', '0005_auto_20200204_1218'), ] operations = [ migrations.AlterField( model_name='webapp', name='comments', ...
true
true
1c27421727e1c900dfdf6889de5268e4744d54ac
8,100
py
Python
api/views.py
AnchitSingh/books_api_app
4327d287697a27367f54d1c76cdbbd396eb8f67b
[ "MIT" ]
null
null
null
api/views.py
AnchitSingh/books_api_app
4327d287697a27367f54d1c76cdbbd396eb8f67b
[ "MIT" ]
null
null
null
api/views.py
AnchitSingh/books_api_app
4327d287697a27367f54d1c76cdbbd396eb8f67b
[ "MIT" ]
null
null
null
from django.http.response import Http404,HttpResponseNotFound from django.shortcuts import render,get_object_or_404 from django.http import HttpResponse,JsonResponse, QueryDict import requests from .models import * from django.views.decorators.csrf import csrf_exempt from ast import literal_eval @csrf_exempt def home...
38.028169
323
0.541852
from django.http.response import Http404,HttpResponseNotFound from django.shortcuts import render,get_object_or_404 from django.http import HttpResponse,JsonResponse, QueryDict import requests from .models import * from django.views.decorators.csrf import csrf_exempt from ast import literal_eval @csrf_exempt def home...
true
true
1c274289505588713a34e9f940cf58f07e38ea27
2,837
py
Python
samples/cli/accelbyte_py_sdk_cli/platform/_query_user_entitlements_by_app_type.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
samples/cli/accelbyte_py_sdk_cli/platform/_query_user_entitlements_by_app_type.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
samples/cli/accelbyte_py_sdk_cli/platform/_query_user_entitlements_by_app_type.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template_file: python-cli-command.j2 # justice-platform-service (4.10.0) # pylint: disable=duplicate-co...
33.77381
125
0.734226
import json import yaml from typing import Optional import click from .._utils import login_as as login_as_internal from .._utils import to_dict from accelbyte_py_sdk.api.platform import query_user_entitlements_by_app_type as query_user_entitlements_by_app_type_internal from accelbyte_py_sdk.a...
true
true
1c274325b03317e12961adb7ce1339025f19c1ea
499
py
Python
scripts/trace/save-plots.py
tmqian/MUSE
164e3ad8c7345f55ef4c8f0584155a2d3d7fbe2f
[ "MIT" ]
1
2021-01-04T01:57:51.000Z
2021-01-04T01:57:51.000Z
scripts/trace/save-plots.py
tmqian/MUSE
164e3ad8c7345f55ef4c8f0584155a2d3d7fbe2f
[ "MIT" ]
null
null
null
scripts/trace/save-plots.py
tmqian/MUSE
164e3ad8c7345f55ef4c8f0584155a2d3d7fbe2f
[ "MIT" ]
null
null
null
import sys import os # usage: python save-plots.py <list-h5-files> # updated 19 Jan 2021 print('usage: python save-plots.py <list-h5-files>') files = sys.argv[1:] for f in files: print(' reading: %s' % f) #os.system('srun -n 4 -t 1:00:00 --mem=8GB python plot_fieldline.py %s &'%f) os.system('python trac...
29.352941
81
0.665331
import sys import os print('usage: python save-plots.py <list-h5-files>') files = sys.argv[1:] for f in files: print(' reading: %s' % f) os.system('python trace/plot-fieldlines.py %s PG2p.qa19.plasma &'%f)
true
true
1c27444fefc09884abe376df959b5667b282c192
2,043
py
Python
hackerrank/Algorithms/The Bomberman Game/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
4
2020-07-24T01:59:50.000Z
2021-07-24T15:14:08.000Z
hackerrank/Algorithms/The Bomberman Game/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
hackerrank/Algorithms/The Bomberman Game/solution.py
ATrain951/01.python-com_Qproject
c164dd093954d006538020bdf2e59e716b24d67c
[ "MIT" ]
null
null
null
#!/bin/python3 import os # Complete the bomberMan function below. def bomberMan(n, grid): if n in [0, 1]: return grid elif n % 2 == 0: return ['O' * len(row) for row in grid] else: # replace symbols and split rows into list g = [list(map(int, list(x.replace('O', '2').repla...
30.044118
96
0.436123
import os def bomberMan(n, grid): if n in [0, 1]: return grid elif n % 2 == 0: return ['O' * len(row) for row in grid] else: g = [list(map(int, list(x.replace('O', '2').replace('.', '0')))) for x in grid] rows = len(g) cols = len(g[0]) for t in r...
true
true
1c27448cf835e862b709f5ead9e751857a62481f
23,627
py
Python
elegantrl_helloworld/agent.py
geekpineapple/ElegantRL
e022ed1cb6ec6d47ee8c25e849145f794103df3a
[ "Apache-2.0" ]
1
2021-11-22T07:46:43.000Z
2021-11-22T07:46:43.000Z
elegantrl_helloworld/agent.py
chunchun010/ElegantRL
d8fe318a0dbba0a9f85be9291d8a5397823d5d33
[ "Apache-2.0" ]
null
null
null
elegantrl_helloworld/agent.py
chunchun010/ElegantRL
d8fe318a0dbba0a9f85be9291d8a5397823d5d33
[ "Apache-2.0" ]
1
2022-01-06T15:24:39.000Z
2022-01-06T15:24:39.000Z
import os import numpy.random as rd from copy import deepcopy from elegantrl_helloworld.net import * class AgentBase: def __init__(self): self.state = None self.device = None self.action_dim = None self.if_off_policy = None self.explore_noise = None self.trajectory_...
45.611969
118
0.635713
import os import numpy.random as rd from copy import deepcopy from elegantrl_helloworld.net import * class AgentBase: def __init__(self): self.state = None self.device = None self.action_dim = None self.if_off_policy = None self.explore_noise = None self.trajectory_...
true
true
1c2744b7576a001aacc929ada09ca6bc773800db
310
py
Python
f9t9it/config/docs.py
iRaySpace/f9t9it
4cbfee0b7d66e44fd0abcd925f8d523593b639f8
[ "MIT" ]
null
null
null
f9t9it/config/docs.py
iRaySpace/f9t9it
4cbfee0b7d66e44fd0abcd925f8d523593b639f8
[ "MIT" ]
null
null
null
f9t9it/config/docs.py
iRaySpace/f9t9it
4cbfee0b7d66e44fd0abcd925f8d523593b639f8
[ "MIT" ]
2
2019-12-28T10:33:53.000Z
2020-03-18T09:46:21.000Z
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/f9t9it" # docs_base_url = "https://[org_name].github.io/f9t9it" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "F9T9IT"
25.833333
68
0.719355
def get_context(context): context.brand_html = "F9T9IT"
true
true
1c274533f00b31c78c633784afd003083ac4a05d
905
py
Python
nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py
dPys/nipype
75030b29297808e7c9a9e91b411b685154dff60b
[ "Apache-2.0" ]
1
2019-03-25T14:11:18.000Z
2019-03-25T14:11:18.000Z
nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py
dPys/nipype
75030b29297808e7c9a9e91b411b685154dff60b
[ "Apache-2.0" ]
1
2017-01-05T01:24:33.000Z
2017-01-05T01:24:33.000Z
nipype/interfaces/diffusion_toolkit/tests/test_auto_TrackMerge.py
wtriplett/nipype
388f140fceaf55438a987e9cdfa2a8e995428afd
[ "Apache-2.0" ]
1
2020-12-16T16:36:48.000Z
2020-12-16T16:36:48.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ..postproc import TrackMerge def test_TrackMerge_inputs(): input_map = dict( args=dict(argstr="%s",), environ=dict(nohash=True, usedefault=True,), output_file=dict(argstr="%s", extensions=None, position=-1, usedefault=True,), ...
34.807692
86
0.662983
from ..postproc import TrackMerge def test_TrackMerge_inputs(): input_map = dict( args=dict(argstr="%s",), environ=dict(nohash=True, usedefault=True,), output_file=dict(argstr="%s", extensions=None, position=-1, usedefault=True,), track_files=dict(argstr="%s...", mandatory=True, p...
true
true
1c274685387c0198558e4d9143d0b1a4b1f279ff
1,891
py
Python
test/test_blacklist.py
lietu/twitch-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
6
2015-12-21T14:43:26.000Z
2019-09-08T12:56:36.000Z
test/test_blacklist.py
lietu/twitch-quote-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
5
2015-04-06T08:33:20.000Z
2016-02-09T03:28:39.000Z
test/test_blacklist.py
lietu/twitch-bot
e1f3462a8851031bc2cbd5dffb6440edc2e45116
[ "MIT" ]
5
2015-12-03T17:54:51.000Z
2020-06-29T12:43:07.000Z
import logging from unittest import TestCase from bot.blacklist import BlacklistManager class Model(object): def __init__(self, rule_id, match, ban_time="1h"): self.id = rule_id self.match = match self.banTime = ban_time class BlacklistTest(TestCase): """Make sure the Bot class seems...
30.5
79
0.55156
import logging from unittest import TestCase from bot.blacklist import BlacklistManager class Model(object): def __init__(self, rule_id, match, ban_time="1h"): self.id = rule_id self.match = match self.banTime = ban_time class BlacklistTest(TestCase): def test_is_blacklisted(self): ...
true
true
1c2747b22926fb376ba93c59527781a3a1387b97
2,012
py
Python
networking_bagpipe/bagpipe_bgp/common/exceptions.py
mail2nsrajesh/networking-bagpipe
e802ead8e3b4cecab6b65a9e441c3cf762bfbbb2
[ "Apache-2.0" ]
null
null
null
networking_bagpipe/bagpipe_bgp/common/exceptions.py
mail2nsrajesh/networking-bagpipe
e802ead8e3b4cecab6b65a9e441c3cf762bfbbb2
[ "Apache-2.0" ]
null
null
null
networking_bagpipe/bagpipe_bgp/common/exceptions.py
mail2nsrajesh/networking-bagpipe
e802ead8e3b4cecab6b65a9e441c3cf762bfbbb2
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding: utf-8 # Copyright 2014 Orange # # 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 # # Un...
26.473684
74
0.684891
class RemotePEMACAddressNotFound(Exception): def __init__(self, ip_address): self.message = ("MAC address for %s could not be found. CAUTION:" " Need direct MPLS/Eth connection" % ip_address) def __str__(self): return repr(self.message) class APIExce...
true
true
1c27483e63b79de8085fdeb34d25216325a3d406
2,557
py
Python
modules/singleplayer.py
newtykins/battleship.py
64d0e7e0dbb32e9482b786b7ac450a9da697f26b
[ "MIT" ]
2
2021-09-18T21:43:32.000Z
2021-09-19T09:57:08.000Z
modules/singleplayer.py
newtykins/battleship.py
64d0e7e0dbb32e9482b786b7ac450a9da697f26b
[ "MIT" ]
null
null
null
modules/singleplayer.py
newtykins/battleship.py
64d0e7e0dbb32e9482b786b7ac450a9da697f26b
[ "MIT" ]
null
null
null
from modules.leaderboards import saveScore from modules.utils import cls, error, rootDir from structures.Board import Board import modules.formatting as formatting import json import re class OutOfBoundsError(Exception): pass def startSingleplayer(name: str, settings: dict, ships: dict): cls() # Initiate the game ...
31.9625
161
0.68244
from modules.leaderboards import saveScore from modules.utils import cls, error, rootDir from structures.Board import Board import modules.formatting as formatting import json import re class OutOfBoundsError(Exception): pass def startSingleplayer(name: str, settings: dict, ships: dict): cls() board = Board(sett...
true
true
1c274855ecb71e6c30cb2c46f4d6978714b74554
15
py
Python
PublicTools/bin/tools/PackTool/src/ui/__init__.py
lyzardiar/RETools
9ce3c01021c36b66d97c4e5cd9c74ae8fb54235e
[ "MIT" ]
2
2016-03-23T10:05:48.000Z
2016-04-20T13:33:57.000Z
PublicTools/bin/tools/PackTool/src/ui/__init__.py
lyzardiar/RETools
9ce3c01021c36b66d97c4e5cd9c74ae8fb54235e
[ "MIT" ]
null
null
null
PublicTools/bin/tools/PackTool/src/ui/__init__.py
lyzardiar/RETools
9ce3c01021c36b66d97c4e5cd9c74ae8fb54235e
[ "MIT" ]
1
2020-01-09T15:40:46.000Z
2020-01-09T15:40:46.000Z
#coding=utf-8
15
15
0.666667
true
true
1c274a0fe9898e45d6819216df6acb5975239dd6
5,433
py
Python
discretize.py
rehmanzafar/dlime_experiments
cf52a67311be586690c6048eebb75a762975ae56
[ "MIT" ]
23
2019-06-26T19:38:49.000Z
2022-02-20T06:39:40.000Z
discretize.py
rehmanzafar/dlime_experiments
cf52a67311be586690c6048eebb75a762975ae56
[ "MIT" ]
4
2020-12-15T19:21:00.000Z
2021-12-24T07:07:15.000Z
discretize.py
rehmanzafar/dlime_experiments
cf52a67311be586690c6048eebb75a762975ae56
[ "MIT" ]
9
2019-07-08T16:10:38.000Z
2022-03-27T13:15:02.000Z
import numpy as np import sklearn import sklearn.tree from sklearn.utils import check_random_state from abc import ABCMeta, abstractmethod class BaseDiscretizer(): __metaclass__ = ABCMeta def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None): self.to_discretize...
38.531915
98
0.534695
import numpy as np import sklearn import sklearn.tree from sklearn.utils import check_random_state from abc import ABCMeta, abstractmethod class BaseDiscretizer(): __metaclass__ = ABCMeta def __init__(self, data, categorical_features, feature_names, labels=None, random_state=None): self.to_discretize...
true
true
1c274a8158c2efbd0e4fd9f93ad24416ee57a77f
919
py
Python
tests/test_correct_year.py
sebhub/sphinx
47cd262b3e50ed650a82f272ba128a1f872cda4d
[ "BSD-2-Clause" ]
1
2019-08-20T03:19:19.000Z
2019-08-20T03:19:19.000Z
tests/test_correct_year.py
JoeyCluett/sphinx
ff5031c96e90027510ad2d0251972e12da46402c
[ "BSD-2-Clause" ]
4
2019-11-05T16:18:23.000Z
2022-03-02T11:13:20.000Z
tests/test_correct_year.py
JoeyCluett/sphinx
ff5031c96e90027510ad2d0251972e12da46402c
[ "BSD-2-Clause" ]
1
2019-11-18T01:47:05.000Z
2019-11-18T01:47:05.000Z
""" test_correct_year ~~~~~~~~~~~~~~~~~ Test copyright year adjustment :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import pytest @pytest.fixture( params=[ # test with SOURCE_DATE_EPOCH unset: no modification (No...
24.837838
75
0.648531
import pytest @pytest.fixture( params=[ (None, '2006-2009'), ('1293840000', '2006-2011'), ('1293839999', '2006-2010'), ], ) def expect_date(request, monkeypatch): sde, expect = request.param if sde: monkeypatch.setenv('SOURCE_DATE_EPOCH', sde) els...
true
true
1c274a9a1534560ddd81389f50a4b187d0624163
4,527
py
Python
ReadSpider.py
dcxiaolou/SpiderForInnerVoice
4e6ea307f185af85ca207f9df78a4a6a65509375
[ "Apache-2.0" ]
null
null
null
ReadSpider.py
dcxiaolou/SpiderForInnerVoice
4e6ea307f185af85ca207f9df78a4a6a65509375
[ "Apache-2.0" ]
null
null
null
ReadSpider.py
dcxiaolou/SpiderForInnerVoice
4e6ea307f185af85ca207f9df78a4a6a65509375
[ "Apache-2.0" ]
null
null
null
import requests from requests import RequestException import re import json import os from config import * # 获取阅读模块数据 文章 + 评论 headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' } def get_page_html(url): try: ...
34.037594
233
0.506075
import requests from requests import RequestException import re import json import os from config import * headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' } def get_page_html(url): try: response = req...
true
true
1c274ac4f0d3359a1cb018c35890536ff38a2abe
1,058
py
Python
util/params.py
juvalen/mb-checker
d1c869cf38af4bed409b901fe260feb54523bd6e
[ "MIT" ]
12
2020-02-01T18:43:51.000Z
2022-03-18T17:53:43.000Z
util/params.py
juvalen/mb-checker
d1c869cf38af4bed409b901fe260feb54523bd6e
[ "MIT" ]
6
2019-10-19T18:32:16.000Z
2021-09-16T13:34:13.000Z
util/params.py
juvalen/mb-checker
d1c869cf38af4bed409b901fe260feb54523bd6e
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Name: params.py # Version: R1.30 # Date: July 2019 # Function: Parses original chrome Bookmarks file # Tries to reach each URL and removes it on error # Accepts return codes as parameters # $ python chrome.py 404 5xx 403 # import json from pprint import pprint import ...
21.16
59
0.678639
import json from pprint import pprint import sys import requests DELETEFOLDER = 0 DIRNAME = "../output/" JSONIN = DIRNAME + "Bookmarks" JSONOUT = DIRNAME + "Filtered.json" URLXXX = DIRNAME + "XXX.url" URLOK = DIRNAME + "OK.url" params = sys.argv nparams = len(sys.argv) errorNum = [] fileName = [] for para...
true
true