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
1c112db3b15163eb09da8fa4f88d446d2b61dcce
26,152
py
Python
run_flask.py
AirWalk-Digital/o365-documentation
81be385b813c28d0029c9d0973ba0a347551d271
[ "MIT" ]
null
null
null
run_flask.py
AirWalk-Digital/o365-documentation
81be385b813c28d0029c9d0973ba0a347551d271
[ "MIT" ]
1
2021-06-02T00:27:22.000Z
2021-06-02T00:27:22.000Z
run_flask.py
AirWalk-Digital/o365-documentation
81be385b813c28d0029c9d0973ba0a347551d271
[ "MIT" ]
null
null
null
"""Flask-OAuthlib sample for Microsoft Graph""" # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. # See LICENSE in the project root for license information. import uuid import flask from flask_oauthlib.client import OAuth from flask import session, request, redirect from json2html import...
41.249211
234
0.569058
import uuid import flask from flask_oauthlib.client import OAuth from flask import session, request, redirect from json2html import * import config import stringcase from requests import get from requests_oauthlib import OAuth2Session from urllib.request import pathname2url import datetime from urllib.parse import ur...
true
true
1c112e7eab1907619df12d04d4e2fd01ace4878a
41,054
py
Python
second/pytorch/models/voxelnet_mayank.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
second/pytorch/models/voxelnet_mayank.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
second/pytorch/models/voxelnet_mayank.py
mayanks888/second.pytorch
02d37885a543ee46516648dcab7db8f5d677a179
[ "MIT" ]
null
null
null
import time from enum import Enum from functools import reduce import contextlib import numpy as np import torch from torch import nn from torch.nn import functional as F import datetime import torchplus from second.pytorch.core import box_torch_ops from second.pytorch.core.losses import (WeightedSigmoidClassificationL...
45.973124
194
0.577556
import time from enum import Enum from functools import reduce import contextlib import numpy as np import torch from torch import nn from torch.nn import functional as F import datetime import torchplus from second.pytorch.core import box_torch_ops from second.pytorch.core.losses import (WeightedSigmoidClassificationL...
true
true
1c112f0f3259d422924a0a3339ad3606f665ba59
398
py
Python
run.py
futurelabmx/secret-santa
e6de59a3ba1f9c102af37b58811cd98984551ee5
[ "MIT" ]
null
null
null
run.py
futurelabmx/secret-santa
e6de59a3ba1f9c102af37b58811cd98984551ee5
[ "MIT" ]
1
2020-04-12T04:25:59.000Z
2020-04-12T16:42:51.000Z
run.py
futurelabmx/secret-santa
e6de59a3ba1f9c102af37b58811cd98984551ee5
[ "MIT" ]
1
2019-12-22T23:58:55.000Z
2019-12-22T23:58:55.000Z
# -*- coding: utf-8 -*- from mail_utils import email_meta_loader from mail_utils import assign_partner from mail_utils import load_emails from mail_utils import send_email if __name__ == "__main__": email = email_meta_loader() emails = load_emails(email['list']) assign_partner(emails) for user in emails: print...
26.533333
59
0.753769
from mail_utils import email_meta_loader from mail_utils import assign_partner from mail_utils import load_emails from mail_utils import send_email if __name__ == "__main__": email = email_meta_loader() emails = load_emails(email['list']) assign_partner(emails) for user in emails: print('[INFO] Sending email t...
true
true
1c112f843e6221c580d2a11157fd9ff0a0a71216
2,005
py
Python
src/leetcode_1008_construct_binary_search_tree_from_preorder_traversal.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
src/leetcode_1008_construct_binary_search_tree_from_preorder_traversal.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
src/leetcode_1008_construct_binary_search_tree_from_preorder_traversal.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
# @l2g 1008 python3 # [1008] Construct Binary Search Tree from Preorder Traversal # Difficulty: Medium # https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal # # Given an array of integers preorder,which represents the preorder traversal of a BST (i.e., # binary search tree),construct the ...
27.847222
131
0.647382
from typing import List, Optional class Solution: def bstFromPreorder(self, preorder: List[int]) -> Optional[TreeNode]: def traverse(left, right): if left > right: return root = TreeNode(preorder[left]) mid = left while mid < ...
true
true
1c112fc61456b9b409051e3663e7badd284c0365
2,368
py
Python
python_data_scien/iipp/min_proj_5.py
Arthur-Lanc/coursera
58cab28c723e2f60ddfdaa37acde6dc97c107222
[ "MIT" ]
null
null
null
python_data_scien/iipp/min_proj_5.py
Arthur-Lanc/coursera
58cab28c723e2f60ddfdaa37acde6dc97c107222
[ "MIT" ]
null
null
null
python_data_scien/iipp/min_proj_5.py
Arthur-Lanc/coursera
58cab28c723e2f60ddfdaa37acde6dc97c107222
[ "MIT" ]
null
null
null
# http://www.codeskulptor.org/#user43_fAwSFN88Y7_0.py # implementation of card game - Memory import simplegui import random # helper function to initialize globals def new_game(): global list1,exposed,state,turns,pre_index1,pre_index2 list1 = range(0, 8) list2 = range(0, 8) list1.extend(l...
29.6
72
0.536318
import simplegui import random def new_game(): global list1,exposed,state,turns,pre_index1,pre_index2 list1 = range(0, 8) list2 = range(0, 8) list1.extend(list2) random.shuffle(list1) exposed = [] for i in range(16): exposed.append(False) state = 0 turns = ...
true
true
1c1130615953cd2b628cb40f7326a7e3e9a4df92
815
py
Python
src/si/util/metrics.py
DiogoM1/MBINF_SIB
19e77896a8b5788747e51b20613c2f3b2888cca1
[ "Apache-2.0" ]
null
null
null
src/si/util/metrics.py
DiogoM1/MBINF_SIB
19e77896a8b5788747e51b20613c2f3b2888cca1
[ "Apache-2.0" ]
null
null
null
src/si/util/metrics.py
DiogoM1/MBINF_SIB
19e77896a8b5788747e51b20613c2f3b2888cca1
[ "Apache-2.0" ]
null
null
null
import numpy as np def accuracy(y_true, y_pred): correct = 0 for true, pred in zip(y_true, y_pred): if true == pred: correct += 1 return correct / len(y_true) def mse(y_true, y_pred, squared=True): y_true, y_pred = np.array(y_true), np.array(y_pred) errors = np.average((y_tru...
23.285714
93
0.628221
import numpy as np def accuracy(y_true, y_pred): correct = 0 for true, pred in zip(y_true, y_pred): if true == pred: correct += 1 return correct / len(y_true) def mse(y_true, y_pred, squared=True): y_true, y_pred = np.array(y_true), np.array(y_pred) errors = np.average((y_tru...
true
true
1c11316c736f163268db56262b77864c17f0abc2
4,883
py
Python
picamera/exc.py
naziris/HomeSecPi---Public
141ea7806db7205f33863e75196a20977f1d2636
[ "Apache-2.0" ]
1
2018-12-08T16:50:26.000Z
2018-12-08T16:50:26.000Z
picamera/exc.py
naziris/HomeSecPi---Public
141ea7806db7205f33863e75196a20977f1d2636
[ "Apache-2.0" ]
null
null
null
picamera/exc.py
naziris/HomeSecPi---Public
141ea7806db7205f33863e75196a20977f1d2636
[ "Apache-2.0" ]
2
2018-01-08T05:59:47.000Z
2020-06-06T19:57:06.000Z
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # Python camera library for the Rasperry-Pi camera module # Copyright (c) 2013,2014 Dave Hughes <dave@waveform.org.uk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
36.17037
85
0.696908
from __future__ import ( unicode_literals, print_function, division, absolute_import, ) str = type('') import picamera.mmal as mmal class PiCameraWarning(Warning): class PiCameraDeprecated(PiCameraWarning, DeprecationWarning): class PiCameraError(Exception): class PiCameraRuntimeError(Pi...
true
true
1c1131c4600ed783e05c172b58e84f65183accff
1,658
py
Python
seg/lib/models/backbones/backbone_selector.py
Frank-Abagnal/HRFormer
d7d362770de8648f8e0a379a71cee25f42954503
[ "MIT" ]
254
2021-08-13T10:05:22.000Z
2022-03-25T09:21:45.000Z
seg/lib/models/backbones/backbone_selector.py
Sense-X/HRFormer
1245b88b5824fbd8cdb358b5ee909a4e537a2ef5
[ "MIT" ]
17
2021-09-08T01:40:49.000Z
2022-03-23T10:53:47.000Z
seg/lib/models/backbones/backbone_selector.py
Sense-X/HRFormer
1245b88b5824fbd8cdb358b5ee909a4e537a2ef5
[ "MIT" ]
48
2021-08-13T14:06:58.000Z
2022-03-30T02:41:26.000Z
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: Donny You, RainbowSecret ## Microsoft Research ## yuyua@microsoft.com ## Copyright (c) 2019 ## ## This source code is licensed under the MIT-style license found in the ## LICENSE file in the root directory of this source tree ##+...
33.16
82
0.631484
from __future__ import absolute_import from __future__ import division from __future__ import print_function from lib.models.backbones.resnet.resnet_backbone import ResNetBackbone from lib.models.backbones.hrnet.hrnet_backbone import HRNetBackbone from lib.models.backbones.hrt.hrt_backbone import HRTBackbone from li...
true
true
1c1133117bdea32e3a7a19aeceeac1d0d243733b
7,098
py
Python
scenes/SetupGame.py
zachdj/ultimate-tic-tac-toe-weka
70b1451186e0aaf0582a6c474aa6950ae287543b
[ "MIT" ]
null
null
null
scenes/SetupGame.py
zachdj/ultimate-tic-tac-toe-weka
70b1451186e0aaf0582a6c474aa6950ae287543b
[ "MIT" ]
null
null
null
scenes/SetupGame.py
zachdj/ultimate-tic-tac-toe-weka
70b1451186e0aaf0582a6c474aa6950ae287543b
[ "MIT" ]
null
null
null
from .SceneBase import SceneBase from widgets import Picker, Button from models.game import Board, Player, TimeLimitedBot from models.game.bots import BotLoader from services import ImageService, FontService, SceneManager, SettingsService as Settings class SetupGame(SceneBase): """ This scene shows a graphica...
47.006623
142
0.637222
from .SceneBase import SceneBase from widgets import Picker, Button from models.game import Board, Player, TimeLimitedBot from models.game.bots import BotLoader from services import ImageService, FontService, SceneManager, SettingsService as Settings class SetupGame(SceneBase): def __init__(self): SceneBa...
true
true
1c11341fd4d0f487101f4665279bc9ca8be3aee0
2,383
py
Python
pydotorg/context_processors.py
Manny27nyc/pythondotorg
257c96d3a94755451a5a5cdcd2abad1e27ea299b
[ "Apache-2.0" ]
911
2015-01-03T22:16:06.000Z
2022-03-31T23:56:22.000Z
pydotorg/context_processors.py
Manny27nyc/pythondotorg
257c96d3a94755451a5a5cdcd2abad1e27ea299b
[ "Apache-2.0" ]
1,342
2015-01-02T16:14:45.000Z
2022-03-28T08:01:20.000Z
pydotorg/context_processors.py
Manny27nyc/pythondotorg
257c96d3a94755451a5a5cdcd2abad1e27ea299b
[ "Apache-2.0" ]
551
2015-01-04T02:17:31.000Z
2022-03-23T11:59:25.000Z
from django.conf import settings from django.urls import resolve, Resolver404, reverse def site_info(request): return {'SITE_INFO': settings.SITE_VARIABLES} def url_name(request): try: match = resolve(request.path) except Resolver404: return {} else: namespace, url_name_ = ma...
31.355263
105
0.549308
from django.conf import settings from django.urls import resolve, Resolver404, reverse def site_info(request): return {'SITE_INFO': settings.SITE_VARIABLES} def url_name(request): try: match = resolve(request.path) except Resolver404: return {} else: namespace, url_name_ = ma...
true
true
1c11343511c78f8cb745b67286f1ee305d884226
2,084
py
Python
parcopy1.py
pfalcon/parcopy
f38848a1da69012904a16c9bc529ce58dba3cd44
[ "MIT" ]
4
2020-03-28T22:25:51.000Z
2021-02-12T16:44:00.000Z
parcopy1.py
pfalcon/parcopy
f38848a1da69012904a16c9bc529ce58dba3cd44
[ "MIT" ]
null
null
null
parcopy1.py
pfalcon/parcopy
f38848a1da69012904a16c9bc529ce58dba3cd44
[ "MIT" ]
1
2020-06-16T18:23:59.000Z
2020-06-16T18:23:59.000Z
# Based on Algorithm 13 from Benoit Boisinot's thesis, with fixes and # extensions by Paul Sokolovsky. import logging log = logging.getLogger(__name__) def sequentialize(copies, filter_dup_dests=False, allow_fan_out=True): # If filter_dup_dests is True, consider pairs ordered, and if multiple # pairs have ...
25.414634
103
0.529271
# extensions by Paul Sokolovsky. import logging log = logging.getLogger(__name__) def sequentialize(copies, filter_dup_dests=False, allow_fan_out=True): # If filter_dup_dests is True, consider pairs ordered, and if multiple # pairs have the same dest var, the last one takes effect. Otherwise, # such du...
true
true
1c11354c70a9dd4da33ba68dde48d3d751709330
16,662
py
Python
app/lib_master_python/ds_webhook.py
superdex/esignature-recipes-python
12a3c617da2d06d458c33cd5a6104b36fe523034
[ "MIT" ]
null
null
null
app/lib_master_python/ds_webhook.py
superdex/esignature-recipes-python
12a3c617da2d06d458c33cd5a6104b36fe523034
[ "MIT" ]
null
null
null
app/lib_master_python/ds_webhook.py
superdex/esignature-recipes-python
12a3c617da2d06d458c33cd5a6104b36fe523034
[ "MIT" ]
null
null
null
# DocuSign webhook library # # Set encoding to utf8. See http://stackoverflow.com/a/21190382/64904 import sys; reload(sys); sys.setdefaultencoding('utf8') import os, base64, json, requests, logging from app.lib_master_python import ds_recipe_lib from flask import request, session from bs4 import BeautifulSoup webho...
39.29717
124
0.60653
import sys; reload(sys); sys.setdefaultencoding('utf8') import os, base64, json, requests, logging from app.lib_master_python import ds_recipe_lib from flask import request, session from bs4 import BeautifulSoup webhook_path = "/webhook" xml_file_dir = "app/static/files/" doc_prefix = "doc_" heroku_env = 'DYNO' trac...
true
true
1c11357726f88da77ad9c945cc561de425a68bd6
207
py
Python
sources/t03/t03ej02.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t03/t03ej02.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
sources/t03/t03ej02.py
workready/pythonbasic
59bd82caf99244f5e711124e1f6f4dec8de22141
[ "MIT" ]
null
null
null
# Mala practica: concatenación simple de cadenas def format_user_info(name, age, sex): return "Nombre: " + name + ", Edad: " + str(age) + ", Sexo: " + sex print(format_user_info("Jorge", 36, "Hombre"))
41.4
72
0.657005
def format_user_info(name, age, sex): return "Nombre: " + name + ", Edad: " + str(age) + ", Sexo: " + sex print(format_user_info("Jorge", 36, "Hombre"))
true
true
1c1135796f5d513f762d5c9931948c54b1e0b0a0
203
py
Python
test/test1.py
tristanbrown/whaler
821506ee5b9939b3493b0d06d266b633a63bc537
[ "MIT" ]
null
null
null
test/test1.py
tristanbrown/whaler
821506ee5b9939b3493b0d06d266b633a63bc537
[ "MIT" ]
null
null
null
test/test1.py
tristanbrown/whaler
821506ee5b9939b3493b0d06d266b633a63bc537
[ "MIT" ]
null
null
null
import unittest from whaler import config from whaler import analysis class FileStructureTestCase(unittest.TestCase): def setUp(self): pass def test_geo(self): assert True
16.916667
47
0.704433
import unittest from whaler import config from whaler import analysis class FileStructureTestCase(unittest.TestCase): def setUp(self): pass def test_geo(self): assert True
true
true
1c11363276ba0dbb9dc5728b01e4e746afb83909
33,012
py
Python
autobahn/wamp/serializer.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
4
2021-01-17T22:10:18.000Z
2021-02-09T18:36:35.000Z
autobahn/wamp/serializer.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
3
2021-03-30T13:49:51.000Z
2021-06-04T23:35:46.000Z
autobahn/wamp/serializer.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
2
2021-01-17T22:08:38.000Z
2021-01-19T02:53:25.000Z
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in ...
33.311806
235
0.604417
import os import struct import platform import math from txaio import time_ns from autobahn.wamp.interfaces import IObjectSerializer, ISerializer from autobahn.wamp.exception import ProtocolError from autobahn.wamp import message __all__ = ['Serializer', 'JsonObjectSerializer', 'JsonSerializer'...
true
true
1c1137126cf7f1528269f03fc4affb66994368c3
1,622
py
Python
docs_src/Tutorial/__init__.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
docs_src/Tutorial/__init__.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
docs_src/Tutorial/__init__.py
LucasFranciscoCorreia/ontask_b
5473e9faa24c71a2a1102d47ebc2cbf27608e42a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pandas as pd # The field class_name contains the name of the class to load to execute the # plugin. class_name = 'LinearRegressionModel' class LinearRegressionModel(object): """ Class implementing an OnTask plugin that given two coefficients it applies a linear regression ...
33.791667
78
0.633169
import pandas as pd class_name = 'LinearRegressionModel' class LinearRegressionModel(object): def __init__(self): self.name = 'Linear Regression Predictive Model' self.description_text = """ Given a column and the coefficients A and B, it computes the linear model Ax + B, where...
true
true
1c11373b3175aa5a2a41696c903129f07f4049d1
19,180
py
Python
src/link_prediction/utils_link_prediction.py
JieZheng-ShanghaiTech/HiCoEx
1b3d4b80d3af9751cdd7a0cabda7af377d1c1253
[ "MIT" ]
1
2022-03-04T08:01:10.000Z
2022-03-04T08:01:10.000Z
src/link_prediction/utils_link_prediction.py
JieZheng-ShanghaiTech/HiCoEx
1b3d4b80d3af9751cdd7a0cabda7af377d1c1253
[ "MIT" ]
null
null
null
src/link_prediction/utils_link_prediction.py
JieZheng-ShanghaiTech/HiCoEx
1b3d4b80d3af9751cdd7a0cabda7af377d1c1253
[ "MIT" ]
null
null
null
import itertools import os import pickle from collections import defaultdict from multiprocessing import Pool from time import time import networkx as nx import numpy as np import pandas as pd import scipy.sparse as sps from bionev.utils import load_embedding from sklearn.ensemble import RandomForestClassifier from sk...
45.235849
214
0.663087
import itertools import os import pickle from collections import defaultdict from multiprocessing import Pool from time import time import networkx as nx import numpy as np import pandas as pd import scipy.sparse as sps from bionev.utils import load_embedding from sklearn.ensemble import RandomForestClassifier from sk...
true
true
1c1139ca1effbdb0754e5ae265a867e8f0f3e98e
512
py
Python
1_IPC/02.tugas_udp_server.py
wikankun/DistributedParalelSystem
f77bdb2213cfbdc35b2dda26d117d71856254c9b
[ "MIT" ]
6
2019-04-16T03:11:31.000Z
2020-02-24T05:40:15.000Z
1_IPC/02.tugas_udp_server.py
wikankun/DistributedParalelSystem
f77bdb2213cfbdc35b2dda26d117d71856254c9b
[ "MIT" ]
null
null
null
1_IPC/02.tugas_udp_server.py
wikankun/DistributedParalelSystem
f77bdb2213cfbdc35b2dda26d117d71856254c9b
[ "MIT" ]
2
2019-04-22T13:49:03.000Z
2019-04-26T02:18:48.000Z
# import library socket karena akan menggunakan IPC socket import socket as sc # definisikan alamat IP bind dari server UDP_HOST = "192.168.1.15" # definisikan port number untuk bind dari server UDP_PORT = 4044 # buat socket bertipe UDP s = sc.socket(sc.AF_INET, sc.SOCK_DGRAM) # lakukan bind s.bind((UDP_HOST, UDP_P...
20.48
58
0.714844
import socket as sc UDP_HOST = "192.168.1.15" UDP_PORT = 4044 s = sc.socket(sc.AF_INET, sc.SOCK_DGRAM) s.bind((UDP_HOST, UDP_PORT)) while True: RECEIVED = s.recv(1024).decode() print(RECEIVED)
true
true
1c113b22c606d3833572524c949dc43ab3fa5aa1
21,781
py
Python
src/sagemaker/amazon/linear_learner.py
jaipradeesh/sagemaker-python-sdk
ef842108ccaa324d2be15978aa678926dd1c21ea
[ "Apache-2.0" ]
3
2020-04-18T15:25:28.000Z
2020-04-21T08:30:59.000Z
src/sagemaker/amazon/linear_learner.py
jaipradeesh/sagemaker-python-sdk
ef842108ccaa324d2be15978aa678926dd1c21ea
[ "Apache-2.0" ]
4
2019-11-02T16:19:14.000Z
2019-11-02T21:31:30.000Z
src/sagemaker/amazon/linear_learner.py
jaipradeesh/sagemaker-python-sdk
ef842108ccaa324d2be15978aa678926dd1c21ea
[ "Apache-2.0" ]
2
2019-05-30T08:47:34.000Z
2020-04-08T09:42:01.000Z
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
69.810897
120
0.689592
from __future__ import absolute_import from sagemaker.amazon.amazon_estimator import AmazonAlgorithmEstimatorBase, registry from sagemaker.amazon.common import numpy_to_record_serializer, record_deserializer from sagemaker.amazon.hyperparameter import Hyperparameter as hp from sagemaker.amazon.validation import isin,...
true
true
1c113b6960097cde0f977bb058780b2db744a25d
129
py
Python
codes_auto/1643.number-of-nodes-in-the-sub-tree-with-the-same-label.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1643.number-of-nodes-in-the-sub-tree-with-the-same-label.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1643.number-of-nodes-in-the-sub-tree-with-the-same-label.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
# # @lc app=leetcode.cn id=1643 lang=python3 # # [1643] number-of-nodes-in-the-sub-tree-with-the-same-label # None # @lc code=end
18.428571
60
0.697674
None
true
true
1c113b9e31b5173e0de392130060e7dbb2011119
102
py
Python
Arquivo/2020-1/2020-1-uff-prog-1/run-code-testes/listas-ordenacao/test.py
joaog314/uff-projects
417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4
[ "MIT" ]
null
null
null
Arquivo/2020-1/2020-1-uff-prog-1/run-code-testes/listas-ordenacao/test.py
joaog314/uff-projects
417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4
[ "MIT" ]
null
null
null
Arquivo/2020-1/2020-1-uff-prog-1/run-code-testes/listas-ordenacao/test.py
joaog314/uff-projects
417895d5b7c6fd88e9c67c925e7c6a4abb6bb6f4
[ "MIT" ]
null
null
null
alist=[20,30,40,90,50,60,70,80,100,110] passnum = len(alist)-1 for i in range(passnum): print(i)
17
39
0.656863
alist=[20,30,40,90,50,60,70,80,100,110] passnum = len(alist)-1 for i in range(passnum): print(i)
true
true
1c113d8cc615c93d2dde2a0228c7b109df17ac2c
5,096
py
Python
navigation.py
eoinnoble/captains-log
1bad081e853af15afbcf9681a4d278387791387c
[ "Unlicense" ]
5
2016-11-30T15:06:37.000Z
2018-03-30T14:11:16.000Z
navigation.py
eoinnoble/captains-log
1bad081e853af15afbcf9681a4d278387791387c
[ "Unlicense" ]
null
null
null
navigation.py
eoinnoble/captains-log
1bad081e853af15afbcf9681a4d278387791387c
[ "Unlicense" ]
null
null
null
import random from collections.abc import MutableMapping from math import atan2, degrees, inf from typing import Tuple from geopy.distance import great_circle import data from captains import Captain from ships import OurShip class RangeDict(MutableMapping): """Enables a dictionary whose keys are ranges.""" ...
30.333333
98
0.649725
import random from collections.abc import MutableMapping from math import atan2, degrees, inf from typing import Tuple from geopy.distance import great_circle import data from captains import Captain from ships import OurShip class RangeDict(MutableMapping): def __init__(self, iterable): if not isinsta...
true
true
1c113e5adf227a3d289907b26df9dd666ad1e465
16,807
py
Python
official/nlp/modeling/layers/transformer.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
2
2021-03-30T12:57:54.000Z
2021-03-30T13:18:48.000Z
official/nlp/modeling/layers/transformer.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
2
2021-05-09T07:09:43.000Z
2021-05-09T07:11:45.000Z
official/nlp/modeling/layers/transformer.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
2
2021-06-13T10:26:17.000Z
2021-08-28T08:40:01.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.094872
80
0.716547
import gin import tensorflow as tf from official.nlp import keras_nlp from official.nlp.modeling.layers import attention from official.nlp.modeling.layers import multi_channel_attention from official.nlp.modeling.layers.util import tf_function_if_eager @tf.keras.utils.register_keras_serializable(package="Text") cl...
true
true
1c113ed0401f66e391ec395ff70df4b750bb5646
732
py
Python
tests/layers/test_utils.py
Jordanjiun/cd11_seepod_ground_risk
00a9b8b340082a046f3e7de001cff85d79502eba
[ "MIT" ]
null
null
null
tests/layers/test_utils.py
Jordanjiun/cd11_seepod_ground_risk
00a9b8b340082a046f3e7de001cff85d79502eba
[ "MIT" ]
null
null
null
tests/layers/test_utils.py
Jordanjiun/cd11_seepod_ground_risk
00a9b8b340082a046f3e7de001cff85d79502eba
[ "MIT" ]
null
null
null
import unittest import shapely.geometry as sg from seedpod_ground_risk.core.utils import make_bounds_polygon class UtilsTestCase(unittest.TestCase): def test_bounds_polygon_2arg(self): res = make_bounds_polygon((1, 5), (1, 5)) poly = sg.Polygon([(1, 1), (1, 5), (5, 5), (5, 1)]) ...
29.28
63
0.614754
import unittest import shapely.geometry as sg from seedpod_ground_risk.core.utils import make_bounds_polygon class UtilsTestCase(unittest.TestCase): def test_bounds_polygon_2arg(self): res = make_bounds_polygon((1, 5), (1, 5)) poly = sg.Polygon([(1, 1), (1, 5), (5, 5), (5, 1)]) ...
true
true
1c114139292f612295a8c061ad0979004c61bc56
3,316
py
Python
web/app/ponthe/api/private/video_routes.py
ENPC-Ponthe/Galeries
77648d880f4f71f62f620227d50452fa7a1482e3
[ "MIT" ]
null
null
null
web/app/ponthe/api/private/video_routes.py
ENPC-Ponthe/Galeries
77648d880f4f71f62f620227d50452fa7a1482e3
[ "MIT" ]
1
2021-01-05T03:43:06.000Z
2021-01-05T03:43:06.000Z
web/app/ponthe/api/private/video_routes.py
ENPC-Ponthe/Galeries
77648d880f4f71f62f620227d50452fa7a1482e3
[ "MIT" ]
3
2020-09-09T17:50:01.000Z
2021-07-29T19:48:49.000Z
from flask_jwt_extended import current_user from flask_restplus import Resource from flask import request from . import api from ... import app from ...dao import GalleryDAO, FileDAO from ...services import FileService, ReactionService, UserService SIZE_LARGE_THUMB = '630x500' @api.route('/get-filmography') class ...
36.43956
127
0.654403
from flask_jwt_extended import current_user from flask_restplus import Resource from flask import request from . import api from ... import app from ...dao import GalleryDAO, FileDAO from ...services import FileService, ReactionService, UserService SIZE_LARGE_THUMB = '630x500' @api.route('/get-filmography') class ...
true
true
1c114213c32abb37901474392cfac6af61fb6aa8
476
py
Python
build/f1_10_sim/race/catkin_generated/pkg.develspace.context.pc.py
diogolopes18-cyber/F1Tenth_CISTER_Integration
06ff104e1e248e63bf8e433ccd4beea516ebd37b
[ "MIT" ]
null
null
null
build/f1_10_sim/race/catkin_generated/pkg.develspace.context.pc.py
diogolopes18-cyber/F1Tenth_CISTER_Integration
06ff104e1e248e63bf8e433ccd4beea516ebd37b
[ "MIT" ]
null
null
null
build/f1_10_sim/race/catkin_generated/pkg.develspace.context.pc.py
diogolopes18-cyber/F1Tenth_CISTER_Integration
06ff104e1e248e63bf8e433ccd4beea516ebd37b
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/diogo/sims_ws/devel/include".split(';') if "/home/diogo/sims_ws/devel/include" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;rospy;sensor_msgs;std_msgs;geometry_msgs".replace(';', ' ') PKG_CONFI...
52.888889
133
0.739496
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/diogo/sims_ws/devel/include".split(';') if "/home/diogo/sims_ws/devel/include" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp;rospy;sensor_msgs;std_msgs;geometry_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else ...
true
true
1c11435644620cec3fe46aca27f633dd2f793159
3,179
py
Python
dace/codegen/instrumentation/perfdb.py
tbennun/dace
484f959c847feee048cd43ae5580f57e67d51671
[ "BSD-3-Clause" ]
1
2020-09-18T07:27:22.000Z
2020-09-18T07:27:22.000Z
dace/codegen/instrumentation/perfdb.py
tbennun/dace
484f959c847feee048cd43ae5580f57e67d51671
[ "BSD-3-Clause" ]
null
null
null
dace/codegen/instrumentation/perfdb.py
tbennun/dace
484f959c847feee048cd43ae5580f57e67d51671
[ "BSD-3-Clause" ]
null
null
null
import re class PerfMetaInfo: """ Class dedicated to keep meta information about the generated code, in particular line numbers. """ def __init__(self): self.nodes = dict() # Maps nodes to their strings self.lines = dict() # Maps nodes to their line number def add_node(self, no...
35.322222
90
0.529726
import re class PerfMetaInfo: def __init__(self): self.nodes = dict() self.lines = dict() def add_node(self, node, string): self.nodes[node] = string def has_node(self, node): return node in self.nodes.keys() def resolve(self, codestr: str): index = 0 ...
true
true
1c114437fd1446b5661c886308aca881912c7aa4
728
py
Python
nasty/batch/_execute_result.py
tilmanbeck/nasty
6342461c878aebeb2d642afea1de44376c8c49b4
[ "Apache-2.0" ]
null
null
null
nasty/batch/_execute_result.py
tilmanbeck/nasty
6342461c878aebeb2d642afea1de44376c8c49b4
[ "Apache-2.0" ]
null
null
null
nasty/batch/_execute_result.py
tilmanbeck/nasty
6342461c878aebeb2d642afea1de44376c8c49b4
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
29.12
74
0.741758
import enum from enum import Enum class _ExecuteResult(Enum): SUCCESS = enum.auto() SKIP = enum.auto() FAIL = enum.auto()
true
true
1c11447a0c497ca990d6cd71b0144c60dbb4a826
3,573
py
Python
LianJia/LianJia/spiders/__init__.py
joelYing/Graduation-Design
efa13db967f8eb444fa060186372e81376268856
[ "MIT" ]
null
null
null
LianJia/LianJia/spiders/__init__.py
joelYing/Graduation-Design
efa13db967f8eb444fa060186372e81376268856
[ "MIT" ]
null
null
null
LianJia/LianJia/spiders/__init__.py
joelYing/Graduation-Design
efa13db967f8eb444fa060186372e81376268856
[ "MIT" ]
null
null
null
# This package will contain the spiders of your Scrapy project # # Please refer to the documentation for information on how to create and manage # your spiders. # CREATE TABLE `house_base` ( # `id` int(10) unsigned NOT NULL AUTO_INCREMENT, # `house_id` varchar(64) CHARACTER SET utf8 NOT NULL, # `house_url` varch...
45.807692
81
0.719004
true
true
1c1144be57a4b25a28ee5ee3680b526ef5f79d07
1,006
py
Python
tests/test_custom_extension.py
pyscaffold/pyscaffoldext-django
d33b141f980e0e46a0e931c7d91e2f4eb3e22e90
[ "MIT" ]
3
2019-12-29T00:27:19.000Z
2021-05-28T12:42:00.000Z
tests/test_custom_extension.py
pyscaffold/pyscaffoldext-django
d33b141f980e0e46a0e931c7d91e2f4eb3e22e90
[ "MIT" ]
2
2020-01-23T10:15:26.000Z
2021-03-04T11:35:59.000Z
tests/test_custom_extension.py
pyscaffold/pyscaffoldext-django
d33b141f980e0e46a0e931c7d91e2f4eb3e22e90
[ "MIT" ]
1
2020-01-21T23:23:05.000Z
2020-01-21T23:23:05.000Z
from pathlib import Path import pytest from pyscaffold import cli from pyscaffold.file_system import chdir from pyscaffoldext.django.extension import Django from .helpers import run_common_tasks EXT_FLAG = Django().flag def test_add_custom_extension(tmpfolder): args = ["--no-config", EXT_FLAG, "my_project", "...
29.588235
76
0.728628
from pathlib import Path import pytest from pyscaffold import cli from pyscaffold.file_system import chdir from pyscaffoldext.django.extension import Django from .helpers import run_common_tasks EXT_FLAG = Django().flag def test_add_custom_extension(tmpfolder): args = ["--no-config", EXT_FLAG, "my_project", "...
true
true
1c1144ef323efa6de302c1d615dd393e93b5aa89
1,371
py
Python
django_prometheus/models.py
vitalyserhienko/django-prometheus
09727441262fcb2eb26325adb520f3d0bf35b1a7
[ "Apache-2.0" ]
2
2020-03-29T08:57:36.000Z
2020-06-13T02:47:33.000Z
django_prometheus/models.py
vitalyserhienko/django-prometheus
09727441262fcb2eb26325adb520f3d0bf35b1a7
[ "Apache-2.0" ]
6
2021-03-19T09:07:56.000Z
2022-02-10T09:25:41.000Z
django_prometheus/models.py
vitalyserhienko/django-prometheus
09727441262fcb2eb26325adb520f3d0bf35b1a7
[ "Apache-2.0" ]
1
2020-03-29T08:57:40.000Z
2020-03-29T08:57:40.000Z
from prometheus_client import Counter model_inserts = Counter( "django_model_inserts_total", "Number of insert operations by model.", ["model"] ) model_updates = Counter( "django_model_updates_total", "Number of update operations by model.", ["model"] ) model_deletes = Counter( "django_model_deletes_tota...
31.883721
84
0.676878
from prometheus_client import Counter model_inserts = Counter( "django_model_inserts_total", "Number of insert operations by model.", ["model"] ) model_updates = Counter( "django_model_updates_total", "Number of update operations by model.", ["model"] ) model_deletes = Counter( "django_model_deletes_tota...
true
true
1c11459ff6cc6a6d4b19dc2419c69f9d6d15f079
2,537
py
Python
flexget/plugins/input/inputs.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
flexget/plugins/input/inputs.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
flexget/plugins/input/inputs.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('inputs') class PluginInputs(object): """ Allows the same inpu...
34.753425
117
0.509263
from __future__ import unicode_literals, division, absolute_import from builtins import * import logging from flexget import plugin from flexget.event import event log = logging.getLogger('inputs') class PluginInputs(object): schema = { 'type': 'array', 'items': { 'allOf': [ ...
true
true
1c1146e41586659c2f6608ac75dbf7218b1080ea
3,718
py
Python
venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py
almmello/frozen
c9928491f694b56a0023926bc763c703ba1fd75a
[ "BSD-2-Clause" ]
2
2022-02-25T09:12:07.000Z
2022-03-22T19:45:43.000Z
venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py
almmello/frozen
c9928491f694b56a0023926bc763c703ba1fd75a
[ "BSD-2-Clause" ]
null
null
null
venv/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py
almmello/frozen
c9928491f694b56a0023926bc763c703ba1fd75a
[ "BSD-2-Clause" ]
1
2022-03-28T09:19:34.000Z
2022-03-28T09:19:34.000Z
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
50.243243
129
0.69177
import warnings from selenium.webdriver.chromium.webdriver import ChromiumDriver from .options import Options from .service import DEFAULT_EXECUTEABLE_PATH, Service from selenium.webdriver.common.desired_capabilities import DesiredCapabilities DEFAULT_PORT = 0 DEFAULT_SERVICE_LOG_PATH = None DEFAULT_KEEP_ALIVE = None...
true
true
1c11477e73f0d96db1f3aec6db00201c488d5c64
1,415
py
Python
directory_to_sql/create_db.py
hydrospanner/directory_to_sql
c3397529bccb42f4037720316b1a22ac236296db
[ "MIT" ]
2
2019-09-19T11:04:20.000Z
2021-03-25T02:20:02.000Z
directory_to_sql/create_db.py
hydrospanner/directory_to_sql
c3397529bccb42f4037720316b1a22ac236296db
[ "MIT" ]
3
2019-04-20T22:05:39.000Z
2019-04-21T04:52:48.000Z
directory_to_sql/create_db.py
hydrospanner/directory_to_sql
c3397529bccb42f4037720316b1a22ac236296db
[ "MIT" ]
null
null
null
"""Create the database tables.""" import sqlite3 import os def create_db(database=':memory:'): """Create the database tables.""" if os.path.isfile(database): os.remove(database) conn = sqlite3.connect(database) c = conn.cursor() sql = ''' CREATE TABLE folders (folder_id IN...
25.727273
69
0.603534
import sqlite3 import os def create_db(database=':memory:'): if os.path.isfile(database): os.remove(database) conn = sqlite3.connect(database) c = conn.cursor() sql = ''' CREATE TABLE folders (folder_id INTEGER PRIMARY KEY, name text, path text, subfold...
true
true
1c1147bd557e2ac0849463a977546bd404db348b
3,186
py
Python
olc_webportalv2/geneseekr/migrations/0032_auto_20190823_1934.py
OLC-Bioinformatics/olc_genomics_portal
d70ec669a3a49106f8290fff5dee089726259a23
[ "MIT" ]
3
2019-01-03T21:22:21.000Z
2019-04-23T15:47:29.000Z
olc_webportalv2/geneseekr/migrations/0032_auto_20190823_1934.py
OLC-Bioinformatics/olc_genomics_portal
d70ec669a3a49106f8290fff5dee089726259a23
[ "MIT" ]
49
2019-01-03T18:15:12.000Z
2022-03-11T23:37:20.000Z
olc_webportalv2/geneseekr/migrations/0032_auto_20190823_1934.py
OLC-Bioinformatics/olc_webportalv2
d70ec669a3a49106f8290fff5dee089726259a23
[ "MIT" ]
58
2019-01-03T21:21:59.000Z
2021-11-02T18:00:20.000Z
# Generated by Django 2.1.5 on 2019-08-23 19:34 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('geneseekr', '0031_auto_20190823_1932'), ] operations = [ migrations.AlterField( model_name...
45.514286
154
0.651601
import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('geneseekr', '0031_auto_20190823_1932'), ] operations = [ migrations.AlterField( model_name='amrsummary', name='emails_array', ...
true
true
1c1148aa0beba6f7bc2a6f8f8787d29f0b2ef445
1,317
py
Python
healthmap/patients/migrations/0001_initial.py
dev-dpoudel/healthmap
faa6b26b98ec18379ef2757f854d856fd7a9dfc1
[ "MIT" ]
1
2021-05-25T02:18:46.000Z
2021-05-25T02:18:46.000Z
healthmap/patients/migrations/0001_initial.py
dev-dpoudel/healthmap
faa6b26b98ec18379ef2757f854d856fd7a9dfc1
[ "MIT" ]
null
null
null
healthmap/patients/migrations/0001_initial.py
dev-dpoudel/healthmap
faa6b26b98ec18379ef2757f854d856fd7a9dfc1
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-01-31 13:09 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='StaffFamily', fields=[ ('created_date', mod...
32.121951
98
0.540623
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='StaffFamily', fields=[ ('created_date', models.DateField(auto_now_add=True)), ...
true
true
1c11491e6a0947ca8cbc8377ca9bbba4c41afb9d
713
py
Python
tests/estimators_test/test_neural_netrowk.py
blacktanktop/vivid
e85837bcd86575f8a275517250dd026aac3e451f
[ "BSD-2-Clause-FreeBSD" ]
39
2020-05-13T18:13:25.000Z
2022-03-02T10:46:53.000Z
tests/estimators_test/test_neural_netrowk.py
blacktanktop/vivid
e85837bcd86575f8a275517250dd026aac3e451f
[ "BSD-2-Clause-FreeBSD" ]
29
2020-05-13T18:04:09.000Z
2022-02-27T04:43:18.000Z
tests/estimators_test/test_neural_netrowk.py
blacktanktop/vivid
e85837bcd86575f8a275517250dd026aac3e451f
[ "BSD-2-Clause-FreeBSD" ]
3
2020-05-13T19:17:01.000Z
2020-10-28T21:29:42.000Z
"""test about netural network out-of-fold feature""" from vivid.estimators.neural_network import KerasClassifierBlock, KerasRegressorBlock # binary のみの対応なので multiclass regression model に対応できていない. 今後修正する # def test_keras_classifier(binary_data, experiment): # df, y = binary_data # model = KerasClassifierBlock...
33.952381
85
0.674614
from vivid.estimators.neural_network import KerasClassifierBlock, KerasRegressorBlock def test_keras_regressor(regression_data, experiment): df, y = regression_data model = KerasRegressorBlock(name='skeras', add_init_param={'epochs': 1}) model.fit(df, y, experiment) ...
true
true
1c1149a250a8ec72c308cc5cdc0426335c29b5ab
2,213
py
Python
shop/forms.py
zahidkizmaz/VehicleShop
5a2dc5cc4eb4c4692db9f19108818069250a950a
[ "MIT" ]
10
2017-11-29T17:41:23.000Z
2020-01-13T14:45:18.000Z
shop/forms.py
zahidkizmaz/VehicleShop
5a2dc5cc4eb4c4692db9f19108818069250a950a
[ "MIT" ]
1
2017-12-15T17:24:42.000Z
2017-12-17T00:05:54.000Z
shop/forms.py
zahidkizmaz/VehicleShop
5a2dc5cc4eb4c4692db9f19108818069250a950a
[ "MIT" ]
2
2020-03-31T00:01:27.000Z
2022-01-02T05:45:17.000Z
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm, UsernameField from shop.models import User, Vehicle, Brand from .models import Firm from django.core.validators import RegexValidator from django.forms import HiddenInput class CustomUserCrea...
32.072464
152
0.660642
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm, UsernameField from shop.models import User, Vehicle, Brand from .models import Firm from django.core.validators import RegexValidator from django.forms import HiddenInput class CustomUserCrea...
true
true
1c1149f04e4ed88e7cdc8166de508282dfbefed2
12,367
py
Python
tests/test_templates.py
elmiko/oshinko-temaki
765d7e57b7472bf3f8f278bb52c3483d44e2bada
[ "Apache-2.0" ]
2
2019-02-22T19:58:14.000Z
2020-06-05T13:23:37.000Z
tests/test_templates.py
elmiko/oshinko-temaki
765d7e57b7472bf3f8f278bb52c3483d44e2bada
[ "Apache-2.0" ]
12
2019-02-21T22:45:36.000Z
2019-03-29T21:38:13.000Z
tests/test_templates.py
elmiko/oshinko-temaki
765d7e57b7472bf3f8f278bb52c3483d44e2bada
[ "Apache-2.0" ]
1
2019-02-25T19:54:54.000Z
2019-02-25T19:54:54.000Z
import argparse import json import unittest import yaml from oshinko_temaki import configs from oshinko_temaki import templates class TestCMTemplate(unittest.TestCase): @staticmethod def base_expected(): return { "apiVersion": "v1", "kind": "ConfigMap", "metadata"...
40.547541
79
0.560847
import argparse import json import unittest import yaml from oshinko_temaki import configs from oshinko_temaki import templates class TestCMTemplate(unittest.TestCase): @staticmethod def base_expected(): return { "apiVersion": "v1", "kind": "ConfigMap", "metadata"...
true
true
1c114bcaf942db0c41d7fc41d3eb647b2d9e52d2
2,792
py
Python
covid/crawler.py
jgdelrio/covid-data
7e479a3df67008141bf1089ea92b1efc3ad0a807
[ "MIT" ]
null
null
null
covid/crawler.py
jgdelrio/covid-data
7e479a3df67008141bf1089ea92b1efc3ad0a807
[ "MIT" ]
null
null
null
covid/crawler.py
jgdelrio/covid-data
7e479a3df67008141bf1089ea92b1efc3ad0a807
[ "MIT" ]
null
null
null
import csv import aiohttp import asyncio import aiofiles import nest_asyncio from sources import data_sources from utils import LOG, clean_text from config import * nest_asyncio.apply() class SemaphoreController: _instance = None def __new__(cls, *args, **kwargs): if not SemaphoreController._instan...
29.083333
105
0.637536
import csv import aiohttp import asyncio import aiofiles import nest_asyncio from sources import data_sources from utils import LOG, clean_text from config import * nest_asyncio.apply() class SemaphoreController: _instance = None def __new__(cls, *args, **kwargs): if not SemaphoreController._instan...
true
true
1c114c31fed4988cf73fd817309237de07f181a8
18,182
py
Python
image_crop/recrop_min_size.py
agnes-yang/firecam
9282d1b5b83be3abf6a137f7a72c090a9eca05f6
[ "Apache-2.0" ]
10
2019-12-19T02:37:33.000Z
2021-12-07T04:47:08.000Z
image_crop/recrop_min_size.py
agnes-yang/firecam
9282d1b5b83be3abf6a137f7a72c090a9eca05f6
[ "Apache-2.0" ]
5
2019-10-27T23:22:52.000Z
2020-02-13T23:08:15.000Z
image_crop/recrop_min_size.py
agnes-yang/firecam
9282d1b5b83be3abf6a137f7a72c090a9eca05f6
[ "Apache-2.0" ]
13
2019-09-24T18:53:24.000Z
2021-07-16T05:57:18.000Z
# Copyright 2018 The Fuego Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
48.228117
187
0.648829
import os import sys fuegoRoot = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.join(fuegoRoot, 'lib')) sys.path.insert(0, fuegoRoot) import settings settings.fuegoRoot = fuegoRoot import collect_args import goog_helper import rect_to_squares import img_archive import datet...
true
true
1c114c8bc5e530100531bd89846be8538261cd9b
126
py
Python
atividades-e-aulas/Testes Simples/APAGAR.py
yagoandradelima/dncgroup-pythonzero
4f60086c4244e69b7996cc94e9ef6b9bb6cbe4fd
[ "MIT" ]
null
null
null
atividades-e-aulas/Testes Simples/APAGAR.py
yagoandradelima/dncgroup-pythonzero
4f60086c4244e69b7996cc94e9ef6b9bb6cbe4fd
[ "MIT" ]
null
null
null
atividades-e-aulas/Testes Simples/APAGAR.py
yagoandradelima/dncgroup-pythonzero
4f60086c4244e69b7996cc94e9ef6b9bb6cbe4fd
[ "MIT" ]
null
null
null
nota = [9, 27] boletim = {'nome': 'Yago', 'nota': nota, 'cidade':'Ananindeua' } alunos = [boletim] print(boletim["nota"][1])
21
64
0.603175
nota = [9, 27] boletim = {'nome': 'Yago', 'nota': nota, 'cidade':'Ananindeua' } alunos = [boletim] print(boletim["nota"][1])
true
true
1c114cc3455a6f9e851608366a3e56c661ab9456
8,630
py
Python
simpletransformers/config/model_args.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
2
2021-03-13T19:05:46.000Z
2021-11-07T20:03:36.000Z
simpletransformers/config/model_args.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
null
null
null
simpletransformers/config/model_args.py
mahanswaray/simpletransformers
44a97d689b6bd19495e698ae918e67c80828559e
[ "Apache-2.0" ]
3
2021-11-07T19:55:46.000Z
2022-01-24T15:25:33.000Z
import json import os import sys from dataclasses import asdict, dataclass, field, fields from multiprocessing import cpu_count from torch.utils.data import Dataset def get_default_process_count(): process_count = cpu_count() - 2 if cpu_count() > 2 else 1 if sys.platform == "win32": process_count = m...
28.110749
82
0.679374
import json import os import sys from dataclasses import asdict, dataclass, field, fields from multiprocessing import cpu_count from torch.utils.data import Dataset def get_default_process_count(): process_count = cpu_count() - 2 if cpu_count() > 2 else 1 if sys.platform == "win32": process_count = m...
true
true
1c114dc1e92e0bb8bdbf0043e6b1b7a5fdb27448
2,865
py
Python
WebBrickLibs/coherence/upnp/core/test/test_didl.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
WebBrickLibs/coherence/upnp/core/test/test_didl.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
WebBrickLibs/coherence/upnp/core/test/test_didl.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008, Frank Scholz <coherence@beebits.net> """ Test cases for L{upnp.core.DIDLLite} """ from copy import copy from twisted.trial import unittest from coherence.upnp.core import DIDLLite didl_frag...
42.132353
193
0.693892
from copy import copy from twisted.trial import unittest from coherence.upnp.core import DIDLLite didl_fragment = """ <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0" xmlns:p...
true
true
1c114dead3f3505ca1cd5eacfb19ba39b1217c35
25,699
py
Python
mne/io/pick.py
nicproulx/mne-python
4b0f362df04b21249faf6c9a2495c71c337a14a8
[ "BSD-3-Clause" ]
null
null
null
mne/io/pick.py
nicproulx/mne-python
4b0f362df04b21249faf6c9a2495c71c337a14a8
[ "BSD-3-Clause" ]
null
null
null
mne/io/pick.py
nicproulx/mne-python
4b0f362df04b21249faf6c9a2495c71c337a14a8
[ "BSD-3-Clause" ]
1
2020-12-15T09:16:29.000Z
2020-12-15T09:16:29.000Z
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from copy import deepcopy import re import numpy as np from .constants import FIFF from ..utils import logge...
34.402945
79
0.598194
from copy import deepcopy import re import numpy as np from .constants import FIFF from ..utils import logger, verbose from ..externals.six import string_types def channel_type(info, idx): kind = info['chs'][idx]['kind'] if kind == FIFF.FIFFV_MEG_CH: if info['chs'][idx]['unit'] == FIFF.FIFF_UNIT_T_...
true
true
1c114dfba827e6d6668e6d1d700865443dbbb527
4,303
py
Python
mrec/__init__.py
python-recsys/mrec
50c28a0384f2499bdc85afa3210eefed6b94011f
[ "BSD-3-Clause" ]
1
2015-09-01T16:11:25.000Z
2015-09-01T16:11:25.000Z
mrec/__init__.py
python-recsys/mrec
50c28a0384f2499bdc85afa3210eefed6b94011f
[ "BSD-3-Clause" ]
null
null
null
mrec/__init__.py
python-recsys/mrec
50c28a0384f2499bdc85afa3210eefed6b94011f
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from scipy.sparse import coo_matrix, csr_matrix from scipy.io import mmread try: import cPickle as pickle except ImportError: import pickle from sparse import fast_sparse_matrix, loadtxt, loadz from base_recommender import BaseRecommender def load_fast_sparse_matrix(input_format,filepath): ...
31.874074
106
0.642343
import numpy as np from scipy.sparse import coo_matrix, csr_matrix from scipy.io import mmread try: import cPickle as pickle except ImportError: import pickle from sparse import fast_sparse_matrix, loadtxt, loadz from base_recommender import BaseRecommender def load_fast_sparse_matrix(input_format,filepath): ...
true
true
1c114e39bc8a785db2183cabb4921b7b7704eeb0
5,894
py
Python
sorting_and_searching/bitonic_array/recursive.py
chrisjdavie/compsci_basics
dab0d377c6cf040ddda2c9c9f8373e996b1a594c
[ "MIT" ]
null
null
null
sorting_and_searching/bitonic_array/recursive.py
chrisjdavie/compsci_basics
dab0d377c6cf040ddda2c9c9f8373e996b1a594c
[ "MIT" ]
null
null
null
sorting_and_searching/bitonic_array/recursive.py
chrisjdavie/compsci_basics
dab0d377c6cf040ddda2c9c9f8373e996b1a594c
[ "MIT" ]
null
null
null
import bisect import unittest from parameterized import parameterized class Test(unittest.TestCase): @parameterized.expand([ ("provided example", [1, 2, 7, 4, 3], 2, 1), ("number on RHS", [1, 2, 7, 4, 3], 4, 3), ("missing number", [1, 2, 7, 4, 3], 5, -1), ("short array 2", [1, 2],...
93.555556
1,550
0.592128
import bisect import unittest from parameterized import parameterized class Test(unittest.TestCase): @parameterized.expand([ ("provided example", [1, 2, 7, 4, 3], 2, 1), ("number on RHS", [1, 2, 7, 4, 3], 4, 3), ("missing number", [1, 2, 7, 4, 3], 5, -1), ("short array 2", [1, 2],...
true
true
1c11520052b30f178b7976895a0fe0678179292c
310
py
Python
django_ueditor/forms.py
wail-asad/django-quill-editor
cdb1bb9006308cce096c386b1eed9b38b7798718
[ "MIT" ]
3
2021-12-28T16:23:47.000Z
2021-12-28T16:25:03.000Z
django_ueditor/forms.py
wail-asad/django-quill-editor
cdb1bb9006308cce096c386b1eed9b38b7798718
[ "MIT" ]
null
null
null
django_ueditor/forms.py
wail-asad/django-quill-editor
cdb1bb9006308cce096c386b1eed9b38b7798718
[ "MIT" ]
1
2021-12-28T16:26:23.000Z
2021-12-28T16:26:23.000Z
from django import forms from .widgets import UEWidget __all__ = ("UEFormField",) class UEFormField(forms.fields.CharField): def __init__(self, *args, **kwargs): kwargs.update( { "widget": UEWidget(), } ) super().__init__(*args, **kwargs)
20.666667
42
0.56129
from django import forms from .widgets import UEWidget __all__ = ("UEFormField",) class UEFormField(forms.fields.CharField): def __init__(self, *args, **kwargs): kwargs.update( { "widget": UEWidget(), } ) super().__init__(*args, **kwargs)
true
true
1c11527f5b789cfd9e30fa33af3ba81a3f6c4577
7,332
py
Python
dagr_revamped/builtin_plugins/classes/DAGRHTTPIo.py
phillmac/dagr-revamped
996d79d793d0f19538df5b58828ea258c503c0a8
[ "MIT" ]
null
null
null
dagr_revamped/builtin_plugins/classes/DAGRHTTPIo.py
phillmac/dagr-revamped
996d79d793d0f19538df5b58828ea258c503c0a8
[ "MIT" ]
null
null
null
dagr_revamped/builtin_plugins/classes/DAGRHTTPIo.py
phillmac/dagr-revamped
996d79d793d0f19538df5b58828ea258c503c0a8
[ "MIT" ]
null
null
null
import logging from os import scandir from pathlib import Path, PurePosixPath from pprint import pformat from dagr_revamped.DAGRIo import (DAGRIo, get_dir_name, get_fname, get_new_dir_name) from dagr_revamped.TCPKeepAliveSession import TCPKeepAliveSession from dagr_revamped.utils impo...
51.272727
203
0.663393
import logging from os import scandir from pathlib import Path, PurePosixPath from pprint import pformat from dagr_revamped.DAGRIo import (DAGRIo, get_dir_name, get_fname, get_new_dir_name) from dagr_revamped.TCPKeepAliveSession import TCPKeepAliveSession from dagr_revamped.utils impo...
true
true
1c11536b4fcb695f305a157fe38c608d854e4aad
10,326
py
Python
sdk/python/pulumi_azure_native/labservices/v20181015/get_lab.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/labservices/v20181015/get_lab.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/labservices/v20181015/get_lab.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
38.529851
349
0.662115
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetLabResult', 'AwaitableGetLabResult', 'get_lab', ] @pulumi.output_type class GetLabResult: def __init__(__self__, cr...
true
true
1c115373ab46d5125ac4f1adcdb3763eea30cecf
3,661
py
Python
src/data.py
jsbyysheng/captcha-recognition
69340a5a83451c4780b7a34729b572582ed3544b
[ "MIT" ]
null
null
null
src/data.py
jsbyysheng/captcha-recognition
69340a5a83451c4780b7a34729b572582ed3544b
[ "MIT" ]
null
null
null
src/data.py
jsbyysheng/captcha-recognition
69340a5a83451c4780b7a34729b572582ed3544b
[ "MIT" ]
null
null
null
import os import numpy as np from sklearn.model_selection import train_test_split def get_data(path): """ Get images name in path :param path: the path to save images :return: image list filled with names and their labels. """ image_names = os.listdir(path) image_names = [name for name in...
40.677778
151
0.635346
import os import numpy as np from sklearn.model_selection import train_test_split def get_data(path): image_names = os.listdir(path) image_names = [name for name in image_names if name.endswith(".jpg")] label2id, id2label = get_dict() results = [[label2id[name[:1]], label2id[name[1:2]], label2id[name...
true
true
1c115463b51310727c323495881cfdda73adf9af
1,418
py
Python
Reversing/ForceCoin/Solution/md5 cracker.py
Rev3rsedC0re/Shabak-Challenge-2021-Writeups
ffdbeca26023d9eef08029b660b69659dab29d77
[ "MIT" ]
null
null
null
Reversing/ForceCoin/Solution/md5 cracker.py
Rev3rsedC0re/Shabak-Challenge-2021-Writeups
ffdbeca26023d9eef08029b660b69659dab29d77
[ "MIT" ]
null
null
null
Reversing/ForceCoin/Solution/md5 cracker.py
Rev3rsedC0re/Shabak-Challenge-2021-Writeups
ffdbeca26023d9eef08029b660b69659dab29d77
[ "MIT" ]
null
null
null
import hashlib import threading from itertools import combinations, combinations_with_replacement,product letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','-',' ','*','#','@','!','&','A','B','C','D','E','F','G','H...
39.388889
304
0.437941
import hashlib import threading from itertools import combinations, combinations_with_replacement,product letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','-',' ','*','#','@','!','&','A','B','C','D','E','F','G','H...
true
true
1c11546806473f8aef575c861b05ce6553d462ce
2,616
py
Python
extract_wikipedia_list.py
philsMINT/AnnotaTeX
cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7
[ "Apache-2.0" ]
3
2021-04-14T13:31:12.000Z
2022-02-13T00:33:37.000Z
extract_wikipedia_list.py
philsMINT/AnnotaTeX
cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7
[ "Apache-2.0" ]
10
2019-07-26T08:10:07.000Z
2021-06-10T17:53:43.000Z
extract_wikipedia_list.py
philsMINT/AnnoMathTeX
cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7
[ "Apache-2.0" ]
2
2020-02-21T10:35:31.000Z
2020-05-27T06:13:35.000Z
################################################################################### ################################################################################### ################################################################################### #################################### NOT USED ######################...
29.727273
103
0.444954
true
true
1c1154729023479198e3cc6f3bc42ad4cab1360e
1,045
py
Python
baseadmin/backend/security.py
christophevg/baseAdmin
c5fd74886457197e079f0c3f3cde020f039c3bf0
[ "MIT" ]
2
2021-05-26T11:42:40.000Z
2021-05-26T15:28:03.000Z
baseadmin/backend/security.py
christophevg/baseAdmin
c5fd74886457197e079f0c3f3cde020f039c3bf0
[ "MIT" ]
1
2020-02-12T13:40:40.000Z
2020-02-12T14:10:50.000Z
baseadmin/backend/security.py
christophevg/baseadmin
c5fd74886457197e079f0c3f3cde020f039c3bf0
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) from functools import wraps import bcrypt from flask import request, Response from baseadmin import config from baseadmin.storage import db def valid_credentials(group): auth = request.authorization if not auth or not auth.username or not auth.passwor...
27.5
83
0.682297
import logging logger = logging.getLogger(__name__) from functools import wraps import bcrypt from flask import request, Response from baseadmin import config from baseadmin.storage import db def valid_credentials(group): auth = request.authorization if not auth or not auth.username or not auth.passwor...
true
true
1c115529e7bc98e651777a7bbbf2d633b53270de
2,406
py
Python
astro_pypelines/pypelines/interactive_plots/plots.py
fred3m/astro_pypelines
fbf62f2c4b8015fdb86192c7aed04e189cacf5a3
[ "BSD-3-Clause" ]
1
2020-06-17T00:44:32.000Z
2020-06-17T00:44:32.000Z
astro_pypelines/pypelines/interactive_plots/plots.py
fred3m/astro_pypelines
fbf62f2c4b8015fdb86192c7aed04e189cacf5a3
[ "BSD-3-Clause" ]
null
null
null
astro_pypelines/pypelines/interactive_plots/plots.py
fred3m/astro_pypelines
fbf62f2c4b8015fdb86192c7aed04e189cacf5a3
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function import os import numpy as np from astropy.table import Table from astropy.modeling import models, fitting fit_types = { 'linearLSQ': fitting.LinearLSQFitter(), 'levMarLSQ': fitting.LevMarLSQFitter(), 'SLSQPLSQ': fitting.SLSQPLSQFitter(), 'simplexLSQ': fit...
35.382353
83
0.608894
from __future__ import division, print_function import os import numpy as np from astropy.table import Table from astropy.modeling import models, fitting fit_types = { 'linearLSQ': fitting.LinearLSQFitter(), 'levMarLSQ': fitting.LevMarLSQFitter(), 'SLSQPLSQ': fitting.SLSQPLSQFitter(), 'simplexLSQ': fit...
true
true
1c115554b3524c22bfc0b4d2a910c6d07efe871d
2,830
py
Python
boa_test/tests/boa_test.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
4
2018-08-22T03:30:34.000Z
2019-04-16T10:54:08.000Z
boa_test/tests/boa_test.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
3
2018-09-03T09:19:26.000Z
2019-01-24T00:06:29.000Z
boa_test/tests/boa_test.py
mixbee/neo-boa
da7366c26c7b8e60afb9ac27439a1da37b0be355
[ "MIT" ]
12
2018-07-19T06:36:44.000Z
2019-05-13T05:45:58.000Z
from neo.Implementations.Wallets.peewee.UserWallet import UserWallet from neo.Settings import settings from neocore.UInt160 import UInt160 from neo.Wallets.utils import to_aes_key import os from neo.Utils.WalletFixtureTestCase import WalletFixtureTestCase settings.USE_DEBUG_STORAGE = False # settings.DEBUG_STORAGE_PAT...
32.906977
118
0.720495
from neo.Implementations.Wallets.peewee.UserWallet import UserWallet from neo.Settings import settings from neocore.UInt160 import UInt160 from neo.Wallets.utils import to_aes_key import os from neo.Utils.WalletFixtureTestCase import WalletFixtureTestCase settings.USE_DEBUG_STORAGE = False class BoaTest(WalletFixtur...
true
true
1c11555a4edcda813bf1fad8fcefa44eb0d65c3b
1,773
py
Python
examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets_tests/integrations_tests/test_dbt.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
1
2021-11-30T21:40:46.000Z
2021-11-30T21:40:46.000Z
import pytest from docs_snippets.integrations.dbt import ( scope_dbt_cli_config_exclude_models, scope_dbt_cli_config_executable, scope_dbt_cli_config_profile_and_target, scope_dbt_cli_config_select_models, scope_dbt_cli_config_vars, scope_dbt_cli_profile_modes, scope_dbt_cli_resource_config,...
32.833333
55
0.78229
import pytest from docs_snippets.integrations.dbt import ( scope_dbt_cli_config_exclude_models, scope_dbt_cli_config_executable, scope_dbt_cli_config_profile_and_target, scope_dbt_cli_config_select_models, scope_dbt_cli_config_vars, scope_dbt_cli_profile_modes, scope_dbt_cli_resource_config,...
true
true
1c115691858d856167a505ee69b09dbf735d5868
15,501
py
Python
iguanas/rules/_convert_rule_strings_to_rule_dicts.py
isabella232/Iguanas
8b15a0843c5be58c6dc50478860e5b4bfebf6928
[ "Apache-2.0" ]
null
null
null
iguanas/rules/_convert_rule_strings_to_rule_dicts.py
isabella232/Iguanas
8b15a0843c5be58c6dc50478860e5b4bfebf6928
[ "Apache-2.0" ]
1
2022-01-19T12:01:30.000Z
2022-01-19T12:01:30.000Z
iguanas/rules/_convert_rule_strings_to_rule_dicts.py
isabella232/Iguanas
8b15a0843c5be58c6dc50478860e5b4bfebf6928
[ "Apache-2.0" ]
null
null
null
"""Class for converting between string and dict representations of rules.""" from typing import Dict, List, Tuple, Union class _ConvertRuleStringsToRuleDicts: """ Converts a set of rules (each being represented in the standard Iguanas string format) into the standard Iguanas dictionary format. Par...
39.34264
97
0.55919
from typing import Dict, List, Tuple, Union class _ConvertRuleStringsToRuleDicts: def __init__(self, rule_strings: Dict[str, str]): self.rule_strings = rule_strings self.rule_dicts = {} self.condition_lookup = { '|': 'OR', '&': 'AND' } self.operator...
true
true
1c1157d7aa7eef26d4b4ae09269a07b323c4c073
1,479
py
Python
examples/pylab_examples/data_helper.py
nkoep/matplotlib
6ed04252994443a4cecf95f0da0efedb6d514b38
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/pylab_examples/data_helper.py
nkoep/matplotlib
6ed04252994443a4cecf95f0da0efedb6d514b38
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/pylab_examples/data_helper.py
nkoep/matplotlib
6ed04252994443a4cecf95f0da0efedb6d514b38
[ "MIT", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Some functions to load a return data for the plot demos from numpy import fromstring, argsort, take, array, resize import matplotlib.cbook as cbook def get_two_stock_data(): """ load stock time and price data for two stocks The return values (d1,p1,d2,p2) are the trade time (in da...
24.65
74
0.57336
from numpy import fromstring, argsort, take, array, resize import matplotlib.cbook as cbook def get_two_stock_data(): ticker1, ticker2 = 'INTC', 'AAPL' file1 = cbook.get_sample_data('INTC.dat.gz') file2 = cbook.get_sample_data('AAPL.dat.gz') M1 = fromstring( file1.read(), '<d') M1 = resize(M1, ...
true
true
1c1158891812e243a1b16147489a0a233e012dce
2,938
py
Python
ml/ex2/ex2_reg.py
dpopadic/ml-res
1fd746301b3ef10a96f78832cebb0c79c9327f1c
[ "MIT" ]
null
null
null
ml/ex2/ex2_reg.py
dpopadic/ml-res
1fd746301b3ef10a96f78832cebb0c79c9327f1c
[ "MIT" ]
null
null
null
ml/ex2/ex2_reg.py
dpopadic/ml-res
1fd746301b3ef10a96f78832cebb0c79c9327f1c
[ "MIT" ]
1
2021-12-21T07:58:21.000Z
2021-12-21T07:58:21.000Z
# ------------- Machine Learning - Topic 2: Logistic Regression Multivariate ## Initialization import numpy as np from scipy.optimize import fmin, fmin_bfgs import os, sys sys.path.append(os.getcwd() + os.path.dirname('/ml/ex2/')) from helpers import sigmoid, costFunctionReg, predict, plotData, plotDecisionBoundary, m...
30.604167
97
0.714772
import numpy as np from scipy.optimize import fmin, fmin_bfgs import os, sys sys.path.append(os.getcwd() + os.path.dirname('/ml/ex2/')) from helpers import sigmoid, costFunctionReg, predict, plotData, plotDecisionBoundary, mapFeature data = np.loadtxt('ml/ex2/ex2data2.txt', delimiter=",") X = data[:, :2] y = data[:, ...
true
true
1c1158f866d673384c4e0fd03b9ffbac550ecf28
6,359
py
Python
ros/src/tl_detector/tl_detector.py
ahmhekal/Final_Project
7d2137841c99239fe389754634c2185d9767a81f
[ "MIT" ]
null
null
null
ros/src/tl_detector/tl_detector.py
ahmhekal/Final_Project
7d2137841c99239fe389754634c2185d9767a81f
[ "MIT" ]
null
null
null
ros/src/tl_detector/tl_detector.py
ahmhekal/Final_Project
7d2137841c99239fe389754634c2185d9767a81f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLCla...
36.97093
132
0.63359
import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLClassifier import tf impo...
true
true
1c11594df3ad2612dd8746bb8785d86390b69937
9,774
py
Python
tensorflow/contrib/distributions/python/ops/mvn_diag_plus_low_rank.py
shanest/tensorflow
8e8a8a574020227889b08778f57bfe004d2d5ff5
[ "Apache-2.0" ]
2
2018-05-28T05:03:30.000Z
2020-06-01T22:27:45.000Z
tensorflow/contrib/distributions/python/ops/mvn_diag_plus_low_rank.py
caelean/tensorflow
dcb10b1d557168646204239bea6ca5bf1abc40a3
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/distributions/python/ops/mvn_diag_plus_low_rank.py
caelean/tensorflow
dcb10b1d557168646204239bea6ca5bf1abc40a3
[ "Apache-2.0" ]
1
2021-11-16T19:59:48.000Z
2021-11-16T19:59:48.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.179688
88
0.629323
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib import linalg from tensorflow.contrib.distributions.python.ops import distribution_util from tensorflow.contrib.distributions.python.ops import mvn_linear_operator as mvn_linop from ten...
true
true
1c11597101d0a5cd691f93fec2ea6559e7403139
2,910
py
Python
skfem/element/element.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from typing import Optional, Tuple, Union, List from numpy import ndarray OrderTuple = Union[Tuple[int, int], Tuple[int, int, int]] OrderOutput = Union[Tuple[ndarray, ndarray], Tuple[ndarray, ndarray, ndarray]] class Element(): """Finite element. At...
31.290323
79
0.580756
import numpy as np from typing import Optional, Tuple, Union, List from numpy import ndarray OrderTuple = Union[Tuple[int, int], Tuple[int, int, int]] OrderOutput = Union[Tuple[ndarray, ndarray], Tuple[ndarray, ndarray, ndarray]] class Element(): nodal_dofs: int = 0 f...
true
true
1c1159a0a2497e7a180327354c47351ca070d2d1
176
py
Python
Game_Mechanics.py
Finnder/Console-Based-Story-Game
fe5341faf82783880872560d43d286e917f5e3d7
[ "Apache-2.0" ]
null
null
null
Game_Mechanics.py
Finnder/Console-Based-Story-Game
fe5341faf82783880872560d43d286e917f5e3d7
[ "Apache-2.0" ]
null
null
null
Game_Mechanics.py
Finnder/Console-Based-Story-Game
fe5341faf82783880872560d43d286e917f5e3d7
[ "Apache-2.0" ]
null
null
null
def attack(): pass def defend(): pass def pass_turn(): pass def use_ability_One(kit): pass def use_ability_Two(kit): pass def end_Of_Battle(): pass
10.352941
25
0.636364
def attack(): pass def defend(): pass def pass_turn(): pass def use_ability_One(kit): pass def use_ability_Two(kit): pass def end_Of_Battle(): pass
true
true
1c115a689e25e47bf2fc6a395f97bb0edecb6c64
4,270
py
Python
benchmark/startQiskit_noisy2782.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2782.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2782.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=40 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
35
140
0.655269
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 impo...
true
true
1c115b97f0038547d7e95de4861ee385131f6e9d
2,645
py
Python
algorithms.py
ly0va/rainbow-sorting
970b7577c1ab45fc11457cb698c942aa3177250d
[ "MIT" ]
null
null
null
algorithms.py
ly0va/rainbow-sorting
970b7577c1ab45fc11457cb698c942aa3177250d
[ "MIT" ]
null
null
null
algorithms.py
ly0va/rainbow-sorting
970b7577c1ab45fc11457cb698c942aa3177250d
[ "MIT" ]
null
null
null
n = 105 step = 1 scl = 6 time = 0.02 def cshell(a): dlist = (301, 132, 57, 23, 10, 4, 1) #dlist = (255, 127, 63, 31, 15, 7, 3, 1) for d in dlist: for i in range(n): j = i while j >= d and a[j] < a[j-d]: a[j], a[j-d] = a[j-d], a[j] j -= d ...
24.490741
51
0.370888
n = 105 step = 1 scl = 6 time = 0.02 def cshell(a): dlist = (301, 132, 57, 23, 10, 4, 1) for d in dlist: for i in range(n): j = i while j >= d and a[j] < a[j-d]: a[j], a[j-d] = a[j-d], a[j] j -= d yield True yield False de...
true
true
1c115bf5fed2c5d3943d27e1921b9dfcfb13495f
2,619
py
Python
autodecrypt/ipsw_dl.py
timonline/autodecrypt
f7932298533189e3eada6404109e67718e4c5796
[ "MIT" ]
87
2019-02-16T18:23:15.000Z
2022-03-31T20:27:59.000Z
autodecrypt/ipsw_dl.py
timonline/autodecrypt
f7932298533189e3eada6404109e67718e4c5796
[ "MIT" ]
8
2019-04-18T08:53:35.000Z
2021-08-11T10:40:33.000Z
autodecrypt/ipsw_dl.py
timonline/autodecrypt
f7932298533189e3eada6404109e67718e4c5796
[ "MIT" ]
32
2019-10-21T08:17:21.000Z
2022-01-11T17:55:29.000Z
import sys import os import shutil import requests import json from urllib.request import urlopen import zipfile from clint.textui import progress def dl(url, filename, sizeofile=0): """download IPSW file""" if sizeofile == 0: dl_file = urlopen(url) with open(filename,'wb') as output: ...
32.7375
113
0.528446
import sys import os import shutil import requests import json from urllib.request import urlopen import zipfile from clint.textui import progress def dl(url, filename, sizeofile=0): if sizeofile == 0: dl_file = urlopen(url) with open(filename,'wb') as output: output.write(dl_file.read...
true
true
1c115c528ac33ea0403f603f7c410682edf711bc
6,848
py
Python
vendor/Catch2/scripts/releaseCommon.py
mumairsadiq/celerity_uibk
288794c39c08026625907c92185c717ee6d14f2a
[ "MIT" ]
null
null
null
vendor/Catch2/scripts/releaseCommon.py
mumairsadiq/celerity_uibk
288794c39c08026625907c92185c717ee6d14f2a
[ "MIT" ]
null
null
null
vendor/Catch2/scripts/releaseCommon.py
mumairsadiq/celerity_uibk
288794c39c08026625907c92185c717ee6d14f2a
[ "MIT" ]
null
null
null
from __future__ import print_function import os import sys import re import string import glob import fnmatch from scriptCommon import catchPath versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' ) rootPath = os.path.join( catchPath, 'inc...
40.52071
186
0.636244
from __future__ import print_function import os import sys import re import string import glob import fnmatch from scriptCommon import catchPath versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' ) rootPath = os.path.join( catchPath, 'inc...
true
true
1c115cba1ef19b4c97a7eebd86e93ef7c8f5be9d
56,478
py
Python
tests/e2e/redis/basic-ingest-redis-serving.py
fossabot/feast
0c0b50927ce023315e25edba16b0f573431ef2d8
[ "Apache-2.0" ]
null
null
null
tests/e2e/redis/basic-ingest-redis-serving.py
fossabot/feast
0c0b50927ce023315e25edba16b0f573431ef2d8
[ "Apache-2.0" ]
6
2020-10-26T17:50:33.000Z
2022-02-10T02:01:28.000Z
tests/e2e/redis/basic-ingest-redis-serving.py
fossabot/feast
0c0b50927ce023315e25edba16b0f573431ef2d8
[ "Apache-2.0" ]
1
2022-01-08T12:05:29.000Z
2022-01-08T12:05:29.000Z
import math import os import random import tempfile import time import uuid from copy import copy from datetime import datetime, timedelta import grpc import numpy as np import pandas as pd import pytest import pytz from google.protobuf.duration_pb2 import Duration from feast.client import Client from feast.config im...
36.111253
112
0.652909
import math import os import random import tempfile import time import uuid from copy import copy from datetime import datetime, timedelta import grpc import numpy as np import pandas as pd import pytest import pytz from google.protobuf.duration_pb2 import Duration from feast.client import Client from feast.config im...
true
true
1c115df94ec32fd5e4ecab0634e7616708300fa4
1,238
py
Python
argostranslatefiles/formats/openxml/pptx.py
PJ-Finlay/argos-translate-files
0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d
[ "MIT" ]
5
2021-11-08T18:50:27.000Z
2022-03-28T14:12:19.000Z
argostranslatefiles/formats/openxml/pptx.py
PJ-Finlay/argos-translate-files
0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d
[ "MIT" ]
1
2021-12-26T08:13:48.000Z
2021-12-26T13:33:47.000Z
argostranslatefiles/formats/openxml/pptx.py
PJ-Finlay/argos-translate-files
0753eccfbbc6d9d88ecabe6eddc4d39ac4c39e2d
[ "MIT" ]
2
2021-11-08T18:50:38.000Z
2021-12-25T20:52:28.000Z
import re import zipfile from argostranslate.tags import translate_tags from argostranslate.translate import ITranslation from bs4 import BeautifulSoup from argostranslatefiles.formats.abstract_xml import AbstractXml class Pptx(AbstractXml): supported_file_extensions = ['.pptx'] def translate(self, underly...
33.459459
82
0.657512
import re import zipfile from argostranslate.tags import translate_tags from argostranslate.translate import ITranslation from bs4 import BeautifulSoup from argostranslatefiles.formats.abstract_xml import AbstractXml class Pptx(AbstractXml): supported_file_extensions = ['.pptx'] def translate(self, underly...
true
true
1c115ea87206266a3b0ae7c6bf573b2462b6800a
3,091
py
Python
src/vatic_checker/handler.py
jonkeane/vatic-checker
fa8aec6946dcfd3f466b62f9c00d81bc43514b22
[ "MIT" ]
null
null
null
src/vatic_checker/handler.py
jonkeane/vatic-checker
fa8aec6946dcfd3f466b62f9c00d81bc43514b22
[ "MIT" ]
null
null
null
src/vatic_checker/handler.py
jonkeane/vatic-checker
fa8aec6946dcfd3f466b62f9c00d81bc43514b22
[ "MIT" ]
null
null
null
""" A lightweight server framework. To use this module, import the 'application' function, which will dispatch requests based on handlers. To define a handler, decorate a function with the 'handler' decorator. Example: >>> from hanlder import handler, application ... @handler ... def spam(): ... return True """ ...
28.62037
84
0.607894
import json from database import session handlers = {} import logging logger = logging.getLogger("vatic.server") try: from wsgilog import log as wsgilog except ImportError: def wsgilog(*args, **kwargs): return lambda x: x def handler(type = "json", jsonify = None, post = False, environ = False): ...
true
true
1c115f1dab40a4851c52f90948d0b4b1bf15b696
7,534
py
Python
src/ach.py
QuVil/mon-bot-le-dj
e9320fc19b1665dbb023c5eac015a208ba612750
[ "MIT" ]
5
2020-06-25T17:12:53.000Z
2020-07-22T16:03:19.000Z
src/ach.py
QuVil/mon-bot-le-dj
e9320fc19b1665dbb023c5eac015a208ba612750
[ "MIT" ]
3
2020-06-29T22:24:32.000Z
2020-08-30T10:45:44.000Z
src/ach.py
QuVil/mon-bot-le-dj
e9320fc19b1665dbb023c5eac015a208ba612750
[ "MIT" ]
null
null
null
import time import pandas as pd import numpy as np from googleapiclient.discovery import build from google.oauth2.service_account import Credentials from src.util import create_cache_dir, cache CREDENTIALS_PATH_GOOGLE = 'google-credentials.json' SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] SPREADSHEET =...
37.482587
74
0.560924
import time import pandas as pd import numpy as np from googleapiclient.discovery import build from google.oauth2.service_account import Credentials from src.util import create_cache_dir, cache CREDENTIALS_PATH_GOOGLE = 'google-credentials.json' SCOPES = ['https://www.googleapis.com/auth/spreadsheets'] SPREADSHEET =...
true
true
1c115f5cfde9ea874a34cabe368471dd2e1d7fd0
2,011
py
Python
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/SetDefaultAITemplateRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/SetDefaultAITemplateRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vod/aliyunsdkvod/request/v20170321/SetDefaultAITemplateRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.563636
78
0.775733
from aliyunsdkcore.request import RpcRequest from aliyunsdkvod.endpoint import endpoint_data class SetDefaultAITemplateRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'vod', '2017-03-21', 'SetDefaultAITemplate','vod') if hasattr(self, "endpoint_map"): setattr(self, "endpoint_map", endpoint...
true
true
1c1161d5d11daedeed19cb3c701ca066da0b528d
6,247
py
Python
local_tests/test_models.py
fighting41love/TextAttack
24e48f0022dc3a7bdcd5cbb3430f1c72cfcb522d
[ "MIT" ]
2
2020-07-08T08:55:37.000Z
2020-09-03T00:57:38.000Z
local_tests/test_models.py
fighting41love/TextAttack
24e48f0022dc3a7bdcd5cbb3430f1c72cfcb522d
[ "MIT" ]
null
null
null
local_tests/test_models.py
fighting41love/TextAttack
24e48f0022dc3a7bdcd5cbb3430f1c72cfcb522d
[ "MIT" ]
null
null
null
import colored import io import os import re import shlex import signal import sys import subprocess import traceback def color_text(s, color): return colored.stylize(s, colored.fg(color)) stderr_file_name = 'err.out' MAGIC_STRING = '/.*/' def compare_output_equivalence(desired_output, test_output): """ ...
36.532164
116
0.616616
import colored import io import os import re import shlex import signal import sys import subprocess import traceback def color_text(s, color): return colored.stylize(s, colored.fg(color)) stderr_file_name = 'err.out' MAGIC_STRING = '/.*/' def compare_output_equivalence(desired_output, test_output): outp...
true
true
1c1162a9ed281a92281d92ea07c590ea540e102b
15,810
py
Python
utils/rgbds_simulator.py
tynguyen/sound-spaces
b196f3a36b4076752400cbf186e9cf2e160cc3c2
[ "CC-BY-4.0" ]
null
null
null
utils/rgbds_simulator.py
tynguyen/sound-spaces
b196f3a36b4076752400cbf186e9cf2e160cc3c2
[ "CC-BY-4.0" ]
null
null
null
utils/rgbds_simulator.py
tynguyen/sound-spaces
b196f3a36b4076752400cbf186e9cf2e160cc3c2
[ "CC-BY-4.0" ]
null
null
null
import os import collections import numpy as np import open3d as o3d from typing import Dict, Any, List, Optional from soundspaces.simulator import SoundSpacesSim from habitat.core.simulator import ( AgentState, Config, Observations, SensorSuite, ShortestPathPoint, Simulator, ) from habitat_sim....
40.434783
128
0.596331
import os import collections import numpy as np import open3d as o3d from typing import Dict, Any, List, Optional from soundspaces.simulator import SoundSpacesSim from habitat.core.simulator import ( AgentState, Config, Observations, SensorSuite, ShortestPathPoint, Simulator, ) from habitat_sim....
true
true
1c11635cb6331c11b51548ad8c894114131c8178
10,706
py
Python
tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/win_network.py
codebergau/salt-formula-odoo9
c619a401505dec3df469e9f9a8f27026f444a660
[ "Apache-2.0" ]
2
2015-09-21T14:13:30.000Z
2016-02-12T11:33:46.000Z
tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/win_network.py
codebergau/salt-formula-odoo9
c619a401505dec3df469e9f9a8f27026f444a660
[ "Apache-2.0" ]
null
null
null
tests/build/virtualenv/lib/python2.7/site-packages/salt/modules/win_network.py
codebergau/salt-formula-odoo9
c619a401505dec3df469e9f9a8f27026f444a660
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Module for gathering and managing network information ''' from __future__ import absolute_import # Import salt libs import salt.utils import hashlib import datetime import socket import salt.utils.network import salt.utils.validate.net try: import salt.utils.winapi HAS_DEPENDENCIES...
25.735577
93
0.570334
from __future__ import absolute_import import salt.utils import hashlib import datetime import socket import salt.utils.network import salt.utils.validate.net try: import salt.utils.winapi HAS_DEPENDENCIES = True except ImportError: HAS_DEPENDENCIES = False try: import wmi except ImportError: HA...
true
true
1c116541047b5e29a8a4aae9402678541c05c10c
2,618
py
Python
backend/api/migrations/0001_initial.py
kaplanPRO/kaplan-desktop
e2c3d2db0e4a2e3778026b93b7ff7119e8c34358
[ "MIT" ]
11
2020-10-08T17:37:34.000Z
2022-02-19T21:20:07.000Z
backend/api/migrations/0001_initial.py
kaplanPRO/kaplan-desktop
e2c3d2db0e4a2e3778026b93b7ff7119e8c34358
[ "MIT" ]
null
null
null
backend/api/migrations/0001_initial.py
kaplanPRO/kaplan-desktop
e2c3d2db0e4a2e3778026b93b7ff7119e8c34358
[ "MIT" ]
null
null
null
# Generated by Django 2.2.19 on 2021-03-07 11:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='KaplanDatabase', fields=[...
43.633333
117
0.570665
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='KaplanDatabase', fields=[ ('id', models.AutoField(auto_cre...
true
true
1c11654f1dc9d3822a3ee179f3160e65e1f7a95e
3,690
py
Python
tests/algorithms/test_algorithm_registry.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
tests/algorithms/test_algorithm_registry.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
tests/algorithms/test_algorithm_registry.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. import dataclasses import pytest from composer.algorithms import (AlgorithmHparams, AlibiHparams, AugMixHparams, BlurPoolHparams, ChannelsLastHparams, ColOutHparams, CutMixHparams, CutOutHparams, DummyHparams, GhostBatchNormHparams, ...
29.055118
117
0.604878
import dataclasses import pytest from composer.algorithms import (AlgorithmHparams, AlibiHparams, AugMixHparams, BlurPoolHparams, ChannelsLastHparams, ColOutHparams, CutMixHparams, CutOutHparams, DummyHparams, GhostBatchNormHparams, LabelSmoothingHpar...
true
true
1c1165f04f86f70bb8121ebe900a81f977a81355
24,588
py
Python
main.py
mt-hack/scratchboard
96e93d4aff2d5d4870085371135be76703d869ba
[ "MIT" ]
1
2022-01-21T09:50:33.000Z
2022-01-21T09:50:33.000Z
main.py
mt-hack/scratchboard
96e93d4aff2d5d4870085371135be76703d869ba
[ "MIT" ]
2
2019-08-01T13:54:31.000Z
2019-08-02T02:39:45.000Z
main.py
mt-hack/scratchboard
96e93d4aff2d5d4870085371135be76703d869ba
[ "MIT" ]
2
2019-08-01T06:02:50.000Z
2019-08-01T10:49:26.000Z
''' Showcase of Kivy Features ========================= This showcases many features of Kivy. You should see a menu bar across the top with a demonstration area below. The first demonstration is the accordion layout. You can see, but not edit, the kv language code for any screen by pressing the bug or 'show source' ic...
39.658065
224
0.540182
from time import time from kivy.app import App from os.path import dirname, join from kivy.lang import Builder from kivy.properties import NumericProperty, StringProperty, BooleanProperty,\ ListProperty from kivy.clock import Clock from kivy.animation import Animation from kivy.uix.boxlayout import BoxLayout from...
true
true
1c1166713f0d236efe41a90ec4979d2976dbe5d7
12,466
py
Python
PyCalc/gui/colorPicker.py
fborsani/PyCalc
50d9fcee641f86bc8215187c194fe96f9c922e0d
[ "MIT" ]
null
null
null
PyCalc/gui/colorPicker.py
fborsani/PyCalc
50d9fcee641f86bc8215187c194fe96f9c922e0d
[ "MIT" ]
null
null
null
PyCalc/gui/colorPicker.py
fborsani/PyCalc
50d9fcee641f86bc8215187c194fe96f9c922e0d
[ "MIT" ]
null
null
null
import re from PyQt5 import QtCore, QtGui, QtWidgets COLOR_RE = re.compile(r'(#[0-9a-fA-F]{3})([0-9a-fA-F]{3})?') COLOR_NAMES = QtGui.QColor.colorNames() class QColorValidator(QtGui.QValidator): def __init__(self, parent=None): super().__init__(parent) def validate(self, text, pos): portion ...
36.028902
85
0.614552
import re from PyQt5 import QtCore, QtGui, QtWidgets COLOR_RE = re.compile(r'(#[0-9a-fA-F]{3})([0-9a-fA-F]{3})?') COLOR_NAMES = QtGui.QColor.colorNames() class QColorValidator(QtGui.QValidator): def __init__(self, parent=None): super().__init__(parent) def validate(self, text, pos): portion ...
true
true
1c1166ff6a3e4c18665f05d1beca5c764b5fda93
3,368
py
Python
AIY/voice/cloudspeech_demo.py
Pougnator/Prometheus
d7c59f3a97b4f60958f130741ccc16b81d65f505
[ "Apache-2.0" ]
null
null
null
AIY/voice/cloudspeech_demo.py
Pougnator/Prometheus
d7c59f3a97b4f60958f130741ccc16b81d65f505
[ "Apache-2.0" ]
null
null
null
AIY/voice/cloudspeech_demo.py
Pougnator/Prometheus
d7c59f3a97b4f60958f130741ccc16b81d65f505
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2017 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...
37.010989
94
0.58462
import aiy.audio import aiy.cloudspeech import aiy.voicehat import aiy.i18n import aiy.audio CONFIRM_SOUND_PATH = '/home/pi/Music/R2D2/R2_Understood.wav' CONFUSED_SOUND_PATH = '/home/pi/Music/R2D2/R2_Confused.wav' UNRECOGNISED_SOUND_PATH = '/home/pi/Music/R2D2/R2_FastBip.wav' def main(): status_ui = aiy.voice...
true
true
1c11672e2032493dfaa240ce2dbe999076923d6e
127
py
Python
6.py
lorenaEscobar0014/TALLER-REPETITIVO
45da0b30fd5f45e98c9d8592a8f9ab852380c1f1
[ "MIT" ]
null
null
null
6.py
lorenaEscobar0014/TALLER-REPETITIVO
45da0b30fd5f45e98c9d8592a8f9ab852380c1f1
[ "MIT" ]
null
null
null
6.py
lorenaEscobar0014/TALLER-REPETITIVO
45da0b30fd5f45e98c9d8592a8f9ab852380c1f1
[ "MIT" ]
null
null
null
a=int(input("Dividendo: ")) b=int(input("Divisor: ")) if a>0 and b>0: c=0 r=a while(r>=b): r=r-b c=c+1 print(c)
14.111111
27
0.519685
a=int(input("Dividendo: ")) b=int(input("Divisor: ")) if a>0 and b>0: c=0 r=a while(r>=b): r=r-b c=c+1 print(c)
true
true
1c116857402d7d0e0c2b8f373e9cd5c48a6a49ae
14,703
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_log_analytics_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_log_analytics_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_log_analytics_operations.py
mohamedshabanofficial/azure-sdk-for-python
81c585f310cd2ec23d2ad145173958914a075a58
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.771127
211
0.686459
from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import Asyn...
true
true
1c116936579c6b2be71b7595d3511d2ec3a09386
1,125
py
Python
src/utils/read_shapefiles/read_files_2.py
G-Simeone/Learning_Tuscany_Tourism_Flows
824772eafb353bfd08104ffc1cfb4fb48a8c9c45
[ "MIT" ]
3
2019-01-05T05:10:30.000Z
2022-02-20T01:07:38.000Z
src/utils/read_shapefiles/read_files_2.py
G-Simeone/Learning_Tuscany_Tourism_Flows
824772eafb353bfd08104ffc1cfb4fb48a8c9c45
[ "MIT" ]
null
null
null
src/utils/read_shapefiles/read_files_2.py
G-Simeone/Learning_Tuscany_Tourism_Flows
824772eafb353bfd08104ffc1cfb4fb48a8c9c45
[ "MIT" ]
2
2019-02-26T20:38:05.000Z
2021-06-29T11:36:02.000Z
# coding: utf-8 # Read shapefiles as a geopandas dataframe # Created by: Qiwei Han # Last updated: 06.08.2018. import pandas as pd import geopandas as gpd def read_shapefile_data(path,file_name, version): """ Reads in a json file containing the path to shapefiles, on regional, province and municipality l...
26.785714
94
0.698667
import pandas as pd import geopandas as gpd def read_shapefile_data(path,file_name, version): import json d = json.load(open(path+file_name)) path_shapefiles = d['path_shapefiles'] version=d[version] return path_shapefiles, version def read_shapefiles_in(path_to_shapefile, file_name, ver...
true
true
1c116a20a2b506e25a59bea28725a83dbbe21c15
1,646
py
Python
CSVPlotter.py
3arii/WeWalkSignalAnalysis
b988775e39b5cf3ff60594b091fa59be3dffd8a3
[ "MIT" ]
null
null
null
CSVPlotter.py
3arii/WeWalkSignalAnalysis
b988775e39b5cf3ff60594b091fa59be3dffd8a3
[ "MIT" ]
null
null
null
CSVPlotter.py
3arii/WeWalkSignalAnalysis
b988775e39b5cf3ff60594b091fa59be3dffd8a3
[ "MIT" ]
null
null
null
#TODO: Read a single row from the OrientationDataGood csv file # Create a list that is the length of the read row containing numbers. # Create a list that will contain the second list and the initial csv file but seperated with commas # Create a for loop that will print them seperately to another .c...
27.433333
106
0.712637
from matplotlib import pyplot as plt from matplotlib import style import numpy as np from data import data index_data = [] vertex_data = [] final_data = [] vertex_string = "" data = data[0].split(",") def get_len_list(data_list): for num in range(len(data_list)): index_data.append(num) ...
true
true
1c116aa48a49a922ebab7f5676adb42f4aeb2a71
4,481
py
Python
11scikit-learn/text_cluster/sklearn_cluster.py
cheerfulwang/python-tutorial
d0f7348e1da4ff954e3add66e1aae55d599283ee
[ "Apache-2.0" ]
2
2021-01-04T10:44:44.000Z
2022-02-13T07:53:41.000Z
11scikit-learn/text_cluster/sklearn_cluster.py
zm79287/python-tutorial
d0f7348e1da4ff954e3add66e1aae55d599283ee
[ "Apache-2.0" ]
null
null
null
11scikit-learn/text_cluster/sklearn_cluster.py
zm79287/python-tutorial
d0f7348e1da4ff954e3add66e1aae55d599283ee
[ "Apache-2.0" ]
2
2020-11-23T08:58:51.000Z
2022-02-13T07:53:42.000Z
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import os import pickle import jieba from sklearn.feature_extraction.text import TfidfVectorizer tfidf_filepath = 'tfidf.pkl' file_path = 'yl_10.txt' titles = [] with open(file_path, 'r', encoding='utf-8') as f: count = 0 for line...
30.482993
106
0.671279
import os import pickle import jieba from sklearn.feature_extraction.text import TfidfVectorizer tfidf_filepath = 'tfidf.pkl' file_path = 'yl_10.txt' titles = [] with open(file_path, 'r', encoding='utf-8') as f: count = 0 for line in f: line = line.strip() cols = line.split('\t') useri...
true
true
1c116abd7fc0bf778ef44009315cf679d049a73b
820
py
Python
xor_encrypt_file.py
nshadov/xor_key_recovery
bf04b492feb8d517f850cd2200a0549261c821b2
[ "MIT" ]
6
2017-06-06T12:50:50.000Z
2020-06-15T07:17:08.000Z
xor_encrypt_file.py
nshadov/xor_key_recovery
bf04b492feb8d517f850cd2200a0549261c821b2
[ "MIT" ]
null
null
null
xor_encrypt_file.py
nshadov/xor_key_recovery
bf04b492feb8d517f850cd2200a0549261c821b2
[ "MIT" ]
1
2020-02-13T06:03:02.000Z
2020-02-13T06:03:02.000Z
#!/usr/bin/env python import sys from cryptolib import RollingKey, cryptolib as cl from itertools import izip from optparse import OptionParser parser = OptionParser() parser.add_option("-f", "--file", dest="input_filename", default="samples/binary_elf", help="Input file filename") parser.add_option("-o", "--output",...
32.8
128
0.732927
import sys from cryptolib import RollingKey, cryptolib as cl from itertools import izip from optparse import OptionParser parser = OptionParser() parser.add_option("-f", "--file", dest="input_filename", default="samples/binary_elf", help="Input file filename") parser.add_option("-o", "--output", dest="output_filename...
true
true
1c116ad7034d243b8ecb71a59b28d19e3039706f
595
py
Python
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/fixtures/acceptancetestsazureparametergrouping/operations/__init__.py
ljhljh235/AutoRest
b9ab4000e9b93d16925db84d08bafc225b098f8e
[ "MIT" ]
3
2018-03-20T22:36:32.000Z
2021-07-15T02:36:51.000Z
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/fixtures/acceptancetestsazureparametergrouping/operations/__init__.py
ljhljh235/AutoRest
b9ab4000e9b93d16925db84d08bafc225b098f8e
[ "MIT" ]
null
null
null
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/fixtures/acceptancetestsazureparametergrouping/operations/__init__.py
ljhljh235/AutoRest
b9ab4000e9b93d16925db84d08bafc225b098f8e
[ "MIT" ]
1
2019-07-20T12:20:03.000Z
2019-07-20T12:20:03.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35
76
0.581513
from .parameter_grouping_operations import ParameterGroupingOperations __all__ = [ 'ParameterGroupingOperations', ]
true
true
1c116b61ef6c6d2c37b27abd8ddf078cad35737b
3,369
py
Python
flask_saml2/sp/views.py
SvyatoslavArtymovych/flask-saml2
ad356da83013692dadf10788dda87b64a824327c
[ "MIT" ]
61
2018-12-19T11:15:52.000Z
2021-09-18T17:17:04.000Z
flask_saml2/sp/views.py
SvyatoslavArtymovych/flask-saml2
ad356da83013692dadf10788dda87b64a824327c
[ "MIT" ]
22
2019-05-28T16:31:16.000Z
2021-06-08T13:02:51.000Z
flask_saml2/sp/views.py
SvyatoslavArtymovych/flask-saml2
ad356da83013692dadf10788dda87b64a824327c
[ "MIT" ]
36
2019-03-22T11:23:54.000Z
2021-09-20T21:21:20.000Z
import logging from flask import Response, make_response, redirect, request, url_for from flask.views import MethodView, View from flask_saml2.exceptions import CannotHandleAssertion, UserNotAuthorized from . import sp logger = logging.getLogger(__name__) class SAML2ViewMixin: def __init__(self, *, sp: 'sp.Se...
29.814159
96
0.664886
import logging from flask import Response, make_response, redirect, request, url_for from flask.views import MethodView, View from flask_saml2.exceptions import CannotHandleAssertion, UserNotAuthorized from . import sp logger = logging.getLogger(__name__) class SAML2ViewMixin: def __init__(self, *, sp: 'sp.Se...
true
true
1c116b7b85642b0ee860c4afe6f55f3d590d9f5a
4,373
py
Python
Packs/QRadar/Scripts/QRadarGetCorrelationLogs/QRadarGetCorrelationLogs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/QRadar/Scripts/QRadarGetCorrelationLogs/QRadarGetCorrelationLogs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/QRadar/Scripts/QRadarGetCorrelationLogs/QRadarGetCorrelationLogs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * def get_query(cre_name_null): if cre_name_null == "True": query = "select RULENAME({0}), sourceip, destinationip, eventcount, sourceport, " \ "username, starttime, destinationport, magnitude, identityip, CATEGORYNAME(category),...
40.869159
110
0.588383
import demistomock as demisto from CommonServerPython import * def get_query(cre_name_null): if cre_name_null == "True": query = "select RULENAME({0}), sourceip, destinationip, eventcount, sourceport, " \ "username, starttime, destinationport, magnitude, identityip, CATEGORYNAME(category),...
true
true
1c116bf6969be8f62546d918a9b83c35a9bbeb8b
6,109
py
Python
grr/client/grr_response_client/client_actions/file_finder_utils/uploading_test.py
jaegeral/grr
1f6bcd901fbebf386988a80fc6cb4034cbedfde9
[ "Apache-2.0" ]
1
2021-01-25T00:55:20.000Z
2021-01-25T00:55:20.000Z
grr/client/grr_response_client/client_actions/file_finder_utils/uploading_test.py
jkirby2423/grr
e0a5ab89a6a9dce3812fcbe930df34488ed90613
[ "Apache-2.0" ]
null
null
null
grr/client/grr_response_client/client_actions/file_finder_utils/uploading_test.py
jkirby2423/grr
e0a5ab89a6a9dce3812fcbe930df34488ed90613
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Lint as: python3 from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections import hashlib import io from unittest import mock import zlib from absl.testing import absltest from grr_response_client.client_actions.file_find...
36.363095
101
0.718284
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections import hashlib import io from unittest import mock import zlib from absl.testing import absltest from grr_response_client.client_actions.file_finder_utils import uploading from grr_respon...
true
true
1c116ca282fd3e6c4578afc1271d124ee0dee384
30,874
py
Python
src/livestreamer_cli/main.py
jaccarmac/livestreamer
ab80dbd6560f6f9835865b2fc9f9c6015aee5658
[ "BSD-2-Clause", "MIT" ]
3,614
2015-01-01T08:07:27.000Z
2022-03-20T00:31:07.000Z
src/livestreamer_cli/main.py
kviktor/livestreamer
ab80dbd6560f6f9835865b2fc9f9c6015aee5658
[ "BSD-2-Clause", "MIT" ]
1,028
2015-01-02T03:38:38.000Z
2021-08-06T16:17:48.000Z
src/livestreamer_cli/main.py
kviktor/livestreamer
ab80dbd6560f6f9835865b2fc9f9c6015aee5658
[ "BSD-2-Clause", "MIT" ]
795
2015-01-02T06:12:04.000Z
2022-03-27T23:41:53.000Z
import errno import os import requests import sys import signal import webbrowser from contextlib import closing from distutils.version import StrictVersion from functools import partial from itertools import chain from time import sleep from livestreamer import (Livestreamer, StreamError, PluginError, ...
33.449621
90
0.618708
import errno import os import requests import sys import signal import webbrowser from contextlib import closing from distutils.version import StrictVersion from functools import partial from itertools import chain from time import sleep from livestreamer import (Livestreamer, StreamError, PluginError, ...
true
true
1c116d30e52339ce87484e5a6bc8dc260a106269
10,745
py
Python
modules/ravestate_ros1/ros1_properties.py
Roboy/diact
45a1e90ca25f1d7de58fa1c7414dc78d9f426ccf
[ "BSD-3-Clause" ]
28
2018-11-25T01:02:06.000Z
2021-08-03T19:41:49.000Z
modules/ravestate_ros1/ros1_properties.py
Roboy/diact
45a1e90ca25f1d7de58fa1c7414dc78d9f426ccf
[ "BSD-3-Clause" ]
122
2018-11-05T02:44:38.000Z
2020-12-04T12:13:52.000Z
modules/ravestate_ros1/ros1_properties.py
Roboy/diact
45a1e90ca25f1d7de58fa1c7414dc78d9f426ccf
[ "BSD-3-Clause" ]
6
2018-11-05T20:51:45.000Z
2022-03-18T23:37:45.000Z
from typing import Dict import ravestate as rs from reggol import get_logger logger = get_logger(__name__) ROS1_AVAILABLE = True try: import rospy except ImportError: logger.error("Could not import rospy. Please make sure to have ROS1 installed.") ROS1_AVAILABLE = False NODE_NAME_CONFIG_KEY = "ros1-nod...
34.773463
119
0.602978
from typing import Dict import ravestate as rs from reggol import get_logger logger = get_logger(__name__) ROS1_AVAILABLE = True try: import rospy except ImportError: logger.error("Could not import rospy. Please make sure to have ROS1 installed.") ROS1_AVAILABLE = False NODE_NAME_CONFIG_KEY = "ros1-nod...
true
true
1c116d41ee03b96f06e433d0771a8660b7a3749c
5,276
py
Python
src/test-tools/recreate-expressions-and-test-cases.py
vuonglab/clc
130cb69636bed60b767e57fda1f7ef6f03aec6ea
[ "MIT" ]
null
null
null
src/test-tools/recreate-expressions-and-test-cases.py
vuonglab/clc
130cb69636bed60b767e57fda1f7ef6f03aec6ea
[ "MIT" ]
null
null
null
src/test-tools/recreate-expressions-and-test-cases.py
vuonglab/clc
130cb69636bed60b767e57fda1f7ef6f03aec6ea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ This Python script reads in a shell script containing the generated expressions (and other test cases). It then writes the generated expression test cases to a separate file ending in .tests and the expressions themselves to another file. The files will be created in the same directory as th...
34.03871
79
0.665845
import re import os import sys def main(): test_script_filename = get_test_script_filename_from_command_line() test_script_path = os.path.dirname(test_script_filename) lines = read_in_all_lines(test_script_filename) functions_dict = find_all_functions(lines) gen_expr_functions = get_gen_expr_f...
true
true
1c116dba8d8f587106fe9282a818b00a56c2b23c
563
py
Python
3-bof-control-eip.py
ab7ung/buffer-overflow
7286b9097da2d893d7d43a244f964fa63422f685
[ "MIT" ]
null
null
null
3-bof-control-eip.py
ab7ung/buffer-overflow
7286b9097da2d893d7d43a244f964fa63422f685
[ "MIT" ]
null
null
null
3-bof-control-eip.py
ab7ung/buffer-overflow
7286b9097da2d893d7d43a244f964fa63422f685
[ "MIT" ]
null
null
null
#!/usr/bin/python import socket import time import sys #Third step: take the offset values and use in filler, to verify try: filler = "A" * 2003 #change the size retn = "BBBB" offset = "CCCC" buffer = filler + retn + offset inputBuffer = "START OVERFLOW" + buffer + "\r\n" print "Sending evil buffer with ...
18.16129
64
0.678508
import socket import time import sys try: filler = "A" * 2003 retn = "BBBB" offset = "CCCC" buffer = filler + retn + offset inputBuffer = "START OVERFLOW" + buffer + "\r\n" print "Sending evil buffer with %s bytes\n" % len(inputBuffer) s = socket.socket (socket.AF_INET, socket.SOCK_STREAM) s.connec...
false
true
1c116e72420744a2edbf8bc87363e9a8ec98f461
5,917
py
Python
tests/test_mapping.py
rileyhazard/smartva-dhis2
04a6326bbffb4050c3af33a66b2c183af33c7069
[ "MIT" ]
3
2018-06-14T03:30:12.000Z
2018-07-23T06:39:20.000Z
tests/test_mapping.py
rileyhazard/smartva-dhis2
04a6326bbffb4050c3af33a66b2c183af33c7069
[ "MIT" ]
17
2018-04-23T12:48:32.000Z
2018-12-10T18:14:09.000Z
tests/test_mapping.py
rileyhazard/smartva-dhis2
04a6326bbffb4050c3af33a66b2c183af33c7069
[ "MIT" ]
6
2018-05-09T03:51:20.000Z
2020-11-10T08:24:53.000Z
import csv import os import json import re from smartvadhis2.core.config import Config from smartvadhis2.core.mapping import ( Mapping, CauseOfDeath, Sex, AgeCategory, Icd10, cause_of_death_option_code ) def test_dhis_uid_unique(): prop = [mapping.dhis_uid for mapping in Mapping.propertie...
37.929487
113
0.654386
import csv import os import json import re from smartvadhis2.core.config import Config from smartvadhis2.core.mapping import ( Mapping, CauseOfDeath, Sex, AgeCategory, Icd10, cause_of_death_option_code ) def test_dhis_uid_unique(): prop = [mapping.dhis_uid for mapping in Mapping.propertie...
true
true
1c117256a390a22dcc637047c032c8238e7d1043
1,421
py
Python
src/parser/utils.py
Ashwin1934/eva
53c1172a0f8a7409cf0ef97efea957979a8290a0
[ "Apache-2.0" ]
1
2019-12-08T03:48:44.000Z
2019-12-08T03:48:44.000Z
src/parser/utils.py
Ashwin1934/eva
53c1172a0f8a7409cf0ef97efea957979a8290a0
[ "Apache-2.0" ]
null
null
null
src/parser/utils.py
Ashwin1934/eva
53c1172a0f8a7409cf0ef97efea957979a8290a0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018-2020 EVA # # 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 ...
35.525
74
0.738916
from src.parser.types import ParserColumnDataType from src.catalog.column_type import ColumnType def xform_parser_column_type_to_catalog_type( col_type: ParserColumnDataType) -> ColumnType: if col_type == ParserColumnDataType.BOOLEAN: return ColumnType.BOOLEAN elif col_type == ParserColumnDat...
true
true
1c11729875d204b72031e9e94cfa1b118e0cc1af
2,726
py
Python
helo/_helper.py
at7h/trod
5167abeb69f5d72ccf81b719cc94bab1b509b1ed
[ "MIT" ]
13
2019-11-12T05:17:58.000Z
2020-03-23T04:42:40.000Z
helo/_helper.py
acthse/Trod
5167abeb69f5d72ccf81b719cc94bab1b509b1ed
[ "MIT" ]
1
2020-10-04T16:20:21.000Z
2020-10-04T16:20:21.000Z
helo/_helper.py
acthse/Trod
5167abeb69f5d72ccf81b719cc94bab1b509b1ed
[ "MIT" ]
3
2019-11-12T05:22:34.000Z
2020-03-19T06:47:19.000Z
import re import struct import socket from datetime import datetime from typing import Any, Optional, List, Union, Callable, Type def with_metaclass(meta: Type, *bases: Type) -> Type: class MetaClass(type): def __new__(cls, name, _this_bases, attrs): return meta(name, bases, attrs) retu...
24.558559
88
0.537417
import re import struct import socket from datetime import datetime from typing import Any, Optional, List, Union, Callable, Type def with_metaclass(meta: Type, *bases: Type) -> Type: class MetaClass(type): def __new__(cls, name, _this_bases, attrs): return meta(name, bases, attrs) retu...
true
true
1c11736540d0e6ec36fa3a500b148e891a38dbaa
14,083
py
Python
userbot/modules/pmpermit.py
BL4CKID/uSeRBeGo
c4043c638bb898dd19b4615a67adf17bbf13dd4e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/pmpermit.py
BL4CKID/uSeRBeGo
c4043c638bb898dd19b4615a67adf17bbf13dd4e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/pmpermit.py
BL4CKID/uSeRBeGo
c4043c638bb898dd19b4615a67adf17bbf13dd4e
[ "Naumen", "Condor-1.1", "MS-PL" ]
5
2020-10-09T15:04:51.000Z
2021-01-03T02:38:31.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for keeping control who PM you. """ from sqlalchemy.exc import IntegrityError from telethon.tl.func...
35.384422
123
0.587801
from sqlalchemy.exc import IntegrityError from telethon.tl.functions.contacts import BlockRequest, UnblockRequest from telethon.tl.functions.messages import ReportSpamRequest from telethon.tl.types import User from userbot import ( BOTLOG, BOTLOG_CHATID, CMD_HELP, COUNT_PM, LASTMSG, LOGS, ...
true
true
1c1174e7e09a3dbcced87a18a678c32b600d06da
34,112
py
Python
ibis/expr/tests/test_value_exprs.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/expr/tests/test_value_exprs.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
ibis/expr/tests/test_value_exprs.py
tswast/ibis
2f6d47e4c33cefd7ea1d679bb1d9253c2245993b
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Cloudera 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...
26.587685
79
0.611339
import pytest import toolz import operator import numpy as np from functools import partial from collections import OrderedDict from operator import methodcaller from datetime import date, datetime, time from ibis import literal from ibis.compat import PY2 from ibis.common import IbisTypeError from ibis.tests.util i...
true
true