hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38c257461d9195d295432e49ffddef290286cf6e | 6,715 | py | Python | CFG_analyzer/Comparison_Gtruth.py | sujon335/AlgebraicDatatypeTaintTracker | f27941009f0a2546a0b3807a435fb9e2ba2714d0 | [
"Apache-2.0"
] | null | null | null | CFG_analyzer/Comparison_Gtruth.py | sujon335/AlgebraicDatatypeTaintTracker | f27941009f0a2546a0b3807a435fb9e2ba2714d0 | [
"Apache-2.0"
] | 2 | 2021-11-03T19:36:56.000Z | 2021-11-23T05:15:32.000Z | CFG_analyzer/Comparison_Gtruth.py | sujon335/AlgebraicDatatypeTaintTracker | f27941009f0a2546a0b3807a435fb9e2ba2714d0 | [
"Apache-2.0"
] | null | null | null | import csv
# fw=open('Flowdroid_comparison_with_amandroid_result.csv','w+')
# # fw.write('Appname'+','+'FirstOrderID'+','+'SecondOrderID'+','+'IDs'+','+'ThirdParty'+','+'Own')
# # fw.write('\n')
#
# fw.write('App'+','+'IMEI(FP)'+','+'IMEI(FN)'+','+'IMSI(FP)'+','+'IMSI(FN)'+','+'AndroidID(FP)'+','+'AndroidID(FN)'+','+'... | 26.752988 | 259 | 0.378555 |
edc88b95087c5c8e737aac19ad4bffca645edc84 | 21,337 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_availability_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_availability_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/aio/operations/_availability_sets_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 44.359667 | 241 | 0.668838 |
8e786a3ec23141a7f1bfd2fbe0f00b34a6846c88 | 2,531 | py | Python | time series regression/autocorelation, mov avg etc/tripleExponentialSmoothing.py | ashishpatel26/ML-DL-scripts | 25f930630f6e546955ad13863d6e728c8c702d43 | [
"Apache-2.0"
] | 2 | 2020-07-17T10:33:42.000Z | 2021-11-08T09:31:27.000Z | time series regression/autocorelation, mov avg etc/tripleExponentialSmoothing.py | ashishpatel26/ML-DL-scripts | 25f930630f6e546955ad13863d6e728c8c702d43 | [
"Apache-2.0"
] | null | null | null | time series regression/autocorelation, mov avg etc/tripleExponentialSmoothing.py | ashishpatel26/ML-DL-scripts | 25f930630f6e546955ad13863d6e728c8c702d43 | [
"Apache-2.0"
] | 1 | 2020-10-15T11:24:52.000Z | 2020-10-15T11:24:52.000Z | # Load modules
from __future__ import print_function
import os
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
#read the data from into a pandas.DataFrame
wisc_emp = pd.read_csv('datasets/wisconsin-employment-time-series.csv')
#Let's find out the shape of the DataFrame
print('Shape of the ... | 31.246914 | 98 | 0.658633 |
2546d27cdaf7fb66e5b7398eca573046b18c08f0 | 165 | py | Python | backend/ebook/models.py | cbh4ou/wikipediabook | 922acd1b5f6004b9ad334665803b87ae56ca556e | [
"MIT"
] | null | null | null | backend/ebook/models.py | cbh4ou/wikipediabook | 922acd1b5f6004b9ad334665803b87ae56ca556e | [
"MIT"
] | null | null | null | backend/ebook/models.py | cbh4ou/wikipediabook | 922acd1b5f6004b9ad334665803b87ae56ca556e | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.db import models
from django.utils.translation import ugettext_lazy as _
| 16.5 | 73 | 0.830303 |
a3cd8ae4a1296a747ac04cded2f9e832092eb74f | 9,764 | py | Python | example_menu.py | ever-qxl/- | e5b6bb67a9d6aaa0aaaa99c678073951b980c47f | [
"MIT"
] | 1 | 2019-09-29T12:08:57.000Z | 2019-09-29T12:08:57.000Z | example_menu.py | ever-qxl/- | e5b6bb67a9d6aaa0aaaa99c678073951b980c47f | [
"MIT"
] | null | null | null | example_menu.py | ever-qxl/- | e5b6bb67a9d6aaa0aaaa99c678073951b980c47f | [
"MIT"
] | null | null | null | # ======================
# imports
# ======================
import tkinter as tk
from tkinter import ttk
from tkinter import scrolledtext
from tkinter import Menu
from tkinter import Spinbox
from tkinter import messagebox as mBox
# 由于tkinter中没有ToolTip功能,所以自定义这个功能如下
class ToolTip(object):
def __init__... | 29.95092 | 109 | 0.624642 |
098029b763ae8ce00cb77ebaf6d69273caccf74f | 6,097 | py | Python | electrum_grs/gui/kivy/uix/dialogs/__init__.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 9 | 2016-09-15T10:10:36.000Z | 2019-08-01T09:08:30.000Z | electrum_grs/gui/kivy/uix/dialogs/__init__.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-10-28T08:46:00.000Z | 2019-03-15T00:59:01.000Z | electrum_grs/gui/kivy/uix/dialogs/__init__.py | Groestlcoin/electrum-grs | 80f00b8d3511bf40be71fc8c0ffe179ab1d57dd5 | [
"MIT"
] | 5 | 2017-08-24T03:44:27.000Z | 2019-03-03T20:42:25.000Z | from typing import TYPE_CHECKING, Sequence
from kivy.app import App
from kivy.clock import Clock
from kivy.factory import Factory
from kivy.properties import NumericProperty, StringProperty, BooleanProperty
from kivy.core.window import Window
from kivy.uix.recycleview import RecycleView
from kivy.uix.boxlayout import ... | 27.340807 | 80 | 0.612104 |
96b41252d244bd462e81b66297a07d23089cfa6e | 2,396 | py | Python | u/userenv.py | byeongal/pefile_ordlookup | 9400d24890601e4ec47f3b279b72f4fd9ca1d58d | [
"MIT"
] | null | null | null | u/userenv.py | byeongal/pefile_ordlookup | 9400d24890601e4ec47f3b279b72f4fd9ca1d58d | [
"MIT"
] | null | null | null | u/userenv.py | byeongal/pefile_ordlookup | 9400d24890601e4ec47f3b279b72f4fd9ca1d58d | [
"MIT"
] | null | null | null | # md5 : eb27fe8770bb56d2ba9c9c29f1ab07da
# sha1 : 1633393c30b002dbae47f73caf68cb201d8b36fa
# sha256 : f40e468b17e5b5239a52a35338406b0e037514176ea79009ea4f5036a0bd347c
ord_names = {
105: b'RsopLoggingEnabled',
106: b'AreThereVisibleLogoffScripts',
107: b'AreThereVisibleShutdownScripts',
108: b'CreateApp... | 36.861538 | 80 | 0.743322 |
d3a5bac9184c196e2866a8e4411132b8c39a321e | 5,814 | py | Python | scripts/sandbox/99_disparity_test.py | skywalkerisnull/ImageAnalysis | 5bbb52c420e31792b5b981d242bd357a571e2a46 | [
"MIT"
] | null | null | null | scripts/sandbox/99_disparity_test.py | skywalkerisnull/ImageAnalysis | 5bbb52c420e31792b5b981d242bd357a571e2a46 | [
"MIT"
] | null | null | null | scripts/sandbox/99_disparity_test.py | skywalkerisnull/ImageAnalysis | 5bbb52c420e31792b5b981d242bd357a571e2a46 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import argparse
import cv2
import math
import numpy as np
from lib import Image
parser = argparse.ArgumentParser(description='Align and combine sentera images.')
parser.add_argument('image1', help='image1 path')
parser.add_argument('image2', help='image1 path')
args = parser.parse_args()
i1 = cv2... | 32.3 | 112 | 0.639491 |
ebe693623552f0cd73b5cdb3d6723f8550e54096 | 892 | py | Python | fairseq/modules/layer_norm.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | fairseq/modules/layer_norm.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | fairseq/modules/layer_norm.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
# Removed Apex FusedLayerNorm for now...
def LayerNorm(normalized_shape, ... | 30.758621 | 81 | 0.676009 |
56c13714886b894684da86b9c18e0d392e801066 | 3,460 | py | Python | mac/google-cloud-sdk/lib/surface/labelmanager/values/create.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | null | null | null | mac/google-cloud-sdk/lib/surface/labelmanager/values/create.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | mac/google-cloud-sdk/lib/surface/labelmanager/values/create.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-25T18:17:57.000Z | 2020-07-25T18:17:57.000Z | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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 requir... | 36.808511 | 79 | 0.703468 |
8fb7e2dbed0427e379772ba732335d93517c5198 | 1,703 | py | Python | user_supplied/user_definitions.py | niallrmurphy/pyvern | 8e929ad4d9289178873f0ec1a697ae0a8df67c7e | [
"Apache-2.0"
] | null | null | null | user_supplied/user_definitions.py | niallrmurphy/pyvern | 8e929ad4d9289178873f0ec1a697ae0a8df67c7e | [
"Apache-2.0"
] | null | null | null | user_supplied/user_definitions.py | niallrmurphy/pyvern | 8e929ad4d9289178873f0ec1a697ae0a8df67c7e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
user_definitions.py
Created by Niall Richard Murphy on 2011-05-30.
"""
import re
import sys
_CORRECT_DNS_HOSTNAME_REGEXP = "^cr(.*)$|^cpe(.*)$"
_CORRECT_DNS_RESOLVERS = ['193.1.186.2', '193.1.186.3']
_CORRECT_NTP_SERVERS = ['193.1.219.116', '193.1.31.66']
_CORRECT_TACACS_S... | 26.609375 | 62 | 0.729301 |
0d537b626bfc4145d656876ef6285820c05bfaa9 | 227 | py | Python | setup.py | AlexGnedenko/python_highlighter | 3eb1bcafe5be4db62a26c5ae0b29aae5db3b6ee0 | [
"MIT"
] | null | null | null | setup.py | AlexGnedenko/python_highlighter | 3eb1bcafe5be4db62a26c5ae0b29aae5db3b6ee0 | [
"MIT"
] | null | null | null | setup.py | AlexGnedenko/python_highlighter | 3eb1bcafe5be4db62a26c5ae0b29aae5db3b6ee0 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='highlighter',
version='1.0.0',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=[
'flask',
],
)
| 17.461538 | 43 | 0.647577 |
f32326c5072bafbf0c3a7c2761392d2016e09134 | 679 | py | Python | FEIT_UTS_hackathon/marketplace/migrations/0002_auto_20210813_2247.py | HHry0918/FEIT_Hackathon | 222bcf6390dddb236da47b20689c66aa69f912fa | [
"MIT"
] | null | null | null | FEIT_UTS_hackathon/marketplace/migrations/0002_auto_20210813_2247.py | HHry0918/FEIT_Hackathon | 222bcf6390dddb236da47b20689c66aa69f912fa | [
"MIT"
] | null | null | null | FEIT_UTS_hackathon/marketplace/migrations/0002_auto_20210813_2247.py | HHry0918/FEIT_Hackathon | 222bcf6390dddb236da47b20689c66aa69f912fa | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-08-13 12:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('marketplace', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='item',
old_name='title',
... | 23.413793 | 65 | 0.547865 |
1d838f663b7c7305a83246b6d7db986c7bae4296 | 2,578 | py | Python | Python3/874.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/874.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/874.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 376 ms submission
class Solution:
def robotSim(self, commands: List[int], obstacles: List[List[int]]) -> int:
x = 0
y = 0
h = 'n'
ans = 0
obstacleSet = set(map(tuple, obs... | 36.828571 | 98 | 0.377812 |
5fd5d06df2649e212549313a4bcdddac98b35463 | 1,781 | py | Python | day08/solve-08b.py | ggchappell/AdventOfCode2021 | b209f7e26684c35906958ce7b5ee65348041a3f9 | [
"MIT"
] | null | null | null | day08/solve-08b.py | ggchappell/AdventOfCode2021 | b209f7e26684c35906958ce7b5ee65348041a3f9 | [
"MIT"
] | null | null | null | day08/solve-08b.py | ggchappell/AdventOfCode2021 | b209f7e26684c35906958ce7b5ee65348041a3f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Advent of Code 2021
# Glenn G. Chappell
import sys # .stdin
# ======================================================================
# HELPER FUNCTIONS
# ======================================================================
# (NONE)
# ===========================================... | 22.833333 | 72 | 0.389107 |
27db23553a5cc7d15f6dccbfefc7cfb429e91091 | 1,464 | py | Python | net/lib/roi_align_pool_tf/function.py | shvetsiya/mask-rcnn | dbe1ae7a7bf457ae53aa88f2d1dee3aef1a32936 | [
"MIT"
] | 9 | 2018-05-10T21:42:27.000Z | 2018-11-28T10:08:00.000Z | net/lib/roi_align_pool_tf/function.py | shvetsiya/mask-rcnn | dbe1ae7a7bf457ae53aa88f2d1dee3aef1a32936 | [
"MIT"
] | null | null | null | net/lib/roi_align_pool_tf/function.py | shvetsiya/mask-rcnn | dbe1ae7a7bf457ae53aa88f2d1dee3aef1a32936 | [
"MIT"
] | null | null | null | from net.lib.roi_align_pool_tf.extension import *
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Function
class CropAndResizeFunction(Function):
def __init__(self, crop_height, crop_width, extrapolation_value=0):
self.crop_height = crop_height
... | 32.533333 | 88 | 0.672131 |
04593f3c355b756064d0f91e270d2184c03eb0f2 | 19 | py | Python | 10.Python/228-main.py | Emilyzg/LogicaDeProgramacao | dd514b25ffe097e1d9a66df70a3af8010bb487d8 | [
"MIT"
] | null | null | null | 10.Python/228-main.py | Emilyzg/LogicaDeProgramacao | dd514b25ffe097e1d9a66df70a3af8010bb487d8 | [
"MIT"
] | null | null | null | 10.Python/228-main.py | Emilyzg/LogicaDeProgramacao | dd514b25ffe097e1d9a66df70a3af8010bb487d8 | [
"MIT"
] | null | null | null | print("Ola mundo")
| 9.5 | 18 | 0.684211 |
869b7f3ba5451e550090a652b2e6fb314798ea16 | 54,538 | py | Python | third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py | RitwikSaikia/filament | 57df4481e99dd45af04e47c9259b44187862bff5 | [
"Apache-2.0"
] | 2 | 2020-11-02T05:04:40.000Z | 2020-11-23T04:28:10.000Z | third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py | RitwikSaikia/filament | 57df4481e99dd45af04e47c9259b44187862bff5 | [
"Apache-2.0"
] | 3 | 2021-05-11T18:42:20.000Z | 2022-02-14T23:58:19.000Z | third_party/spirv-tools/external/spirv-headers/include/spirv/unified1/spirv.py | RitwikSaikia/filament | 57df4481e99dd45af04e47c9259b44187862bff5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-2020 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and/or associated documentation files (the "Materials"),
# to deal in the Materials without restriction, including without limitation
# the rights to use, copy, modify, m... | 34.671329 | 89 | 0.592174 |
19e2df3c29b608107d23228e8bc31d7f0a6b5cf9 | 11,558 | py | Python | pretrained-model/albert-brightmart/custom_optimization.py | ebiggerr/malaya | be757c793895522f80b929fe82353d90762f7fff | [
"MIT"
] | 88 | 2021-01-06T10:01:31.000Z | 2022-03-30T17:34:09.000Z | pretrained-model/albert-brightmart/custom_optimization.py | zulkiflizaki/malaya | 2358081bfa43aad57d9415a99f64c68f615d0cc4 | [
"MIT"
] | 43 | 2021-01-14T02:44:41.000Z | 2022-03-31T19:47:42.000Z | pretrained-model/albert-brightmart/custom_optimization.py | zulkiflizaki/malaya | 2358081bfa43aad57d9415a99f64c68f615d0cc4 | [
"MIT"
] | 38 | 2021-01-06T07:15:03.000Z | 2022-03-19T05:07:50.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | 35.345566 | 98 | 0.638951 |
3267ca6871e1b8b898953fee20fe3c873a9cfdb9 | 907 | py | Python | cvat/apps/authentication/admin.py | gitibharatibiswal/cvat-adas-team | a33c1ae38d79ed6e35a61a97b74cd2978853e4c2 | [
"Intel",
"MIT"
] | 5 | 2021-12-01T20:58:07.000Z | 2022-03-17T00:31:00.000Z | cvat/apps/authentication/admin.py | nav13n/cvat | 9bdcc7f8f2d86a763ab5f306ea049ce1432da557 | [
"Intel",
"MIT"
] | 80 | 2021-04-12T19:36:33.000Z | 2022-03-29T00:26:10.000Z | cvat/apps/authentication/admin.py | nav13n/cvat | 9bdcc7f8f2d86a763ab5f306ea049ce1432da557 | [
"Intel",
"MIT"
] | 41 | 2020-12-16T05:52:41.000Z | 2021-09-23T08:45:16.000Z |
# Copyright (C) 2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
from django.contrib import admin
from django.contrib.auth.models import Group, User
from django.contrib.auth.admin import GroupAdmin, UserAdmin
from django.utils.translation import ugettext_lazy as _
class CustomUserAdmin(UserAdmin):
fieldse... | 33.592593 | 79 | 0.661521 |
aece9e0d42698a5a2d2defb263ee18ec1fc2f097 | 614 | py | Python | python_interview_program/singleton.py | qimanchen/Algorithm_Python | 72eabb5fcc9fafb17172879c1250d3c9553e583d | [
"Apache-2.0"
] | null | null | null | python_interview_program/singleton.py | qimanchen/Algorithm_Python | 72eabb5fcc9fafb17172879c1250d3c9553e583d | [
"Apache-2.0"
] | null | null | null | python_interview_program/singleton.py | qimanchen/Algorithm_Python | 72eabb5fcc9fafb17172879c1250d3c9553e583d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2019-06-04 23:04:13
# @Author : Qiman Chen
# @Version : $Id$
"""
单例模式
"""
# 1
def singleton(cls):
instances = {}
def wrapper(*args, **kwargs):
if cls not in instances:
instances[cls] = cls(*args, **kwargs)
return instances[cls]
return wrapper
@s... | 14.619048 | 70 | 0.628664 |
dac98c9f0c7093023b7136af61b432aefbeeba15 | 9,191 | py | Python | staffing/staffing/report/staff_timesheet_2/staff_timesheet_2.py | exvas/staffing | 98812d5bb326d5b01274c6edf9e10eff142410c2 | [
"MIT"
] | null | null | null | staffing/staffing/report/staff_timesheet_2/staff_timesheet_2.py | exvas/staffing | 98812d5bb326d5b01274c6edf9e10eff142410c2 | [
"MIT"
] | null | null | null | staffing/staffing/report/staff_timesheet_2/staff_timesheet_2.py | exvas/staffing | 98812d5bb326d5b01274c6edf9e10eff142410c2 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, jan and contributors
# For license information, please see license.txt
import frappe
from calendar import monthrange
import datetime
def get_columns(filters):
columns = [
{"fieldname": "employee", "fieldtype": "Data", "width": "150"},
{"label": "Name", "fieldname": "employee_staff_name", "fi... | 47.869792 | 189 | 0.664672 |
dc5bf26e7134f5cc1baff7b194c7934bab467a34 | 577 | py | Python | Apps/sdc/calibrate.py | bytemaster-0xff/OpenSDT | d2cd7b78219658964b9fc674241a6f3585c4d5cb | [
"MIT"
] | null | null | null | Apps/sdc/calibrate.py | bytemaster-0xff/OpenSDT | d2cd7b78219658964b9fc674241a6f3585c4d5cb | [
"MIT"
] | null | null | null | Apps/sdc/calibrate.py | bytemaster-0xff/OpenSDT | d2cd7b78219658964b9fc674241a6f3585c4d5cb | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.pyplot as plt
cap = cv2.VideoCapture("s:\Titan_2020_05_07.mp4")
ret, frame = cap.read()
combo_image = frame
height=180
left = 150
right = 700
top = 150
bottom_margin = 150
x_top_offset = 20
last_center = 320
center = 500
bottom = 330
top = bottom - height
polygo... | 15.184211 | 105 | 0.67591 |
d82e6d98fcb3ac29a614f69c2a34855060296e1d | 2,290 | py | Python | tests/excerptexport/conftest.py | geometalab/osmaxx | 1b7f92ea4d4fecc3afd35b1253aca8d4dcff4c51 | [
"MIT"
] | 27 | 2015-03-30T14:17:26.000Z | 2022-02-19T17:30:44.000Z | tests/excerptexport/conftest.py | geometalab/osmaxx | 1b7f92ea4d4fecc3afd35b1253aca8d4dcff4c51 | [
"MIT"
] | 483 | 2015-03-09T16:58:03.000Z | 2022-03-14T09:29:06.000Z | tests/excerptexport/conftest.py | geometalab/osmaxx | 1b7f92ea4d4fecc3afd35b1253aca8d4dcff4c51 | [
"MIT"
] | 6 | 2015-04-07T07:38:30.000Z | 2020-04-01T12:45:53.000Z | import os
import tempfile
import pytest
from osmaxx.conversion import output_format
from osmaxx.excerptexport.models import Excerpt, ExtractionOrder, Export, OutputFile
@pytest.fixture
def bounding_geometry():
from django.contrib.gis import geos
return geos.GEOSGeometry(
'{"type":"MultiPolygon","coo... | 26.941176 | 246 | 0.756769 |
623dbfd3b76609c6ea84c56502b044f5253e6268 | 170 | py | Python | src/cirrus/core/components/workflows.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 26 | 2020-08-18T14:34:47.000Z | 2021-07-29T14:41:14.000Z | src/cirrus/core/components/workflows.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 68 | 2021-10-04T18:49:57.000Z | 2022-03-30T14:54:39.000Z | src/cirrus/core/components/workflows.py | sjwoodr/cirrus-geo | 8f1190325ba6f6c7fc82e5d3ddb16d34c1b8478d | [
"Apache-2.0"
] | 6 | 2020-08-18T14:37:32.000Z | 2021-07-15T21:59:06.000Z | from .base import StepFunction
from .files import ComponentFile
class Workflow(StepFunction):
test_payload = ComponentFile(name='test-payload.json', optional=True)
| 24.285714 | 73 | 0.794118 |
508ddcafca1f7c619c256917e751cdb92276dbf7 | 460 | py | Python | site/sermons/migrations/0002_auto_20190802_0229.py | scottBowles/dailyoffice2019 | ca750ac77316d247ca7a7a820e085f9968fbc8ff | [
"MIT"
] | 19 | 2020-01-12T23:57:22.000Z | 2022-03-30T16:35:17.000Z | site/sermons/migrations/0002_auto_20190802_0229.py | scottBowles/dailyoffice2019 | ca750ac77316d247ca7a7a820e085f9968fbc8ff | [
"MIT"
] | 59 | 2020-01-13T00:45:27.000Z | 2022-02-20T04:10:05.000Z | site/sermons/migrations/0002_auto_20190802_0229.py | scottBowles/dailyoffice2019 | ca750ac77316d247ca7a7a820e085f9968fbc8ff | [
"MIT"
] | 7 | 2020-01-21T21:12:03.000Z | 2021-10-24T01:15:50.000Z | # Generated by Django 2.2.3 on 2019-08-02 02:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("sermons", "0001_initial")]
operations = [
migrations.AlterField(
model_name="sermon",
name="text",
field=models.TextF... | 24.210526 | 102 | 0.593478 |
dc74e5ad53d34c86091178ed76927305e124bdac | 1,619 | py | Python | tests/integration/blueprints/admin/orga/test_views.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/blueprints/admin/orga/test_views.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/blueprints/admin/orga/test_views.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
from byceps.services.orga import service as orga_service
def test_persons_for_brand(orga_admin_client, brand):
url = f'/admin/orgas/persons/{brand.id}'
response = orga_admin_client.get(url)
assert re... | 30.54717 | 73 | 0.732551 |
192450f7cc0413d7174e250a12659a15c054fa8c | 2,046 | py | Python | tests_scripts/Sprint3/Data_definition_TEST_SCRIPT_Pallavi.py | vineethreddyramasa/uno-community-partnership | 694886b7ad7fa98f6dbb24b03476962cfadebc70 | [
"MIT"
] | 13 | 2018-08-30T16:03:18.000Z | 2019-11-25T07:08:43.000Z | tests_scripts/Sprint3/Data_definition_TEST_SCRIPT_Pallavi.py | vineethreddyramasa/uno-community-partnership | 694886b7ad7fa98f6dbb24b03476962cfadebc70 | [
"MIT"
] | 814 | 2018-08-30T02:28:55.000Z | 2022-03-11T23:31:45.000Z | tests_scripts/Sprint3/Data_definition_TEST_SCRIPT_Pallavi.py | vineethreddyramasa/uno-community-partnership | 694886b7ad7fa98f6dbb24b03476962cfadebc70 | [
"MIT"
] | 6 | 2018-09-16T05:35:49.000Z | 2019-10-17T02:44:19.000Z | import unittest
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
class UnoCpi(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome(executable_path='C:\TEST... | 39.346154 | 146 | 0.654448 |
31e5b07a7141f1c1f3b1bd86e77d591795b40627 | 59,149 | py | Python | torcharrow/icolumn.py | kit1980/torcharrow | 98816c65fd0fa33be5f50ff15b31a3df3cd0eb37 | [
"BSD-3-Clause"
] | null | null | null | torcharrow/icolumn.py | kit1980/torcharrow | 98816c65fd0fa33be5f50ff15b31a3df3cd0eb37 | [
"BSD-3-Clause"
] | null | null | null | torcharrow/icolumn.py | kit1980/torcharrow | 98816c65fd0fa33be5f50ff15b31a3df3cd0eb37 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
from __future__ import annotations
import abc
import itertools
import math
import operator
import statistics
import typing as ty
import warnings
from collections import OrderedDict, defaultdict
from functools import partial
import numpy as np
i... | 31.817644 | 174 | 0.543188 |
e844c1626b88d03aec03665bc47cb1ba0c68eefd | 9,665 | py | Python | tests/google_test.py | BostonDSA/fest | 2876cd09a5df978145b432fb1e711c9d0322fc25 | [
"MIT"
] | 10 | 2018-08-05T20:34:03.000Z | 2021-12-01T07:18:35.000Z | tests/google_test.py | BostonDSA/fest | 2876cd09a5df978145b432fb1e711c9d0322fc25 | [
"MIT"
] | 10 | 2018-02-12T16:46:16.000Z | 2022-01-21T23:39:07.000Z | tests/google_test.py | BostonDSA/fest | 2876cd09a5df978145b432fb1e711c9d0322fc25 | [
"MIT"
] | 7 | 2019-04-13T00:49:05.000Z | 2021-09-28T00:53:51.000Z | from unittest import mock
import pytest
from fest import facebook
from fest import google
def test_google_page_iter_events():
mockapi = mock.MagicMock()
mockapi.events.return_value.list.return_value.execute.side_effect = [
{
'items': [{'id': '1'}, {'id': '2'}],
'nextPageToken... | 32.003311 | 78 | 0.440973 |
7f0c0fc70c9c1228c5cc565cf0880dba23939267 | 2,529 | py | Python | _templates/jinja2/cookiecutter-py/{{cookiecutter.name}}/choices/testfrwk/unittest/tests/test_props_new.py | thebridge0491/intro_py | c8ef32d8df10fa07a3c7b191474074b2dfd640c3 | [
"CECILL-B"
] | null | null | null | _templates/jinja2/cookiecutter-py/{{cookiecutter.name}}/choices/testfrwk/unittest/tests/test_props_new.py | thebridge0491/intro_py | c8ef32d8df10fa07a3c7b191474074b2dfd640c3 | [
"CECILL-B"
] | null | null | null | _templates/jinja2/cookiecutter-py/{{cookiecutter.name}}/choices/testfrwk/unittest/tests/test_props_new.py | thebridge0491/intro_py | c8ef32d8df10fa07a3c7b191474074b2dfd640c3 | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
'''New test property examples for `{{cookiecutter.parent}}{{cookiecutter.separator}}{{cookiecutter.project}}` package.'''
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import unittest
from future.builtins import (ascii, filter, hex, map, oct, zip, obje... | 31.222222 | 121 | 0.640965 |
8a9f9b29f5649f5e500e431b4af7af11102916e7 | 606 | py | Python | test_data_btc.py | pdavis39/btc_predictor | b07ad7a26fb2bf4622b3e390a34cc38e4a9ad53f | [
"MIT"
] | 9 | 2019-02-13T09:32:08.000Z | 2021-04-02T00:17:32.000Z | test_data_btc.py | pdavis39/btc_predictor | b07ad7a26fb2bf4622b3e390a34cc38e4a9ad53f | [
"MIT"
] | null | null | null | test_data_btc.py | pdavis39/btc_predictor | b07ad7a26fb2bf4622b3e390a34cc38e4a9ad53f | [
"MIT"
] | 1 | 2019-10-11T09:17:11.000Z | 2019-10-11T09:17:11.000Z | import csv
from exchanges.coindesk import CoinDesk
train_data = CoinDesk.get_historical_data_as_dict(start='2013-09-01', end='2017-12-31')
with open('train_btc.csv','wb') as csv_file1:
writer = csv.writer(csv_file1)
for key, value in train_data.items():
writer.writerow([key,value])
print('training ... | 26.347826 | 87 | 0.707921 |
dcbe70a16404393348edb5f861bf7fbf4791ee71 | 5,510 | py | Python | common.py | Zumbi-ML/zmbWeb | b080230725f3a998f17e78a95695576ceddf4f6d | [
"MIT"
] | null | null | null | common.py | Zumbi-ML/zmbWeb | b080230725f3a998f17e78a95695576ceddf4f6d | [
"MIT"
] | null | null | null | common.py | Zumbi-ML/zmbWeb | b080230725f3a998f17e78a95695576ceddf4f6d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import dash_html_components as html
"""
Common, reusable views across apps.
Please do not define any callback logic in this file.
"""
def logo_html():
"""
Get the zumbi logo as a centered image for an app.
Returns:
(dash_html_components.Div): The header.
"""
l... | 26.618357 | 90 | 0.653176 |
92d903ff90acb05d4fdeec6f857c712c1147fa9a | 1,330 | py | Python | Hackerrank/Python/text_wrap.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 40 | 2020-07-25T19:35:37.000Z | 2022-01-28T02:57:02.000Z | Hackerrank/Python/text_wrap.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 34 | 2020-10-10T17:59:46.000Z | 2021-10-05T18:29:25.000Z | Hackerrank/Python/text_wrap.py | Snehakri022/Competitive-Programming-Solutions | 62a2cbb2d71a040d81e3e71ad6353a86007b8cb7 | [
"MIT"
] | 24 | 2020-05-03T08:11:53.000Z | 2021-10-04T03:23:20.000Z | # Textwrap
# The textwrap module provides two convenient functions: wrap() and fill().
# textwrap.wrap()
# The wrap() function wraps a single paragraph in text (a string) so that every line is width characters long at most.
# It returns a list of output lines.
# >>> import textwrap
# >>> string = "This is a very ver... | 22.166667 | 118 | 0.684962 |
caa593735a2ca723dcc17b41e2ae276df3f2b459 | 1,265 | py | Python | src/infi/credentials_store/utils.py | Infinidat/infi.credentials_store | 1b17b8ca4706571d6ad60975081505b3411bbca7 | [
"BSD-3-Clause"
] | null | null | null | src/infi/credentials_store/utils.py | Infinidat/infi.credentials_store | 1b17b8ca4706571d6ad60975081505b3411bbca7 | [
"BSD-3-Clause"
] | null | null | null | src/infi/credentials_store/utils.py | Infinidat/infi.credentials_store | 1b17b8ca4706571d6ad60975081505b3411bbca7 | [
"BSD-3-Clause"
] | null | null | null | import sys
import random
import hashlib
from base64 import b64encode, b64decode
PY3 = sys.version_info[0] == 3
MAGIC_VER = 'ENC:1'
default_mask_key = hashlib.sha512(b'CrD').digest()
def _ord(c):
# single char (byte/str) to int
if isinstance(c, int):
return c
return ord(c)
def _chr(o):
# i... | 21.810345 | 107 | 0.620553 |
e522eaf34259c88d5f3b0fcb2083eb3344cecf3f | 3,925 | py | Python | src/Stele/analysis/analysis_ipg/fixes/LegendSettings_ui.py | SherwinGroup/Stele | 9bb7da0b406a801975e21c9f7ce05d369ae661e5 | [
"MIT"
] | 1 | 2021-06-22T19:38:32.000Z | 2021-06-22T19:38:32.000Z | src/Stele/analysis/analysis_ipg/fixes/LegendSettings_ui.py | SherwinGroup/Stele | 9bb7da0b406a801975e21c9f7ce05d369ae661e5 | [
"MIT"
] | 1 | 2021-08-23T20:54:25.000Z | 2021-08-23T20:54:25.000Z | src/Stele/analysis/analysis_ipg/fixes/LegendSettings_ui.py | SherwinGroup/Stele | 9bb7da0b406a801975e21c9f7ce05d369ae661e5 | [
"MIT"
] | 1 | 2017-08-16T21:05:46.000Z | 2017-08-16T21:05:46.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\FELLab\Documents\GitHub\Interactivepg-waffle\interactivePG\fixes\LegendSettings.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
cl... | 53.767123 | 146 | 0.74293 |
1d33209cb82c546031490fe0042e0e61fc935bc4 | 1,736 | py | Python | tests/test_class_oelint_file_underscores.py | vermaete/oelint-adv | 6a2cadf2fd076d6e531d4bb0abcc4ad89d1fdbee | [
"BSD-2-Clause"
] | null | null | null | tests/test_class_oelint_file_underscores.py | vermaete/oelint-adv | 6a2cadf2fd076d6e531d4bb0abcc4ad89d1fdbee | [
"BSD-2-Clause"
] | null | null | null | tests/test_class_oelint_file_underscores.py | vermaete/oelint-adv | 6a2cadf2fd076d6e531d4bb0abcc4ad89d1fdbee | [
"BSD-2-Clause"
] | null | null | null | import os
import sys
import pytest
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
from base import TestBaseClass
class TestClassOelintFileUnderscores(TestBaseClass):
@pytest.mark.parametrize('id', ['oelint.file.underscores'])
@pytest.mark.parametrize('occurrence', [1])
@pytest.mark.par... | 21.974684 | 67 | 0.410138 |
f2826d2a971bc94a5ae11cebc7df2256e627e9a7 | 1,446 | py | Python | components/vtpm2-server/jss-server-pub.py | florentinvintila/trusted-service-identity | 60d658f066ab6c7593270aaaec2a51f06e92ddd2 | [
"Apache-2.0"
] | 21 | 2020-01-15T14:58:37.000Z | 2022-03-09T07:26:33.000Z | components/vtpm2-server/jss-server-pub.py | SocioProphet/trusted-service-identity | 8f93b7d8e6c205f3896225cc4fd7d67fe855a03c | [
"Apache-2.0"
] | 72 | 2020-02-10T12:40:46.000Z | 2022-03-01T21:11:30.000Z | components/vtpm2-server/jss-server-pub.py | SocioProphet/trusted-service-identity | 8f93b7d8e6c205f3896225cc4fd7d67fe855a03c | [
"Apache-2.0"
] | 4 | 2020-01-17T03:36:02.000Z | 2021-08-18T14:44:56.000Z | from flask import Flask, request
import os
from os.path import join, exists
import subprocess
app = Flask(__name__)
if __name__ == '__main__':
app.run(debug=True,host='0.0.0.0',port=5000)
@app.route('/')
def index():
return "JSS for vTPM - pub"
# public server returns the CSR for signing with CA to create X... | 29.510204 | 75 | 0.596127 |
7c1d5c90a824897726be140a18f807bb5196fa40 | 3,294 | py | Python | improved_diffusion/kernel_datasets.py | Khanhnn00/kernel-prior-diffusion | 6f38d3a645c5f6a2b33b8ab60b6f15a12bf245dd | [
"MIT"
] | null | null | null | improved_diffusion/kernel_datasets.py | Khanhnn00/kernel-prior-diffusion | 6f38d3a645c5f6a2b33b8ab60b6f15a12bf245dd | [
"MIT"
] | null | null | null | improved_diffusion/kernel_datasets.py | Khanhnn00/kernel-prior-diffusion | 6f38d3a645c5f6a2b33b8ab60b6f15a12bf245dd | [
"MIT"
] | 1 | 2021-11-12T12:59:36.000Z | 2021-11-12T12:59:36.000Z | from PIL import Image
import blobfile as bf
from mpi4py import MPI
import numpy as np
from torch.utils.data import DataLoader, Dataset
import torch
import torchvision.transforms.functional as F
def load_kernel(
*, data_dir, data_type, batch_size, image_size, class_cond=False, deterministic=False
):
"""
Fo... | 35.419355 | 89 | 0.657863 |
3c39a32b1dcf0d2d5cb52429a0a533718797b017 | 13,492 | py | Python | swagger_client/models/job_response.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | swagger_client/models/job_response.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | swagger_client/models/job_response.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
TGS API
A production scale tool for BYOND server management # noqa: E501
OpenAPI spec version: 9.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class JobResponse(object):
"""NOTE: This class is... | 32.047506 | 250 | 0.625259 |
524e90d6eb7a9abdf1e715ade94732139bab5556 | 15,927 | py | Python | django/db/backends/mysql/base.py | metamatik/django | 415ae960bb9f1bdae798023fdce3247d2c938eec | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/mysql/base.py | metamatik/django | 415ae960bb9f1bdae798023fdce3247d2c938eec | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/backends/mysql/base.py | metamatik/django | 415ae960bb9f1bdae798023fdce3247d2c938eec | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-09-16T07:19:02.000Z | 2020-09-16T07:19:02.000Z | """
MySQL database backend for Django.
Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/
MySQLdb is supported for Python 2 only: http://sourceforge.net/projects/mysql-python
"""
from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
from django.conf import settings... | 42.134921 | 117 | 0.641552 |
97ec125939022b584b1998792e15b67561eec6da | 1,312 | py | Python | setup.py | konstruktoid/python3-vagrant | 01150c2d8b7513aa56136fa6511589e74936f02c | [
"MIT"
] | 1 | 2022-02-19T10:13:31.000Z | 2022-02-19T10:13:31.000Z | setup.py | konstruktoid/python3-vagrant | 01150c2d8b7513aa56136fa6511589e74936f02c | [
"MIT"
] | null | null | null | setup.py | konstruktoid/python3-vagrant | 01150c2d8b7513aa56136fa6511589e74936f02c | [
"MIT"
] | 1 | 2022-02-19T09:56:12.000Z | 2022-02-19T09:56:12.000Z | """python3-vagrant setup"""
import os
import re
from setuptools import setup
# parse version from package/module without importing or evaluating the code
with open("vagrant/__init__.py", encoding="utf-8") as fh:
for line in fh:
m = re.match(r"^__version__ = .*\"$", line)
if m:
version ... | 33.641026 | 81 | 0.651677 |
7489eab33411d55ba90c98a8605481076e7876e8 | 7,018 | py | Python | alipay/aop/api/domain/CateringStoreInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/CateringStoreInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/CateringStoreInfo.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.BusinessHoursInfo import BusinessHoursInfo
from alipay.aop.api.domain.CateringStoreDeliveryInfo import CateringStoreDeliveryInfo
from alipay.aop.api.domain.StoreAddressInfo import S... | 35.09 | 87 | 0.617697 |
35c26e22b84eb7e4379c58e95a74b52837bc3a5b | 23,217 | py | Python | photo4d/Class_photo4D.py | ArcticSnow/photo4D | 2210683e3d352ffb648962ff043d14e2aa24a80f | [
"MIT"
] | 15 | 2019-01-16T12:37:47.000Z | 2022-01-24T08:27:16.000Z | photo4d/Class_photo4D.py | ArcticSnow/photo4D | 2210683e3d352ffb648962ff043d14e2aa24a80f | [
"MIT"
] | 4 | 2019-03-31T16:02:52.000Z | 2020-08-20T11:09:28.000Z | photo4d/Class_photo4D.py | ArcticSnow/photo4D | 2210683e3d352ffb648962ff043d14e2aa24a80f | [
"MIT"
] | 7 | 2019-06-11T15:51:57.000Z | 2021-08-19T17:09:44.000Z | '''
Program XXX Part I
TODO:
- add the possibility to treat each camera independently with the file MicMac-LocolChantierDescriptuer.xml
Generate automaticaly this xml file based on the camera names, and number
'''
# import public library
import os, glob
from os.path import join as opj
import numpy as np
im... | 44.648077 | 206 | 0.571564 |
ce99e5c64e259b8745928a91fe336241f64c7c88 | 3,210 | py | Python | pybgg_json/pybgg_utils.py | SnarkAttack/pybgg-json | bfc4f23b3f3dbc3978d99795c22684eb5e8c746b | [
"MIT"
] | 1 | 2020-02-22T01:09:35.000Z | 2020-02-22T01:09:35.000Z | pybgg_json/pybgg_utils.py | SnarkAttack/pybgg-json | bfc4f23b3f3dbc3978d99795c22684eb5e8c746b | [
"MIT"
] | 16 | 2020-02-21T03:58:20.000Z | 2020-05-23T12:51:55.000Z | pybgg_json/pybgg_utils.py | SnarkAttack/pybgg-json | bfc4f23b3f3dbc3978d99795c22684eb5e8c746b | [
"MIT"
] | null | null | null | import requests
import xml.etree.ElementTree as ElementTree
base_api_url = "https://www.boardgamegeek.com/xmlapi2/"
pivot_list = ['type']
no_mod_list = ['item', 'forums']
condense_lists_tags = ['item', 'results']
prevent_condense_tags = ['poll', 'result']
def _personal_pretty_print(elem, indent=0):
rec_str... | 34.891304 | 107 | 0.610592 |
9937c5e13136e489031315bad5608dde3f113111 | 3,796 | py | Python | main.py | dgrethlein/RubixCube | e4276107a1cdcf5a4acba4c67198a5b0d0813ffa | [
"MIT"
] | null | null | null | main.py | dgrethlein/RubixCube | e4276107a1cdcf5a4acba4c67198a5b0d0813ffa | [
"MIT"
] | 3 | 2020-03-24T18:08:08.000Z | 2021-06-04T15:27:29.000Z | main.py | dgrethlein/RubixCube | e4276107a1cdcf5a4acba4c67198a5b0d0813ffa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Main module for running ``make`` targets with minimal
effort command-line invokation.
Module Description
==================
Main module that relies on :class:`argparse.Namespace` to relay parameters
for running the application.
.. moduleauthor:: David Grethlein <djg329@drexel.edu>`
Module... | 24.490323 | 79 | 0.578504 |
b5be1891bfa9a6b291d43682b0e24aab1f345e4e | 1,478 | py | Python | positional_encoding.py | Vignesh-Nswamy/Abstractive-Text-Summarization | a5c7dfc606002750c29c8cb0f7cfd19cf244376c | [
"MIT"
] | null | null | null | positional_encoding.py | Vignesh-Nswamy/Abstractive-Text-Summarization | a5c7dfc606002750c29c8cb0f7cfd19cf244376c | [
"MIT"
] | null | null | null | positional_encoding.py | Vignesh-Nswamy/Abstractive-Text-Summarization | a5c7dfc606002750c29c8cb0f7cfd19cf244376c | [
"MIT"
] | null | null | null | import tensorflow as tf
class PositionEncoder(tf.keras.layers.Layer):
"""Adds positional information to input sequence"""
def __init__(self, max_seq_len=512, d_model=768):
"""Initialize PositionEncoder
Args:
max_seq_len: int, Maximum expected length of each training sequence
... | 38.894737 | 106 | 0.612991 |
1a37352100ea2cd149c8b3782928ed7a29b98154 | 590 | py | Python | safe_explorer/ddpg/actor.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | null | null | null | safe_explorer/ddpg/actor.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | null | null | null | safe_explorer/ddpg/actor.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | null | null | null | import torch
from safe_explorer.core.config import Config
from safe_explorer.core.net import Net, ConvNet
from safe_explorer.ddpg.utils import init_fan_in_uniform
class Actor(Net):
def __init__(self, observation_dim, action_dim):
config = Config.get().ddpg.actor
super(Actor, self).__init__(obser... | 34.705882 | 56 | 0.544068 |
89b351d4803efc6c07e8f83fac2ac6fc02e1f2e4 | 7,186 | py | Python | tarexp/ledger.py | eugene-yang/tarexp | 3037462b41ea3a5aa3faf6afa71db0de5c14e88f | [
"Apache-2.0"
] | 13 | 2022-02-23T09:39:05.000Z | 2022-03-25T15:34:38.000Z | tarexp/ledger.py | eugene-yang/tarexp | 3037462b41ea3a5aa3faf6afa71db0de5c14e88f | [
"Apache-2.0"
] | null | null | null | tarexp/ledger.py | eugene-yang/tarexp | 3037462b41ea3a5aa3faf6afa71db0de5c14e88f | [
"Apache-2.0"
] | null | null | null | """Any aspect of the history of a batch-based workflow can, if necessary, be reproduced from a record of
which documents were labeled on which training rounds (including any initial seed round).
The :py:class:`tarexp.ledger.Ledger` instance records this state in memory, and
writes it to disk at user-specified interv... | 39.922222 | 132 | 0.646257 |
4d55a0b075a36121a119f2e90eb57506e360a5f6 | 715 | py | Python | 03 - Taking Measures of your data/1. firstlook.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 96 | 2020-07-18T08:33:23.000Z | 2022-03-27T15:52:40.000Z | 03 - Taking Measures of your data/1. firstlook.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 2 | 2020-12-18T17:35:50.000Z | 2021-01-12T07:14:31.000Z | 03 - Taking Measures of your data/1. firstlook.py | nevaan9/Python-Data-Cleaning-Cookbook | c40322673ad93f59a3fe183fcd881e61053001f2 | [
"MIT"
] | 104 | 2020-07-22T13:48:44.000Z | 2022-03-31T14:22:48.000Z | # import pandas, numpy
import pandas as pd
import numpy as np
pd.set_option('display.width', 70)
pd.set_option('display.max_columns', 5)
pd.set_option('display.max_rows', 20)
pd.options.display.float_format = '{:,.0f}'.format
nls97 = pd.read_csv("data/nls97.csv")
covidtotals = pd.read_csv("data/covidtotals.csv",
pars... | 25.535714 | 50 | 0.767832 |
0019b7c896335d87e7f0bd3b7450f1352b6797a1 | 3,175 | py | Python | djangogee/settings.py | ShambAI/django_caju_web | 03cab16415736f939a46774ff4480e261aef4c69 | [
"MIT"
] | null | null | null | djangogee/settings.py | ShambAI/django_caju_web | 03cab16415736f939a46774ff4480e261aef4c69 | [
"MIT"
] | null | null | null | djangogee/settings.py | ShambAI/django_caju_web | 03cab16415736f939a46774ff4480e261aef4c69 | [
"MIT"
] | null | null | null | """
Django settings for djangoGEE project.
Generated by 'django-admin startproject' using Django 2.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
... | 25.198413 | 91 | 0.694488 |
db427de7b7e6d4d2c8720960b99588b121b64e30 | 2,810 | py | Python | Tests/EndToEndTests/CNTKv2Python/Examples/TrainResNet_CIFAR10_test.py | burhandodhy/CNTK | fcdeef63d0192c7b4b7428b14c1f9750d6c1de2e | [
"MIT"
] | 17,702 | 2016-01-25T14:03:01.000Z | 2019-05-06T09:23:41.000Z | Tests/EndToEndTests/CNTKv2Python/Examples/TrainResNet_CIFAR10_test.py | burhandodhy/CNTK | fcdeef63d0192c7b4b7428b14c1f9750d6c1de2e | [
"MIT"
] | 3,489 | 2016-01-25T13:32:09.000Z | 2019-05-03T11:29:15.000Z | Tests/EndToEndTests/CNTKv2Python/Examples/TrainResNet_CIFAR10_test.py | burhandodhy/CNTK | fcdeef63d0192c7b4b7428b14c1f9750d6c1de2e | [
"MIT"
] | 5,180 | 2016-01-25T14:02:12.000Z | 2019-05-06T04:24:28.000Z | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import numpy as np
import os
import shutil
import sys
import cntk
from cntk.ops.te... | 43.230769 | 184 | 0.725267 |
b407bec18d0384bfb588ea6a45f6c8a385ed9fa2 | 1,755 | py | Python | helpers/wordlist/wordlist.py | victor-axelsson/SimAPI | 0d4511ae75d35f10a5ca2b9feb41af193cce9639 | [
"Unlicense",
"MIT"
] | null | null | null | helpers/wordlist/wordlist.py | victor-axelsson/SimAPI | 0d4511ae75d35f10a5ca2b9feb41af193cce9639 | [
"Unlicense",
"MIT"
] | null | null | null | helpers/wordlist/wordlist.py | victor-axelsson/SimAPI | 0d4511ae75d35f10a5ca2b9feb41af193cce9639 | [
"Unlicense",
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2018 Victor Axelsson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merg... | 29.745763 | 78 | 0.74188 |
c12913b366428e7af3e8fb96b12843805a1a220c | 28,559 | py | Python | differentiableFluidSim.py | ucsdarclab/liquid_reconstruction | 5559edbf71dba05d432d85e7dbbfe3634e650aeb | [
"MIT"
] | null | null | null | differentiableFluidSim.py | ucsdarclab/liquid_reconstruction | 5559edbf71dba05d432d85e7dbbfe3634e650aeb | [
"MIT"
] | null | null | null | differentiableFluidSim.py | ucsdarclab/liquid_reconstruction | 5559edbf71dba05d432d85e7dbbfe3634e650aeb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
import SmoothParticleNets as spn
import sympy
class FluidGravityForce(nn.Module):
def __init__(self, gravity, maxSpeed = 3):
"""
Initializes a fluid gravity model.
Arguments:
gravity: Gravity vector in the global frame (sa... | 50.457597 | 130 | 0.615463 |
433ea620e1698d22a63716b18a6d5dadf1f06dff | 12,733 | py | Python | vendor/github.com/tensorflow/tensorflow/tensorflow/python/data/kernel_tests/multi_device_iterator_test.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-12-03T22:45:44.000Z | 2020-12-28T03:52:28.000Z | vendor/github.com/tensorflow/tensorflow/tensorflow/python/data/kernel_tests/multi_device_iterator_test.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 13 | 2020-11-13T18:53:29.000Z | 2022-03-12T00:33:00.000Z | vendor/github.com/tensorflow/tensorflow/tensorflow/python/data/kernel_tests/multi_device_iterator_test.py | owennewo/kfserving | 89f73c87525b8e06ea799f69f2979c4ad272fcb3 | [
"Apache-2.0"
] | 2 | 2020-10-06T09:24:31.000Z | 2020-12-20T15:10:56.000Z | # Copyright 2018 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... | 42.872054 | 80 | 0.713029 |
c489003b505647f2fca5c952dbfbfb22e3ecaa14 | 2,591 | py | Python | app.py | rsjones94/personal-site | 09ca1ca9441fd93a4405baf214c5eb2a94ddf4af | [
"MIT"
] | null | null | null | app.py | rsjones94/personal-site | 09ca1ca9441fd93a4405baf214c5eb2a94ddf4af | [
"MIT"
] | null | null | null | app.py | rsjones94/personal-site | 09ca1ca9441fd93a4405baf214c5eb2a94ddf4af | [
"MIT"
] | null | null | null | import os
from flask import Flask, render_template, url_for, request
from flask_mail import Message, Mail
from forms import ContactForm
app = Flask(__name__)
app.secret_key = '10doublecross2016DEV'
"""
mail_settings = {
"MAIL_SERVER": 'smtp.gmail.com',
"MAIL_PORT": 465,
"MAIL_USE_TLS": False,
"MAI... | 26.71134 | 88 | 0.63296 |
76e74ecc5621927b8df8cf4ccb8b8131a1dcd4e6 | 94 | py | Python | mmdet3d/ops/furthest_point_sample/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 12 | 2021-03-17T09:07:18.000Z | 2022-01-21T01:37:42.000Z | mmdet3d/ops/furthest_point_sample/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 1 | 2020-08-11T05:44:29.000Z | 2020-08-11T05:44:29.000Z | mmdet3d/ops/furthest_point_sample/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 2 | 2021-03-17T09:25:15.000Z | 2021-04-22T09:15:58.000Z | from .furthest_point_sample import furthest_point_sample
__all__ = ['furthest_point_sample']
| 23.5 | 56 | 0.851064 |
9c7031fa7d5b2a327840d4a25d9a8cd1269f55a6 | 6,009 | py | Python | feature_selection/harmonic_search.py | gonzalesMK/MetaHeuristic | 101664ffd3fd65f1d8ea689b6d263518ce176886 | [
"BSD-3-Clause"
] | 12 | 2017-09-05T03:32:37.000Z | 2020-03-26T02:46:11.000Z | feature_selection/harmonic_search.py | gonzalesMK/MetaHeuristic | 101664ffd3fd65f1d8ea689b6d263518ce176886 | [
"BSD-3-Clause"
] | 12 | 2017-09-05T02:27:22.000Z | 2017-12-10T18:28:13.000Z | feature_selection/harmonic_search.py | gonzalesMK/MetaHeuristic | 101664ffd3fd65f1d8ea689b6d263518ce176886 | [
"BSD-3-Clause"
] | 2 | 2019-02-25T01:09:36.000Z | 2020-06-08T14:06:38.000Z | from __future__ import print_function
from timeit import time
from deap import base
from deap import tools
from .meta_base import *
from .meta_base import _BaseMetaHeuristic
from sklearn.svm import SVC
import random
from sklearn.base import clone
from multiprocessing import Pool
class HarmonicSearch(_BaseMetaHeuristi... | 37.092593 | 139 | 0.623565 |
77ba759c195aaf3397d0a85c53e73b311605029c | 23,981 | py | Python | geopatterns/geopatterns.py | devbib/geopatterns | 8311ca8c3b33535a4ecb0f0ccefe5d1d7763c64d | [
"MIT"
] | null | null | null | geopatterns/geopatterns.py | devbib/geopatterns | 8311ca8c3b33535a4ecb0f0ccefe5d1d7763c64d | [
"MIT"
] | null | null | null | geopatterns/geopatterns.py | devbib/geopatterns | 8311ca8c3b33535a4ecb0f0ccefe5d1d7763c64d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
import hashlib
import math
from colour import Color
from .svg import SVG
from .utils import promap
class GeoPattern(object):
def __init__(self, string, generator=None):
self.hash = hashlib.sha1(string.encode('utf8')).hexdiges... | 37.007716 | 146 | 0.386181 |
28c1d208c70fa09b3fa767f1d6e73cd1d0855286 | 1,905 | py | Python | rusentrel/rusentrel_ds/ctx/att_cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | null | null | null | rusentrel/rusentrel_ds/ctx/att_cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2020-12-16T18:21:11.000Z | 2020-12-30T10:08:27.000Z | rusentrel/rusentrel_ds/ctx/att_cnn.py | nicolay-r/attitude-extraction-with-attention-and-ds | fb8e9d0d9488363738a88c4c447c7a8cb3e2ec1d | [
"MIT"
] | 1 | 2021-03-29T20:58:26.000Z | 2021-03-29T20:58:26.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
sys.path.append('../../../')
from io_utils import RuSentRelBasedExperimentsIOUtils
from arekit.common.evaluation.evaluators.two_class import TwoClassEvaluator
from arekit.contrib.experiments.nn_io.rusentrel_with_ruattitudes import RuSentRelWithRuAttitudesBasedExper... | 42.333333 | 113 | 0.780052 |
48d1549241fb1065eab54ae86c4c69ed41819fe4 | 4,889 | py | Python | test/inverseProblem/particleSwarm_LIN/Column1D.py | edsaac/bioparticle | 67e191329ef191fc539b290069524b42fbaf7e21 | [
"MIT"
] | null | null | null | test/inverseProblem/particleSwarm_LIN/Column1D.py | edsaac/bioparticle | 67e191329ef191fc539b290069524b42fbaf7e21 | [
"MIT"
] | 1 | 2020-09-25T23:31:21.000Z | 2020-09-25T23:31:21.000Z | test/inverseProblem/particleSwarm_LIN/Column1D.py | edsaac/VirusTransport_RxSandbox | 67e191329ef191fc539b290069524b42fbaf7e21 | [
"MIT"
] | 1 | 2021-09-30T05:00:58.000Z | 2021-09-30T05:00:58.000Z | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
from ipywidgets import interact_manual
import ipywidgets as wd
from os import system
## New functions
import PFLOTRAN as PFLO
## Global variables
L = 50 #cm
ConcentrationAtInlet = 1.66E-16 #mol/L
InjectTimeInPoreVol = 1.04
## Initialize PFLO... | 27.466292 | 104 | 0.696052 |
00f4e00ad1d324a495e1b44750d02d1f938304ec | 64 | py | Python | jassen/max.py | cabilangan112/intern-python | 4bce660ef45d0cae04f90c64d19679fb4111f79d | [
"WTFPL"
] | null | null | null | jassen/max.py | cabilangan112/intern-python | 4bce660ef45d0cae04f90c64d19679fb4111f79d | [
"WTFPL"
] | null | null | null | jassen/max.py | cabilangan112/intern-python | 4bce660ef45d0cae04f90c64d19679fb4111f79d | [
"WTFPL"
] | null | null | null | a=[1,2,3,4,6]
max= 0
for i in a:
if i > max:
max=i
print(max) | 10.666667 | 13 | 0.546875 |
790d48fc9ee07093ca65a37b73e0a3c66616d9a7 | 13,802 | py | Python | codebase/datasets/adres_dataset.py | petercuret/woonfraude | 2602464f9b9a8bf901d89590b61205ba18fe697d | [
"MIT"
] | null | null | null | codebase/datasets/adres_dataset.py | petercuret/woonfraude | 2602464f9b9a8bf901d89590b61205ba18fe697d | [
"MIT"
] | null | null | null | codebase/datasets/adres_dataset.py | petercuret/woonfraude | 2602464f9b9a8bf901d89590b61205ba18fe697d | [
"MIT"
] | null | null | null | ####################################################################################################
"""
adres_dataset.py
This module implements several classes to perform dataset-specific downloading, saving and
data-transformation operations.
Written by Swaan Dekkers & Thomas Jongstra
"""
##########################... | 45.853821 | 184 | 0.624402 |
79bda845f1769b1964251fd8205d732a1738a57c | 1,569 | py | Python | Apps/address/admin.py | LeChatong/beakhub-api | ee8ab5d528d3b6b8386fd15fc263971d20d4ac62 | [
"MIT"
] | null | null | null | Apps/address/admin.py | LeChatong/beakhub-api | ee8ab5d528d3b6b8386fd15fc263971d20d4ac62 | [
"MIT"
] | null | null | null | Apps/address/admin.py | LeChatong/beakhub-api | ee8ab5d528d3b6b8386fd15fc263971d20d4ac62 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from import_export.admin import ImportExportModelAdmin
from Apps.address.models import Country, City, Zone, Address
class CityInlineAdmin(admin.StackedInline):
model = City
classes = ('grp-collapse grp-open',)
inline_classes = ('grp-collapse ... | 24.138462 | 60 | 0.681326 |
25348beb577b3bc2efdb7d4bd1d69527b9aa1b56 | 1,814 | py | Python | dags/utils/history/dai_history.py | makerdao-data/airflow-docker-image | 498b8ff83c0e9651c3fd36a91a516ea80f32e8a7 | [
"Apache-2.0"
] | null | null | null | dags/utils/history/dai_history.py | makerdao-data/airflow-docker-image | 498b8ff83c0e9651c3fd36a91a516ea80f32e8a7 | [
"Apache-2.0"
] | 1 | 2022-03-22T13:57:44.000Z | 2022-03-22T13:57:44.000Z | dags/utils/history/dai_history.py | makerdao-data/airflow-docker-image | 498b8ff83c0e9651c3fd36a91a516ea80f32e8a7 | [
"Apache-2.0"
] | null | null | null | """
Updates DAI Transfer History
"""
from airflow.exceptions import AirflowFailException
def update_dai_history(sf):
block_cap = sf.execute(
"select max(BLOCK) from EDW_SHARE.RAW.EVENTS;"
).fetchone()
top_block = sf.execute(
"select max(BLOCK) from MAKER.TRANSFERS.DAI;"
).fetchone()
... | 30.745763 | 93 | 0.619625 |
a4d71a51b685b2c09c934e32dbeee6ea24e91c3e | 1,478 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/sms/apis/ReplyRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/sms/apis/ReplyRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/sms/apis/ReplyRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | null | null | null | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 27.886792 | 75 | 0.67456 |
b2386defbb01629cb34f228ddc596be3b3235767 | 5,584 | py | Python | myenv/lib/python3.7/site-packages/praw/models/user.py | initzion/studentcoder | fdd79eef5ff2922963f6d82292df3497aebca48d | [
"MIT"
] | null | null | null | myenv/lib/python3.7/site-packages/praw/models/user.py | initzion/studentcoder | fdd79eef5ff2922963f6d82292df3497aebca48d | [
"MIT"
] | 3 | 2021-03-30T13:15:12.000Z | 2021-09-22T18:55:59.000Z | myenv/lib/python3.7/site-packages/praw/models/user.py | initzion/studentcoder | fdd79eef5ff2922963f6d82292df3497aebca48d | [
"MIT"
] | null | null | null | """Provides the User class."""
from typing import Dict, Generator, List, Optional, TypeVar, Union
from ..const import API_PATH
from ..models import Preferences
from ..util.cache import cachedproperty
from .base import PRAWBase
from .listing.generator import ListingGenerator
from .reddit.redditor import Redditor
from .... | 36.496732 | 87 | 0.644341 |
bc5e9376be5aa2d67228e35c5d83088470184dde | 3,235 | py | Python | vendor/github.com/elastic/beats/metricbeat/tests/system/test_postgresql.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | 8 | 2017-02-22T01:53:34.000Z | 2018-04-18T15:31:03.000Z | vendor/github.com/elastic/beats/metricbeat/tests/system/test_postgresql.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | 1 | 2016-11-28T18:01:21.000Z | 2016-11-30T13:57:52.000Z | vendor/github.com/elastic/beats/metricbeat/tests/system/test_postgresql.py | rfraposa/hadoopbeat | 884c0f8e0f2027cb4aa180d8f419f05b4d890e85 | [
"Apache-2.0"
] | 5 | 2017-02-22T01:57:56.000Z | 2021-09-22T15:29:35.000Z | import os
import metricbeat
import unittest
from nose.plugins.attrib import attr
class Test(metricbeat.BaseTest):
def common_checks(self, output):
# Ensure no errors or warnings exist in the log.
log = self.get_log()
self.assertNotRegexpMatches(log, "ERR|WARN")
for evt in output:... | 33.350515 | 76 | 0.591963 |
a8e35cbbc0e5fe543fb1e5896122641ec0b7491e | 4,270 | py | Python | model/PM25_GNN_nosub.py | YilliaJing/PM2.5-GNN | 7aacc6b6b9562ad2a9dad6197e6c4d73607ebdf2 | [
"MIT"
] | 91 | 2020-02-09T15:05:44.000Z | 2022-03-29T07:52:16.000Z | model/PM25_GNN_nosub.py | YilliaJing/PM2.5-GNN | 7aacc6b6b9562ad2a9dad6197e6c4d73607ebdf2 | [
"MIT"
] | 9 | 2020-05-15T00:46:31.000Z | 2022-03-30T08:10:23.000Z | model/PM25_GNN_nosub.py | YilliaJing/PM2.5-GNN | 7aacc6b6b9562ad2a9dad6197e6c4d73607ebdf2 | [
"MIT"
] | 36 | 2020-05-31T12:44:32.000Z | 2022-03-22T17:53:52.000Z | import torch
from torch import nn
from model.cells import GRUCell
from torch.nn import Sequential, Linear, Sigmoid
import numpy as np
from torch_scatter import scatter_add#, scatter_sub # no scatter sub in lastest PyG
from torch.nn import functional as F
from torch.nn import Parameter
class GraphGNN(nn.Module):
... | 39.537037 | 125 | 0.601171 |
5c2fbe5965f9542d4c2a04ee1f0b02b41cf72091 | 4,882 | py | Python | homeassistant/components/rachio/webhooks.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | homeassistant/components/rachio/webhooks.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | homeassistant/components/rachio/webhooks.py | mib1185/core | b17d4ac65cde9a27ff6032d70b148792e5eba8df | [
"Apache-2.0"
] | null | null | null | """Webhooks used by rachio."""
from __future__ import annotations
from aiohttp import web
from homeassistant.components import cloud, webhook
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import URL_API
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.d... | 32.331126 | 80 | 0.763417 |
2c0780cd0448010a730a67298fc3f10611ff2dd5 | 347 | py | Python | bancoDeDados/excluir.py | Dead47/bancodedados | e5bf4d4d86dfc40511e4d16326da9350e718fd43 | [
"Apache-2.0"
] | null | null | null | bancoDeDados/excluir.py | Dead47/bancodedados | e5bf4d4d86dfc40511e4d16326da9350e718fd43 | [
"Apache-2.0"
] | null | null | null | bancoDeDados/excluir.py | Dead47/bancodedados | e5bf4d4d86dfc40511e4d16326da9350e718fd43 | [
"Apache-2.0"
] | null | null | null | import sqlite3
try:
banco = sqlite3.connect('primeiro_banco.db')
cursor = banco.cursor()
cursor.execute("DELETE from pessoas WHERE idade = 16")
banco.commit()
banco.close()
print("os dados foram excluidos com sucesso!")
except sqlite3.Error as erro:
print("Houve um erro... | 21.6875 | 59 | 0.654179 |
6ceac52dc59823d2f713b631d1a7c3ded5b4442a | 421 | py | Python | arpym/pricing/rollvalue_ytm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2021-04-10T13:24:30.000Z | 2022-03-26T08:20:42.000Z | arpym/pricing/rollvalue_ytm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | null | null | null | arpym/pricing/rollvalue_ytm.py | dpopadic/arpmRes | ddcc4de713b46e3e9dcb77cc08c502ce4df54f76 | [
"MIT"
] | 6 | 2019-08-13T22:02:17.000Z | 2022-02-09T17:49:12.000Z | # -*- coding: utf-8 -*-
import numpy as np
def rollvalue_ytm(tau, v):
"""For details, see here.
Parameters
----------
tau : array, shape (d_,)
v : array, shape (t_, d_)
Returns
-------
y : array, shape (t_, d_)
log_v : array, shape (t_, d_)
"""
log_v = ... | 17.541667 | 48 | 0.494062 |
3c9534a9e8d21feff99651c2db80b29bec446357 | 150 | py | Python | Taller Control de estructuras 2/Ejercicio_2.py | Majito17/Trabajos-Majo | 88a5c814365686747d843ca3ce56b7ae694c98cb | [
"MIT"
] | null | null | null | Taller Control de estructuras 2/Ejercicio_2.py | Majito17/Trabajos-Majo | 88a5c814365686747d843ca3ce56b7ae694c98cb | [
"MIT"
] | null | null | null | Taller Control de estructuras 2/Ejercicio_2.py | Majito17/Trabajos-Majo | 88a5c814365686747d843ca3ce56b7ae694c98cb | [
"MIT"
] | null | null | null | """
for i in range(1,101,2):
if(i%7==0):
continue
print(i)
"""
c=0
while c<=100:
if(c%2!=0 and c%7!=0):
print(c)
c=c+1 | 13.636364 | 26 | 0.44 |
5de1abcc86a096b9b7765b83a369677689ba13cf | 7,541 | py | Python | tensorflow_datasets/text/yelp_polarity.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 7 | 2020-04-21T01:28:30.000Z | 2021-06-13T07:23:33.000Z | tensorflow_datasets/text/yelp_polarity.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/text/yelp_polarity.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 4 | 2020-04-25T15:48:46.000Z | 2020-11-22T20:35:01.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets 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 appl... | 39.689474 | 491 | 0.704018 |
9d8e8d9532e9c8a67d43adf6c4ffd185714d1646 | 39,758 | py | Python | goji/wallet/wallet_node.py | nowing11/goji-blockchain | 31f3c80819e3786040c404680b672bd2216b4f89 | [
"Apache-2.0"
] | null | null | null | goji/wallet/wallet_node.py | nowing11/goji-blockchain | 31f3c80819e3786040c404680b672bd2216b4f89 | [
"Apache-2.0"
] | null | null | null | goji/wallet/wallet_node.py | nowing11/goji-blockchain | 31f3c80819e3786040c404680b672bd2216b4f89 | [
"Apache-2.0"
] | 1 | 2022-02-10T05:27:56.000Z | 2022-02-10T05:27:56.000Z | import asyncio
import json
import logging
import socket
import time
import traceback
from pathlib import Path
from typing import Callable, Dict, List, Optional, Set, Tuple, Union, Any
from blspy import PrivateKey
from goji.consensus.block_record import BlockRecord
from goji.consensus.constants import ConsensusConstan... | 44.273942 | 119 | 0.595302 |
ccdceca14d0a82e502a9941fbc034e0d8ba71048 | 3,843 | py | Python | third_party_package/RDKit_2015_03_1/rdkit/sping/Pyart/Fontmapping.py | Ivy286/cluster_basedfps | 7fc216537f570436f008ea567c137d03ba2b6d81 | [
"WTFPL"
] | 9 | 2019-04-23T01:46:12.000Z | 2021-08-16T07:07:12.000Z | third_party_package/RDKit_2015_03_1/rdkit/sping/Pyart/Fontmapping.py | Ivy286/cluster_basedfps | 7fc216537f570436f008ea567c137d03ba2b6d81 | [
"WTFPL"
] | null | null | null | third_party_package/RDKit_2015_03_1/rdkit/sping/Pyart/Fontmapping.py | Ivy286/cluster_basedfps | 7fc216537f570436f008ea567c137d03ba2b6d81 | [
"WTFPL"
] | 5 | 2016-09-21T03:47:48.000Z | 2019-07-30T22:17:35.000Z | ## font mapping stuff ##
# by default, I'm using the standard acrobat fonts so that pdfmetrics should work well
#
DefaultFace = 'times'
import string
# these are the required fonts for piddle
PidLegalFonts = { "courier": "courier", # note: keys are lowercased
"helvetica": "helvetica",
... | 37.31068 | 86 | 0.478532 |
3ae7b5853f30f6590cd96ffc17deb34c511347a9 | 3,994 | py | Python | wotpy/wot/interaction.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 24 | 2019-02-15T09:00:27.000Z | 2021-12-23T05:45:03.000Z | wotpy/wot/interaction.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 20 | 2020-03-17T09:41:51.000Z | 2021-07-14T12:29:02.000Z | wotpy/wot/interaction.py | JKRhb/wot-py | 3eaa780189b686c82b7dbdea404fd8077bd3c9f9 | [
"MIT"
] | 5 | 2019-10-10T13:38:20.000Z | 2021-12-22T14:22:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Classes that represent all interaction patterns.
"""
from abc import ABCMeta, abstractmethod
# noinspection PyPackageRequirements
from slugify import slugify
from wotpy.wot.enums import InteractionTypes
from wotpy.wot.validation import is_valid_safe_name
from wotpy.... | 26.104575 | 106 | 0.661743 |
54c42751d3b7cec16b000566fe223e1ce2598af2 | 1,388 | py | Python | glue/adv_masker.py | ziwei7437/bert_on_stilts | 353fc45a2caeb9a79f8665997b8ec1de2bd71f45 | [
"Apache-2.0"
] | 105 | 2019-03-07T01:01:40.000Z | 2022-03-02T13:14:38.000Z | glue/adv_masker.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 8 | 2019-03-07T17:59:46.000Z | 2020-08-07T20:58:20.000Z | glue/adv_masker.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 28 | 2019-03-07T03:52:11.000Z | 2021-07-19T02:06:45.000Z | import torch.nn as nn
import torch.nn.functional as F
from pytorch_pretrained_bert.modeling import BertConfig, BertLayer
class Masker(nn.Module):
def __init__(self, vocab_size, original_hidden_size, num_layers, tau=1):
super().__init__()
self.bert_layer = BertLayer(BertConfig(
vocab_s... | 39.657143 | 119 | 0.695245 |
4538624158b0321268253bb048733d15b3730192 | 873 | py | Python | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 28 | 2020-10-12T19:05:22.000Z | 2022-03-18T01:19:29.000Z | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 1 | 2022-01-30T01:52:59.000Z | 2022-02-19T08:04:54.000Z | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 7 | 2020-10-29T14:01:04.000Z | 2022-02-22T18:33:10.000Z | from .constants import SPECIAL_TOKENS
try:
import re2 as re
except ImportError:
import re
def twitter_sentiment_token_matching(token):
"""Special token matching function for twitter sentiment data."""
if 'URL_TOKEN' in SPECIAL_TOKENS and re.match(r'https?:\/\/[^\s]+', token):
return SPECIAL_TO... | 41.571429 | 79 | 0.651775 |
9115043df0ab4beb770002f44e644d4115ac2c73 | 1,420 | py | Python | tests/sensor/test_v2.py | epenet/simplisafe-python | 1ac074788e3560ca2ba568e12b411537c23275d4 | [
"MIT"
] | 34 | 2018-10-26T03:01:12.000Z | 2022-02-22T18:09:14.000Z | tests/sensor/test_v2.py | epenet/simplisafe-python | 1ac074788e3560ca2ba568e12b411537c23275d4 | [
"MIT"
] | 283 | 2018-09-28T22:50:49.000Z | 2022-03-31T15:11:29.000Z | tests/sensor/test_v2.py | epenet/simplisafe-python | 1ac074788e3560ca2ba568e12b411537c23275d4 | [
"MIT"
] | 24 | 2018-09-28T05:10:35.000Z | 2022-03-30T18:45:40.000Z | """Define tests for v2 Sensor objects."""
# pylint: disable=unused-argument
import aiohttp
import pytest
from simplipy import API
from simplipy.errors import SimplipyError
from tests.common import TEST_AUTHORIZATION_CODE, TEST_CODE_VERIFIER, TEST_SYSTEM_ID
@pytest.mark.asyncio
async def test_properties_v2(aresponse... | 34.634146 | 84 | 0.708451 |
39b9ca50683d6e8f6cbda1444ce0232b8f9d59d1 | 1,888 | py | Python | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_tokens_received.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_tokens_received.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_tokens_received.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from unittest import TestCase
from os.path import dirname, join
import json
from pytezos.michelson.program import MichelsonProgram
from pytezos.michelson.types.big_map import big_map_diff_to_lazy_diff
from pytezos.michelson.forge import forge_micheline, unforge_micheline
folder = 'dexter_usdtz_xtz'
entrypoint = 'remo... | 39.333333 | 112 | 0.724047 |
7b33af80bde3506818f964ea9866199cf397147e | 4,028 | py | Python | mlclas/utils/persist_reuters.py | markzy/multi-label-classification | e5b10351f2b9f1b3eba7f81b7edb7acad6f313d4 | [
"MIT"
] | 1 | 2016-05-17T03:36:35.000Z | 2016-05-17T03:36:35.000Z | mlclas/utils/persist_reuters.py | markzy/multi-label-classification | e5b10351f2b9f1b3eba7f81b7edb7acad6f313d4 | [
"MIT"
] | null | null | null | mlclas/utils/persist_reuters.py | markzy/multi-label-classification | e5b10351f2b9f1b3eba7f81b7edb7acad6f313d4 | [
"MIT"
] | null | null | null | from peewee import *
import re
import string
from operator import itemgetter
import pickle
firstN = 9
db = MySQLDatabase('classification', host="localhost", user="root", passwd="root")
topic_dic = {0: 'earnings', 1: 'acquisitions', 2: 'commodity', 3: 'economics', 4: 'interest', 5: 'energy', 6: 'money-fx', 7: 'shippi... | 28.366197 | 136 | 0.677756 |
59d27856cd02a2f07eeed70598b560600cee83f0 | 7,220 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_compute_instance_group_info.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_compute_instance_group_info.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_compute_instance_group_info.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | 32.088889 | 143 | 0.595706 |
acd809652c00a6f0021dfb6dbb4d9f8aaa25542a | 673 | py | Python | app/main/forms.py | Wildsong/accela_flask_app | ca5ef6c6f9a2557c0f20490cbdaecd801a6ad0ef | [
"MIT"
] | null | null | null | app/main/forms.py | Wildsong/accela_flask_app | ca5ef6c6f9a2557c0f20490cbdaecd801a6ad0ef | [
"MIT"
] | null | null | null | app/main/forms.py | Wildsong/accela_flask_app | ca5ef6c6f9a2557c0f20490cbdaecd801a6ad0ef | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, DateTimeField
from wtforms.validators import DataRequired, Regexp, NumberRange
class AdditionForm(FlaskForm):
"""
This form just queues an addition
"""
x = StringField(u'X value', default="0", validators=[
DataRequir... | 28.041667 | 81 | 0.652303 |
ed545214f57c24dab5c0a81b8b5261e66143fe00 | 10,811 | py | Python | tests/test_tornado.py | authbox-lib/python-consul | 347347df750eaa2a39d410fc5f32faf58619180c | [
"MIT"
] | null | null | null | tests/test_tornado.py | authbox-lib/python-consul | 347347df750eaa2a39d410fc5f32faf58619180c | [
"MIT"
] | null | null | null | tests/test_tornado.py | authbox-lib/python-consul | 347347df750eaa2a39d410fc5f32faf58619180c | [
"MIT"
] | 1 | 2018-04-02T22:06:34.000Z | 2018-04-02T22:06:34.000Z | import struct
import time
import pytest
import six
from tornado import ioloop
from tornado import gen
import consul
import consul.tornado
@pytest.fixture
def loop():
loop = ioloop.IOLoop()
loop.make_current()
return loop
def sleep(loop, s):
result = gen.Future()
loop.add_timeout(
time... | 32.080119 | 73 | 0.526408 |
2dc11698069fb8f32d2aed485ba830ea9150618b | 34,938 | py | Python | lib/payload/scanner/SSL_TLS/engine.py | pradeepjairamani/OWASP-Nettacker | 988bd960d31e1982d422f6e58590b0f34d7e5215 | [
"Apache-2.0"
] | null | null | null | lib/payload/scanner/SSL_TLS/engine.py | pradeepjairamani/OWASP-Nettacker | 988bd960d31e1982d422f6e58590b0f34d7e5215 | [
"Apache-2.0"
] | 104 | 2018-04-30T03:59:58.000Z | 2022-03-31T02:31:34.000Z | lib/payload/scanner/SSL_TLS/engine.py | pradeepjairamani/OWASP-Nettacker | 988bd960d31e1982d422f6e58590b0f34d7e5215 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Pradeep Jairamani (github.com/pradeepjairamani)
import os
import time
import socket
import struct
import re
class TLS:
def __init__(self, host="", port=0):
self.host = host
self.port = port
self.protocols = {}
self.protocols[... | 51.228739 | 125 | 0.632664 |
a5a08d6f952a1b7063c3023c5647d86dbc13856f | 3,498 | py | Python | drivers/sqlite.py | xty0505/crossfilter-benchmark-public | bb10bfeacb8438fa3b1e758e8ef9660caa5e633c | [
"MIT"
] | 2 | 2020-07-08T03:51:21.000Z | 2020-11-04T02:42:34.000Z | drivers/sqlite.py | xty0505/crossfilter-benchmark-public | bb10bfeacb8438fa3b1e758e8ef9660caa5e633c | [
"MIT"
] | null | null | null | drivers/sqlite.py | xty0505/crossfilter-benchmark-public | bb10bfeacb8438fa3b1e758e8ef9660caa5e633c | [
"MIT"
] | 1 | 2020-12-31T07:33:31.000Z | 2020-12-31T07:33:31.000Z | import os
import json
import sqlite3
import datetime, time
import itertools
from common import util
import queue
import threading
from threading import Thread
import logging
import sqlite3
import datetime, time
import itertools
from common import util
class IDEBenchDriver:
def init(self, options, schema, driver... | 30.417391 | 122 | 0.603202 |
2969246c5c7ef3ba05ac720fee0cc670040ff5ac | 3,370 | py | Python | MovelistEnums.py | Eldorico/SCUFFLE | 8f2b14ea1a274c435e7a92d5463152b6420193d0 | [
"MIT"
] | 3 | 2020-02-14T18:45:23.000Z | 2021-12-06T18:23:05.000Z | MovelistEnums.py | aTangerine/SCUFFLE | b1e3b1b3ab8fee4b0a48bf57a6198a94f6592eb1 | [
"MIT"
] | null | null | null | MovelistEnums.py | aTangerine/SCUFFLE | b1e3b1b3ab8fee4b0a48bf57a6198a94f6592eb1 | [
"MIT"
] | 1 | 2020-02-14T18:42:38.000Z | 2020-02-14T18:42:38.000Z | from enum import Enum
def enum_has_value(cls, value):
return any(value == item.value for item in cls)
class Button(Enum):
A = 0x01
B = 0x02
K = 0x04
G = 0x08
B_K = 0x06
A_B = 0x03
A_G = 0x09
K_G = 0x0C
A_B_K = 0x07
class PaddedButton(Enum):
U = 0xA... | 22.171053 | 162 | 0.605045 |
d7d7a4591d8a136f5367bdfe6eac23ac54bda7d8 | 6,314 | py | Python | plugins/feeds/public/misp.py | GDATAAdvancedAnalytics/yeti | fcd3ee3d3d064df772d0392c20c22aad2bc4c8e6 | [
"Apache-2.0"
] | 1,250 | 2017-03-12T16:20:47.000Z | 2022-03-29T02:12:11.000Z | plugins/feeds/public/misp.py | GDATAAdvancedAnalytics/yeti | fcd3ee3d3d064df772d0392c20c22aad2bc4c8e6 | [
"Apache-2.0"
] | 540 | 2017-03-20T16:45:35.000Z | 2022-03-22T16:55:02.000Z | plugins/feeds/public/misp.py | GDATAAdvancedAnalytics/yeti | fcd3ee3d3d064df772d0392c20c22aad2bc4c8e6 | [
"Apache-2.0"
] | 293 | 2017-03-20T13:59:07.000Z | 2022-03-28T16:00:10.000Z | import logging
from datetime import date, timedelta
from urllib.parse import urljoin
import pandas as pd
from pymisp.api import PyMISP
from mongoengine import DictField
from core.config.config import yeti_config
from core.feed import Feed
from core.observables import Ip, Url, Hostname, Hash, Email, Bitcoin, Observable
... | 33.057592 | 88 | 0.544029 |
d3db7b21c7c8322ded83187343869f10c949b8b6 | 2,146 | py | Python | tdameritrade/orders/models/orders.py | t-triobox/tdameritrade | 9a6a4162ca336cc7e28bc6ac2d2d718fb3e9f069 | [
"Apache-2.0"
] | 528 | 2018-08-19T17:06:29.000Z | 2022-03-28T03:39:22.000Z | tdameritrade/orders/models/orders.py | t-triobox/tdameritrade | 9a6a4162ca336cc7e28bc6ac2d2d718fb3e9f069 | [
"Apache-2.0"
] | 122 | 2018-10-23T00:06:22.000Z | 2022-03-27T15:17:24.000Z | tdameritrade/orders/models/orders.py | t-triobox/tdameritrade | 9a6a4162ca336cc7e28bc6ac2d2d718fb3e9f069 | [
"Apache-2.0"
] | 232 | 2018-09-07T19:13:00.000Z | 2022-01-28T17:32:17.000Z | from dataclasses import dataclass
from typing import List
from ..constants import (
ComplexOrderStrategyType,
Duration,
OrderStrategyType,
OrderType,
PriceLinkBasis,
PriceLinkType,
RequestedDestination,
Session,
SpecialInstruction,
Status,
StopPriceLinkBasis,
StopPriceLi... | 28.236842 | 93 | 0.698975 |
465bb9344f3a1f0ba1bbaf813e6cc4b909f57506 | 4,204 | py | Python | libml-py/classification/knn_classifier.py | tdudz/libml-py | e22764360adc94929ab523e3a07c4a1bbfeaaad7 | [
"MIT"
] | null | null | null | libml-py/classification/knn_classifier.py | tdudz/libml-py | e22764360adc94929ab523e3a07c4a1bbfeaaad7 | [
"MIT"
] | null | null | null | libml-py/classification/knn_classifier.py | tdudz/libml-py | e22764360adc94929ab523e3a07c4a1bbfeaaad7 | [
"MIT"
] | null | null | null | """
k-Nearest Neighbors Classification
----------------------------------
Supports L1 norm (Manhattan), L2 norm (Euclidean), Linf norm (Chebyshev).
"""
import numpy as numpy
import math
class kNearestNeighborsClassifier(object):
def __init__(self):
self.fitted = False
self.dataset = None
... | 32.589147 | 85 | 0.554234 |
2523d48825953995e0ae5266f5f0e892dd65d61b | 1,203 | py | Python | _static/cookbook/gravmag_grav_polyprism.py | fatiando/v0.1 | 1ab9876b247c67834b8e1c874d5b1d86f82802e2 | [
"BSD-3-Clause"
] | null | null | null | _static/cookbook/gravmag_grav_polyprism.py | fatiando/v0.1 | 1ab9876b247c67834b8e1c874d5b1d86f82802e2 | [
"BSD-3-Clause"
] | null | null | null | _static/cookbook/gravmag_grav_polyprism.py | fatiando/v0.1 | 1ab9876b247c67834b8e1c874d5b1d86f82802e2 | [
"BSD-3-Clause"
] | null | null | null | """
GravMag: Forward gravity modeling using a stack of 3D polygonal prisms
"""
from fatiando import logger, mesher, gridder, gravmag
from fatiando.vis import mpl, myv
log = logger.get()
log.info(logger.header())
log.info(__doc__)
log.info("Draw the polygons one by one:")
bounds = [-10000, 10000, -10000, 10000, 0, 500... | 27.340909 | 70 | 0.661679 |
832fd02b5159a31e572be339ac22a25f21e4617a | 370 | py | Python | manage.py | mehmett420/Mysite | 2fbf735d2714c73fbf7a5a4012dfc0e6189835d6 | [
"MIT"
] | 2 | 2021-10-13T23:39:57.000Z | 2021-11-13T02:42:48.000Z | manage.py | mehmett420/Mysite | 2fbf735d2714c73fbf7a5a4012dfc0e6189835d6 | [
"MIT"
] | null | null | null | manage.py | mehmett420/Mysite | 2fbf735d2714c73fbf7a5a4012dfc0e6189835d6 | [
"MIT"
] | 1 | 2021-04-30T23:07:01.000Z | 2021-04-30T23:07:01.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
from mezzanine.utils.conf import real_project_name
settings_module = "%s.settings" % real_project_name("mysite")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
from django.core.management import execute_from_comm... | 24.666667 | 68 | 0.77027 |
43dbfbc79a9a1f1796f7da9fe0ae1da11ad240db | 6,187 | py | Python | theano/gpuarray/reduction.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | 4 | 2017-09-10T00:54:17.000Z | 2019-10-22T23:28:09.000Z | theano/gpuarray/reduction.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/reduction.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | 2 | 2019-08-12T13:45:09.000Z | 2020-08-14T10:13:50.000Z | from __future__ import print_function, absolute_import, division
import os
import theano
from theano.gof import Op, Apply
from theano.gof.type import Generic
from .basic_ops import (infer_context_name, as_gpuarray_variable)
from .type import GpuArrayType
try:
import pygpu
except ImportError as e:
pass
class... | 42.668966 | 139 | 0.589462 |
9a0d87bf9454e68ee62ce93b2e11e08b9b5dd81c | 467 | py | Python | examples/verilog/user_guide/run.py | tyski34/vunit | cc0e0fd220ec6ce409f5c48301a78ca3decab5fd | [
"Artistic-2.0"
] | null | null | null | examples/verilog/user_guide/run.py | tyski34/vunit | cc0e0fd220ec6ce409f5c48301a78ca3decab5fd | [
"Artistic-2.0"
] | null | null | null | examples/verilog/user_guide/run.py | tyski34/vunit | cc0e0fd220ec6ce409f5c48301a78ca3decab5fd | [
"Artistic-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com
from os.path import join, dirname
from vunit.ver... | 29.1875 | 75 | 0.732334 |
519550409738795e9ff566f6c5e54dcfcefa52b4 | 464 | py | Python | e/mail-relay/web_customer/auditlog/migrations/0008_logentry_relate_id.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | e/mail-relay/web_customer/auditlog/migrations/0008_logentry_relate_id.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | 18 | 2020-06-05T18:17:40.000Z | 2022-03-11T23:25:21.000Z | e/mail-relay/web_customer/auditlog/migrations/0008_logentry_relate_id.py | zhouli121018/nodejsgm | 0ccbc8acf61badc812f684dd39253d55c99f08eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('auditlog', '0007_object_pk_type'),
]
operations = [
migrations.AddField(
model_name='logentry',
name... | 23.2 | 112 | 0.62931 |
adf5d5d46645e6a3398f7b019c98800f6f089b5a | 10,038 | py | Python | seeded_sampler.py | coupriec/enc_dec | 5e31a1cd384f24ac48e932b623780bd0c70103d9 | [
"MIT"
] | null | null | null | seeded_sampler.py | coupriec/enc_dec | 5e31a1cd384f24ac48e932b623780bd0c70103d9 | [
"MIT"
] | null | null | null | seeded_sampler.py | coupriec/enc_dec | 5e31a1cd384f24ac48e932b623780bd0c70103d9 | [
"MIT"
] | null | null | null | ''' Samples from a (class-conditional) GAN, so that the samples can be reproduced '''
import os
import pickle
import random
import copy
import torch
from torch import nn
from gan_training.checkpoints import CheckpointIO
from gan_training.config import (load_config, build_models)
from seeing.yz_dataset import YZDatas... | 41.479339 | 134 | 0.614166 |
13554a96223ef197d09e7329358cfca842e4f197 | 552 | py | Python | HMBBF/migrations/0029_auto_20161205_1040.py | HLoveMe/HWMBBF_Serve | a11fb5b67c913b62df839ce3438a3be433e3865b | [
"Apache-2.0"
] | null | null | null | HMBBF/migrations/0029_auto_20161205_1040.py | HLoveMe/HWMBBF_Serve | a11fb5b67c913b62df839ce3438a3be433e3865b | [
"Apache-2.0"
] | null | null | null | HMBBF/migrations/0029_auto_20161205_1040.py | HLoveMe/HWMBBF_Serve | a11fb5b67c913b62df839ce3438a3be433e3865b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('HMBBF', '0028_auto_20161205_1032'),
]
operations = [
migrations.AlterField(
model_name='theme',
name... | 27.6 | 200 | 0.628623 |
8f18dfccb736dcbf69f7bd2f767cebb44c33eb38 | 2,703 | py | Python | tempest/tests/cli/test_cli.py | afaheem88/tempest_neutron | 20276dbee68087e576f4977633380fc6cd3fc1cd | [
"Apache-2.0"
] | null | null | null | tempest/tests/cli/test_cli.py | afaheem88/tempest_neutron | 20276dbee68087e576f4977633380fc6cd3fc1cd | [
"Apache-2.0"
] | null | null | null | tempest/tests/cli/test_cli.py | afaheem88/tempest_neutron | 20276dbee68087e576f4977633380fc6cd3fc1cd | [
"Apache-2.0"
] | 1 | 2018-10-09T06:32:04.000Z | 2018-10-09T06:32:04.000Z | # Copyright 2014 IBM Corp.
#
# 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... | 39.173913 | 79 | 0.631521 |
49d6b3d7a45638900a94d8d4660aa34e8205fe33 | 10,766 | py | Python | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | null | null | null | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 221 | 2020-11-06T13:03:32.000Z | 2021-07-30T08:17:58.000Z | chi/plots/_residuals.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 1 | 2021-02-10T13:03:58.000Z | 2021-02-10T13:03:58.000Z | #
# This file is part of the chi repository
# (https://github.com/DavAug/chi/) which is released under the
# BSD 3-clause license. See accompanying LICENSE.md for copyright notice and
# full license details.
#
import numpy as np
import pandas as pd
import plotly.colors
import plotly.graph_objects as go
from chi impor... | 39.149091 | 79 | 0.614063 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.