hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fbec81afde982744129ed62c3d44a6236c5b5a8e | 27,523 | py | Python | howdoi/howdoi.py | benjaminhafen/howdoi | 875983c9ebdf4a1c9abad7afd63a68a9229e8eed | [
"MIT"
] | null | null | null | howdoi/howdoi.py | benjaminhafen/howdoi | 875983c9ebdf4a1c9abad7afd63a68a9229e8eed | [
"MIT"
] | null | null | null | howdoi/howdoi.py | benjaminhafen/howdoi | 875983c9ebdf4a1c9abad7afd63a68a9229e8eed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
######################################################
#
# howdoi - instant coding answers via the command line
# written by Benjamin Gleitzman (gleitz@mit.edu)
# inspired by Rich Jones (rich@anomos.info)
#
######################################################
import gc
gc.disable()
import arg... | 33.482968 | 114 | 0.63427 |
ea011e19b2599a0908c90f899ef22072c3691713 | 719 | py | Python | Libreria/recorte.py | Sannso/GameCG2 | 426e22541bf670e0767395c30f15d1b6ad6183f3 | [
"CC0-1.0"
] | null | null | null | Libreria/recorte.py | Sannso/GameCG2 | 426e22541bf670e0767395c30f15d1b6ad6183f3 | [
"CC0-1.0"
] | null | null | null | Libreria/recorte.py | Sannso/GameCG2 | 426e22541bf670e0767395c30f15d1b6ad6183f3 | [
"CC0-1.0"
] | null | null | null | import pygame
import configparser
animapersonaje = []
def recortar_imagen(nombre_imagen, ancho_imagen,alto_imagen,fila_):
terreno = pygame.image.load(nombre_imagen)
info = terreno.get_rect()
ancho_pixeles = info[2]
alto_pixeles = info[3]
ancho_patron = ancho_pixeles/ancho_imagen
alto_pat... | 29.958333 | 104 | 0.720445 |
56e22ee1d2812f1881aa3e2ef41f1be3c41d20e3 | 420 | py | Python | utils/image_downloader.py | louismeunier/school-disct-bot-v2 | e6c225e6883b6a820df5f290cae6d5c01edcae46 | [
"MIT"
] | null | null | null | utils/image_downloader.py | louismeunier/school-disct-bot-v2 | e6c225e6883b6a820df5f290cae6d5c01edcae46 | [
"MIT"
] | null | null | null | utils/image_downloader.py | louismeunier/school-disct-bot-v2 | e6c225e6883b6a820df5f290cae6d5c01edcae46 | [
"MIT"
] | null | null | null | import requests
import shutil
def download(url,name):
"""
This function was almost ENTIRELY "copied" from
https://towardsdatascience.com/how-to-download-an-image-using-python-38a75cfa21c
"""
r=requests.get(url,stream=True)
if r.status_code==200:
r.raw.decode_content=True
with open(f"utils/resources/images/sc... | 26.25 | 81 | 0.742857 |
0ae261a4ebe4c6f01f6c6e4cff9c57b1bfde5b6f | 94 | py | Python | samanage/__init__.py | rodneymandap/samanage-py | 9e06b363e2fa43b3e8f92f97aa3975e1f0461a56 | [
"MIT"
] | null | null | null | samanage/__init__.py | rodneymandap/samanage-py | 9e06b363e2fa43b3e8f92f97aa3975e1f0461a56 | [
"MIT"
] | null | null | null | samanage/__init__.py | rodneymandap/samanage-py | 9e06b363e2fa43b3e8f92f97aa3975e1f0461a56 | [
"MIT"
] | 1 | 2022-01-25T21:40:48.000Z | 2022-01-25T21:40:48.000Z | """
A simple python library to interact with Samanage API.
"""
from .samanage import Samanage
| 18.8 | 54 | 0.755319 |
0ebab7aa22b7295e680c8a5a13e536e63fd32d87 | 2,528 | py | Python | opencv/sources/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | opencv/sources/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | opencv/sources/samples/python/tutorial_code/ShapeDescriptors/bounding_rotated_ellipses/generalContours_demo2.py | vrushank-agrawal/opencv-x64-cmake | 3f9486510d706c8ac579ac82f5d58f667f948124 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse
import random as rng
rng.seed(12345)
def thresh_callback(val):
threshold = val
## [Canny]
# Detect edges using Canny
canny_output = cv.Canny(src_gray, threshold, threshold * 2)
## [Canny]
... | 30.457831 | 125 | 0.649525 |
4562dc3a95851a278fb188725cb2033198ca85c1 | 1,885 | py | Python | tests/test_tools/test_search.py | Nazime/wordlistools | f18fb0dbfa6e4950e090299d99a173ac96514f42 | [
"MIT"
] | 17 | 2022-02-06T21:23:27.000Z | 2022-02-07T22:33:40.000Z | tests/test_tools/test_search.py | Nazime/wordlistools | f18fb0dbfa6e4950e090299d99a173ac96514f42 | [
"MIT"
] | 1 | 2022-02-06T21:52:30.000Z | 2022-02-06T21:52:30.000Z | tests/test_tools/test_search.py | Nazime/wordlistools | f18fb0dbfa6e4950e090299d99a173ac96514f42 | [
"MIT"
] | 2 | 2022-02-06T21:29:42.000Z | 2022-02-06T21:31:06.000Z | from wordlistools.helpertest import AsStdinWordlist, AsWordlist, PolyArgument, runtest
from wordlistools.plugins import red
def test_color_false():
# By default color is enabled in cmdline and disabled in API
color_arg_false = PolyArgument(
api_key="color", api_value=False, cmd_args=["--color", "no"]
... | 27.720588 | 87 | 0.468966 |
90dc887dcea1ff2eedefbc8d6852c4d9ad9a64cb | 33,321 | py | Python | scripts/docspregen.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | scripts/docspregen.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | scripts/docspregen.py | ufo2011/platformio-core | 0ceae62701731f8b32c34d7993a34dea34aea59c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | 28.455167 | 126 | 0.581855 |
2ca10ad6bb6480220070f6667f39518fd6e94a5b | 533 | py | Python | workspace_william/data_dowloads/CreateShapefile.py | william-r-austin/district2 | fa2f5a6560159478b15cd69a97959e91a81c1490 | [
"Unlicense"
] | null | null | null | workspace_william/data_dowloads/CreateShapefile.py | william-r-austin/district2 | fa2f5a6560159478b15cd69a97959e91a81c1490 | [
"Unlicense"
] | null | null | null | workspace_william/data_dowloads/CreateShapefile.py | william-r-austin/district2 | fa2f5a6560159478b15cd69a97959e91a81c1490 | [
"Unlicense"
] | null | null | null | # Polsby Popper
import shapefile
#import shapely
from shapely import geometry
import math
f = open("voronoi_polygons.txt")
allLines = f.readlines()
i = 1
w = shapefile.Writer("MyGeneratedShapefiles/test_2")
w.field('TFIELD', 'C')
for currentLine in allLines:
points = currentLine.split()
mainPoly = []
for point i... | 17.193548 | 58 | 0.707317 |
f30c1b3ffb93028da3c23c02eed170e36ef24bc0 | 6,363 | py | Python | naima/extern/minimize.py | Carlor87/naima | 1728b0ac18fab9e709816c868625e5ffbaab83b7 | [
"BSD-3-Clause"
] | null | null | null | naima/extern/minimize.py | Carlor87/naima | 1728b0ac18fab9e709816c868625e5ffbaab83b7 | [
"BSD-3-Clause"
] | null | null | null | naima/extern/minimize.py | Carlor87/naima | 1728b0ac18fab9e709816c868625e5ffbaab83b7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# This module includes a copy of the scipy.optimize._minimize_neldermead
# function modified to use relative tolerances instead of absolute. See issue at
# https://github.com/scipy/scipy/issues/5051
# minimize is a thin wrapper tha... | 26.077869 | 80 | 0.509194 |
eaedfd59190ad288f5447652b18cad9a710941b7 | 161 | py | Python | main.py | justinhchae/app_courts | c46d48c4fa02cec91bda6fc3818ab677d6a83281 | [
"MIT"
] | 4 | 2021-01-04T05:46:43.000Z | 2022-01-06T16:33:40.000Z | main.py | justinhchae/app_courts | c46d48c4fa02cec91bda6fc3818ab677d6a83281 | [
"MIT"
] | null | null | null | main.py | justinhchae/app_courts | c46d48c4fa02cec91bda6fc3818ab677d6a83281 | [
"MIT"
] | null | null | null | from application.application import Application
if __name__ == '__main__':
app = Application()
def run_app():
app.run_app()
run_app()
| 11.5 | 47 | 0.63354 |
5f3cbf5c9e2b8330b90446a1604db5a6798a758e | 193 | py | Python | python/init/pip_upgrade.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/init/pip_upgrade.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/init/pip_upgrade.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | import pkg_resources
from subprocess import call
packages = [dist.project_name for dist in pkg_resources.working_set]
call("python -m pip install --upgrade " + ' '.join(packages), shell=True)
| 32.166667 | 73 | 0.772021 |
2080d6d8dba6ac7d40b50201274b7ae825d1ec75 | 2,484 | py | Python | invadedhouse/commands/command_interpreter.py | redjoey/games | c30739e8363a5724f1c80eb3d2ce34e680cee48a | [
"MIT"
] | null | null | null | invadedhouse/commands/command_interpreter.py | redjoey/games | c30739e8363a5724f1c80eb3d2ce34e680cee48a | [
"MIT"
] | 5 | 2019-12-15T19:29:22.000Z | 2019-12-18T23:02:35.000Z | invadedhouse/commands/command_interpreter.py | redjoey/games | c30739e8363a5724f1c80eb3d2ce34e680cee48a | [
"MIT"
] | null | null | null | from .attack import Attack
from .drop import Drop
from .enter import Enter
from .exit import Exit
from .help import Help
from .inventory import Inventory
from .look import Look
from .lookat import LookAt
from .loot import Loot
from .pickup import Pickup
from .rename import Rename
from .smash import Smash
from .startove... | 29.927711 | 60 | 0.572464 |
47cb52cd64268dd8f391726d47ba89c91e264627 | 1,607 | py | Python | scrapy-examples/tutorial/tutorial/pipelines.py | Project-Sch/SpiderGarden | 1928c9253815f79a03f7a6075dbe83add9a170c8 | [
"Apache-2.0"
] | 2 | 2016-06-11T10:39:25.000Z | 2017-03-03T04:25:23.000Z | scrapy-examples/tutorial/tutorial/pipelines.py | Project-Sch/SpiderGarden | 1928c9253815f79a03f7a6075dbe83add9a170c8 | [
"Apache-2.0"
] | null | null | null | scrapy-examples/tutorial/tutorial/pipelines.py | Project-Sch/SpiderGarden | 1928c9253815f79a03f7a6075dbe83add9a170c8 | [
"Apache-2.0"
] | null | null | null | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy import signals
from scrapy.contrib.exporter import XmlItemExporter
class TutorialPipeline(object):
def process_item(self, item, spider... | 26.783333 | 78 | 0.664592 |
e73cb0b3dc46495439b7b310ca6e2d0672297c86 | 1,143 | py | Python | kde/frameworks/tier3/ktexteditor/ktexteditor.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | null | null | null | kde/frameworks/tier3/ktexteditor/ktexteditor.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 1 | 2020-01-10T01:06:16.000Z | 2020-01-10T01:06:16.000Z | kde/frameworks/tier3/ktexteditor/ktexteditor.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 2 | 2020-01-02T18:22:12.000Z | 2020-08-05T13:39:21.000Z | import info
class subinfo(info.infoclass):
def setTargets(self):
self.versionInfo.setDefaultValues()
self.description = "KTextEditor provides an advanced embeddable text editor"
def setDependencies(self):
self.buildDependencies["virtual/base"] = None
self.buildDependencies["k... | 38.1 | 84 | 0.721785 |
fefa704bd5f9296328de10ab4352c599231ba09d | 11,871 | py | Python | melodic/lib/python2.7/dist-packages/rqt_robot_monitor/robot_monitor.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 2 | 2021-07-14T12:33:55.000Z | 2021-11-21T07:14:13.000Z | melodic/src/rqt_robot_monitor/src/rqt_robot_monitor/robot_monitor.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | 1 | 2021-07-08T10:26:06.000Z | 2021-07-08T10:31:11.000Z | melodic/src/rqt_robot_monitor/src/rqt_robot_monitor/robot_monitor.py | disorn-inc/ROS-melodic-python3-Opencv-4.1.1-CUDA | 3d265bb64712e3cd7dfa0ad56d78fcdebafdb4b0 | [
"BSD-3-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | 39.178218 | 85 | 0.665235 |
bc9c6956aab6c288dc419b3ee372744a4c5e47b6 | 10,150 | py | Python | bigml/predicate_utils/utils.py | axellos162/python-4 | 569f6655871ea60b41e9442396433567b9daaea7 | [
"Apache-2.0"
] | 137 | 2015-01-12T06:04:10.000Z | 2022-03-06T21:00:04.000Z | bigml/predicate_utils/utils.py | axellos162/python-4 | 569f6655871ea60b41e9442396433567b9daaea7 | [
"Apache-2.0"
] | 78 | 2015-01-13T18:28:51.000Z | 2022-03-04T19:18:28.000Z | bigml/predicate_utils/utils.py | axellos162/python-4 | 569f6655871ea60b41e9442396433567b9daaea7 | [
"Apache-2.0"
] | 144 | 2015-01-16T06:13:33.000Z | 2022-03-29T17:53:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2020-2021 BigML
#
# 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 ... | 33.061889 | 80 | 0.591034 |
957fc248015ace0a7f263e6ab741f7bd28519c20 | 1,717 | py | Python | visualiser/facades/ociVault.py | LaudateCorpus1/oci-designer-toolkit | 4b6af0d8088ea3f3b61cb3b6076a1382c269d8b4 | [
"UPL-1.0",
"Apache-2.0"
] | 186 | 2020-05-12T23:02:38.000Z | 2022-03-25T04:29:25.000Z | visualiser/facades/ociVault.py | LaudateCorpus1/oci-designer-toolkit | 4b6af0d8088ea3f3b61cb3b6076a1382c269d8b4 | [
"UPL-1.0",
"Apache-2.0"
] | 145 | 2020-05-13T17:40:00.000Z | 2022-03-22T17:27:11.000Z | visualiser/facades/ociVault.py | LaudateCorpus1/oci-designer-toolkit | 4b6af0d8088ea3f3b61cb3b6076a1382c269d8b4 | [
"UPL-1.0",
"Apache-2.0"
] | 96 | 2020-05-13T16:00:08.000Z | 2022-03-25T06:22:12.000Z | #!/usr/bin/python
# Copyright (c) 2020, 2021, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
"""Provide Module Description
"""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
__author__ =... | 32.396226 | 118 | 0.631916 |
aeb629a1f8eb6e293971ff976d205dfe5f33e9da | 331 | py | Python | projects/noise/random_noise.py | JonasKoenig/CodeOnMyMind | d169a424f29d603f0510f98d265d68c26a333a6b | [
"MIT"
] | 3 | 2019-02-20T22:01:37.000Z | 2022-03-02T20:06:16.000Z | projects/noise/random_noise.py | JonasKoenig/CodeOnMyMind | d169a424f29d603f0510f98d265d68c26a333a6b | [
"MIT"
] | null | null | null | projects/noise/random_noise.py | JonasKoenig/CodeOnMyMind | d169a424f29d603f0510f98d265d68c26a333a6b | [
"MIT"
] | null | null | null | import numpy as np
size = 32
np.random.seed(42)
# normalized random noise map
map = np.random.rand(size,size)
# pretty print
shades = [' ', '░░', '▒▒', '▓▓', '██']
string = ''
for y in range(0,size):
for x in range(0,size):
string += shades[int(np.floor(map[y][x]*(len(shades))))]
string += '\n'
pri... | 18.388889 | 64 | 0.577039 |
faf5ac080eff7d959686146df2863ac76246c818 | 7,800 | py | Python | python/recommender.py | mpab/RobocodeML | 30edd0395df54ef5a035cbecb70eddf2eb3a99ac | [
"Apache-2.0"
] | 1 | 2020-11-20T23:02:05.000Z | 2020-11-20T23:02:05.000Z | python/recommender.py | mpab/RobocodeML | 30edd0395df54ef5a035cbecb70eddf2eb3a99ac | [
"Apache-2.0"
] | 1 | 2022-03-04T04:16:56.000Z | 2022-03-04T04:16:56.000Z | python/recommender.py | mpab/RobocodeML | 30edd0395df54ef5a035cbecb70eddf2eb3a99ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import random
import io
import copy
import util
import observations
import cfg
import models
import extractor
import features
import datasets
model_name = 'AdaBoost'
# features_classification_filter = 'pure_boolean_classified'
# target_filter = 'enemy_collisions'
__classification_metamodels__ ... | 30.46875 | 103 | 0.673205 |
e918f242dfe8182e33a9f179d04d1048689b8118 | 2,062 | py | Python | solve_state.py | imVincentTan/wordle-solver | b57d5ec9d2d6426d05449b9230a08405040b4b19 | [
"MIT"
] | null | null | null | solve_state.py | imVincentTan/wordle-solver | b57d5ec9d2d6426d05449b9230a08405040b4b19 | [
"MIT"
] | null | null | null | solve_state.py | imVincentTan/wordle-solver | b57d5ec9d2d6426d05449b9230a08405040b4b19 | [
"MIT"
] | null | null | null | from math import log2
from hints_calculator import HintsCalculator
from tools import Tools
class SolveState(Tools):
def __init__(self, possible_letters, number_of_characters, valid_words) -> None:
self.possible_letters = possible_letters
self.number_of_characters = number_of_characters
sel... | 41.24 | 93 | 0.730844 |
7bae862657f38a00a09cbf95a98e2e374da89758 | 4,169 | py | Python | tetris-server/app.py | OrhanKupusoglu/docker-tetris | 42f70431e686264f8dd66e7d419674b7271a66e6 | [
"MIT"
] | 9 | 2018-04-06T23:10:59.000Z | 2022-01-21T01:04:51.000Z | tetris-server/app.py | OrhanKupusoglu/docker-tetris | 42f70431e686264f8dd66e7d419674b7271a66e6 | [
"MIT"
] | null | null | null | tetris-server/app.py | OrhanKupusoglu/docker-tetris | 42f70431e686264f8dd66e7d419674b7271a66e6 | [
"MIT"
] | 5 | 2019-09-18T22:04:35.000Z | 2022-01-04T20:27:37.000Z | """
Tetris Server
Flask:
http://flask.pocoo.org/
Tetris:
https://github.com/ytiurin/tetris
"""
import os
import uuid
import time
import logging
import logging.handlers
import json
from flask import (
abort,
Flask,
request,
Response,
session,
g,
jsonify,
redirect,
... | 27.427632 | 125 | 0.637083 |
1390237717c3ef8fd76398e6ce5c5dea7908a60b | 9,790 | py | Python | bin/add_attachments.py | mardub1635/acl-anthology | 448c9d8919736c7493e57af505dfb06cf11dc43a | [
"Apache-2.0"
] | null | null | null | bin/add_attachments.py | mardub1635/acl-anthology | 448c9d8919736c7493e57af505dfb06cf11dc43a | [
"Apache-2.0"
] | null | null | null | bin/add_attachments.py | mardub1635/acl-anthology | 448c9d8919736c7493e57af505dfb06cf11dc43a | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2019 Matt Post <post@cs.jhu.edu>
#
# 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... | 38.543307 | 291 | 0.594382 |
b4af888c05052c270fcf9a0f7a3024ae77bb61fa | 1,627 | py | Python | Kai/crab/NANOv7_NoveCampaign/2018/crab_cfg_2018_tt_DL-GF.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/crab/NANOv7_NoveCampaign/2018/crab_cfg_2018_tt_DL-GF.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/crab/NANOv7_NoveCampaign/2018/crab_cfg_2018_tt_DL-GF.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | import os
from WMCore.Configuration import Configuration
from CRABClient.UserUtilities import config, getUsernameFromCRIC
config = Configuration()
config.section_("General")
config.General.requestName = '2018_tt_DL-GF'
config.General.transferOutputs = True
config.General.transferLogs = True
config.section_("JobType")... | 40.675 | 161 | 0.777505 |
3afc862a4da7214a8d147df8ed03e28da80b06e7 | 60,851 | py | Python | tobii_pro_wrapper/tobii_pro_wrapper.py | anthonycrane/tobii_pro_wrapper | 65292966f2b3a9ec9bef0382878a397406ec974d | [
"Apache-2.0"
] | null | null | null | tobii_pro_wrapper/tobii_pro_wrapper.py | anthonycrane/tobii_pro_wrapper | 65292966f2b3a9ec9bef0382878a397406ec974d | [
"Apache-2.0"
] | null | null | null | tobii_pro_wrapper/tobii_pro_wrapper.py | anthonycrane/tobii_pro_wrapper | 65292966f2b3a9ec9bef0382878a397406ec974d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Psychopy supported Tobii controller for the new Pro SDK
# Authors: Olivia Guayasamin
# Date: 8/3/2017
# Requirements: Python 2.7 32 Bit (SDK required)
# Tobii Pro SDK 1.0 for Python, and all dependencies
# Psychopy, Psychopy.iohub, and all dependencies
# numpy, scipy, and ... | 45.108228 | 108 | 0.51889 |
e72dba85cc70914d2f8cbd7eb914d226103ddb84 | 788 | py | Python | tests/test_extractor.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | tests/test_extractor.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | tests/test_extractor.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | '''
Created on May 05, 2021
@author: pashaa@mskcc.org
'''
import glob
import json
import os
import pandas as pd
import shutil
import pytest
from graph_db.common.config import ConfigSet, APP_CFG, DATA_CFG
from graph_db.extractor import delta_to_json
delta_table = 'tests/input_data/user_table'
json_path = 'tests/outp... | 20.205128 | 76 | 0.742386 |
9137cc4580663edf715cf1eb40e720eb97d038a6 | 1,264 | py | Python | Own/Python/Tutorials/Classes.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | Own/Python/Tutorials/Classes.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | Own/Python/Tutorials/Classes.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | #Cristian Chitiva
#cychitivav@unal.edu.co
#13/Sept/2018
class Pencil:
_length = '10 cm'#Class variable notation
def __new__(self, color = 'Rojo', eraser = True, graphite = False):#Constructor
self.__init__(self, color, eraser, graphite)
def __init__(self, color, eraser, graphite):
... | 22.981818 | 84 | 0.599684 |
a420022537a27f46857d881d54db04635f25562e | 2,725 | py | Python | sdk/python-sdk/test/protocols/test_QuestionAnswer.py | tw-bc-group/verity-sdk | e932209ab849f04a389bdda0718cd6227187e5cf | [
"Apache-2.0"
] | null | null | null | sdk/python-sdk/test/protocols/test_QuestionAnswer.py | tw-bc-group/verity-sdk | e932209ab849f04a389bdda0718cd6227187e5cf | [
"Apache-2.0"
] | 2 | 2021-09-02T19:02:06.000Z | 2021-09-02T19:02:24.000Z | sdk/python-sdk/test/protocols/test_QuestionAnswer.py | tw-bc-group/verity-sdk | e932209ab849f04a389bdda0718cd6227187e5cf | [
"Apache-2.0"
] | 1 | 2021-01-13T10:43:14.000Z | 2021-01-13T10:43:14.000Z | # import pytest
#
# from test.test_utils import get_test_config, cleanup
# from verity_sdk.protocols.v1_0.QuestionAnswer import QuestionAnswer
# from verity_sdk.utils import COMMUNITY_MSG_QUALIFIER
# from verity_sdk.utils.Context import Context
#
# for_relationship = 'some_did'
# question_text = 'Are you trying to logi... | 38.928571 | 111 | 0.678899 |
b1f0af366f8009d3e1f2e0737b18ea2205c89383 | 9,243 | py | Python | src/csv_db_package/fileserver.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | src/csv_db_package/fileserver.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | src/csv_db_package/fileserver.py | ankitaliya/csv_db_package | 4c61a26132c7ce1de4440c1fc0ca6cf1ee39c0a3 | [
"MIT"
] | null | null | null | """The script to create a http server on local for uploading a csv file
and perform CRUD operations on the UI connected with the database."""
from http.server import HTTPServer, BaseHTTPRequestHandler
import cgi
import logging
import jinja2
from mysql.connector import connect, errors
import pandas as pd
from crud_... | 46.918782 | 117 | 0.572217 |
fbc610cd1e1d060960e96bb00f0f0548d59d7685 | 1,147 | py | Python | chapter7_语音合成/C7_2_y.py | busyyang/python_sound_open | 91bc284f0ed538c1e8756a1a1475956191b4ae86 | [
"Apache-2.0"
] | 165 | 2020-06-10T03:39:17.000Z | 2022-03-28T08:37:32.000Z | chapter7_语音合成/C7_2_y.py | shangminghao/python_sound_open | 91bc284f0ed538c1e8756a1a1475956191b4ae86 | [
"Apache-2.0"
] | 3 | 2020-11-20T03:00:56.000Z | 2021-08-05T01:30:32.000Z | chapter7_语音合成/C7_2_y.py | shangminghao/python_sound_open | 91bc284f0ed538c1e8756a1a1475956191b4ae86 | [
"Apache-2.0"
] | 66 | 2020-06-02T01:57:24.000Z | 2022-03-16T07:54:59.000Z | from chapter2_基础.soundBase import *
from chapter7_语音合成.flipframe import *
from chapter3_分析实验.C3_1_y_1 import enframe
from chapter3_分析实验.lpc import lpc_coeff
from scipy.signal import lfilter
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
data, fs = soundBase('C7_2_y.wav').audi... | 24.404255 | 63 | 0.659983 |
9a210bf79367694f4925238b3a020b2a0ceaefaa | 5,031 | py | Python | distrax/_src/distributions/uniform.py | LaudateCorpus1/distrax | ed8381045a0eb08eea262ac8707f9d77692475ef | [
"Apache-2.0"
] | null | null | null | distrax/_src/distributions/uniform.py | LaudateCorpus1/distrax | ed8381045a0eb08eea262ac8707f9d77692475ef | [
"Apache-2.0"
] | 1 | 2021-10-05T16:07:30.000Z | 2021-10-05T16:07:30.000Z | distrax/_src/distributions/uniform.py | LaudateCorpus1/distrax | ed8381045a0eb08eea262ac8707f9d77692475ef | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DeepMind Technologies Limited. 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 ... | 31.055556 | 80 | 0.675214 |
e7520e386dac674ee0c67f2f0de718e673e457de | 3,626 | py | Python | sic_codes.py | leanguardia/gender-pay-gap-uk | 85633151380bb641fc08112fed199334013b7b3c | [
"MIT"
] | 1 | 2021-01-13T13:40:16.000Z | 2021-01-13T13:40:16.000Z | sic_codes.py | leanguardia/gender-pay-gap-uk | 85633151380bb641fc08112fed199334013b7b3c | [
"MIT"
] | null | null | null | sic_codes.py | leanguardia/gender-pay-gap-uk | 85633151380bb641fc08112fed199334013b7b3c | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
def drop_sic_codes_na(df):
""" Removes all rows with missing SicCodes
"""
return df.dropna(subset=['SicCodes']).reset_index(drop=True)
def clean_sic_codes(df):
""" Cleans lists of SicCodes
"""
df = _codes_to(df, str)
df.SicCodes = df.SicCodes.apply(_s... | 32.666667 | 101 | 0.694981 |
3a956c607a1ae3293da5944bb5ea9b3b4822c64f | 114 | py | Python | Software/main.py | cboltz/MacherdaachBadgeQueue | ed8b39a0fb1c3fe43e61179c0c510cc011dd9a48 | [
"CC0-1.0"
] | null | null | null | Software/main.py | cboltz/MacherdaachBadgeQueue | ed8b39a0fb1c3fe43e61179c0c510cc011dd9a48 | [
"CC0-1.0"
] | null | null | null | Software/main.py | cboltz/MacherdaachBadgeQueue | ed8b39a0fb1c3fe43e61179c0c510cc011dd9a48 | [
"CC0-1.0"
] | null | null | null | from controller.controller import Controller
def run():
Controller()
if __name__ == '__main__':
run()
| 11.4 | 44 | 0.675439 |
9122864a19a16d1576b1dad9a56a3810032a7845 | 2,763 | py | Python | test-import-vulnerable-api-master/test-import-vulnerable-api-master/test/test_vapi.py | rmit-cyber-ready-cic/Security99 | 2d32865aef91f09b0edac2dd926ce603769052d7 | [
"MIT"
] | null | null | null | test-import-vulnerable-api-master/test-import-vulnerable-api-master/test/test_vapi.py | rmit-cyber-ready-cic/Security99 | 2d32865aef91f09b0edac2dd926ce603769052d7 | [
"MIT"
] | null | null | null | test-import-vulnerable-api-master/test-import-vulnerable-api-master/test/test_vapi.py | rmit-cyber-ready-cic/Security99 | 2d32865aef91f09b0edac2dd926ce603769052d7 | [
"MIT"
] | null | null | null | import json
import unittest
from test import BaseTestCase
class TestvAPI(BaseTestCase):
def test_tokens_1(self):
headers = { "Content-type": "application/json"}
r = self.client.open(
"/tokens",
method='POST',
data=json.dumps({'username': "blah1'", 'password': '... | 33.695122 | 107 | 0.566051 |
e380debf42eb8210370254ea98e490baf7f5c9c3 | 4,550 | py | Python | mtgreatest-py/mtgreatest/scrape/players.py | oelarnes/mtgreatest | e2bf74fe9695302d6881e835e2cd1f5d2b312b5c | [
"MIT"
] | null | null | null | mtgreatest-py/mtgreatest/scrape/players.py | oelarnes/mtgreatest | e2bf74fe9695302d6881e835e2cd1f5d2b312b5c | [
"MIT"
] | null | null | null | mtgreatest-py/mtgreatest/scrape/players.py | oelarnes/mtgreatest | e2bf74fe9695302d6881e835e2cd1f5d2b312b5c | [
"MIT"
] | null | null | null | import requests
import re
from bs4 import BeautifulSoup
from distance import levenshtein
from mtgreatest.rdb import Cursor, serialize
NUM_NORM_NAMES = 4
NORM_NAMES = ['norm_name_{}'.format(num) for num in range(NUM_NORM_NAMES)]
def fix_name_and_country(name, country):
if name is None:
return (name, country)
... | 39.224138 | 161 | 0.695824 |
ec3e3b9ff7e653c612e2deb9d9d4329753b86051 | 782 | py | Python | tests/test_utils.py | coderatchet/scrapy-test | 4f5febfca05d267dc98df94e65a403210ce39d81 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | coderatchet/scrapy-test | 4f5febfca05d267dc98df94e65a403210ce39d81 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | coderatchet/scrapy-test | 4f5febfca05d267dc98df94e65a403210ce39d81 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_utils.py
Copyright 2017 CodeRatchet
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
"""
from sc... | 31.28 | 101 | 0.643223 |
a69ee7a9f888d8536f4bf36dc0bbbceb6bad0d24 | 1,333 | py | Python | iotbx/command_line/pdb.box_around_molecule.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/command_line/pdb.box_around_molecule.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/command_line/pdb.box_around_molecule.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
import sys
from cctbx import uctbx
import iotbx.pdb
from libtbx.option_parser import option_parser
import libtbx.load_env
from libtbx.str_utils import show_string
from libtbx.utils import date_and_time
import mmtbx.model
def run(args):
log = sys.stdout
if (len(args) == 0): args = [... | 32.512195 | 74 | 0.727682 |
dfa509f9568377b1ff1205997263da43054a7b7b | 3,508 | py | Python | src/gui_wall_widget.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | src/gui_wall_widget.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | src/gui_wall_widget.py | LiamTyler/ClimbingWallLEDController | 99e65ab44e9bd84ac3dbe76ba4a3d66f24ba3c9e | [
"MIT"
] | null | null | null | from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from routes import *
STENCIL_FONT = QFont( QFont( 'Arial', 16 ) )
STENCIL_FONT.setBold( True )
class WallHold( QWidget ):
def __init__( self, row, col, editable = False ):
super().__init__()
self.setFixedSize( QSize... | 34.732673 | 102 | 0.547891 |
317fd8b22d2428aa9dff95d98505d7e70f02706e | 1,933 | py | Python | src/face_detector.py | yariv1025/FACIAL_EMOTION_RECOGNITION | 1141912271a6ed336db60856552e20282dfd6a60 | [
"MIT"
] | null | null | null | src/face_detector.py | yariv1025/FACIAL_EMOTION_RECOGNITION | 1141912271a6ed336db60856552e20282dfd6a60 | [
"MIT"
] | 4 | 2021-03-04T10:07:49.000Z | 2021-03-04T15:31:10.000Z | src/face_detector.py | yariv1025/EmotionRec | 1141912271a6ed336db60856552e20282dfd6a60 | [
"MIT"
] | null | null | null | from datetime import datetime
from mtcnn.mtcnn import MTCNN
class FaceDetector(MTCNN):
"""
Perform facial detection.
"""
def __init__(self):
"""
Creating FaceDetector object by calling to the super class constructor (MTCNN).
"""
super().__init__()
self.no_face_... | 29.738462 | 111 | 0.588205 |
2182c65c56102f99f82fd0c563332a054b4d2ee7 | 1,795 | py | Python | alipay/aop/api/domain/KoubeiMerchantDepartmentTreeQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/KoubeiMerchantDepartmentTreeQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/KoubeiMerchantDepartmentTreeQueryModel.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class KoubeiMerchantDepartmentTreeQueryModel(object):
def __init__(self):
self._auth_code = None
self._dept_id = None
self._type = None
@property
def auth... | 25.28169 | 69 | 0.56546 |
015fa1833f42898327317629bf34ca5071e4d3b4 | 7,531 | py | Python | Tests/Validation/Magnetics/test_FEMM_parallelization.py | EmileDvs/pyleecan | ad2f5f25c089a981f373557a198da51c62407928 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | Tests/Validation/Magnetics/test_FEMM_parallelization.py | EmileDvs/pyleecan | ad2f5f25c089a981f373557a198da51c62407928 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | Tests/Validation/Magnetics/test_FEMM_parallelization.py | EmileDvs/pyleecan | ad2f5f25c089a981f373557a198da51c62407928 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | from os.path import join
from time import time
import pytest
from numpy import array, pi
from numpy.testing import assert_allclose
from Tests import save_validation_path as save_path
from pyleecan.Classes.ImportGenVectLin import ImportGenVectLin
from pyleecan.Classes.ImportMatrixVal import ImportMatrixVal
from pyleec... | 28.31203 | 86 | 0.634577 |
0952f0fb396ba9a4ae41dfb0b7528e4b2e337e91 | 39,307 | py | Python | labscript_devices/NI_USB_6343.py | specialforcea/labscript_suite | a4ad5255207cced671990fff94647b1625aa0049 | [
"BSD-2-Clause"
] | null | null | null | labscript_devices/NI_USB_6343.py | specialforcea/labscript_suite | a4ad5255207cced671990fff94647b1625aa0049 | [
"BSD-2-Clause"
] | null | null | null | labscript_devices/NI_USB_6343.py | specialforcea/labscript_suite | a4ad5255207cced671990fff94647b1625aa0049 | [
"BSD-2-Clause"
] | null | null | null | #####################################################################
# #
# /NI_USB_6343.py #
# #
# Copyright 2013, Monash University ... | 46.572275 | 204 | 0.576996 |
6350c3cbae528bc309377b51d8616ad7fbd150a6 | 66,342 | py | Python | python/ccxt/async_support/bitstamp.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitstamp.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitstamp.py | pcriadoperez/ccxt | fd0db4bad42f4f937c401cdb4cd0bcc4e716282e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 40.501832 | 279 | 0.458759 |
f424e4da64f09e94ce31d4d87005b5c24a66de08 | 4,319 | py | Python | bitmovin_api_sdk/encoding/encodings/input_streams/subtitles/dvb_teletext/dvb_teletext_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/encodings/input_streams/subtitles/dvb_teletext/dvb_teletext_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/encodings/input_streams/subtitles/dvb_teletext/dvb_teletext_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | # coding: utf-8
from __future__ import absolute_import
from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.models.bitmovin_response import BitmovinResponse
from bitmovin_api_sdk.models.dvb_teletext_input_stream import Dv... | 41.528846 | 166 | 0.693448 |
55b444075dea2be0072acdd8a4545d953a852d4a | 2,267 | py | Python | pyleecan/Methods/Slot/SlotW15/_comp_point_coordinate.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | 2 | 2019-06-08T15:04:39.000Z | 2020-09-07T13:32:22.000Z | pyleecan/Methods/Slot/SlotW15/_comp_point_coordinate.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Slot/SlotW15/_comp_point_coordinate.py | ajpina/pyleecan | f8d1fce7d108cf443f5767e35d59ff15905fb49f | [
"Apache-2.0"
] | null | null | null | from numpy import angle, arcsin, arctan, cos, exp, pi, sin, sqrt
from ....Methods.Slot.SlotW15 import S15InnerError
def _comp_point_coordinate(self):
"""Compute the point coordinates needed to plot the Slot.
Parameters
----------
self : SlotW15
A SlotW15 object
Returns
-------
p... | 32.385714 | 83 | 0.505073 |
ac3366f96112505ab20c0d59d749c71f9b140848 | 4,993 | py | Python | wavefront_api_client/models/response_container_paged_report_event_anomaly_dto.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/response_container_paged_report_event_anomaly_dto.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/response_container_paged_report_event_anomaly_dto.py | httpsgithu/python-client | f85a530367cdabe458a11919ad35609b9bc0606b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Wavefront REST API Documentation
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W... | 33.066225 | 409 | 0.629281 |
018f7479f5a19b76fef4aa8529da886f2f2b94f0 | 806 | py | Python | class_separation.py | UmarKhalidcs/ACL-for-Face-Recognition | e10f1f870dfc86382c8acfc9fcc23ab39bd14c92 | [
"MIT"
] | null | null | null | class_separation.py | UmarKhalidcs/ACL-for-Face-Recognition | e10f1f870dfc86382c8acfc9fcc23ab39bd14c92 | [
"MIT"
] | null | null | null | class_separation.py | UmarKhalidcs/ACL-for-Face-Recognition | e10f1f870dfc86382c8acfc9fcc23ab39bd14c92 | [
"MIT"
] | null | null | null | import os,shutil
identity_CelebA_text = open('D:\\Research_work\\project_3\\umar_version\\data\\celeba\\identity_CelebA.txt', 'r')
Lines = identity_CelebA_text.readlines()
img_align_celeb_path="D:\\Research_work\\project_3\\umar_version\\data\celeba\\img_align_celeba\\"
classified_path="D:\\Research_work\\project_3... | 44.777778 | 114 | 0.712159 |
ac988d542207d0026ff192cba4c6cb7bc5154993 | 515 | py | Python | blog/conf/__init__.py | lingfromSh/blog | 190e4c1162c7fb31f88b7e8f806ccdd9aace6e93 | [
"Apache-2.0"
] | null | null | null | blog/conf/__init__.py | lingfromSh/blog | 190e4c1162c7fb31f88b7e8f806ccdd9aace6e93 | [
"Apache-2.0"
] | 3 | 2020-09-11T14:52:00.000Z | 2020-09-11T15:17:54.000Z | blog/conf/__init__.py | lingfromSh/blog | 190e4c1162c7fb31f88b7e8f806ccdd9aace6e93 | [
"Apache-2.0"
] | null | null | null | import importlib
PythonPath = str
class LazyConfig:
def from_object(self, config: object):
def is_dunder_name(name: str):
return name.startswith("__") and name.endswith("__")
for attr_name in dir(config):
if not is_dunder_name(attr_name):
setattr(self, att... | 23.409091 | 68 | 0.673786 |
9e2843d0e74a6190c921616e6bc81c27fa01da69 | 891 | py | Python | World/Object/Unit/Player/Handlers/PlayerInit.py | sergio-ivanuzzo/idewave-core | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 10 | 2019-06-29T19:24:52.000Z | 2021-02-21T22:45:57.000Z | World/Object/Unit/Player/Handlers/PlayerInit.py | sergio-ivanuzzo/wowcore | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 4 | 2019-08-15T07:03:36.000Z | 2021-06-02T13:01:25.000Z | World/Object/Unit/Player/Handlers/PlayerInit.py | sergio-ivanuzzo/idewave-core | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 8 | 2019-06-30T22:47:48.000Z | 2021-02-20T19:21:30.000Z | from World.Object.Unit.Player.PlayerManager import PlayerManager
from Server.Registry.QueuesRegistry import QueuesRegistry
from Server.Connection.Connection import Connection
class PlayerInit(object):
__slots__ = ('data', 'connection')
def __init__(self, **kwargs):
self.data: bytes = kwargs.pop('dat... | 31.821429 | 79 | 0.674523 |
66183d6364472c48a89f3e18e569aa4ded43aa2b | 327 | py | Python | addons/utils/checks.py | T3CHNOLOG1C/GLaDOS | 723da47178c395e37828f067b3e0def9735609a5 | [
"Apache-2.0"
] | 5 | 2018-07-19T19:57:59.000Z | 2020-04-13T00:16:26.000Z | addons/utils/checks.py | T3CHNOLOG1C/GLaDOS | 723da47178c395e37828f067b3e0def9735609a5 | [
"Apache-2.0"
] | 11 | 2018-07-19T19:24:44.000Z | 2020-04-29T00:28:38.000Z | addons/utils/checks.py | T3CHNOLOG1C/GLaDOS | 723da47178c395e37828f067b3e0def9735609a5 | [
"Apache-2.0"
] | 32 | 2018-03-20T00:08:54.000Z | 2020-02-15T04:54:18.000Z | from discord.ext.commands import check
def _check_owner(ctx):
return ctx.bot.owner_role in ctx.message.author.roles
def _check_botdev(ctx):
return ctx.bot.botdev_role in ctx.message.author.roles or _check_owner(ctx)
def is_owner():
return check(_check_owner)
def is_botdev():
return check(_check_... | 19.235294 | 79 | 0.75841 |
9f6597edde5a6c28397edf1e98ad587909067b1a | 2,441 | py | Python | indra/tests/test_hgnc_client.py | qiuhaoling/indra | fa1fb31c4333ea63d023181eaf6f759e3dd3b400 | [
"BSD-2-Clause"
] | null | null | null | indra/tests/test_hgnc_client.py | qiuhaoling/indra | fa1fb31c4333ea63d023181eaf6f759e3dd3b400 | [
"BSD-2-Clause"
] | null | null | null | indra/tests/test_hgnc_client.py | qiuhaoling/indra | fa1fb31c4333ea63d023181eaf6f759e3dd3b400 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from indra.databases import hgnc_client
from indra.util import unicode_strs
from nose.plugins.attrib import attr
def test_get_uniprot_id():
hgnc_id = '6840'
uniprot_id = hgnc_client.get_uniprot_id(hgnc_id)
... | 28.717647 | 72 | 0.736583 |
1604e72f9507574b4506dca839c84d0e96c6e95c | 10,685 | py | Python | homeassistant/components/chromecast.py | EnTeQuAk/home-assistant | f9fbb30fc0905a9d1858cb5829a6d9c16a9c50de | [
"MIT"
] | 1 | 2019-06-27T11:32:36.000Z | 2019-06-27T11:32:36.000Z | homeassistant/components/chromecast.py | EnTeQuAk/home-assistant | f9fbb30fc0905a9d1858cb5829a6d9c16a9c50de | [
"MIT"
] | null | null | null | homeassistant/components/chromecast.py | EnTeQuAk/home-assistant | f9fbb30fc0905a9d1858cb5829a6d9c16a9c50de | [
"MIT"
] | 1 | 2015-06-16T19:42:51.000Z | 2015-06-16T19:42:51.000Z | """
homeassistant.components.chromecast
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides functionality to interact with Chromecasts.
"""
import logging
import homeassistant.util as util
import homeassistant.components as components
DOMAIN = 'chromecast'
DEPENDENCIES = []
SERVICE_YOUTUBE_VIDEO = 'play_youtube_video'
EN... | 34.028662 | 78 | 0.644829 |
c72f016e7458965deca5b1633129b7537259ff63 | 263 | py | Python | interface/caller.py | hhaensel/MolecularGraph.jl | c54ccdf09274e36ed3d866604f99b497a39bfaf5 | [
"MIT"
] | 126 | 2019-01-28T06:54:27.000Z | 2022-03-22T08:45:46.000Z | interface/caller.py | timholy/MolecularGraph.jl | 90d6f6175f30023ffce92d9bbc386f8659866508 | [
"MIT"
] | 64 | 2019-04-19T03:33:52.000Z | 2022-03-22T23:34:44.000Z | interface/caller.py | timholy/MolecularGraph.jl | 90d6f6175f30023ffce92d9bbc386f8659866508 | [
"MIT"
] | 30 | 2019-02-07T04:08:52.000Z | 2022-03-22T03:33:20.000Z |
from ctypes import CDLL, c_char_p
JL = CDLL("invokejulia.so")
JL.smilestomol.argtypes = [c_char_p]
print(JL.smilestomol("CCC(=O)CCO".encode()))
"""
def mol_to_svg(mol):
JL.smilestomol.argtypes = None # Pointer to MolGraph
return JL.moltosvg(mol)
"""
| 18.785714 | 57 | 0.69962 |
bc7baf86b04992f12a4f38c4c8790ca7e44940ec | 232 | py | Python | mmp/cli/utils.py | alfonsocv12/mpip | 972aca21916a6037a1656780e844a93070613d07 | [
"MIT"
] | 3 | 2021-04-25T16:39:21.000Z | 2021-04-28T22:17:44.000Z | mmp/cli/utils.py | alfonsocv12/mpip | 972aca21916a6037a1656780e844a93070613d07 | [
"MIT"
] | null | null | null | mmp/cli/utils.py | alfonsocv12/mpip | 972aca21916a6037a1656780e844a93070613d07 | [
"MIT"
] | null | null | null | import os
import mmp
def get_version_info(scope):
versioninfo = 'mmp version {}'.format(mmp.__version__)
if scope == 'mmp':
return versioninfo
raise ValueError("{} is not a valid version scope".format(scope))
| 21.090909 | 69 | 0.681034 |
ad43d6bdb56ff582e14ff9008aaaea727501ad6e | 11,505 | py | Python | MindSPONGE/mindsponge/fold/eval/data/feature/feature_extraction.py | mindspore-ai/mindscience | b5269245915695de2d99fb290fef662c241db189 | [
"Apache-2.0"
] | 3 | 2021-11-10T06:17:50.000Z | 2022-03-21T14:25:30.000Z | MindSPONGE/tests/fold_test/data/feature/feature_extraction.py | mindspore-ai/mindscience | b5269245915695de2d99fb290fef662c241db189 | [
"Apache-2.0"
] | null | null | null | MindSPONGE/tests/fold_test/data/feature/feature_extraction.py | mindspore-ai/mindscience | b5269245915695de2d99fb290fef662c241db189 | [
"Apache-2.0"
] | 1 | 2021-12-05T11:41:29.000Z | 2021-12-05T11:41:29.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 39 | 116 | 0.68405 |
34fe41e9038d0d873911be7cfdd5e5744c18cbd7 | 15,986 | py | Python | rdflib/plugins/sparql/evaluate.py | tonyfast/rdflib | e4fe0fdbd4de7e1183418f302315b51a14602e03 | [
"BSD-3-Clause"
] | 2 | 2021-02-06T17:36:05.000Z | 2021-04-21T07:33:39.000Z | rdflib/plugins/sparql/evaluate.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | 2 | 2020-05-09T15:03:57.000Z | 2020-05-30T10:51:40.000Z | rdflib/plugins/sparql/evaluate.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | 4 | 2020-05-08T08:36:19.000Z | 2020-05-28T07:23:23.000Z | """
These method recursively evaluate the SPARQL Algebra
evalQuery is the entry-point, it will setup context and
return the SPARQLResult object
evalPart is called on each level and will delegate to the right method
A rdflib.plugins.sparql.sparql.QueryContext is passed along, keeping
information needed for evaluation... | 27.753472 | 88 | 0.584511 |
fe7143d233af2a0e00b176efefe591e23e5f4219 | 785 | py | Python | config.py | Alikhalid2020/Pitches | ff703163ce3050ea4a2266cf777828deb1c386fe | [
"MIT"
] | 1 | 2021-01-27T22:14:48.000Z | 2021-01-27T22:14:48.000Z | config.py | Alikhalid2020/Pitches | ff703163ce3050ea4a2266cf777828deb1c386fe | [
"MIT"
] | null | null | null | config.py | Alikhalid2020/Pitches | ff703163ce3050ea4a2266cf777828deb1c386fe | [
"MIT"
] | null | null | null | import os
class Config:
SQLALCHEMY_TRACK_MODIFICATIONS=False
SECRET_KEY='SECRET_KEY'
MAIL_SERVER = 'smtp.googlemail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get("MAIL_USERNAME")
MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD")
UPLOADED_PHOTOS_DEST ='app/s... | 23.787879 | 94 | 0.742675 |
7565d73bfc308a0951e3a17d377c056443c2fdec | 1,757 | py | Python | 01-Neural Networks and Deep Learning/week4/dnn_utils_v2.py | gaojiaxi/Coursera-Deep-Learning-deeplearning.ai | 75a2026f1241ec5e7d24583740dc2f9d4f307d41 | [
"MIT"
] | null | null | null | 01-Neural Networks and Deep Learning/week4/dnn_utils_v2.py | gaojiaxi/Coursera-Deep-Learning-deeplearning.ai | 75a2026f1241ec5e7d24583740dc2f9d4f307d41 | [
"MIT"
] | null | null | null | 01-Neural Networks and Deep Learning/week4/dnn_utils_v2.py | gaojiaxi/Coursera-Deep-Learning-deeplearning.ai | 75a2026f1241ec5e7d24583740dc2f9d4f307d41 | [
"MIT"
] | null | null | null | import numpy as np
def sigmoid(Z):
"""
Implements the sigmoid activation in numpy
Arguments:
Z -- numpy array of any shape
Returns:
A -- output of sigmoid(z), same shape as Z
cache -- returns Z as well, useful during backpropagation
"""
A = 1/(1+np.exp(-Z))
cache ... | 21.168675 | 100 | 0.598748 |
255fb2b69560b308ec6f870667c35274b6352ea2 | 56,125 | py | Python | apero/io/drs_fits.py | njcuk9999/apero-drs | 83b043e9f277a011b03e0227c77307961b200901 | [
"MIT"
] | 1 | 2021-03-09T17:49:31.000Z | 2021-03-09T17:49:31.000Z | apero/io/drs_fits.py | njcuk9999/apero-drs | 83b043e9f277a011b03e0227c77307961b200901 | [
"MIT"
] | 43 | 2020-10-06T18:42:24.000Z | 2022-03-28T21:23:10.000Z | apero/io/drs_fits.py | njcuk9999/apero-drs | 83b043e9f277a011b03e0227c77307961b200901 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# CODE NAME HERE
# CODE DESCRIPTION HERE
Created on 2019-03-21 at 11:36
@author: cook
"""
import numpy as np
from astropy.io import fits
from astropy.table import Table
from astropy.time import Time, TimeDelta
from astropy import version as av
from astropy import uni... | 39.057063 | 80 | 0.501488 |
5ead94b33f93390f8069c8f48a75a9bd6f91e800 | 653 | py | Python | safegraph_patterns/setup.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 8 | 2020-10-12T04:27:04.000Z | 2022-03-08T16:56:57.000Z | safegraph_patterns/setup.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 666 | 2020-09-30T21:18:41.000Z | 2022-03-31T22:37:12.000Z | safegraph_patterns/setup.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 13 | 2020-10-01T14:25:06.000Z | 2022-02-12T08:31:19.000Z | from setuptools import setup
from setuptools import find_packages
required = [
"numpy",
"pandas",
"pydocstyle",
"pytest",
"pytest-cov",
"pylint==2.8.3",
"delphi-utils"
]
setup(
name="delphi_safegraph_patterns",
version="0.0.1",
description="Mobility Indicators from Safegraph",
... | 22.517241 | 61 | 0.633997 |
b1f56d45f082bad798a71fb82ae7323ba9c190d5 | 3,361 | py | Python | alipay/aop/api/domain/MybankPaymentTradeBusinessOrderRefundModel.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/MybankPaymentTradeBusinessOrderRefundModel.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/MybankPaymentTradeBusinessOrderRefundModel.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 *
class MybankPaymentTradeBusinessOrderRefundModel(object):
def __init__(self):
self._amount = None
self._currency_value = None
self._order_no = None
self._refund_type = N... | 28.974138 | 79 | 0.582862 |
c825b56c321bc8bd7e630b81e7c10f965b7616af | 3,675 | py | Python | localshop/apps/packages/utils.py | CheeseTheMonkey/localshop | d597eb07b20e20e2c4f9f5416b131c48638f0ab3 | [
"BSD-3-Clause"
] | null | null | null | localshop/apps/packages/utils.py | CheeseTheMonkey/localshop | d597eb07b20e20e2c4f9f5416b131c48638f0ab3 | [
"BSD-3-Clause"
] | null | null | null | localshop/apps/packages/utils.py | CheeseTheMonkey/localshop | d597eb07b20e20e2c4f9f5416b131c48638f0ab3 | [
"BSD-3-Clause"
] | null | null | null | import inspect
import hashlib
import logging
import os
from django.core.files.uploadedfile import TemporaryUploadedFile
from django.db.models import FieldDoesNotExist
from django.db.models.fields.files import FileField
from django.http import QueryDict
from django.utils.datastructures import MultiValueDict
logger = l... | 29.878049 | 78 | 0.562993 |
7da649e07b984bd0448d2270ee2738e20e1b732a | 3,229 | py | Python | disney_fandom_crawler/settings.py | fiqrisr/disney_fandom_crawler | 0151904a2ea0c3c3f7a3d14cf8aa05b9e512e4b1 | [
"Apache-2.0"
] | 2 | 2021-04-16T06:31:55.000Z | 2021-04-19T14:14:33.000Z | disney_fandom_crawler/settings.py | fiqrisr/disney_fandom_crawler | 0151904a2ea0c3c3f7a3d14cf8aa05b9e512e4b1 | [
"Apache-2.0"
] | null | null | null | disney_fandom_crawler/settings.py | fiqrisr/disney_fandom_crawler | 0151904a2ea0c3c3f7a3d14cf8aa05b9e512e4b1 | [
"Apache-2.0"
] | null | null | null | # Scrapy settings for disney_fandom_crawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/downloa... | 36.280899 | 103 | 0.781356 |
8f940dfd60e03191455d85830217b782194cb8db | 689 | py | Python | trails/feeds/minerchk.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | 1 | 2021-01-10T14:35:36.000Z | 2021-01-10T14:35:36.000Z | trails/feeds/minerchk.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | 29 | 2018-10-18T20:14:49.000Z | 2019-07-08T07:45:08.000Z | trails/feeds/minerchk.py | Jahismighty/maltrail | 9bc70430993b2140ceb4dbac4b487251a9254416 | [
"MIT"
] | 2 | 2018-11-29T22:50:57.000Z | 2019-04-12T03:35:35.000Z | #!/usr/bin/env python
"""
Copyright (c) 2014-2018 Miroslav Stampar (@stamparm)
See the file 'LICENSE' for copying permission
"""
from core.common import retrieve_content
__url__ = "https://raw.githubusercontent.com/Hestat/minerchk/master/hostslist.txt"
__check__ = ".com"
__info__ = "crypto mining (suspicious)"
__ref... | 25.518519 | 82 | 0.656023 |
c99afd2d722bb350182afa532409dc6d715f4626 | 208 | py | Python | mmdet/core/bbox/iou_calculators/builder.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 232 | 2021-05-25T12:55:24.000Z | 2022-03-25T07:58:49.000Z | mmdet/core/bbox/iou_calculators/builder.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 51 | 2021-05-29T06:36:54.000Z | 2022-03-27T09:24:39.000Z | mmdet/core/bbox/iou_calculators/builder.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 66 | 2021-06-01T03:40:08.000Z | 2022-03-30T16:51:21.000Z | from mmcv.utils import Registry, build_from_cfg
IOU_CALCULATORS = Registry('IoU calculator')
def build_iou_calculator(cfg, default_args=None):
return build_from_cfg(cfg, IOU_CALCULATORS, default_args)
| 26 | 61 | 0.8125 |
7762887e1385534892167c2a4c274949017e2e72 | 8,197 | py | Python | empire/server/stagers/windows/ms16-051.py | gr33nm0nk2802/Empire | 886e5131d51b082325f57dc0a5c8eeb39fb04fe1 | [
"BSD-3-Clause"
] | 1 | 2021-08-03T21:34:06.000Z | 2021-08-03T21:34:06.000Z | empire/server/stagers/windows/ms16-051.py | gr33nm0nk2802/Empire | 886e5131d51b082325f57dc0a5c8eeb39fb04fe1 | [
"BSD-3-Clause"
] | null | null | null | empire/server/stagers/windows/ms16-051.py | gr33nm0nk2802/Empire | 886e5131d51b082325f57dc0a5c8eeb39fb04fe1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from empire.server.common import helpers
class Stager(object):
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'MS16-051 IE RCE',
'Author': ['CrossGroupSecurity'],
'Description': (
'Leverages MS16-... | 31.40613 | 120 | 0.47615 |
435ac90c41870b7b9d343a0932ff263e82df77bc | 466 | py | Python | openprescribing/frontend/migrations/0028_prescription_net_cost.py | rebkwok/openprescribing | 28c7500a7e4cb725fc6cda0f8c58b07ac7e916a4 | [
"MIT"
] | null | null | null | openprescribing/frontend/migrations/0028_prescription_net_cost.py | rebkwok/openprescribing | 28c7500a7e4cb725fc6cda0f8c58b07ac7e916a4 | [
"MIT"
] | null | null | null | openprescribing/frontend/migrations/0028_prescription_net_cost.py | rebkwok/openprescribing | 28c7500a7e4cb725fc6cda0f8c58b07ac7e916a4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2017-06-19 11:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('frontend', '0027_auto_20170616_0925'),
]
operations = [
migrations.AddField(... | 22.190476 | 59 | 0.622318 |
f864d0a0feb9ecfef773f6a0e9803c7a1232b104 | 68,226 | py | Python | Python/python3_version/klampt/math/optimize.py | ipa-rmb-mr/Klampt | 71793b54eead788811b4e62bcf8dadb49b68ff17 | [
"BSD-3-Clause"
] | 1 | 2020-07-03T20:38:20.000Z | 2020-07-03T20:38:20.000Z | Python/python3_version/klampt/math/optimize.py | tcrapse/Klampt | d5a334e73f1f24ba4c606e03f49915b353799a57 | [
"BSD-3-Clause"
] | null | null | null | Python/python3_version/klampt/math/optimize.py | tcrapse/Klampt | d5a334e73f1f24ba4c606e03f49915b353799a57 | [
"BSD-3-Clause"
] | null | null | null | """Classes to help set up and solve nonlinear, constrained optimization
problems.
Supports local and global optimization. Wraps around scipy, pyOpt, or
DIRECT (for now).
Works well with the klampt.math.symbolic module.
"""
import numpy as np
import math,random
from . import symbolic,symbolic_io,symbolic_linalg
fro... | 48.352941 | 177 | 0.579119 |
844b30e9784d81833548d8835d6ea8fcce6267f5 | 925 | py | Python | Web dev/Flask/Projects/todo-app/app/routes.py | prathimacode-hub/WIE-WoC | f412f297a57249af98213bf4a747c897f2d4c035 | [
"MIT"
] | 8 | 2022-03-01T09:09:20.000Z | 2022-03-03T05:36:01.000Z | Web dev/Flask/Projects/todo-app/app/routes.py | prathimacode-hub/WIE-WoC | f412f297a57249af98213bf4a747c897f2d4c035 | [
"MIT"
] | 52 | 2022-03-02T13:52:46.000Z | 2022-03-04T03:03:17.000Z | Web dev/Flask/Projects/todo-app/app/routes.py | prathimacode-hub/WIE-WoC | f412f297a57249af98213bf4a747c897f2d4c035 | [
"MIT"
] | 23 | 2022-03-01T06:39:34.000Z | 2022-03-03T09:24:40.000Z | from flask import render_template, redirect, url_for, request
from app import app, db
from app.models import Todo
@app.route('/')
def index():
incomplete = Todo.query.filter_by(status=False).all()
complete = Todo.query.filter_by(status=True).all()
return render_template('index.html', complete=complete, in... | 25.694444 | 82 | 0.678919 |
8122dc4db005fa7d78e1a0336f95e63b27d862c7 | 8,782 | py | Python | polaris/polaris/management/commands/watch_transactions.py | paysharesdev/django-polaris | cbbebed5623a92074071f59f4bca65e2b1c6571b | [
"Apache-2.0"
] | null | null | null | polaris/polaris/management/commands/watch_transactions.py | paysharesdev/django-polaris | cbbebed5623a92074071f59f4bca65e2b1c6571b | [
"Apache-2.0"
] | null | null | null | polaris/polaris/management/commands/watch_transactions.py | paysharesdev/django-polaris | cbbebed5623a92074071f59f4bca65e2b1c6571b | [
"Apache-2.0"
] | null | null | null | """This module defines custom management commands for the app admin."""
import asyncio
from typing import Dict, Optional
from decimal import Decimal
from django.core.management.base import BaseCommand
from django.db.models import Q
from stellar_sdk.exceptions import NotFoundError
from stellar_sdk.transaction_envelope ... | 42.019139 | 89 | 0.654407 |
273254e0f855b050bd2d5f1db51c4c97ba0d6b8b | 2,564 | py | Python | app/utils.py | Cradac/dhbw-microblog | 4f2bda483ec3864973a082038fec2bc8a9898bb2 | [
"MIT"
] | null | null | null | app/utils.py | Cradac/dhbw-microblog | 4f2bda483ec3864973a082038fec2bc8a9898bb2 | [
"MIT"
] | null | null | null | app/utils.py | Cradac/dhbw-microblog | 4f2bda483ec3864973a082038fec2bc8a9898bb2 | [
"MIT"
] | null | null | null | from app.models import User
'''
Das Paginator Objekt mit allen relevanten Variablen.
list: SuperListe aller SubListen (Seiten)
cur_page: aktuelle Seite (Index + 1 der list)
max_page: Anzahl der Seiten
items: list[cur_page-1], also return der aktuellen Seite;
Falls der Index out of Range is... | 34.186667 | 134 | 0.642746 |
26c852f701b2b302d7f519e176c388cc572b08ec | 643 | py | Python | Python Scripts/Jammer with CLI Interface/start_adapter.py | swalihkdan/YRov | 415da1b74dc01134eb8ea597466b35ae380b909d | [
"MIT"
] | null | null | null | Python Scripts/Jammer with CLI Interface/start_adapter.py | swalihkdan/YRov | 415da1b74dc01134eb8ea597466b35ae380b909d | [
"MIT"
] | null | null | null | Python Scripts/Jammer with CLI Interface/start_adapter.py | swalihkdan/YRov | 415da1b74dc01134eb8ea597466b35ae380b909d | [
"MIT"
] | 1 | 2020-12-08T12:26:34.000Z | 2020-12-08T12:26:34.000Z | import subprocess
import logging
def start_adapter():
#Configuring the logger
logging.basicConfig(filename="./logs/start_adapter.log",
format='%(asctime)s %(message)s',
filemode='w')
#Creating an object
logger=logging.getLogger()
#Setting the threshold of logger t... | 29.227273 | 109 | 0.643857 |
6bb9e98656853155838637d70ff816e2a5c844d2 | 5,372 | py | Python | src/pretix/presale/forms/waitinglist.py | pretix/pretix | 78917afa1a3f0def9d4a67d31df811215708abec | [
"Apache-2.0"
] | 1,248 | 2015-04-24T13:32:06.000Z | 2022-03-29T07:01:36.000Z | src/pretix/presale/forms/waitinglist.py | pretix/pretix | 78917afa1a3f0def9d4a67d31df811215708abec | [
"Apache-2.0"
] | 2,113 | 2015-02-18T18:58:16.000Z | 2022-03-31T11:12:32.000Z | src/pretix/presale/forms/waitinglist.py | pretix/pretix | 78917afa1a3f0def9d4a67d31df811215708abec | [
"Apache-2.0"
] | 453 | 2015-05-13T09:29:06.000Z | 2022-03-24T13:39:16.000Z | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by ... | 40.390977 | 118 | 0.623232 |
2b76fa9f8c014895c61c7680ae490139422a308f | 3,720 | py | Python | pysat/instruments/timed_saber.py | scivision/pysat | 2916ff7c77ad4201c537acca91b7c0b46b542e82 | [
"BSD-3-Clause"
] | null | null | null | pysat/instruments/timed_saber.py | scivision/pysat | 2916ff7c77ad4201c537acca91b7c0b46b542e82 | [
"BSD-3-Clause"
] | null | null | null | pysat/instruments/timed_saber.py | scivision/pysat | 2916ff7c77ad4201c537acca91b7c0b46b542e82 | [
"BSD-3-Clause"
] | 1 | 2018-10-26T02:42:50.000Z | 2018-10-26T02:42:50.000Z | # -*- coding: utf-8 -*-
"""Supports the Sounding of the Atmosphere using Broadband Emission Radiometry
(SABER) instrument on the Thermosphere Ionosphere Mesosphere Energetics
Dynamics (TIMED) satellite.
Properties
----------
platform
'timed'
name
'saber'
tag
None supported
sat_id
None supported
Note
... | 32.068966 | 80 | 0.709946 |
dc64df24b371fd44a3c6206d960c9c45428445a0 | 4,653 | py | Python | python/simulation/kyber/reference/poly.py | BayesianSCA/k-trace-CCA | 8dbf10ff28712848dcb8874e370c3fe40a0566a0 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-03-14T01:19:56.000Z | 2022-03-14T01:19:56.000Z | python/simulation/kyber/reference/poly.py | BayesianSCA/k-trace-CCA | 8dbf10ff28712848dcb8874e370c3fe40a0566a0 | [
"Apache-2.0",
"MIT"
] | null | null | null | python/simulation/kyber/reference/poly.py | BayesianSCA/k-trace-CCA | 8dbf10ff28712848dcb8874e370c3fe40a0566a0 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-03T08:31:21.000Z | 2022-02-03T08:31:21.000Z | import numpy as np
import math
from .ntt import basemul, zetas, ntt, invntt
from .reduce import barrett_reduce
from .params import KYBER_ETA1, KYBER_N
class poly(np.ndarray):
def __new__(cls, height=KYBER_N):
obj = np.zeros(height, dtype=np.int16).view(cls)
return obj
@property
def height... | 33.47482 | 87 | 0.526112 |
2f005a239a1d902db0fa9748b80ece0e67f16247 | 11,390 | py | Python | perftrackerlib/browser/httputils.py | brusnigin/perftracker-lib | 648de197aaa301001791764a7ac0a6e731edf74d | [
"MIT"
] | null | null | null | perftrackerlib/browser/httputils.py | brusnigin/perftracker-lib | 648de197aaa301001791764a7ac0a6e731edf74d | [
"MIT"
] | null | null | null | perftrackerlib/browser/httputils.py | brusnigin/perftracker-lib | 648de197aaa301001791764a7ac0a6e731edf74d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
# -*- coding: utf-8 -*-
__author__ = "istillc0de@gmail.com"
__copyright__ = "Copyright 2018, The PerfTracker project"
__license__ = "MIT"
import re
import logging
import urllib
import tempfile
import os
import sys
if sys.version_info[0] < 3:
import url... | 34.204204 | 108 | 0.57489 |
b7a062e6c814c4c6e8a011bc6fbdc165762ba795 | 976 | py | Python | swf/models/event/timer.py | nstott/simpleflow | 483602deb745a09b59ad6e24052dd5096c54fad2 | [
"MIT"
] | null | null | null | swf/models/event/timer.py | nstott/simpleflow | 483602deb745a09b59ad6e24052dd5096c54fad2 | [
"MIT"
] | null | null | null | swf/models/event/timer.py | nstott/simpleflow | 483602deb745a09b59ad6e24052dd5096c54fad2 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
from swf.models.event.base import Event
from swf.models.event.compiler import CompiledEvent
class TimerEvent(Event):
_type = 'Timer'
class CompiledTimerEvent(CompiledEv... | 27.111111 | 105 | 0.655738 |
8bf863d6b82169ab1fcece848f4b93149f4f9342 | 6,537 | py | Python | test/functional/rpc_generateblock.py | WORLDKING2021/bitcoin-abc | e98dd8358d9ca5442d80ec8a1596a8c9be486c1a | [
"MIT"
] | null | null | null | test/functional/rpc_generateblock.py | WORLDKING2021/bitcoin-abc | e98dd8358d9ca5442d80ec8a1596a8c9be486c1a | [
"MIT"
] | null | null | null | test/functional/rpc_generateblock.py | WORLDKING2021/bitcoin-abc | e98dd8358d9ca5442d80ec8a1596a8c9be486c1a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''Test generateblock rpc.
'''
from test_framework.test_framework import BitcoinTestFramework
from test_framew... | 44.469388 | 152 | 0.59844 |
9765ab17be01169bec4312e6532afb80c5ad5807 | 10,118 | py | Python | ml-agents/mlagents/trainers/trainer/rl_trainer.py | wjsghtjf/AI_SOOLZARI | 65c05e073f7673ddec708b9e6eb58fede4d0eb5c | [
"Apache-2.0"
] | 1 | 2021-03-31T02:36:47.000Z | 2021-03-31T02:36:47.000Z | ml-agents/mlagents/trainers/trainer/rl_trainer.py | wjsghtjf/AI_SOOLZARI | 65c05e073f7673ddec708b9e6eb58fede4d0eb5c | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/trainer/rl_trainer.py | wjsghtjf/AI_SOOLZARI | 65c05e073f7673ddec708b9e6eb58fede4d0eb5c | [
"Apache-2.0"
] | 1 | 2020-08-24T11:02:57.000Z | 2020-08-24T11:02:57.000Z | # # Unity ML-Agents Toolkit
import os
from typing import Dict, List, Optional
from collections import defaultdict
import abc
import time
import attr
from mlagents.model_serialization import SerializationSettings, copy_model_files
from mlagents.trainers.policy.checkpoint_manager import (
NNCheckpoint,
NNCheckpoi... | 41.467213 | 119 | 0.642024 |
8a0013f3c3b1a0bbdbf50c9623759aa62293574b | 12,338 | py | Python | multifew/models/fumi.py | s-a-malik/multi-few | 7f7d05e51ee7630026153c4a8a7c363827418735 | [
"MIT"
] | 1 | 2021-06-02T09:10:26.000Z | 2021-06-02T09:10:26.000Z | multifew/models/fumi.py | s-a-malik/multi-few | 7f7d05e51ee7630026153c4a8a7c363827418735 | [
"MIT"
] | 11 | 2021-12-12T00:15:26.000Z | 2022-03-30T15:44:04.000Z | multifew/models/fumi.py | s-a-malik/multi-few | 7f7d05e51ee7630026153c4a8a7c363827418735 | [
"MIT"
] | null | null | null | import wandb
import torch
import torch.nn as nn
import torch.nn.functional as F
from tqdm import tqdm
from collections import OrderedDict
from transformers import BertModel
from torchmeta.modules import MetaModule, MetaSequential, MetaLinear
from torchmeta.utils.gradient_based import gradient_update_parameters
from .... | 39.41853 | 110 | 0.544821 |
dabd248b6e3e315aa5b0207d1a654e4ec32a9fe0 | 121 | py | Python | girvan_newman/__init__.py | kindeQi/Community-Detection | 623b5162fca9948d463ae1a1a8e24cbfc90125d3 | [
"MIT"
] | 2 | 2019-12-24T02:27:45.000Z | 2019-12-24T02:28:00.000Z | girvan_newman/__init__.py | kindeQi/Community-Detection | 623b5162fca9948d463ae1a1a8e24cbfc90125d3 | [
"MIT"
] | null | null | null | girvan_newman/__init__.py | kindeQi/Community-Detection | 623b5162fca9948d463ae1a1a8e24cbfc90125d3 | [
"MIT"
] | null | null | null | from girvan_newman.dataset import GNDataset
from girvan_newman.model import GNModel, GNBetweenessGraph, GNModularityGraph | 60.5 | 77 | 0.892562 |
94647894288043c0f8ee8a671055617ae06d42bb | 59 | py | Python | fuzzybee/utils/constant.py | youtaya/knight | 6899e18ca6b1ef01daaae7d7fd14b50a26aa0aee | [
"MIT"
] | null | null | null | fuzzybee/utils/constant.py | youtaya/knight | 6899e18ca6b1ef01daaae7d7fd14b50a26aa0aee | [
"MIT"
] | null | null | null | fuzzybee/utils/constant.py | youtaya/knight | 6899e18ca6b1ef01daaae7d7fd14b50a26aa0aee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
GENDER = ((u'男',u'男'),(u'女',u'女'))
| 19.666667 | 34 | 0.40678 |
89076ff2730fda90ecf426d357a3512e73d20017 | 497 | py | Python | connectDB.py | BiancaGedorio/Python-MySQLDatabase | 2b7c2a95ba6492e910d86905621609dff0509789 | [
"MIT"
] | null | null | null | connectDB.py | BiancaGedorio/Python-MySQLDatabase | 2b7c2a95ba6492e910d86905621609dff0509789 | [
"MIT"
] | null | null | null | connectDB.py | BiancaGedorio/Python-MySQLDatabase | 2b7c2a95ba6492e910d86905621609dff0509789 | [
"MIT"
] | null | null | null | import mysql.connector
# connecting client and database server using mysql connector module
conn = mysql.connector.connect(host='localhost',
user='root',
password='***********',
database='database'
... | 29.235294 | 72 | 0.545272 |
89504a2e0cd7ed217611b14984c731bcedc6e864 | 13,892 | py | Python | bot/constants.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | null | null | null | bot/constants.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | null | null | null | bot/constants.py | atmishra/bot | ad1a33e80152343a81eeeabf0117ced76b83e273 | [
"MIT"
] | null | null | null | """
Loads bot configuration from YAML files.
By default, this simply loads the default
configuration located at `config-default.yml`.
If a file called `config.yml` is found in the
project directory, the default configuration
is recursively updated with any settings from
the custom configuration. Any settings left
out i... | 22.478964 | 114 | 0.657429 |
e0061703b112d00472fb09a4e28a3d4ad9804f01 | 998 | py | Python | dns_check.py | Nexterum/cert-bot-dns | fa69b4effe479ab82af8445ed79cb00562a7a9e4 | [
"MIT"
] | null | null | null | dns_check.py | Nexterum/cert-bot-dns | fa69b4effe479ab82af8445ed79cb00562a7a9e4 | [
"MIT"
] | null | null | null | dns_check.py | Nexterum/cert-bot-dns | fa69b4effe479ab82af8445ed79cb00562a7a9e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import dns.resolver
from time import sleep
def wait_dns_update(d_name: str, text: str, sub: str = "_acme-challenge", interval: int = 60):
sleep(interval)
for x in range(100):
if check_record(d_name, text, sub):
sleep(interval)
exit(0)
else:
... | 30.242424 | 94 | 0.576152 |
64677cd5a6d2b800f3db67fbb8e28f96e90f883a | 14,164 | py | Python | modules.py | liqichen6688/duo-transformer | c718d59100c24b8f7f0a04ed01d563a882f4277d | [
"Apache-2.0"
] | null | null | null | modules.py | liqichen6688/duo-transformer | c718d59100c24b8f7f0a04ed01d563a882f4277d | [
"Apache-2.0"
] | 5 | 2020-01-28T23:13:35.000Z | 2022-02-10T00:46:40.000Z | modules.py | liqichen6688/duo-transformer | c718d59100c24b8f7f0a04ed01d563a882f4277d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#/usr/bin/python3
'''
Feb. 2019 by kyubyong park.
kbpark.linguist@gmail.com.
https://www.github.com/kyubyong/transformer.
Building blocks for Transformer
'''
import numpy as np
import tensorflow as tf
def ln(inputs, epsilon = 1e-8, scope="ln"):
'''Applies layer normalization. See https://... | 39.344444 | 131 | 0.587616 |
a2fbb6db6ecd4a3c6c550e7f6a9e61792b2b6a16 | 13,383 | py | Python | lib/modules/python/collection/osx/imessage_dump.py | terrorizer1980/Empire | 9259e5106986847d2bb770c4289c0c0f1adf2344 | [
"BSD-3-Clause"
] | 49 | 2015-09-02T15:20:09.000Z | 2022-03-05T18:18:23.000Z | lib/modules/python/collection/osx/imessage_dump.py | rmusser01/Empire | c1bdbd0fdafd5bf34760d5b158dfd0db2bb19556 | [
"BSD-3-Clause"
] | 1 | 2020-11-04T08:15:12.000Z | 2020-11-04T08:15:12.000Z | lib/modules/python/collection/osx/imessage_dump.py | InfinitelyFreedom/Empire | 3a922f60d92658fb716efb3be5a1c15074114766 | [
"BSD-3-Clause"
] | 24 | 2015-09-08T11:45:23.000Z | 2022-02-07T23:53:58.000Z | #!/usr/bin/env python3
from builtins import object
from builtins import str
class Module(object):
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Nam... | 46.46875 | 139 | 0.496824 |
de8e378e9f6b59dcf521f5669f093920895a448f | 28,696 | py | Python | caffe2onnx/src/caffe2onnx.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/caffe2onnx.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/caffe2onnx.py | kumardesappan/caffe2onnx | b7e73feed3bbc5ddbdf25b87af93a2bae596055d | [
"BSD-3-Clause"
] | 1 | 2022-01-20T05:18:29.000Z | 2022-01-20T05:18:29.000Z | import copy
import numpy as np
from onnx import helper
import onnx
from . import OPs as op
from .c2oObject import *
from .op_layer_info import *
class Caffe2Onnx():
def __init__(self,net,model,onnxname):
# Initialize a c2oGraph object
self.onnxmodel = c2oGraph(onnxname)
# Network and para... | 47.986622 | 219 | 0.58482 |
b5714e6101d4bcd35275a8ce80bf5ba0f8812b29 | 2,099 | py | Python | everyday_wechat/control/moviebox/maoyan_movie_box.py | filon7/EverydayWechat | cf4f509eb570de312995ce5c3b517f369753a1e9 | [
"MIT"
] | 1 | 2019-10-07T02:32:30.000Z | 2019-10-07T02:32:30.000Z | everyday_wechat/control/moviebox/maoyan_movie_box.py | filon7/EverydayWechat | cf4f509eb570de312995ce5c3b517f369753a1e9 | [
"MIT"
] | null | null | null | everyday_wechat/control/moviebox/maoyan_movie_box.py | filon7/EverydayWechat | cf4f509eb570de312995ce5c3b517f369753a1e9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Project: EverydayWechat-Github
Creator: DoubleThunder
Create time: 2019-08-30 12:22
Introduction: 猫眼实时票房 地址:https://piaofang.maoyan.com/dashboard
接口地址:https://box.maoyan.com/promovie/api/box/second.json?beginDate=20190830
"""
import requests
from datetime import datetime
def get_maoyan_mo... | 32.292308 | 112 | 0.602192 |
0edb29ac5643be7e5af6f0475976201da240b35e | 7,196 | py | Python | lib/python/treadmill/tests/treadmill_ldap_patch.py | vrautela/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 133 | 2016-09-15T13:36:12.000Z | 2021-01-18T06:29:13.000Z | lib/python/treadmill/tests/treadmill_ldap_patch.py | vrautela/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 108 | 2016-12-28T23:41:27.000Z | 2020-03-05T21:20:37.000Z | lib/python/treadmill/tests/treadmill_ldap_patch.py | evreng/treadmill | 05e47fa8acdf8bad7af78e737efb26ea6488de82 | [
"Apache-2.0"
] | 69 | 2016-09-23T20:38:58.000Z | 2020-11-11T02:31:21.000Z | """Monkey-patch the evaluate_filter_node method of ldap3's MockBaseStrategy.
This function is extracted from ldap3 with a small change in the
`node.tag == MATCH_SUBSTRING` branch. See:
ldap3/strategy/mockBase.py line 822 for ldap3 version 2.3
"""
from __future__ import absolute_import
from __future__ import division
... | 42.329412 | 79 | 0.588938 |
701c989e503de200104f08eefd68325d4b7710ff | 2,633 | py | Python | simple_virtual_env/virtual_env.py | iasawseen/MultiServerRL | 8460b162eb33eeae35eb01818ac6a5c26fedce0c | [
"MIT"
] | 5 | 2019-02-28T09:25:58.000Z | 2021-07-19T08:49:18.000Z | simple_virtual_env/virtual_env.py | iasawseen/MultiServerRL | 8460b162eb33eeae35eb01818ac6a5c26fedce0c | [
"MIT"
] | null | null | null | simple_virtual_env/virtual_env.py | iasawseen/MultiServerRL | 8460b162eb33eeae35eb01818ac6a5c26fedce0c | [
"MIT"
] | null | null | null | import abc
import json
import gym
import requests
from requests.exceptions import RequestException
import time
import numpy as np
class VirtualEnvironment(gym.Env):
def __init__(self, host_tcp, port_tcp):
self.host_tcp = host_tcp
self.port_tcp = port_tcp
@staticmethod
def _make_request(re... | 39.298507 | 115 | 0.511204 |
5633ec7f19016782b04a11f1d5f885bd9cf0a05d | 341 | py | Python | nnlib/__init__.py | AleksaC/nnlib | 5ad0fd570471626e9994100c844e1ed1493d94bd | [
"MIT"
] | 5 | 2019-07-09T20:56:10.000Z | 2020-02-13T19:31:47.000Z | nnlib/__init__.py | AleksaC/nnlib | 5ad0fd570471626e9994100c844e1ed1493d94bd | [
"MIT"
] | 1 | 2021-06-01T23:59:21.000Z | 2021-06-01T23:59:21.000Z | nnlib/__init__.py | AleksaC/nnlib | 5ad0fd570471626e9994100c844e1ed1493d94bd | [
"MIT"
] | 1 | 2019-08-19T11:00:55.000Z | 2019-08-19T11:00:55.000Z | from . import autodiff
from . import datasets
from . import layers
from . import utils
from . import activations
from . import callbacks
from . import config
from . import initializers
from . import losses
from . import metrics
from . import optimizers
from . import regularizers
from .core import Model, load_model
_... | 18.944444 | 35 | 0.771261 |
0cab848fbc2f19477d7233e2587496458033b2fd | 1,531 | py | Python | tools/mo/unit_tests/mo/back/kaldi_remove_memory_output_test.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/unit_tests/mo/back/kaldi_remove_memory_output_test.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/unit_tests/mo/back/kaldi_remove_memory_output_test.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from openvino.tools.mo.back.kaldi_remove_memory_output import KaldiRemoveMemoryOutputBackReplacementPattern
from unit_tests.utils.graph import build_graph
class KaldiRemoveMemoryOutputTest(unittest.TestCase):
nodes... | 33.282609 | 107 | 0.530372 |
e5c34ab0d06992ccf38cfa6ecd9d993f547983ae | 12,775 | py | Python | rc/model_handler.py | jayelm/coqa-baselines | 12f3380f1437a7b26a05c68bbd193a2c9f59238a | [
"MIT"
] | 6 | 2019-01-23T09:16:56.000Z | 2020-06-01T10:00:42.000Z | rc/model_handler.py | jayelm/coqa-baselines | 12f3380f1437a7b26a05c68bbd193a2c9f59238a | [
"MIT"
] | null | null | null | rc/model_handler.py | jayelm/coqa-baselines | 12f3380f1437a7b26a05c68bbd193a2c9f59238a | [
"MIT"
] | 2 | 2019-07-30T16:23:45.000Z | 2019-12-16T19:46:04.000Z | import time
from utils.data_utils import prepare_datasets
from utils import constants as Constants
from model import Model
import torch
import os
import json
from torch.utils.data import DataLoader
from utils.timer import Timer
from utils.logger import ModelLogger
from utils.eval_utils import AverageMeter
from utils.da... | 45.462633 | 147 | 0.55319 |
5f5dabc13dc38625ae81cd1c0915d182b65c104e | 16,074 | py | Python | verticapy/tests/vDataFrame/test_vDF_correlation.py | oualib/VerticaPy | 387a037df575540ec928ad1834c5b775818d8b98 | [
"Apache-2.0"
] | 1 | 2018-10-08T07:15:26.000Z | 2018-10-08T07:15:26.000Z | verticapy/tests/vDataFrame/test_vDF_correlation.py | oualib/VerticaPy | 387a037df575540ec928ad1834c5b775818d8b98 | [
"Apache-2.0"
] | null | null | null | verticapy/tests/vDataFrame/test_vDF_correlation.py | oualib/VerticaPy | 387a037df575540ec928ad1834c5b775818d8b98 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright [2018-2021] Micro Focus or one of its affiliates.
# 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 applicabl... | 43.918033 | 84 | 0.596678 |
33e9eb0d686a4c3a2fe38b47707d1f72142e00a0 | 82,500 | py | Python | src/sage/algebras/quantum_groups/fock_space.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/algebras/quantum_groups/fock_space.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/algebras/quantum_groups/fock_space.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | # -*- coding: utf-8 -*-
r"""
Fock Space
AUTHORS:
- Travis Scrimshaw (2013-05-03): Initial version
"""
# ****************************************************************************
# Copyright (C) 2013-2017 Travis Scrimshaw <tcscrims at gmail.com>
#
# This program is free software: you can redistribute it and/... | 37.229242 | 106 | 0.416764 |
3c5f3d3b80dab47d9968eed116110e46d7052223 | 12,460 | py | Python | tests/trainer/test_data_loading.py | eladsegal/pytorch-lightning | 7b4df7bf919acfd7f7b39d780faeadb54aec9ade | [
"Apache-2.0"
] | 3 | 2021-10-04T05:08:28.000Z | 2021-10-04T06:04:06.000Z | tests/trainer/test_data_loading.py | Programmer-RD-AI/pytorch-lightning | 02a675241c826d7720c7e15d6fda3f5da0b28116 | [
"Apache-2.0"
] | null | null | null | tests/trainer/test_data_loading.py | Programmer-RD-AI/pytorch-lightning | 02a675241c826d7720c7e15d6fda3f5da0b28116 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 38.695652 | 114 | 0.678652 |
d44109f3ff116788da5c2cbec9515e2c0771d9e4 | 2,233 | py | Python | code/internal/fake_ev3.py | TheVinhLuong102/LEGO-Mindstorms-Dalek | 9e341e5b94e81e9220d1229402b661fbf4d4b3f8 | [
"MIT"
] | 1 | 2021-05-15T20:46:38.000Z | 2021-05-15T20:46:38.000Z | code/internal/fake_ev3.py | calliecameron/lego-mindstorms-dalek | 9e341e5b94e81e9220d1229402b661fbf4d4b3f8 | [
"MIT"
] | 1 | 2017-01-25T11:09:33.000Z | 2017-02-13T07:04:32.000Z | code/internal/fake_ev3.py | calliecameron/lego-mindstorms-dalek | 9e341e5b94e81e9220d1229402b661fbf4d4b3f8 | [
"MIT"
] | 1 | 2020-06-25T20:42:59.000Z | 2020-06-25T20:42:59.000Z | """Fake versions of some ev3dev classes, so the networking code can be tested
without having the real ev3 to hand."""
import time
import subprocess
class Motor(object):
def __init__(self, port, mtype):
super(Motor, self).__init__()
self.port = port
self.mtype = mtype
self.speed_reg... | 25.089888 | 77 | 0.586207 |
12bb92daf151e0875a987e023495027dca0419ad | 703 | py | Python | GDLC/tests/test_destroy_tags.py | ptoche/Gran-Diccionari-de-la-llengua-catalana-Kindle-Edition- | a31412d2a6f05a6c1a9bd9854cdd6fee8abd65f4 | [
"BSD-3-Clause"
] | 1 | 2022-02-01T16:08:03.000Z | 2022-02-01T16:08:03.000Z | GDLC/tests/test_destroy_tags.py | ptoche/Gran-Diccionari-de-la-llengua-catalana-Kindle-Edition- | a31412d2a6f05a6c1a9bd9854cdd6fee8abd65f4 | [
"BSD-3-Clause"
] | null | null | null | GDLC/tests/test_destroy_tags.py | ptoche/Gran-Diccionari-de-la-llengua-catalana-Kindle-Edition- | a31412d2a6f05a6c1a9bd9854cdd6fee8abd65f4 | [
"BSD-3-Clause"
] | null | null | null | """
Strip tags from a BeautifulSoup object:
>>> from GDLC.GDLC import *
>>> dml = '''\
... <html>
... <head>
... <title>TITLE</title>
... <script>This text is inside an invalid tag</script>
... </head>
... <body>
... <p>This text is inside a valid tag</p><style>Invalid!</style><invalid>Invalid!</invalid>
... </... | 19.527778 | 94 | 0.614509 |
c7c7c0f5272b91acabc8d591f59b2e7408654e6d | 474 | py | Python | contact/migrations/0003_contactcaptchaformfield_hide_label.py | djangulo/integralpsychology.life | 941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b | [
"MIT"
] | null | null | null | contact/migrations/0003_contactcaptchaformfield_hide_label.py | djangulo/integralpsychology.life | 941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b | [
"MIT"
] | null | null | null | contact/migrations/0003_contactcaptchaformfield_hide_label.py | djangulo/integralpsychology.life | 941e6c1ad1f274d7489d8ecdea5ae72f4889cc4b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-10-10 15:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contact', '0002_auto_20181010_1446'),
]
operations = [
migrations.AddField... | 22.571429 | 53 | 0.635021 |
5d4b1a9baeb19b38e5e01a9ae86a1e3d2dc75eb4 | 3,049 | py | Python | custom/up_nrhm/reports/asha_facilitators_report.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | custom/up_nrhm/reports/asha_facilitators_report.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | custom/up_nrhm/reports/asha_facilitators_report.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.reports.sqlreport import DataFormatter, TableDataFormat
from corehq.apps.reports.standard import CustomProjectReport, DatespanMixin
from corehq.apps.reports.filters... | 41.202703 | 99 | 0.680551 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.