hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | 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 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | 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 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e97132f3440cd37e82977a22bf1358f03bf479e0 | 2,491 | py | Python | util/ap/py/HouseRobber2.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-12-29T03:26:39.000Z | 2016-12-29T03:26:39.000Z | util/ap/py/HouseRobber2.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | util/ap/py/HouseRobber2.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | '''
You can run it directly to see results.
'''
def rob2(nums):
# This problem is similar to Rober_I.
#
# However, for N houses,
# the 1st house and the Nth house
# can be robbed at the same time.
#
# So the tricky point is that this
# problem can be divided into two
# case... | 21.474138 | 87 | 0.481333 |
f9391250bde4af50d5279bad53d30e72e5c3ee76 | 1,326 | py | Python | src/Sephrasto/DatenbankEinstellung.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/DatenbankEinstellung.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/DatenbankEinstellung.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | class DatenbankEinstellung(object):
def __init__(self):
self.name = ''
self.beschreibung = ''
self.wert = ''
self.typ = 'Text' #Text, Float, Int oder Bool
self.isUserAdded = True
def __eq__(self, other) :
if self.__class__ != other.__class__: return False
... | 28.826087 | 70 | 0.533183 |
ddf42ec7829667188d8bc30531a4b2cda0535526 | 4,820 | py | Python | Apps/Vorverarbeitung/validate_subjects_tabel.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | 1 | 2021-04-13T10:00:46.000Z | 2021-04-13T10:00:46.000Z | Apps/Vorverarbeitung/validate_subjects_tabel.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | Apps/Vorverarbeitung/validate_subjects_tabel.py | RGreinacher/bachelor-thesis | 60dbc03ce40e3ec42f2538d67a6aabfea6fbbfc8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# import python libs
import re
import json
import argparse
import json
import random
from os import listdir
from os.path import isfile, join
from pprint import pprint as pp
from collections import deque
import sys
sys.path.append('../Auswertung')
# import project libs
... | 34.676259 | 163 | 0.645228 |
34dcf3a0668250a09d13c82faddad2fb78163541 | 6,034 | py | Python | Packs/Claroty/Integrations/Claroty/Claroty_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Claroty/Integrations/Claroty/Claroty_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Claroty/Integrations/Claroty/Claroty_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import dateparser
import demistomock as demisto
from Claroty import Client, fetch_incidents
MOCK_AUTHENTICATION = {
"first_name": "admin",
"id": 1,
"last_name": "admin",
"mail": "admin",
"password_expired": False,
"token": "ok",
"username": "admin"
}
RESOLVE_ALERT_RESPONSE = {
"success"... | 34.48 | 128 | 0.581372 |
9b2a2f24a980d1ba332ac910eaa0647f7f21b238 | 3,375 | py | Python | suite.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 13 | 2020-04-10T17:34:49.000Z | 2022-02-13T04:04:30.000Z | suite.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 213 | 2020-04-10T04:15:00.000Z | 2022-01-20T19:18:55.000Z | suite.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 7 | 2020-10-08T07:22:08.000Z | 2021-07-08T21:09:33.000Z | """run full suite of sims"""
import argparse
import csv
import os
import subprocess
import sys
import yaml
with open("config.yml", "r", encoding="utf8") as ymlfile:
config = yaml.load(ymlfile, Loader=yaml.FullLoader)
def call_process(process_args):
"""runs a process and constantly monitors for output"""
... | 33.088235 | 86 | 0.623111 |
1fe1306c59ee5cc7f95e6188f1723c8f2bf1c55e | 3,634 | py | Python | Kintol_Shell_Upload-main/kintol.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Kintol_Shell_Upload-main/kintol.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Kintol_Shell_Upload-main/kintol.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*
#!/usr/bin/python
#Kintol Upload Shell Rce
#####################################
import requests, re, urllib2, os, sys, codecs, random
import getpass
from base64 import b64encode, b64decode
from multiprocessing.dummy import Pool
from time import time... | 32.738739 | 258 | 0.523941 |
1f648ae25740a60dc9aedf28e9a9bc66631c7a71 | 50 | py | Python | settings.py | LikeToAccess/RCB | 37510facf935a9a8559bdd85ac86b292b5764639 | [
"MIT"
] | 1 | 2022-02-02T18:08:10.000Z | 2022-02-02T18:08:10.000Z | settings.py | LikeToAccess/RCB | 37510facf935a9a8559bdd85ac86b292b5764639 | [
"MIT"
] | null | null | null | settings.py | LikeToAccess/RCB | 37510facf935a9a8559bdd85ac86b292b5764639 | [
"MIT"
] | null | null | null | data_drive_letter = "X"
maximum_thread_limit = 12
| 16.666667 | 25 | 0.8 |
1f7c69a914c989f9203df5f4b99f4bd740dcd6ee | 7,179 | py | Python | contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/deploy_scripts/customize_service.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/deploy_scripts/customize_service.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | contrib/华为云垃圾分类大赛心得与案例-GitLD/src_Xception_all_aug+TTA/deploy_scripts/customize_service.py | huaweicloud/ModelArts-Lab | 75d06fb70d81469cc23cd422200877ce443866be | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | import ast
import numpy as np
from PIL import Image
import tensorflow as tf
from collections import OrderedDict
from tensorflow.python.saved_model import tag_constants
from model_service.tfserving_model_service import TfServingBaseService
class garbage_classify_service(TfServingBaseService):
def __init_... | 40.106145 | 109 | 0.528068 |
2f804b90261ea044b41c8b13aa8defc13023ddb9 | 791 | py | Python | dvwa-app/victim/dvwa_init.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | 4 | 2019-05-13T21:39:29.000Z | 2019-08-10T09:19:44.000Z | dvwa-app/victim/dvwa_init.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | null | null | null | dvwa-app/victim/dvwa_init.py | alxgrk/pratikum-sec-inf-and-event-mgmt | a53d8a79be4664b7b8b249034760bab1d9fbc657 | [
"Apache-2.0"
] | null | null | null | from time import sleep
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from pyvirtualdisplay import Display
import requests
import os
# dvwa init script - to create the dvwa database
requests.packages.urllib3.disable_warnings()
# Virtual display to run chrome-browser
display = Di... | 24.71875 | 57 | 0.790139 |
2f8dc9b39b247781ae302d4a2415ef37a9e428aa | 7,964 | py | Python | src/test/tests/operators/reflect.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/operators/reflect.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/operators/reflect.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: reflect.py
#
# Tests: mesh - 3D curvilinear, single domain,
# 3D rectilinear, single domain.
# 3D unstructured, single domain.
# p... | 23.218659 | 78 | 0.701783 |
85ecb0843554ba21bdfb959674c3a245209a1a46 | 936 | py | Python | gratz/forum/models.py | mike-carter/Gratz | 5f0889c4ad127e2bb513f11cb4b39e9a3aa2d4c6 | [
"MIT"
] | null | null | null | gratz/forum/models.py | mike-carter/Gratz | 5f0889c4ad127e2bb513f11cb4b39e9a3aa2d4c6 | [
"MIT"
] | null | null | null | gratz/forum/models.py | mike-carter/Gratz | 5f0889c4ad127e2bb513f11cb4b39e9a3aa2d4c6 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse
# Create your models here.
class Post(models.Model):
owner = models.ForeignKey(User, on_delete=models.SET_NULL, null=True)
title = models.CharField(max_length=200)
date_posted = models.DateTimeField('... | 28.363636 | 73 | 0.692308 |
7b362861b251d9ca35fbc4b47058e09adae518d8 | 430 | py | Python | exercises/es/solution_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/solution_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/solution_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importa la clase de lenguaje "Spanish" y crea el objeto nlp
from spacy.lang.es import Spanish
nlp = Spanish()
# Procesa el texto
doc = nlp("Me gustan las panteras negras y los leones.")
# Un slice del Doc para "panteras negras"
panteras_negras = doc[3:5]
print(panteras_negras.text)
# Un slice del Doc para "panter... | 26.875 | 67 | 0.751163 |
cda61c3e1040bdcce1d3d3b499178b6b51b69299 | 410 | py | Python | src/pgsql_cluster.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/pgsql_cluster.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/pgsql_cluster.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/python
# pylint: disable=W0142
'''
Postgresql script for ztc (pgsql.* items)
Copyright (c) 2009-2011 Vladimir Rusinov <vladimir@greenmice.info>
Licensed under GNU GPL v.3
Currently supported metrics:
* autovac_freeze (float) - returns max % of how close each database to
autovac_freeze
'''
from ... | 22.777778 | 74 | 0.714634 |
cde4c068e03549736e09b71a3003913bfd1f84c3 | 619 | py | Python | quark_core_api/common/object_initializers.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/common/object_initializers.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/common/object_initializers.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null |
APPLICATION = {
"workspaces" : [{"id":1, "name":"WS-1", "dir":"d:/quark/WS-1"},
{"id":2, "name":"WS-2", "dir":"d:/quark/WS-2"},
{"id":3, "name":"WS-3", "dir":"d:/quark/WS-3"}],
"user": {
"name" : "John Doe",
"email" : "john@doe.com"
},
"repo_l... | 17.685714 | 68 | 0.408724 |
a83765db97f22b3b2f20187788369f18856e68f4 | 1,139 | py | Python | etl/transforms/primitives/df/tests/test_format_data.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/transforms/primitives/df/tests/test_format_data.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/transforms/primitives/df/tests/test_format_data.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | from etl.transforms.primitives.df import format_data
from etl.core import test_utils
import pytest
import pandas as pd
import numpy as np
def test_format_columns():
df = pd.DataFrame([
{
'admittime': '5:43pm March 6th, 2012',
'age': 123,
}, {
'admittime': '17:43 2012/3/6',
'age': 12.... | 22.78 | 66 | 0.565408 |
8d0fc53c3e9dc97a8f7f4d71dcfa1ffec1d144b4 | 1,986 | py | Python | imageDelta/experiment-epi-NaCl.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 4 | 2017-06-20T19:56:22.000Z | 2021-05-29T10:07:47.000Z | imageDelta/experiment-epi-NaCl.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 11 | 2017-05-31T19:14:32.000Z | 2018-09-12T23:44:11.000Z | imageDelta/experiment-epi-NaCl.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 2 | 2017-06-20T17:14:38.000Z | 2017-06-20T19:51:34.000Z | """
Code in this file aims to automatically produce "difference images" from
full frame micrographs of calcium-sensitive fluorophores before and after a drug
is applied. This is done by creating a baseline image (the average of several
TIFs before the drug) and calculating the difference between that and the average
i... | 44.133333 | 102 | 0.704935 |
5705496f01ae32cfe1686c1207fb649cb14c3efc | 1,434 | py | Python | src/doc/data_into_visit/data_examples/blueprint_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/data_into_visit/data_examples/blueprint_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/data_into_visit/data_examples/blueprint_example.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
sys.path.append("/usr/gapps/conduit/software/ascent/0.7.1/toss_3_x86_64_ib/openmp/gnu/conduit-install/lib/python3.7/site-packages")
import conduit
import conduit.relay.io
import conduit.blueprint.mesh
import numpy
mesh = conduit.Node()
# Create the coordinate set.
mesh["coordsets/coords/type"] = "uniform"... | 31.173913 | 131 | 0.738494 |
57515b3f6fac81f089ab42897f38a8955772ed34 | 38 | py | Python | sentinel/__init__.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | 342 | 2017-08-21T20:12:56.000Z | 2022-03-19T17:58:25.000Z | sentinel/__init__.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | 57 | 2017-11-13T11:16:47.000Z | 2022-03-01T13:54:31.000Z | vpn-node-cosmos/sentinel/__init__.py | smtcrms/sentinel | ff65bc9200f6c940aa184c0ec0872fdcfef25363 | [
"MIT"
] | 72 | 2017-11-23T05:13:24.000Z | 2022-02-25T14:18:33.000Z | # coding=utf-8
from .node import node
| 12.666667 | 22 | 0.736842 |
5ff5c14b8287d95cc19e53bc26fd2e6fd47f2754 | 2,023 | py | Python | _Dist/NeuralNetworks/c_BasicNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/c_BasicNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/c_BasicNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../")
if root_path not in sys.path:
sys.path.append(root_path)
from _Dist.NeuralNetworks.NNUtil import *
from _Dist.NeuralNetworks.DistBase import Base
class Basic(Base):
signature = "Basic"
def __init__(self, *args, **kwargs):
super(Basic,... | 36.781818 | 92 | 0.660405 |
7bffbb2958f7221f1f5a0f33b82cc40d76056662 | 1,333 | py | Python | sFTP-master/crypto.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 9 | 2018-09-01T06:34:52.000Z | 2020-11-02T22:53:58.000Z | sFTP-master/crypto.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | sFTP-master/crypto.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 5 | 2018-11-29T20:09:20.000Z | 2020-11-02T22:54:00.000Z | # Date: 06/02/2018
# Author: Pure-L0G1C
# Description: Encryption/Decryption
from Crypto.PublicKey import RSA
from base64 import b64encode, b64decode
from Crypto.Random import get_random_bytes
from Crypto.Cipher import Salsa20, PKCS1_OAEP
class CryptoRSA(object):
@staticmethod
def generate_keys():
k... | 27.770833 | 82 | 0.733683 |
d0a500b2a07db8ae743eec79ff0d8f00f3aac617 | 6,731 | py | Python | test/demonst_4_nba.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | test/demonst_4_nba.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | 3 | 2020-03-24T18:18:21.000Z | 2021-08-23T20:37:09.000Z | test/demonst_4_nba.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | #############################################################
#
# Real-world Data 4. NBA
#
#############################################################
import sys, os
sys.path.append("../..")
sys.path.append("..")
sys.path.append(os.getcwd())
import numpy as np
import pandas as pd
import copy
import pickle
from math ... | 30.595455 | 121 | 0.584609 |
d0d7db0a1ae0211e4a93003ccc794d34f0b8ed0d | 2,046 | py | Python | project/api/push_registration/schemas.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | project/api/push_registration/schemas.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | project/api/push_registration/schemas.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | from marshmallow import fields, validate
from marshmallow_enum import EnumField
from project.api import marshmallow
from project.api.schemas import (
IdSchemaMixin,
PaginationRequestSchema,
PaginationResponseSchema,
SQLAlchemyBaseSchema,
TrackableSchemaMixin,
WriteIdSchemaMixin,
)
from project.... | 26.921053 | 88 | 0.776637 |
ef4129fc1359955e99c61603c6a5cca46844bb29 | 9,561 | py | Python | code/sensors/bluetooth/bluetooth.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/sensors/bluetooth/bluetooth.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/sensors/bluetooth/bluetooth.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | # BLE Scanner based on https://github.com/switchdoclabs/iBeacon-Scanner-/blob/master/blescan.py
# BLE = Bluetooth Low Energy
import os
import sys
import struct
import bluetooth._bluetooth as bluez
import math
import time
import logging
from enum import Enum
from collections import deque, namedtuple
from threading impo... | 32.85567 | 95 | 0.62368 |
328cb6307f70f83df483c16ebad3fab11c697ef4 | 2,824 | py | Python | src/lecture2/logistic_regression/naive_softmax_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture2/logistic_regression/naive_softmax_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture2/logistic_regression/naive_softmax_regression.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | """
Created on August 02 00:06, 2020
@author: fassial
"""
import numpy as np
import matplotlib.pyplot as plt
# local dep
import .utils
def load_dataset(file_path):
dataMat = []
labelMat = []
fr = open(file_path)
for line in fr.readlines():
lineArr = line.strip().split()
dataMat.append(... | 30.695652 | 133 | 0.632436 |
de502f0d7295c12268e568b5024a69d8b04cd49a | 196 | py | Python | ib_connection/IBConnector.py | nic-fillion/SMALET | 011844a2ee23383f4cbd9df4f394de086f873fc6 | [
"MIT"
] | null | null | null | ib_connection/IBConnector.py | nic-fillion/SMALET | 011844a2ee23383f4cbd9df4f394de086f873fc6 | [
"MIT"
] | null | null | null | ib_connection/IBConnector.py | nic-fillion/SMALET | 011844a2ee23383f4cbd9df4f394de086f873fc6 | [
"MIT"
] | null | null | null | from threading import Thread
import logging
class IBConnector:
def __init__(self, app):
self.thread = Thread(
target=self.run,
name='IB connector',
) | 17.818182 | 32 | 0.591837 |
dec2f2a79acc00ab4ec810defae9b44030b079a9 | 5,812 | py | Python | contents/blender_export.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | contents/blender_export.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | contents/blender_export.py | cutec-chris/sce | da1f906ff4a049722b8968eeab8a07b411c92a8c | [
"MIT"
] | null | null | null | import bpy,pathlib,mathutils,math,os
def IsNewer(File1,File2):
try:
return os.path.getmtime(str(File1))<os.path.getmtime(str(File2))
except:
return True
def ExportObject(File,Object,TargetName,lod=[10],lod_ligthing=50,**kwargs):
File = pathlib.Path(File)
if IsNewer(TargetName+'_10.glb',F... | 47.252033 | 135 | 0.69563 |
deecb14b27d4af6713c4acee70d3adf22146b73f | 527 | py | Python | Utils/py/naoth/naoth/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/naoth/naoth/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/naoth/naoth/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import sys, os
# add the current directory to search path
sys.path.append(os.path.dirname(__file__))
# add Framework stuff (opencv) to search path
versionPart = 'python2.7' if sys.version_info[0] == 2 else 'python3.6'
fwPath = os.path.join(os.getenv('EXTERN_PATH_NATIVE'),'lib', versionPart, 'site-packages')
if os.pat... | 35.133333 | 90 | 0.779886 |
19c29815db5e30f915c77de92c8ca4fd10a94afa | 3,969 | py | Python | test/test_npu/test_triangular_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_triangular_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_triangular_solve.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable... | 46.694118 | 101 | 0.705971 |
5f32060fe0adce3611e143101d45f84e96d9528c | 7,738 | py | Python | algorithm/implementation.py | xSAVIKx/SHUP-algorithm | d188add53da7ec0a163f02ea4ad49fa9f33d2402 | [
"Apache-2.0"
] | null | null | null | algorithm/implementation.py | xSAVIKx/SHUP-algorithm | d188add53da7ec0a163f02ea4ad49fa9f33d2402 | [
"Apache-2.0"
] | null | null | null | algorithm/implementation.py | xSAVIKx/SHUP-algorithm | d188add53da7ec0a163f02ea4ad49fa9f33d2402 | [
"Apache-2.0"
] | null | null | null | from bitstring import pack, BitArray
from algorithm.util import galNI, sbox_1, sbox_2, sbox_3, sbox_4
__author__ = 'Iurii Sergiichuk <iurii.sergiichuk@gmail.com>'
class MasterKey(object):
def __init__(self, master_key_hex_string="0x3cc849279ba298b587a34cabaeffc5ecb3a044bbf97c516fab7ede9d1af77cfa"):
self... | 37.931373 | 131 | 0.667873 |
263fcc0769a3c20cdf737d2d68c3e4cbb758029b | 1,016 | py | Python | python/advanced_sw/GITHUB/test2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/advanced_sw/GITHUB/test2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/advanced_sw/GITHUB/test2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl
import re
import sqlite3
import requests
import datetime
import os
import sys
import argparse
import random
import lxml
import lxml.html as lh
from lxml import etree
import wget
from io import StringIO, BytesIO
from urllib.reques... | 23.090909 | 63 | 0.697835 |
f8c07f61de0f629904e117299d2bfb944d21da47 | 8,756 | py | Python | hausse/hausse.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/hausse.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/hausse.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | """Hausse main module."""
import json
import logging
import os
from importlib import import_module
from pathlib import Path
from typing import Callable, Iterable, Union
import yaml
from .lib import Element, Project
from .utils import Defaults, Keys, clean_dir
class Hausse(Project):
"""
Hausse
======
... | 32.917293 | 80 | 0.592051 |
e4b5e6e05339b587ceb4e6a6d8384c8ad3b8aba6 | 866 | py | Python | create_game.py | Lyniat/dungeon-hop | e8d19b2c933feb6665935f37f73785626698ea09 | [
"MIT"
] | null | null | null | create_game.py | Lyniat/dungeon-hop | e8d19b2c933feb6665935f37f73785626698ea09 | [
"MIT"
] | null | null | null | create_game.py | Lyniat/dungeon-hop | e8d19b2c933feb6665935f37f73785626698ea09 | [
"MIT"
] | null | null | null | import time
import re
import os
version = time.time()
print "actual version will be: "+str(version)
lines = []
with open('./main/client/GameInstance.js') as infile:
for line in infile:
line = re.sub('GAME_VERSION.*,','GAME_VERSION = '+str(version)+',',line)
lines.append(line)
infile.close()
print "new c... | 21.65 | 73 | 0.655889 |
39afa0f3a2092298267dda406d5fa7530089896a | 11,026 | py | Python | backend/app/core/export/task_exporter.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2022-02-20T12:45:04.000Z | 2022-02-20T12:45:04.000Z | backend/app/core/export/task_exporter.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/core/export/task_exporter.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | import re
from io import BytesIO
from typing import List, Tuple, Type
import requests
import xlsxwriter
from app.core.config import settings
from app.crud.crud_base_task import crud_base_task
from app.crud.crud_task_group import crud_task_group
from app.crud.crud_user import crud_user
from app.crud.crud_user... | 33.718654 | 109 | 0.565844 |
39f43e90eba0874a7457724f83dae596172c3560 | 1,828 | py | Python | cart_text_jieba.py | Artemis-ii/LDA | 496e43f875ef35084cfb8539ee8bfe4e4fe68fb7 | [
"Apache-2.0"
] | null | null | null | cart_text_jieba.py | Artemis-ii/LDA | 496e43f875ef35084cfb8539ee8bfe4e4fe68fb7 | [
"Apache-2.0"
] | null | null | null | cart_text_jieba.py | Artemis-ii/LDA | 496e43f875ef35084cfb8539ee8bfe4e4fe68fb7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 1 15:41:02 2018
@author: 月神少女
"""
import jieba
import jieba.analyse
import jieba.posseg as pseg
import codecs,sys
from string import punctuation
from text_parse import TEXT_parse
if sys.getdefaultencoding() != 'utf-8':
reload(sys)
sys.setdefaultencoding('utf-8... | 27.283582 | 75 | 0.561269 |
299a75a96157e3264ce2c4e4173e6515f69546eb | 1,927 | py | Python | setup.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | setup.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | setup.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
"""
ZTC setup file
Copyright (c) 2009-2012 Vladimir Rusinov <vladimir.rusinov@muransofot.com>
Copyright (c) 2012 Murano Software [http://www.muranosoft.com]
"""
import glob
import sys
if sys.version_info > (3, 3):
from packaging.core import setup
print("Using packaging")
else:
try:
... | 31.590164 | 76 | 0.542813 |
29ad9532f3d978caebfd889dd1dcd0b381e68ff3 | 5,720 | py | Python | analysis/Plot_by_time.py | MeteorologieHautnah/MeteorologieHautnah | 1607c25b85753f31faccfd279abd503b83c1f4ea | [
"MIT"
] | 1 | 2022-02-17T08:24:13.000Z | 2022-02-17T08:24:13.000Z | analysis/Plot_by_time.py | MeteorologieHautnah/MeteorologieHautnah | 1607c25b85753f31faccfd279abd503b83c1f4ea | [
"MIT"
] | null | null | null | analysis/Plot_by_time.py | MeteorologieHautnah/MeteorologieHautnah | 1607c25b85753f31faccfd279abd503b83c1f4ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[5]: index
from wetterdienst import Wetterdienst
from wetterdienst.provider.dwd.observation import DwdObservationRequest, DwdObservationDataset, DwdObservationPeriod, DwdObservationResolution
from datetime import datetime, timedelta
import numpy as np
import pandas as... | 27.368421 | 142 | 0.697378 |
8a25f062ae089a9c6e618210f3ca9e6e14cc1ac8 | 2,318 | py | Python | textmining/com/aaron/text_token.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | textmining/com/aaron/text_token.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | textmining/com/aaron/text_token.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import nltk
import os
import nltk.corpus
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
from nltk.probability import FreqDist
import matplotlib.pyplot as plt
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from nltk.tokenize i... | 31.324324 | 114 | 0.725626 |
8abb7933cc4ebb9742b25dffa851376252ea1ffd | 840 | py | Python | gemtown/modelphotos/migrations/0005_auto_20190424_0316.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/modelphotos/migrations/0005_auto_20190424_0316.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/modelphotos/migrations/0005_auto_20190424_0316.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-04-23 18:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('modelphotos', '0004_auto_20190420_1737'),
]
operations = [
migrations.AlterField(
model_name='modelphoto',
name='co... | 35 | 231 | 0.590476 |
0a8f403bda330cd8e652a58480dad635564ba2ba | 1,371 | py | Python | packages/OpenCV/nodes/OpenCV___TopHat0/widgets/OpenCV___TopHat0___main_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/OpenCV/nodes/OpenCV___TopHat0/widgets/OpenCV___TopHat0___main_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/OpenCV/nodes/OpenCV___TopHat0/widgets/OpenCV___TopHat0___main_widget.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | # from PySide2.QtWidgets import ...
# from PySide2.QtCore import ...
# from PySide2.QtGui import ...
from PySide2.QtGui import QImage, QPixmap
from PySide2.QtWidgets import QLabel
import cv2
class TopHat_NodeInstance_MainWidget(QLabel):
def __init__(self, parent_node_instance):
super(TopHat_NodeInstance... | 30.466667 | 85 | 0.625091 |
0ab3d809a5389df90021eae3ed8f13b056c852ec | 8,972 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cnos/cnos_image.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cnos/cnos_image.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cnos/cnos_image.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | 37.07438 | 92 | 0.646121 |
0ae802e4917c2a13270b04fb4de96f98679c021e | 10,268 | py | Python | PPO-PyTorch/train.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | PPO-PyTorch/train.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | PPO-PyTorch/train.py | xixiha5230/RL | cc957a4231263074b8cf7fad6ba276f4b3899670 | [
"MIT"
] | null | null | null | import os
import glob
import time
from datetime import datetime
import torch
import numpy as np
import gym
from PPO import PPO
################################### Training ###################################
def train():
print("====================================================================================... | 39.340996 | 131 | 0.517335 |
d48f1edc0948b830163a701f0e132ef9983eb689 | 11,775 | py | Python | research/cv/GENet_Res50/src/GENet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/GENet_Res50/src/GENet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/GENet_Res50/src/GENet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 37.028302 | 98 | 0.552187 |
d4a2677671d9c96bb49b249f3b70ff6fcc9f9468 | 5,941 | py | Python | LF6/vb.py | JohannesMuelle/workshops | af9140159e3872aff75864ced99b5163d7bba1ba | [
"CC0-1.0"
] | 5 | 2016-07-07T09:00:31.000Z | 2017-03-09T22:46:33.000Z | LF6/vb.py | JohannesMuelle/workshops | af9140159e3872aff75864ced99b5163d7bba1ba | [
"CC0-1.0"
] | null | null | null | LF6/vb.py | JohannesMuelle/workshops | af9140159e3872aff75864ced99b5163d7bba1ba | [
"CC0-1.0"
] | 8 | 2016-05-13T14:29:06.000Z | 2019-10-20T16:43:32.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, subprocess
import sys, traceback
import crypt
# Passwort für den User vbox
print("Dieses Skript installiert VirtualBox und phpVirtualBox auf dem System")
print("Es ist zu unterscheiden zwischen dem Benutzer unter dem die Anwendung läuft und dem Benutzer, der si... | 52.575221 | 161 | 0.693318 |
580130c4bf321de1ed7bba8034be178ca337fef7 | 229 | py | Python | 11-Templates/app.py | dikyindrah/Flask | 96f3f2b0db12b362d439d0c064dfa392ee14ad12 | [
"MIT"
] | null | null | null | 11-Templates/app.py | dikyindrah/Flask | 96f3f2b0db12b362d439d0c064dfa392ee14ad12 | [
"MIT"
] | null | null | null | 11-Templates/app.py | dikyindrah/Flask | 96f3f2b0db12b362d439d0c064dfa392ee14ad12 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/login/<username>')
def login(username):
return render_template('login.html', username=username)
if __name__ == '__main__':
app.run(debug=True) | 22.9 | 59 | 0.729258 |
ed19825faf8d5dbb74205eefbdc8d1f7820340e1 | 53,137 | py | Python | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/utils.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/utils.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/bitbake/lib/bb/utils.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | """
BitBake Utility Functions
"""
# Copyright (C) 2004 Michael Lauer
#
# SPDX-License-Identifier: GPL-2.0-only
#
import re, fcntl, os, string, stat, shutil, time
import sys
import errno
import logging
import bb
import bb.msg
import multiprocessing
import fcntl
import importlib
from importlib import machinery
import i... | 33.931673 | 181 | 0.573518 |
9c3259e540e7d07de478418013ab2f8954a5e798 | 3,785 | py | Python | module/encodings/huffman/huffman_encoding.py | abraxas767/ezencode | 14d870a708c4da1389858f5265c36b930a0e5176 | [
"MIT"
] | null | null | null | module/encodings/huffman/huffman_encoding.py | abraxas767/ezencode | 14d870a708c4da1389858f5265c36b930a0e5176 | [
"MIT"
] | null | null | null | module/encodings/huffman/huffman_encoding.py | abraxas767/ezencode | 14d870a708c4da1389858f5265c36b930a0e5176 | [
"MIT"
] | null | null | null | from leaf_node import LeafNode
import sys
sys.path.insert(0, "./encodings/")
from abstract_encoding import Encoding
class HuffmanEncoding(Encoding):
"""
This is the implementation of the huffman encoding.
"""
__leafs = []
__prefix_table = {}
# generate prefix table and encode accordingl... | 33.495575 | 90 | 0.56539 |
92dcf68e6c97a3a805ae8a3355dc92b478a1a5c0 | 594 | py | Python | minimum-path-sum/minimum-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | minimum-path-sum/minimum-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | minimum-path-sum/minimum-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def minPathSum(self, grid: List[List[int]]) -> int:
dp=[[0 for _ in range(len(grid[0]))] for _ in range(len(grid))]
for row in range(len(grid)):
for col in range(len(grid[0])):
dp[row][col]=grid[row][col]
if row==0 and col==0:
... | 39.6 | 71 | 0.451178 |
b928ec93afb4beed9aa07ca6a042faa5096ea5a0 | 13,916 | py | Python | src/Sephrasto/CharakterAttributeWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterAttributeWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterAttributeWrapper.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:21:49 2017
@author: Lennart
"""
from Wolke import Wolke
import UI.CharakterAttribute
from PyQt5 import QtWidgets, QtCore, QtGui
import logging
import copy
from Hilfsmethoden import Hilfsmethoden
from EventBus import EventBus
import Definitionen
class AttrWrapper(Qt... | 49.878136 | 322 | 0.64257 |
b9a758d95904be8229412da42c0516b18ac23aa9 | 3,957 | py | Python | Assembler/labels.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | 1 | 2019-01-28T01:53:20.000Z | 2019-01-28T01:53:20.000Z | Assembler/labels.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | null | null | null | Assembler/labels.py | Laegluin/mikrorechner | 7e5e878072c941e422889465c43dea838b83e5fd | [
"MIT"
] | null | null | null | import datastrings
import re
import exceptions as error
def process_labels(commands):
try:
return replace_labels_with_values(commands)
except (error.label_duplicate_error,error.label_replacement_not_successful_error) as err:
print(err.string)
raise error.binary_file_not_creatable_except... | 50.088608 | 144 | 0.628506 |
e06a857fedc36a097de58ff641e29f6ee75a71f1 | 3,883 | py | Python | CS303/lab7-9/work/ISE/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS303/lab7-9/work/ISE/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS303/lab7-9/work/ISE/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | from queue import Queue
import multiprocessing as mp
import time
import sys
import argparse
import os
import random
import numpy as np
worker_num = 8
epoch = 2000
class Node:
def __init__(self, name, threshold=None):
self.name = name
self.next = []
self.weight = []
class Worker(mp.Proce... | 24.732484 | 77 | 0.523822 |
0ef0f3a4830852c838985588d6408ba9048c6404 | 176 | py | Python | app/admin/__init__.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 73 | 2018-12-14T18:12:33.000Z | 2022-02-23T21:39:59.000Z | app/admin/__init__.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 4 | 2019-11-23T18:08:18.000Z | 2021-08-23T09:00:15.000Z | app/admin/__init__.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 33 | 2019-06-03T00:30:57.000Z | 2022-03-10T23:54:43.000Z | """
AUTOR: Juanjo
FECHA DE CREACIÓN: 24/05/2019
"""
from flask import Blueprint
admin_bp = Blueprint('admin', __name__, template_folder='templates')
from . import routes
| 12.571429 | 68 | 0.727273 |
161c7247d8f7e839d50d1d287907b990848d49ad | 1,288 | py | Python | scripts/runsqlsmith.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | scripts/runsqlsmith.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | scripts/runsqlsmith.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z |
# run SQL smith and collect breaking queries
import os
import re
import subprocess
import sys
import sqlite3
from python_helpers import open_utf8
sqlsmith_db = 'sqlsmith.db'
sqlsmith_test_dir = 'test/sqlsmith/queries'
export_queries = False
con = sqlite3.connect(sqlsmith_db)
c = con.cursor()
if len(sys.argv) == 2:... | 23.851852 | 85 | 0.701863 |
164cb532a76617daac24630c5cbab3d72c4bf693 | 2,203 | py | Python | robolib/robogui/pixel_editor.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | robolib/robogui/pixel_editor.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | robolib/robogui/pixel_editor.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import cv2
import numpy as np
from robolib.images.feature_extraction import resize_image_to_info
__DEFAULT_CONTINUE_KEYS = [27, 13, 32]
def get_pixel_input_raw(rows, cols, name="Edit Image", dtype=np.float32, low=-1, high=1, continue_keys=None):
return np.array(_get_pixel_input_raw(rows, cols, name, dtype, low, ... | 30.597222 | 148 | 0.669995 |
d5c1194ffec6d10f95aba586977b20adfc1cbf7c | 26,507 | py | Python | DummerStammtischBot.py | VVEIRD/DummerStammtischBot | da0fd2dfe354a7fda5790023d199ddd9c5fbf76c | [
"MIT"
] | 1 | 2021-08-11T18:50:04.000Z | 2021-08-11T18:50:04.000Z | DummerStammtischBot.py | VVEIRD/DummerStammtischBot | da0fd2dfe354a7fda5790023d199ddd9c5fbf76c | [
"MIT"
] | 1 | 2019-05-16T06:28:36.000Z | 2019-05-16T06:28:36.000Z | DummerStammtischBot.py | VVEIRD/DummerStammtischBot | da0fd2dfe354a7fda5790023d199ddd9c5fbf76c | [
"MIT"
] | 1 | 2019-05-14T14:02:58.000Z | 2019-05-14T14:02:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## Stammtischbot
#
# Macht Mittwochs eine Umfrage um herauszufinden wohin es zum Stammtisch gehen soll
import sys
import json
import sqlite3
from telegram.ext import Updater
from telegram.ext import CommandHandler
from telegram.ext import MessageHandler, Filters
import dat... | 44.326087 | 312 | 0.674086 |
e66b64c090062fa4320308b0f75296dcc8e8c5a4 | 2,436 | py | Python | official/cv/retinaface_resnet50/src/lr_schedule.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/retinaface_resnet50/src/lr_schedule.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/retinaface_resnet50/src/lr_schedule.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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.290323 | 103 | 0.64491 |
fc36197e9b5f7a39f94875fa5f46ff8640aed7c6 | 5,903 | py | Python | Packs/CommonScripts/Scripts/DateStringToISOFormat/DateStringToISOFormat_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/DateStringToISOFormat/DateStringToISOFormat_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/DateStringToISOFormat/DateStringToISOFormat_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from DateStringToISOFormat import parse_datestring_to_iso
import demistomock as demisto
import pytest
# date_value, day_first, year_first, fuzzy, expected_output
testdata = [
('05-11-2929', True, True, True, True, '2929-11-05T00:00:00+00:00'),
('05-11-2929', True, False, True, True, '2929-11-05T00:00:00+00:00... | 71.120482 | 118 | 0.655429 |
5dca870e069c6a0a5d577bc3920a45fd2a1a7e19 | 5,289 | py | Python | KNN/kNN.py | lance52587/MachineLearningNote | 0184f8de178990ee31ace2a43809830874313697 | [
"MIT"
] | 37 | 2018-06-06T05:58:54.000Z | 2022-02-21T04:49:54.000Z | KNN/kNN.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | null | null | null | KNN/kNN.py | YYangjlu/MachineLearningNote | d34a9b57af3b2c6f276d14c2a7a3dccadb585421 | [
"MIT"
] | 35 | 2018-10-01T16:12:34.000Z | 2022-02-21T03:35:33.000Z | # -*- coding: utf-8 -*-
# @Date : 2017-04-03 15:47:04
# @Author : Alan Lau (rlalan@outlook.com)
# import numpy as np
# import distance
# import fwalker
# import reader
# import statistic
# def get_data(data_path):
# label_vec = []
# files = fwalker.fun(data_path)
# for file in files:
# ech_labe... | 34.568627 | 123 | 0.650974 |
5d30b9642ca02eb7664d764f1fd524886afbe78d | 6,643 | py | Python | hisim/components/dummy.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/dummy.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/dummy.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 1 | 2022-03-13T16:15:36.000Z | 2022-03-13T16:15:36.000Z | # Generic/Built-in
import copy
import numpy as np
from typing import List, Optional
# Owned
from hisim.component import Component, SingleTimeStepValues, ComponentInput, ComponentOutput
from hisim.components.ev_charger import SimpleStorageState
from hisim.utils import HISIMPATH
from hisim import loadtypes as lt
from his... | 41.006173 | 124 | 0.617191 |
dbaaf23f145d5a04f8b02a26023396b77b3dc4df | 4,447 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_pfc_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_pfc_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_pfc_interface.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import pa... | 38.669565 | 103 | 0.670564 |
dbc9b69c59fff01ef0e276b0ea84fad1e309986e | 818 | py | Python | sketches/natureOfCode/chapter01/mover/mover.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/natureOfCode/chapter01/mover/mover.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/natureOfCode/chapter01/mover/mover.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | class Mover(object):
def __init__(self):
self.location = PVector(random(width), random(height))
self.velocity = PVector(random(-5, 5), random(-5, 5))
self.r = 15
def update(self):
self.location.add(self.velocity)
def display(self):
stroke(0)
fil... | 28.206897 | 69 | 0.530562 |
919f35df2425fa45d68a62ff250d7f7259d01c3d | 5,345 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vtep.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vtep.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vtep.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['... | 26.20098 | 111 | 0.640037 |
37d2717e8b3e1fa56c025383d7488218b1e125ca | 2,176 | py | Python | research/cv/swin_transformer/src/data/data_utils/moxing_adapter.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/swin_transformer/src/data/data_utils/moxing_adapter.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/swin_transformer/src/data/data_utils/moxing_adapter.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 29.808219 | 116 | 0.653033 |
f4352e3f34ff59bdfc8dd2bfbaf3ca6bfe02756d | 8,596 | py | Python | research/nlp/hypertext/src/poincare.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/hypertext/src/poincare.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/hypertext/src/poincare.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 30.920863 | 114 | 0.591671 |
be9a0ae08e5d2b0cf33ab9e197160664f5587480 | 31,571 | py | Python | Packs/Base/Scripts/DBotSuggestClassifierMapping/DBotSuggestClassifierMapping.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Base/Scripts/DBotSuggestClassifierMapping/DBotSuggestClassifierMapping.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Base/Scripts/DBotSuggestClassifierMapping/DBotSuggestClassifierMapping.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
import itertools
import numbers
import re
import socket
from collections import Counter
from collections import OrderedDict
from datetime import datetime, timedelta
INCIDENT_FIELD_NAME = "name"
INCIDENT_FIELD_MACHINE_NAME = "cliName"
INCIDENT_FIELD_SYSTEM = "system"
SAMPLES_INCOMING ... | 41.982713 | 119 | 0.565424 |
beb9462e7eb4cb9120161d5efcebb2195448e61e | 388 | py | Python | vorl1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl1.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | # 1. Vorlesung mit Python (3. zu Skriptsprachen insges. -- 26.09.2020 - 1. PDF dazu)
x = input ("Ihr Name? ")
X = "Hallo " + x
print (x)
x = input ("Ihr Alter? ")
x = int(x) - 5
print (x)
# Seite 12
liste = "Hello World"
print (liste)
print (liste[2])
# Seite 17
strvar = "ABC"
print (strvar)
strvar = "ABC" * 5
... | 13.857143 | 84 | 0.608247 |
22a835b39d5c26d87758f88e10e54d6007c99983 | 11,393 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/open_iscsi.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/open_iscsi.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/system/open_iscsi.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'me... | 31.128415 | 121 | 0.598174 |
4306437305398fdfa56682cb39fae32e02b7acb6 | 15,271 | py | Python | _Dist/NeuralNetworks/e_AdvancedNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/e_AdvancedNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/e_AdvancedNN/DistNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../")
if root_path not in sys.path:
sys.path.append(root_path)
import math
import numpy as np
import tensorflow as tf
from _Dist.NeuralNetworks.NNUtil import *
from _Dist.NeuralNetworks.c_BasicNN.DistNN import Basic
class Advanced(Basic):
signature = "... | 46.700306 | 112 | 0.603431 |
60cc8fde5298eb8b2ba7eb219e5f4d8541b683fd | 4,515 | py | Python | import-emails-api-docker/main.py | Zeno-Paukner/cellarius | 904b88c6dc33cf4ec2f6d70d3e1acf175b11967a | [
"Unlicense"
] | 1 | 2021-12-06T20:29:28.000Z | 2021-12-06T20:29:28.000Z | import-emails-api-docker/main.py | Zeno-Paukner/cellarius | 904b88c6dc33cf4ec2f6d70d3e1acf175b11967a | [
"Unlicense"
] | null | null | null | import-emails-api-docker/main.py | Zeno-Paukner/cellarius | 904b88c6dc33cf4ec2f6d70d3e1acf175b11967a | [
"Unlicense"
] | null | null | null | import os
from imap_tools import MailBox, AND
import pymongo
from pydantic import BaseModel
from fastapi import FastAPI
from bs4 import BeautifulSoup
import uvicorn
app = FastAPI()
#check if rest api is running
print("Rest-Server running")
# create class ImportEmails with imap_username imap_password imap_server_url ... | 36.41129 | 118 | 0.66711 |
71e1fc0892b74520084fc5cc7410f69346dd3218 | 479 | py | Python | ___Python/Thomas/pycurs_180625/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
# Zähle die Anzahle Ordner in einem Ordner (inkl. Unetrordner)
def count_dirs(path):
try:
subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()] # Unterordner dieses Verzeichnis
count = 1
for subdir in subdirs:
count += count_dirs... | 25.210526 | 108 | 0.643006 |
46080f0351429e6f033ebda794d228d6c1c01157 | 5,905 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_aaa.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_aaa.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_aaa.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 36.677019 | 106 | 0.682642 |
e804af1034061f2f104d2ffe58eec14a7bc29868 | 88 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 26/26.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 26/26.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 26/26.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Make a script that prints out numbers from 1 to 10
for i in range(1,11):
print(i)
| 17.6 | 51 | 0.681818 |
e826dce0a2efec3777ab49d67c529dd9c42675ca | 2,811 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/topic_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/topic_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/topic_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from watchmen_data_kernel.storage import TopicDataEntityHelper
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_model.admin import Topic
from watchmen_model.common import TenantId, TopicId
from .cache_manager import get_topic_by_id_cache, get_topic_by_tenant_and... | 40.157143 | 102 | 0.811811 |
c7742d037fbfa87807fd9419663afe8f98d4b927 | 1,087 | py | Python | Beginner/03. Python/remove_duplicates.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 3 | 2021-03-16T16:44:04.000Z | 2021-06-07T17:32:51.000Z | Beginner/03. Python/remove_duplicates.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/remove_duplicates.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2020-10-26T08:44:01.000Z | 2020-10-26T08:44:01.000Z | '''
Given an input of a 2D array of integers, removes all duplicates from the array.
Empty sub-arrays are removed.
'''
map = {}
def remove_duplicates(all_nums):
end_index = len(all_nums) #length of all_nums
i = 0 #current index of all_nums
while(i < end_index):
j = 0 #current index of sub-array
... | 31.970588 | 101 | 0.522539 |
1bfcbe98a563233e76cce2f48c46d13e30ac670b | 5,222 | py | Python | code/snake/Visualization.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 1 | 2020-03-30T09:25:53.000Z | 2020-03-30T09:25:53.000Z | code/snake/Visualization.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 2 | 2020-02-05T14:00:23.000Z | 2020-03-30T19:57:19.000Z | code/snake/Visualization.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | null | null | null | import pygame
from GameData import GameData
from TrainingData import TrainingData
from Field import Field
class Visualization:
def __init__(self, pixel_size: int, field: Field):
self.current_print_y: int = 0
# PyGame stuff
pygame.init()
pygame.fastevent.init()
self.clock ... | 46.212389 | 134 | 0.634623 |
d3c0698c06fb8aa6e7f973e111326d1789b2d201 | 308 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-ds-master/algorithms/math/sumofdigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/algorithms/math/sumofdigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/algorithms/math/sumofdigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | # This is to find the sum of digits of a number until it is a single digit
def sum_of_digits(n):
n = int(input()) # here n is the number
if n % 9 != 0:
print(n % 9)
else:
print("9")
# This method reduces time complexity by a factor of n and also without using any loop
| 25.666667 | 86 | 0.613636 |
d3c1e06d5da6a9eccf9d261778767e37808ed7c6 | 4,474 | py | Python | official/cv/vit/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/vit/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/vit/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 41.045872 | 89 | 0.5827 |
d3d107629e018d079de059c29b5b2649cece9a04 | 21,159 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/game/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/game/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/game/runner.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# -*- coding: utf8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2010-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is availa... | 36.35567 | 112 | 0.565622 |
c30b8b72f076c5457f9f0e8c230a44a9cc7a8e5f | 1,044 | py | Python | web/Electroplating/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/Electroplating/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | web/Electroplating/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | import requests
import hashlib
import uuid
import binascii
import os
import sys
def generate():
return uuid.uuid4().hex[:4], uuid.uuid4().hex[:4]
def verify(prefix, suffix, answer, difficulty=6):
hash = hashlib.sha256(prefix.encode() + answer.encode() + suffix.encode()).hexdigest()
return hash.endswith("... | 24.27907 | 90 | 0.644636 |
c351dec159890595ef75075c3943491ddc436720 | 892 | py | Python | exercises/python/data-types/collections/default-dict.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | exercises/python/data-types/collections/default-dict.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | exercises/python/data-types/collections/default-dict.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | # In this challenge, you will be given 2 integers, m and n.
# There are n words, which might repeat, in word group A.
# There are m words belonging to word group B.
# For each m words, check whether the word has appeared in group A or not.
# Print the indices of each occurrence of m in group A.
# If it does not ap... | 30.758621 | 75 | 0.571749 |
6f50f82050e54f4868ea22dbd8655476c4e1c5f4 | 1,619 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/shortest_path_unweighted_graph.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/shortest_path_unweighted_graph.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/shortest_path_unweighted_graph.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | """
Find the shortest path between two nodes in an unweighted undirected graph. Remember this
is about finding the shortest path, not the shortest distance. For shortest
distance you can simply calculate the level of nodes from the source vertex
and that will give the answer. For shortest path, use the concept of paren... | 23.808824 | 89 | 0.594812 |
48cd470862b5566406b88bf33d5cc16654b91e0a | 302 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/3. return the quotient and remainder.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/3. return the quotient and remainder.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/3. return the quotient and remainder.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
1. Write a function that accepts two integers num1 and num2. The function should divide num1 by num2
and return the quotient and remainder. The output can be rounded to 2 decimal places.
"""
def quot_rem(num1,num2):
q = round((num1 / num2), 2)
r = round((num1 % num2), 2)
return (q,r) | 30.2 | 100 | 0.68543 |
d28c7a51f180fe4d9711b5cf099c91ea2d70c774 | 580 | py | Python | python/asyncio/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/asyncio/tasks.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import asyncio
async def my_task(seconds):
"""
A task to do for a number of seconds
"""
print('This task is taking {} seconds to complete'.format(seconds))
await asyncio.sleep(seconds)
return 'task finished'
if __name__ == '__main__':
my_event_loop = asyncio.get_event_loop()
try:
... | 26.363636 | 71 | 0.668966 |
96050349c05924aa062803ddf5dd8d851a867f8b | 5,081 | py | Python | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/extract_encoder.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/extract_encoder.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/extract_encoder.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | """
Simple Translate CLI
"""
from contextlib import ExitStack
import mxnet as mx
import sys
import argparse
import logging
import time
import sockeye.utils
from sockeye.utils import acquire_gpu, get_num_gpus
import sockeye.data_io
import sockeye.arguments as arguments
import sockeye.inference
import re
import numpy as... | 51.846939 | 128 | 0.571147 |
7dc2a90ba4547195588f251869e654e8a1c3535b | 2,552 | py | Python | plugins/tff_backend/models/payment.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/models/payment.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/models/payment.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 31.506173 | 92 | 0.704154 |
4858b0ab221bd6fcbedef2394043bc190ecf5a5e | 983 | py | Python | Packs/DuoAdminApi/Integrations/DuoEventCollector/DuoEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/DuoAdminApi/Integrations/DuoEventCollector/DuoEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/DuoAdminApi/Integrations/DuoEventCollector/DuoEventCollector_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | from DuoEventCollector import Client, GetEvents, LogType, Params
demisto_params = {'after': '1 month', 'host': 'api-a1fdb00d.duosecurity.com', 'integration_key': 'DI47EXXXXXXXWRYV2',
'limit': '5', 'proxy': False, 'retries': '5', 'secret_key': {'password': 'YK6mtSzXXXXXXXXXXX',
... | 57.823529 | 120 | 0.699898 |
d21059497ff56cda89a8d1b389c15c04c01fa702 | 2,773 | py | Python | src/api/light.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2021-04-28T09:45:34.000Z | 2021-04-28T09:45:34.000Z | src/api/light.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2020-09-24T07:20:16.000Z | 2020-09-24T07:20:16.000Z | src/api/light.py | th-koeln-intia/ip-sprachassistent-team1 | 69fbc06a326da91fd3d84f222eba6cd2b1a79975 | [
"MIT"
] | 1 | 2020-12-04T13:38:33.000Z | 2020-12-04T13:38:33.000Z | from api.app import app
from api import MQTT_HOST, MQTT_PORT
from flask import request, Response, jsonify
import json
import paho.mqtt.publish as publish
from json import JSONDecoder, JSONEncoder
@app.route('/light/set', methods=['POST'])
def set_light():
body = request.get_json()
if body is None or 'frie... | 33.817073 | 81 | 0.673639 |
d27ffe7a1e06854e2ba699eea5d81dfb4945c148 | 1,901 | py | Python | Steg2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | Steg2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | Steg2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | from stegano import lsb
from tkinter import filedialog
# A personal project to test out some Steganography functions. Steganography involves hiding data inside
# image files (e.g. in the buffer, in unused bits, etc) without altering the physical appearance of the image at all.
# Hide a message into an image using L... | 37.27451 | 117 | 0.634929 |
96714247c993e41c5762d3e61ed42c474feb4d08 | 2,136 | py | Python | .arch/plugins/doc_lcdoc/serve.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | .arch/plugins/doc_lcdoc/serve.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | .arch/plugins/doc_lcdoc/serve.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
`doc serve` is a convenience tool which starts the live server together with doc pre_process
(with working but changeable defaults)
Note: You have to run this from the repo root of a checked out devapp project, which has a docs folder.
"""
from devapp.tools import FLG, exists
from devapp.a... | 26.7 | 123 | 0.606273 |
fb595e128f019ae4e13c45fab11da4f05a338717 | 1,016 | py | Python | retro/enums.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/enums.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/enums.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | from enum import Enum
class State(Enum):
"""
Special values for setting the restart state of the environment. You can
also specify a string that is the name of the ``.state`` file
"""
DEFAULT = -1 #: Start the game at the default savestate from ``metadata.json``
NONE = 0 #: Start the game a... | 36.285714 | 99 | 0.695866 |
f766b23e2080d4363dc21b4a4bf6048e315bfffb | 7,556 | py | Python | test/distributed/fsdp/test_fsdp_checkpoint.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | test/distributed/fsdp/test_fsdp_checkpoint.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | test/distributed/fsdp/test_fsdp_checkpoint.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | # Owner(s): ["oncall: distributed"]
import contextlib
from copy import deepcopy
from functools import partial
import torch
import torch.nn as nn
from torch.distributed._fsdp.fully_sharded_data_parallel import (
FullyShardedDataParallel as FSDP,
CPUOffload,
)
from torch.distributed.algorithms._checkpoint._chec... | 34.190045 | 88 | 0.571731 |
f7913068c3042169ee6c413f8ef205e68a9963ab | 2,716 | py | Python | research/cv/arcface/modelarts/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/arcface/modelarts/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/arcface/modelarts/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.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... | 36.213333 | 112 | 0.670471 |
540d424532ff9f498d7d0a5c8cc540f93970db70 | 713 | py | Python | Python/pandas/01_series.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pandas/01_series.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pandas/01_series.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
data = [22, 33, 41, 12]
index = ["A", "B", "C", "D"]
s = pd.Series(data, name='Age', index=index)
print(s)
print(s["B"])
print(s[2])
data_dict = {
"A": 28,
"B": 42,
"C": 1337,
"D": 43,
}
# index kann gesetzt werden und ändert auch die Reihenfolge und werte könne... | 20.970588 | 76 | 0.632539 |
54a5a39aa2099d456ab0d02ac4fb47014ac0ba69 | 1,400 | py | Python | Problems/Depth-First Search/easy/MinimumAbsoluteDifferenceBST/min_abs_dif_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/easy/MinimumAbsoluteDifferenceBST/min_abs_dif_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/easy/MinimumAbsoluteDifferenceBST/min_abs_dif_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import Optional
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# Recursive Magic
# def getMinimumDifference(self, root: Optional[TreeNode]) -> int:
# def get_min_dif(... | 25.925926 | 69 | 0.601429 |
49c2612eb15938f0206a41d0a6921f4dfbb8879e | 679 | py | Python | IVTp/2014/TITOV_S_G/task_6_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_6_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/TITOV_S_G/task_6_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 22.
# Создайте игру, в которой компьютер загадывает имена двух братьев, легендарных основателей Рима, а игрок должен его угадать.
# Titov S.G.
# 11.04.2016
import random
print ("Программа случайным образом загадывает имена двух братьев, легендарных основателей Рима, а игрок должен его угадать.")
... | 25.148148 | 126 | 0.705449 |
b72419d65127bf209e857f63197e4e47f112db09 | 1,198 | py | Python | basics/lists.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | basics/lists.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | basics/lists.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | from sys import stdin
import re
"""
The first line contains an integer,N , denoting the number of commands.
Each line of the subsequent lines contains one of the commands:
insert i e: Insert integer at position .
print: Print the list.
remove e: Delete the first occurrence of integer .
append e: Insert ... | 30.717949 | 71 | 0.605175 |
3fcb65dba04aa41adca62639fb1dc876d15cd06f | 19,338 | py | Python | misc/sympy_play/baxter_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/sympy_play/baxter_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/sympy_play/baxter_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """baxterロボの同時変換行列などをsympyで式展開し整理
・左腕のみ
"""
import sympy as sy
import math
from sympy.printing.pycode import pycode
t_independent = False
L, h, H = sy.symbols("L, h, H")
L0, L1, L2, L3, L4, L5, L6 = sy.symbols("L0, L1, L2, L3, L4, L5, L6")
if t_independent:
q1, q2, q3, q4, q5, q6, q7 = sy.symbols("q1, q2, q3... | 37.332046 | 96 | 0.445134 |
b797229800135fc011bc9b38749536448f35264c | 568 | py | Python | Chapter5_Functions/Functions/command_line_arguments2.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | 4 | 2020-12-28T23:43:35.000Z | 2022-01-01T18:34:18.000Z | Chapter5_Functions/Functions/command_line_arguments2.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | null | null | null | Chapter5_Functions/Functions/command_line_arguments2.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | 9 | 2020-09-26T19:29:28.000Z | 2022-02-07T06:41:00.000Z | import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--age', help='Enter your age (int)', type=int, required=True)
parser.add_argument('--name', help='Enter your name (str)', type=str, required=True)
parser.add_argument('--admin', help='Are your an admin? (bool)', type=b... | 28.4 | 95 | 0.65669 |
b79b1b889b94911ce0e4e6155e66ab11d9bf5953 | 665 | py | Python | Project Euler Qusetions 61 - 70/Project Euler Question 64.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 61 - 70/Project Euler Question 64.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 61 - 70/Project Euler Question 64.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 64
#Odd period square roots
import math
import decimal
decimal.getcontext().prec = 299
odd_count = 0
for num in range(1, 10000):
repeat_list = []
x = decimal.Decimal(num).sqrt()
x1 = decimal.Decimal(math.modf(x)[1])
y = x
y1 = x1
if math.modf(y)[0] == 0:
continu... | 23.75 | 60 | 0.574436 |
b7fab05c9e75761de2933e8475a2d68aab00c447 | 1,579 | py | Python | showcase8/com/aaron/Serial_QR.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | showcase8/com/aaron/Serial_QR.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | showcase8/com/aaron/Serial_QR.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- codiing:utf-8 -*-
"""
serial port test
扫描枪测试:D 起动 E 结束
"""
__author__="aaron.qiu"
import serial
import time
import string
import io
if __name__ == "__main__":
ser = serial.Serial()
ser.port="COM2"
ser.baudrate=115200
ser.stopbits=serial.STOPBITS_ONE
ser.timeout=0
ser.parity=serial.PARITY... | 22.557143 | 97 | 0.537682 |
12cf4624bca1b05e6af0d6fa0ea8fd352dbc7f99 | 3,119 | py | Python | src/onegov/pay/collections/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/collections/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/collections/payment.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from collections import defaultdict
from onegov.core.collection import GenericCollection, Pagination
from onegov.pay.models import Payment
from sqlalchemy import desc
from sqlalchemy.orm import joinedload
from sqlalchemy.orm import undefer
class PaymentCollection(GenericCollection, Pagination):
""" Manages the pa... | 29.990385 | 76 | 0.603399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.