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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
be7daea892558164b8162a1217440e23d9dc1e1e | 1,819 | py | Python | src/onegov/qrcode/model.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/qrcode/model.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/qrcode/model.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from base64 import b64encode
from io import BytesIO
from qrcode import QRCode, ERROR_CORRECT_H
class QrCodeMixin:
_border = 4
_box_size = 10
_fill_color = 'black'
_back_color = 'white'
_format = 'png'
_encoding = None
@property
def image(self):
"""
Create an image fr... | 27.560606 | 77 | 0.62122 |
fe3dd488f46e2cb7fe1f3c8286516cd8ce9d2917 | 2,612 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/co/nit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/co/nit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/co/nit.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # nit.py - functions for handling Colombian identity codes
# coding: utf-8
#
# Copyright (C) 2008-2011 Cédric Krier
# Copyright (C) 2008-2011 B2CK
# Copyright (C) 2015 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License ... | 31.46988 | 77 | 0.691041 |
71c2d62a29972f97355bba4bef9c80bbad5fc45b | 13,324 | py | Python | TFLCycles/unfinished/TFLSummaryCycles.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | null | null | null | TFLCycles/unfinished/TFLSummaryCycles.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-02-11T23:44:52.000Z | 2021-02-11T23:44:52.000Z | TFLCycles/unfinished/TFLSummaryCycles.py | stanton119/data-analysis | b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9 | [
"Apache-2.0"
] | 1 | 2021-12-16T01:02:23.000Z | 2021-12-16T01:02:23.000Z | # %% [markdown]
# # Transport for London Cycle Data Exploration
#
# %%
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style="whitegrid")
plt.style.use("seaborn-whitegrid")
# %%
# Fetch data
cycle_data = pd.read_csv("TFLCycles/data/london_merged.csv")
#... | 30.629885 | 129 | 0.708196 |
e0922b5bff3794266c981500a7f8c1159b766e6f | 557 | py | Python | leetcode/242-Valid-Anagram/ValAnagram_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/242-Valid-Anagram/ValAnagram_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/242-Valid-Anagram/ValAnagram_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def anaRepresentation(self, s):
p = {}
for c in s:
if c in p:
p[c] += 1
else:
p[c] = 1
return p
def isAnagram(self, s, t):
if len(s) !=... | 22.28 | 55 | 0.432675 |
e81ff55eab4da016c0cee3d4962e487781b810c0 | 829 | py | Python | Kapitel_3/_1_person_spezifizieren.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_3/_1_person_spezifizieren.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_3/_1_person_spezifizieren.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Deklaration der Elternklasse Person --- #
class Person:
def __init__(self, fname, lname):
self.fname = fname
self.lname = lname
# --- Deklaration der Kindklasse Student --- #
class Student(Person):
def __init__(self, mat_nr, fname, lname): # Ansatz 1
self.mat_nr = mat_nr
s... | 37.681818 | 70 | 0.671894 |
40b282d719e824b916e9372010baa0c0a8771042 | 5,610 | py | Python | Packs/Workday/Integrations/Workday/Workday_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Workday/Integrations/Workday/Workday_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Workday/Integrations/Workday/Workday_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import pytest
from Workday import Client, list_workers_command, create_worker_context, convert_to_json
from CommonServerPython import CommandResults
client = Client(tenant_url="https://test.workday.com/XSOAR", verify_certificate=False, proxy=False,
tenant_name="tenant_name", toke... | 49.646018 | 118 | 0.66738 |
40cfc0b95587c5e1669ebe86a286bb9b8a8a9555 | 1,696 | py | Python | tests/integration/scalar_fields/test_eigenvalues_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | tests/integration/scalar_fields/test_eigenvalues_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | tests/integration/scalar_fields/test_eigenvalues_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pytest
import numpy as np
@pytest.mark.parametrize("scalar_field_name", [
"anisotropy",
"planarity"
])
@pytest.mark.usefixtures("pyntcloud_and_eigenvalues")
def test_eigen_values_scalar_fields_where_coplanar_points_have_value_of_1(pyntcloud_and_eigenvalues, scalar_field_name):
cloud, ev = pyntcloud... | 32.615385 | 121 | 0.733491 |
40edd418afc1732d51325945f4c3ebe2f939f1ee | 2,217 | py | Python | python/Bowling/src/bowling.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 8 | 2016-10-18T09:30:12.000Z | 2021-12-08T13:28:28.000Z | python/Bowling/src/bowling.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 29 | 2019-12-28T06:09:07.000Z | 2022-03-02T03:44:19.000Z | python/Bowling/src/bowling.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 4 | 2018-07-23T22:20:58.000Z | 2020-09-19T09:46:41.000Z | from functools import reduce
from typing import Callable, Tuple
class Bowling(object):
def __init__(self):
self.__rolls = []
def roll(self, pins: int) -> None:
self.__rolls.append(pins)
@property
def score(self) -> int:
_, score = reduce(
lambda acc, _: self.__sco... | 36.95 | 98 | 0.632386 |
9099cbaa14ca867058597a5baecdb786c67e390d | 1,772 | py | Python | T1/05_rhino_basics/04_python/rhino_geometry_example.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 3 | 2019-09-15T17:40:35.000Z | 2020-11-07T01:47:29.000Z | T1/05_rhino_basics/04_python/rhino_geometry_example.py | tetov/MAS-1920 | e5cfe4afbc7c0e80c6adfd139624d028c0ca4bfb | [
"MIT"
] | 1 | 2019-09-17T22:59:19.000Z | 2019-09-17T22:59:19.000Z | T1/05_rhino_basics/04_python/rhino_geometry_example.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 8 | 2019-09-16T18:47:20.000Z | 2019-10-15T17:08:08.000Z | import Rhino.Geometry as rg
import rhinoscriptsyntax as rs
import math as m
class Brick:
def __init__(self, center_plane, x_size = 200, y_size = 80, z_size = 70):
self.cp = center_plane
self.xs = x_size
self.ys = y_size
self.zs = z_size
def distance_to_other_brick(self, oth... | 44.3 | 119 | 0.628668 |
90ca6195832668e625de68794b9cd3a73dd19fec | 433 | py | Python | examplecode.py | JonasFovea/PyDocToLaTeX | 81f90cb82f9d7b8a8bab632a845b8ced42e3e8fa | [
"MIT"
] | null | null | null | examplecode.py | JonasFovea/PyDocToLaTeX | 81f90cb82f9d7b8a8bab632a845b8ced42e3e8fa | [
"MIT"
] | 1 | 2020-09-23T21:03:00.000Z | 2020-09-23T21:03:00.000Z | examplecode.py | JonasFovea/PyDocToLaTeX | 81f90cb82f9d7b8a8bab632a845b8ced42e3e8fa | [
"MIT"
] | null | null | null | a = 1
"""a is a variable"""
varB = "abcdefg"
"""varB is another variable"""
V_ariable_C = 3.14
def funcA():
"""Function A does nothing"""
pass
def funcB(a, b: str):
"""Function B also does nothing"""
pass
class TestClass:
"""TestClass description"""
var1 = 42
var2 = "this is a strin... | 14.433333 | 38 | 0.575058 |
2958822502b2eebccd9c69d9f38bcdf38c5e5839 | 36,548 | py | Python | mara-ptm-importer.py | WhereGroup/mara-ptm-importer | bca8f134be066c0966b360f8bc15bc3139261ac5 | [
"MIT"
] | null | null | null | mara-ptm-importer.py | WhereGroup/mara-ptm-importer | bca8f134be066c0966b360f8bc15bc3139261ac5 | [
"MIT"
] | null | null | null | mara-ptm-importer.py | WhereGroup/mara-ptm-importer | bca8f134be066c0966b360f8bc15bc3139261ac5 | [
"MIT"
] | null | null | null | import sys
import platform
import subprocess
import urllib.error
import urllib.request
from functools import partial
from itertools import product
from psycopg2.extras import execute_batch, quote_ident
from PyQt5.QtCore import *
from PyQt5.QtGui import QIntValidator
from PyQt5.QtWidgets import *
import multiprocessi... | 44.625153 | 120 | 0.640965 |
9ee0b322c081a1099fb79c52b24573697dea608b | 88 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/10.01-Import-Module.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/10.01-Import-Module.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/10.01-Import-Module.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | from Calc import *
print(add(5, 2))
print(sub(5, 2))
print(mul(5, 2))
print(div(5, 2))
| 12.571429 | 18 | 0.613636 |
b46adadca0156d9ded92cfa7f42e90938cf9bbc5 | 351 | py | Python | python/python_backup/PRAC_PYTHON/bs.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/bs.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/bs.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=[]
n=input("enter range:")
for i in range(0,n,1):
k=input("value:")
a.insert(i,k)
for i in a:
print (i)
v=input("enter searching element")
l=0
h=n-1
m=(l+h)/2
f=0
while l<=h:
if (a[m]==v):
f=1
break
if(v>a[m]):
l=m+1
if(v<a[m]):
l=m-1
m=(l+h)/2
if (f==1):
print "element found... | 14.04 | 35 | 0.509972 |
6f34ca6c390ec13157d1ea5a276d20abc8daa919 | 966 | py | Python | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
import frappe.defaults
class TestPurchaseOrder(unittest.TestCase):
def test_make_purchase_order(self):
from erpnext.b... | 27.6 | 94 | 0.758799 |
d294f74d9731984abd33807866b90fda35764b18 | 239 | py | Python | tests/onegov/swissvotes/test_views_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_views_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/swissvotes/test_views_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from webtest import TestApp as Client
def test_view_home(swissvotes_app):
client = Client(swissvotes_app)
home = client.get('/').maybe_follow()
assert "<h2>home</h2>" in home
assert home.request.url.endswith('page/home')
| 26.555556 | 49 | 0.711297 |
1ef651d270d4415616f326617d21ba5bfb6762f3 | 1,823 | py | Python | pyventskalender/tag07.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag07.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag07.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | # Neben der `while`-Schleife, die Code so lange ausgeführt hatte, wie eine
# bestimmte Bedingung wahr war, gibt es die `for`-Schleife, die den selben Code
# für jedes Objekt einer Menge von Objekten ausführt.
# Im einfachsten Fall kann man sich per `range(10)` eine Menge von 10 Zahlen
# erzeugen lassen -- und zwar die ... | 39.630435 | 82 | 0.709819 |
966cd39302621f183afcfb0d9e3d4a85fe933a27 | 6,003 | py | Python | src/main/python/ble_temperature_sensor/misensorbleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/misensorbleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/misensorbleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
sys.path.append('/home/pi/python/mitemp')
import logging
import threading
import time
import asyncio
import atorlib
import ble_temperature_sensor
# GUI
import tkinter as tk
import tkinter.font as tkFont
def notification_handler(sender, data):
logging.info... | 36.381818 | 135 | 0.476595 |
fbcbd3441f6bda95accb696e1df147a89a968a02 | 485 | py | Python | Sorting/algos/selection.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | Sorting/algos/selection.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | Sorting/algos/selection.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | 1 | 2020-09-25T18:31:34.000Z | 2020-09-25T18:31:34.000Z | import numpy as np
import matplotlib.pyplot as plt
def selectionsort(arr):
for i in range(len(arr)):
mid = i
for j in range(i + 1, len(arr)):
if arr[mid] > arr[j]:
mid = j
arr[i], arr[mid] = arr[mid], arr[i] # swap
plt.stem(arr)
plt.pause(1e-4)
... | 21.086957 | 51 | 0.527835 |
584632fbe5616a07dd60371ffba25e49cd8eec74 | 253 | py | Python | python/generator_tricks_for_systemprogrammer/largest.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/largest.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/largest.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # largest.py
#
# Find the largest file
from linesdir import lines_from_dir
from apachelog import apache_log
lines = lines_from_dir("access-log*", "www")
log = apache_log(lines)
print("%d %s" % max((r["bytes"], r["request"]) for r in log))
| 21.083333 | 62 | 0.671937 |
3fa0ceb46a21782a12c11ca082271fba4ee76a06 | 1,024 | py | Python | data/opendf6.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | data/opendf6.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | data/opendf6.py | Lyceoth/DataEngineeringProject | bc3c230a23eb5f3e8d7dd5322e3b22995801dc29 | [
"Apache-2.0"
] | null | null | null | #!/bin/bash
"true" '''\' #allow running from vs code, cf. http://rosettacode.org/wiki/Multiline_shebang#Python
CUR_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
CUR_FILE=`basename "$0"`
CMD="docker run -it --rm -v \"$PWD/data:/data\" -v \"$CUR_DIR:/src\" --name=pyspark jupyter/pyspark-notebook spark-submit \... | 40.96 | 205 | 0.689453 |
12fd4be7cf41be57614c619c946e584bc6304e86 | 151 | py | Python | scripts/cont-scan.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T22:29:44.000Z | 2022-01-28T22:29:44.000Z | scripts/cont-scan.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | null | null | null | scripts/cont-scan.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T21:10:41.000Z | 2022-01-28T21:10:41.000Z | import os
import time
for count in range(1, 1000):
os.system('python3 scripts/check-exchange.py -i domain.txt -o domaint.txt')
time.sleep(60)
| 21.571429 | 79 | 0.708609 |
426f59fc9ba0332c35b54c5223c07d4d0f12aee2 | 14,499 | py | Python | src/onegov/form/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import warnings
from datetime import datetime, timedelta
from onegov.core.crypto import random_token
from onegov.core.utils import normalize_for_url
from onegov.core.collection import GenericCollection
from onegov.file.utils import as_fileintent
from onegov.form.errors import UnableToComplete
from onegov.form.fields i... | 33.407834 | 79 | 0.630871 |
42b1724c608bdb1c55673202996c50f762078e5a | 3,885 | py | Python | Packs/Telegram/Integrations/Telegram/Telegram.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Telegram/Integrations/Telegram/Telegram.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Telegram/Integrations/Telegram/Telegram.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
''' IMPORTS '''
import json
import requests
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBALS/PARAMS '''
TOKEN = demisto.params().get('token')
BASE_URL = 'https://api.telegram.org/bot{}/'.format(TOKEN)
''' HELPER FUNCTIONS '''
def http_request(... | 25.728477 | 113 | 0.621107 |
671f4f58e08b71e81505879c22f10cde308aaada | 2,368 | py | Python | py/jpy/src/test/python/jpy_typeres_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 210 | 2015-03-19T14:07:16.000Z | 2022-03-31T19:28:13.000Z | py/jpy/src/test/python/jpy_typeres_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | py/jpy/src/test/python/jpy_typeres_test.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 40 | 2015-10-17T13:53:41.000Z | 2021-07-18T20:09:11.000Z | import unittest
import jpyutil
jpyutil.init_jvm(jvm_maxmem='512M', jvm_classpath=['target/test-classes'])
import jpy
class TestTypeResolution(unittest.TestCase):
def setUp(self):
self.Fixture = jpy.get_type('org.jpy.fixtures.TypeResolutionTestFixture')
self.assertIsNotNone(self.Fixture)
d... | 37 | 93 | 0.698902 |
c023cd937272b2fed50c61ad3b3b83c6ffd4bf8b | 920 | py | Python | src/vfs_dev.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/vfs_dev.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/vfs_dev.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/python
"""
vfs_dev_* scripts item
This file is part of ZTC and distributed under GNU GPL v.3
Copyright (c) 2010 Murano Software [http://muranosoft.com/]
Params:
$1 - metric name. Supported:
major: major number
minor: minor mumber
devname: device name
reads: reads comple... | 25.555556 | 60 | 0.65 |
fbe70a09fde5012bea7e4992a7d2dfffca9354b1 | 4,747 | py | Python | feedcrawler/db.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 63 | 2016-03-21T21:35:07.000Z | 2021-03-20T22:50:34.000Z | feedcrawler/db.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 200 | 2016-03-15T21:45:26.000Z | 2021-04-03T10:47:45.000Z | feedcrawler/db.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 25 | 2016-03-15T20:44:33.000Z | 2020-10-25T09:43:48.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import sqlite3
import feedcrawler.common
from feedcrawler import internal
def get_first(iterable):
return iterable and list(iterable[:1]).pop() or None
class FeedDb(object):
def __init__(self, table):
self._conn = sqlit... | 33.666667 | 112 | 0.535285 |
2217dbbe495563ee207153d67e39593239a97d13 | 886 | py | Python | assignment1.py | bariseser/elbow_algorithm | 7dd61404422818ddc777321c439f8e6e50aee41d | [
"MIT"
] | null | null | null | assignment1.py | bariseser/elbow_algorithm | 7dd61404422818ddc777321c439f8e6e50aee41d | [
"MIT"
] | null | null | null | assignment1.py | bariseser/elbow_algorithm | 7dd61404422818ddc777321c439f8e6e50aee41d | [
"MIT"
] | null | null | null | from knn_modules import knn
from knn_modules import neighbor
from knn_modules import accuracy as ac
def main():
predictions = []
data = knn.load('iris.csv')
training_set = data[0]
test_set = data[1]
errorCount = 0
correctCount = 0
k = 7
for x in range(len(test_set)):
neighbors... | 26.058824 | 85 | 0.624153 |
452f5e3116a88587d254fe17dee791b135e7b530 | 1,569 | py | Python | libs/azuretextanalytics/AzureTextAnalyticsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/azuretextanalytics/AzureTextAnalyticsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/azuretextanalytics/AzureTextAnalyticsModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
import uuid
import requests
sys.path.append(os.path.dirname(__file__))
from libs.azuretextanalytics.Environment import Environment
from libs.azuretextanalytics.AzureDataHandler import AzureDataHandler
from libs.AbstractLanguageDetectionModel import AbstractLanguageDetectionModel
class AzureTextAn... | 30.173077 | 78 | 0.690886 |
e175f0de5946e3a5a7db7762531e4825013778c5 | 226 | py | Python | PYTHON/Strings/designer_door_mat.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Strings/designer_door_mat.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Strings/designer_door_mat.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
N, M = map(int,input().split())
for i in range(1,N,2):
print((i * ".|.").center(M, "-"))
print('WELCOME'.center(M, '-'))
for i in range(N-2,-1,-2):
print((i * ".|.").center(M, "-"))
| 20.545455 | 37 | 0.517699 |
3690ac4340c145cc04d769aa1376282fadd673f3 | 9,569 | py | Python | python/simstb_generator.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | null | null | null | python/simstb_generator.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | null | null | null | python/simstb_generator.py | MarkusBreuer1964/SimSTB | d9a530a5457b4296961e09b955e99900a6ea9047 | [
"MIT"
] | 1 | 2020-11-26T09:42:53.000Z | 2020-11-26T09:42:53.000Z | """ SimSTB - Dateizugriff auf Analoger Funktionsgenerator
SimSTB - Simulation digitaler und analoger Ein- und Ausgaben
Das Modul Funktionsgenerator stellt drei Klassen zur Realisierung des
analogen Funktionsgenerators zur Verfügung.
1. In der Klasse GeneratorGUI wird ein Toplevel-Fenster erzeugt, in d... | 44.924883 | 168 | 0.638938 |
183116dcc073d812ca7efe64b3dcba0ccffbd0e3 | 1,761 | py | Python | research/audio/wavenet/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/audio/wavenet/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/audio/wavenet/src/lr_generator.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.894737 | 98 | 0.686542 |
a104cfab706146b0171ea62925158746ac4cb343 | 346 | py | Python | plugins/sort_categories/sort_categories.py | nerdydrew/Drews-Sheet-Music | d34c82fde1099c3bbdaf55a3ed68c6c4b4b1001c | [
"MIT"
] | 2 | 2019-09-14T08:46:30.000Z | 2022-01-13T18:47:28.000Z | plugins/sort_categories/sort_categories.py | nerdydrew/Drews-Sheet-Music | d34c82fde1099c3bbdaf55a3ed68c6c4b4b1001c | [
"MIT"
] | null | null | null | plugins/sort_categories/sort_categories.py | nerdydrew/Drews-Sheet-Music | d34c82fde1099c3bbdaf55a3ed68c6c4b4b1001c | [
"MIT"
] | null | null | null | from pelican import signals
from operator import attrgetter
def sort_key(cat_tuple):
category = cat_tuple[0]
return str(getattr(category, 'releasedate', category))
def set_category_order(generator):
generator.context.get('categories', []).sort(key=sort_key)
def register():
signals.article_generator_finalized.c... | 24.714286 | 64 | 0.800578 |
a10a6c1b08d36e4687bd4b0ca8cd1f84dcd97a0a | 494 | py | Python | INBa/2015/Sarocvashin_M/task_5_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_5_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_5_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 23
# Напишите программу, которая бы при запуске случайным образом отображала имя одной из трех официальных жен Зевса.
# Сароквашин Максим
# 26.03.2016
import random
print ("Программа случчайным образом отображает имя одной из трех жен официальных жен бога Зевса")
x = int (random.randint(1,3))
... | 20.583333 | 114 | 0.682186 |
a15245c653d5b1208c7f7a135e9d5d3c9776b281 | 2,963 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/createscreed.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/createscreed.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/screed-0.7.1-py2.7.egg/screed/createscreed.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import DBConstants
import os
import sqlite3
import itertools
def create_db(filepath, fields, rcrditer):
"""
Creates a screed database in the given filepath. Fields is a tuple
specifying the names and relative order of attributes in a
record. rcrditer is an iterator returning records over a
sequence... | 36.580247 | 73 | 0.631792 |
b80783c4400af5f065bc76731c67a3d1ad855774 | 8,667 | py | Python | official/cv/xception/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/xception/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/xception/train.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... | 44.446154 | 117 | 0.656629 |
62e5bbb5f6f6d51498238bca91f8950c8ce8b2cd | 3,662 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/route/analyzePersonPlans.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/route/analyzePersonPlans.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/route/analyzePersonPlans.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-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 available at
# https://www.ec... | 38.145833 | 117 | 0.640087 |
3d7422e12046bbfa41b991a53e5282146bfc913b | 2,522 | py | Python | official/cv/MCNN/src/Mcnn_Callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/MCNN/src/Mcnn_Callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/MCNN/src/Mcnn_Callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 43.482759 | 87 | 0.60904 |
3de91773fc0875814d3397d5eefb6641eae235be | 30 | py | Python | service/wkb/poseMusic/Piano/bin/__init__.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/wkb/poseMusic/Piano/bin/__init__.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/wkb/poseMusic/Piano/bin/__init__.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | from .make_music import Piano
| 15 | 29 | 0.833333 |
3de942a11e6bef23887f66a9fb26db32d80e4365 | 5,776 | py | Python | SequenceModel/check_oof.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | SequenceModel/check_oof.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | SequenceModel/check_oof.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import os
from settings import *
if not os.path.exists(f'{csv_root}/standard_test.csv'):
tmp = pd.read_csv(f'{csv_root}/stage_2_sample_submission.csv')
tmp['filename'] = tmp['ID'].apply(lambda st: "ID_" + st.split('_')[1])
tmp['type'] = tmp['ID'].apply(lambd... | 35.654321 | 137 | 0.638504 |
91f497a27fa8fb6a4e89f839c40356b5421a0b51 | 2,265 | py | Python | official/cv/lenet_quant/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/lenet_quant/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/lenet_quant/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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.051724 | 88 | 0.627815 |
6201ad3656925e86ced478b2059896fa47f88be6 | 3,411 | py | Python | python/oneflow/nn/optimizer/warm_up_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/optimizer/warm_up_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/optimizer/warm_up_lr.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 39.206897 | 87 | 0.620639 |
b291bd2a07322c423141db7b8741a6c78176e923 | 6,623 | py | Python | sport.py | liyufan/Sport | 758e71d405a515a9c2ffbc93c814b3f8bbe0a775 | [
"Apache-2.0"
] | null | null | null | sport.py | liyufan/Sport | 758e71d405a515a9c2ffbc93c814b3f8bbe0a775 | [
"Apache-2.0"
] | null | null | null | sport.py | liyufan/Sport | 758e71d405a515a9c2ffbc93c814b3f8bbe0a775 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | 36.39011 | 113 | 0.655745 |
a234c9ef7b6ca67035e4a86aab248726940c2bea | 3,120 | py | Python | plugins/tff_backend/configuration.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/configuration.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/configuration.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... | 35.454545 | 113 | 0.733974 |
a2e3791cdb38ff7734c7a9bacb0ad2876ab00493 | 2,054 | py | Python | main_server.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-04-30T15:46:47.000Z | 2018-04-30T15:46:47.000Z | main_server.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T13:20:19.000Z | 2018-06-03T20:19:25.000Z | main_server.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T12:59:11.000Z | 2018-06-03T12:59:11.000Z | import signal
import sys
from Classes.Screen_codes.Application_server import Application_server
import requests
from Classes.CONFIG.config_services import services_config
import random
import logging
from PyQt5.QtCore import QTimer
global URL
global AUTH
global SERVER_CONFIG
global SERVICES_URL
SERVICES_URL = 'http:/... | 27.026316 | 90 | 0.699124 |
ce2e044128b20ab964d8890b77c2358df7b9d96e | 396 | py | Python | backend/api/migrations/0006_reservation_iscanceled.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0006_reservation_iscanceled.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0006_reservation_iscanceled.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-30 11:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0005_parking_streetnosuffix'),
]
operations = [
migrations.AddField(
model_name='reservation',
name='IsCancel... | 20.842105 | 53 | 0.608586 |
f0669fb6e4d36b6ef2e633dde2dbcd0507662648 | 23,585 | py | Python | DHParser/log.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | DHParser/log.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | DHParser/log.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # log.py - logging and debugging for DHParser
#
# Copyright 2018 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | 39.505863 | 96 | 0.596523 |
f06a40afd980b9c4b790237466bd0c2c17486287 | 2,201 | py | Python | CS303/lab7-9/work/ISE_C/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS303/lab7-9/work/ISE_C/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS303/lab7-9/work/ISE_C/ISE.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | # -*- coding: utf-8 -*-
# written by mark zeng 2018-11-14
# modified by Yao Zhao 2019-10-30
from multiprocessing import Pool
import time
import sys
import argparse
import os
import random
import numpy as np
import copy
import ctypes
worker_num = 8
start = time.time()
def IC_model(time_budget):
model_start = time... | 28.960526 | 100 | 0.619718 |
b2bdfea21c98a04af906b6ecb7f7d429446d2913 | 689 | py | Python | todomanager/models.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | todomanager/models.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | todomanager/models.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | from sqlalchemy import (
Column,
Index,
Integer,
Text,
DateTime)
import datetime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (
scoped_session,
sessionmaker,
)
from zope.sqlalchemy import ZopeTransactionExtension
DBSession = scoped_session(sessio... | 20.264706 | 78 | 0.692308 |
e8e4796f7bee5b3b84c534faa787389b5420bb59 | 119 | py | Python | books/PythonCleanCode/ch6_descriptors/log.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch6_descriptors/log.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch6_descriptors/log.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import logging
logging.basicConfig(level=logging.INFO, format="%(message)s")
logger = logging.getLogger(__name__)
| 23.8 | 62 | 0.764706 |
68ad5fc2c0c4d098ddcf430d77be8b21dbe23668 | 19,008 | py | Python | Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/control.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/control.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/control.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Creates binary images from input files controlled by a description
#
from __future__ import print_function
from collections import OrderedDict
import os
import sys
import tools
import cbfs_util
import... | 35.2 | 105 | 0.635364 |
d7d8eeac418cf64679df04829574c66ffeabda86 | 1,185 | py | Python | apps/flowguard/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/flowguard/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/flowguard/migrations/0001_initial.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2019-06-05 08:50
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Cre... | 32.916667 | 120 | 0.588186 |
0bc640a3ced9ecd594ab9d4d27b2e5e54a0153f1 | 318 | py | Python | autojail/utils/fs.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | autojail/utils/fs.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | autojail/utils/fs.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | import os
from typing import Union
def which(pgm: str) -> Union[str, None]:
path = os.getenv("PATH")
if path is None:
return None
for p in path.split(os.path.pathsep):
p = os.path.join(p, pgm)
if os.path.exists(p) and os.access(p, os.X_OK):
return p
return None
| 19.875 | 55 | 0.584906 |
f0e1ab2cdcb7067f0e9203a4dce0c7d6fd3d3afb | 117 | py | Python | gym_movie/__init__.py | hakeemta/gym-movie | cba05190cf08f1ce6698ca9e51fa50a52ddaed84 | [
"MIT"
] | null | null | null | gym_movie/__init__.py | hakeemta/gym-movie | cba05190cf08f1ce6698ca9e51fa50a52ddaed84 | [
"MIT"
] | null | null | null | gym_movie/__init__.py | hakeemta/gym-movie | cba05190cf08f1ce6698ca9e51fa50a52ddaed84 | [
"MIT"
] | null | null | null | from gym.envs.registration import register
register(
id='movie-v0',
entry_point='gym_movie.envs:MovieEnv',
) | 19.5 | 42 | 0.735043 |
c5de9c5903110f17618973cbbf3bf56c17a21795 | 599 | py | Python | exercises/es/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/solution_04_10.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | TRAINING_DATA = [
(
"El año pasado fuí a Venecie y los canales son hermosos",
{"entities": [(20, 27, "LOC")]},
),
(
"Tu deberías visitar Madrid una vez en tu vida, pero el museo prado es aburrido",
{"entities": [(20, 26, "LOC")]},
),
(
"Yo sé que también hay u... | 31.526316 | 128 | 0.537563 |
ba227be7a08420cd31a15155b68ede28fa988d58 | 92 | py | Python | 2015/04/unemployment-clinton-20150413/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/04/unemployment-clinton-20150413/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/04/unemployment-clinton-20150413/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1I9mNFyu8jHqR6iPu8JHvNSWDNTwmOrjzwlbPfNy8Mks'
| 23 | 68 | 0.847826 |
e8a82061543454b7b15fe5cc910ada79983b3e55 | 2,440 | py | Python | test/test_archive_cleanup.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 451 | 2015-06-15T13:33:13.000Z | 2018-05-15T15:10:50.000Z | test/test_archive_cleanup.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 95 | 2015-08-12T07:45:37.000Z | 2018-05-10T07:13:59.000Z | test/test_archive_cleanup.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 38 | 2015-06-17T13:35:26.000Z | 2018-03-28T21:26:57.000Z | # Copyright (c) 2022 Aiven, Helsinki, Finland. https://aiven.io/
import datetime
import sys
from unittest import mock
import pytest
from pghoard import archive_cleanup
def test_missing_config_arg():
args = ["archive_cleanup", "--dry-run"]
tool = archive_cleanup.ArchiveCleanup()
with mock.patch.object(s... | 35.362319 | 110 | 0.7 |
d1604348e459f1c2d61710ab967627c40cee0e36 | 53,111 | py | Python | DHParser/testing.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | DHParser/testing.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | DHParser/testing.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # testing.py - test support for DHParser based grammars and compilers
#
# Copyright 2016 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with th... | 41.98498 | 112 | 0.552917 |
7eaa1e9907ea0f5c4a3e2cbd498f860b2d56d761 | 3,269 | py | Python | src/bo4e/bo/preisblattmessung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/preisblattmessung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/preisblattmessung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains PreisblattMessung class and corresponding marshmallow schema for de-/serialization
"""
from typing import List, Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.preisblatt import Preisblatt, PreisblattSchema
from bo4e.com.gerae... | 42.454545 | 188 | 0.75803 |
7d2c50910980afa63e262cdd733b9ffa2c7e2277 | 98 | py | Python | django_project/test_mode/test_model/views.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | django_project/test_mode/test_model/views.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | django_project/test_mode/test_model/views.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null |
from django.http import HttpResponse
def hello(request):
return HttpResponse("Hello world ! ")
| 16.333333 | 38 | 0.765306 |
3831cb74c301c3d26433955e29164eec70301b89 | 508 | py | Python | top/clearlight/io/Chinese_text_process.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/io/Chinese_text_process.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/io/Chinese_text_process.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | import codecs as cs
import os
fr = open('test.txt', encoding='utf-8', errors='ignore')
all_utf8 = fr.read()
# all_utf8.decode('utf-8')
print(all_utf8)
'''for p, d, fs in os.walk('test'):
for f in fs:
blob = open(os.path.join(p, f)).read()
m = magic.Magic(mime_encoding=True)
encoding = m.fr... | 28.222222 | 56 | 0.568898 |
69d40cd7dbd509b5ba9c5702644f7b5182f3c0ee | 592 | py | Python | crypto/Do-While/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | crypto/Do-While/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | crypto/Do-While/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | from Crypto.Util.number import *
import string
c = int(open('flag.enc').read().strip())
p = 10057155855653816519008443883516207669171752595664834420732089141237812002637253398995576187189844504825306970324841764687135753617281559500522417554589779
q = 1275197576708181521317343654014040186348553703915399351050845121186... | 37 | 159 | 0.817568 |
38cb57cfa206475482a9bd3303e3f7e3b418c7e0 | 2,437 | py | Python | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day02_bathroom_security/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | """Tests."""
from common import ThreeByThreeKeypad, Urinator
class TestClass1:
"""Poop."""
def test_that_i_know_what_a_keypad_looks_like(self):
"""."""
kp = ThreeByThreeKeypad()
assert(kp.center.number == 5)
assert(kp.center.up.number == 2)
assert(kp.center.up.up.nu... | 34.323944 | 83 | 0.604432 |
2a27d70465f182233d0158df0cd646a6c5a4046b | 1,634 | py | Python | python/string_interpolation/string_interpolation.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 15 | 2015-03-13T03:45:52.000Z | 2022-02-26T00:11:18.000Z | python/string_interpolation/string_interpolation.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 5 | 2015-02-23T18:20:17.000Z | 2021-03-20T21:54:48.000Z | python/string_interpolation/string_interpolation.py | miroadamy/language-matrix | 510bc33d058555da8a67f87d25353b93d219d750 | [
"MIT"
] | 9 | 2016-05-11T13:03:22.000Z | 2021-04-11T13:07:12.000Z | # Copyright (c) 2018 Hinojosa, Daniel <dhinojosa@evolutionnext.com>
# Author: Hinojosa, Daniel <dhinojosa@evolutionnext.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restrict... | 46.685714 | 82 | 0.762546 |
35a82f1f0aa205942c11c7c5b22837c4edb99aa2 | 1,357 | py | Python | coco2yolov5-converter/src/converter/txt_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/src/converter/txt_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/src/converter/txt_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | # pylint: disable=C0114,C0115,C0116,R0201
from pathlib import Path
class TxtUtil:
""" Text Writer Util """
@staticmethod
def write_labels_txt_file(label_rows: list, txt_file: Path):
""" Write annotations to text file
'label_rows' must be a list of type [int,float,float,float,float]
... | 43.774194 | 187 | 0.605011 |
57787be293c9876e0d5a69beb2c9cbd3769bdc48 | 1,009 | py | Python | setup.py | xaviaracil/ltiecsdockerspawner | 83f8cc74654bdc787f95fc06d7cb50016a72b4c2 | [
"MIT"
] | 1 | 2019-07-12T08:12:07.000Z | 2019-07-12T08:12:07.000Z | setup.py | xaviaracil/ltiecsdockerspawner | 83f8cc74654bdc787f95fc06d7cb50016a72b4c2 | [
"MIT"
] | null | null | null | setup.py | xaviaracil/ltiecsdockerspawner | 83f8cc74654bdc787f95fc06d7cb50016a72b4c2 | [
"MIT"
] | null | null | null | import sys
from setuptools import setup, find_packages
v = sys.version_info
if v[:2] < (3, 0):
error = "ERROR: ims_lti_py requires Python version 3.0 or above."
print(error, file=sys.stderr)
sys.exit(1)
setup_args = dict(
name='ltiecsdockerspawner',
version='0.1',
packages=['ltiecsdockerspawn... | 25.225 | 69 | 0.650149 |
57aaf55cf8e4f845e464ecbd5fcf687459669f9a | 2,567 | py | Python | ialgotest/data_feeds/backtrader_mongo_feed.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | ialgotest/data_feeds/backtrader_mongo_feed.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | ialgotest/data_feeds/backtrader_mongo_feed.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:59:12.000Z | 2021-11-24T18:59:12.000Z | from __future__ import (absolute_import, division, print_function, unicode_literals)
import datetime as dt
import backtrader as bt
import backtrader.feed as feed
from backtrader.utils import date2num
from pymongo import MongoClient, ASCENDING
from pymongo.errors import ConnectionFailure
def get_col_name(code):
... | 27.902174 | 115 | 0.588235 |
17eaba519d79bf3d17fc62730da4c67137e35aeb | 234 | py | Python | zencad/examples/2.Operations/3.Sweep/extrude.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/2.Operations/3.Sweep/extrude.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/2.Operations/3.Sweep/extrude.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
ZenCad API example: extrude
"""
from zencad import *
base = ngon(10,6)
m0 = extrude(base, 10)
m1 = extrude(base, (5,0,10))
m2 = extrude(base, (5,5,10))
disp(m0)
disp(m1.forw(30))
disp(m2.forw(60))
show() | 13.764706 | 28 | 0.636752 |
aa335e15151c99e1f8b2e89921e36f114ffbb8bb | 6,323 | py | Python | torch/utils/data/communication/iter.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/utils/data/communication/iter.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/utils/data/communication/iter.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | import time
import types
from torch.utils.data import IterDataPipe, communication
DEFAULT_NON_BLOCKING_SLEEP = 0.001
def default_not_available_hook():
time.sleep(DEFAULT_NON_BLOCKING_SLEEP)
class NotAvailable(Exception):
pass
class InvalidStateResetRequired(Exception):
"""
Returned by DataPi... | 36.761628 | 106 | 0.64637 |
10235ea01ba2fc7ea3f9fe2cc5190a550cb8b1db | 2,865 | py | Python | skripte_datensammlung/csv_preparation.py | TimSchmittmann/ML2-Project | 7ad01366f2322018065efcae542ae75786b3c0ec | [
"MIT"
] | null | null | null | skripte_datensammlung/csv_preparation.py | TimSchmittmann/ML2-Project | 7ad01366f2322018065efcae542ae75786b3c0ec | [
"MIT"
] | null | null | null | skripte_datensammlung/csv_preparation.py | TimSchmittmann/ML2-Project | 7ad01366f2322018065efcae542ae75786b3c0ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 16.11.2018
@author: Tim Schmittmann
'''
import emoji_helper
import csv_fixer
import emoji_statistics
start_at = 3
# important settings. Excludes and Mappings are done by hand
excludes_filepath = "../data/manual_settings/emojis_to_exclude_1.cs... | 54.056604 | 161 | 0.791274 |
105ce1106b3da32208b1b607b0eb60f4ff1ad0f2 | 797 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/enum_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/enum_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/enum_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Dict
from watchmen_meta.admin import EnumItemService
from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator
from watchmen_model.common import EnumId
from watchmen_utilities import ArrayHelper
def get_enum_item_service() -> EnumItemService:
return EnumItemService(ask_meta_stora... | 27.482759 | 84 | 0.772898 |
5e0100039fbd6291f1c0a05a90694f44d0b06f29 | 4,881 | py | Python | src/Sephrasto/CharakterFreieFertigkeitenPickerWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterFreieFertigkeitenPickerWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterFreieFertigkeitenPickerWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtWidgets, QtGui
from Wolke import Wolke
import UI.CharakterFreieFertigkeitenPicker
from EventBus import EventBus
class CharakterFreieFertigkeitenPickerWrapper(object):
def __init__(self, fertigkeit=None):
super().__init__()
self.current = ""
if fertigkeit... | 45.616822 | 182 | 0.631018 |
f4e9ee5574a3f74ec774d9d3ec5f685f11fbd2e9 | 1,588 | py | Python | scripts/pcm_coeff.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_coeff.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | scripts/pcm_coeff.py | puv13/nspt-scripts | bba4c794858f34894adc2f82fd530ed5ff52f691 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module provides a function to calculate the known expansion coefficients
of the energy density of the Principal Chiral model.
References
----------
Paolo Rossi and Ettore Vicari,
"Two-dimensional SU(N)xSU(N) chiral models on the lattice",
Phys... | 24.060606 | 80 | 0.485516 |
bff6375b169bcefa0d361759759d02ce8396699e | 571 | py | Python | __init__.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | __init__.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | __init__.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | import sys
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
__name__ = "IVPD"
ppath = os.path.dirname(os.path.abspath(__file__))
pth = '{}'.format(ppath)
plist = list(sys.path)
if pth in plist:
pass
else:
sys.path.append(r'{}'.format(ppath))
__all__ = ["common", "... | 21.148148 | 118 | 0.681261 |
5ebda72dcf30916b4d39b0b5a9b8fd43ef1c2f9b | 491 | py | Python | Algorithms/Array-Algorithm/high-low-rearrangement.py | Pandi-Sangareswari/algo_ds_101 | 056a0dd6f1bbba424cad54859dabe5d369459445 | [
"MIT"
] | 182 | 2020-10-01T17:16:42.000Z | 2021-10-04T17:52:49.000Z | Algorithms/Array-Algorithm/high-low-rearrangement.py | Pandi-Sangareswari/algo_ds_101 | 056a0dd6f1bbba424cad54859dabe5d369459445 | [
"MIT"
] | 759 | 2020-10-01T00:12:21.000Z | 2021-10-04T19:35:11.000Z | Algorithms/Array-Algorithm/high-low-rearrangement.py | Pandi-Sangareswari/algo_ds_101 | 056a0dd6f1bbba424cad54859dabe5d369459445 | [
"MIT"
] | 1,176 | 2020-10-01T16:02:13.000Z | 2021-10-04T19:20:19.000Z | # Swap functions
def swap(A, i, j):
temp = A[i]
A[i] = A[j]
A[j] = temp
# reaggrange array
def rearrangeArray(A):
for i in range(1, len(A), 2):
if A[i - 1] > A[i]:
swap(A, i - 1, i)
if i + 1 < len(A) and A[i + 1] > A[i]:
swap(A, i + 1, i)
if __name__ == '__main__... | 25.842105 | 73 | 0.490835 |
0d675dfce72fbfbff168cc10c9f71376721487ca | 971 | py | Python | python/tcp.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/tcp.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/tcp.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | #!/usr/bin/env python
import socket
import threading
import sbs
TCP_IP = '10.0.0.198'
TCP_PORT = 30003
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
def listen(arg1, stop_event):
while (not stop_event.is_set()):
data = s.recv(BUFFER_SIZE)
... | 20.659574 | 62 | 0.562307 |
df55143cb214ba01021682f6fbbe3326b219aafa | 18,071 | py | Python | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | test/inverted/TestInvertedTurtleRock.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | from test.inverted.TestInverted import TestInverted
class TestInvertedTurtleRock(TestInverted):
def testTurtleRock(self):
self.run_location_tests([
["Turtle Rock - Compass Chest", False, []],
["Turtle Rock - Compass Chest", False, [], ['Cane of Somaria']],
["Turtle Roc... | 129.078571 | 320 | 0.604338 |
10f13bb9f4f45a9e4a93ae721f3309a72d00b154 | 2,643 | py | Python | official/cv/Deepsort/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/Deepsort/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/Deepsort/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | # 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.447761 | 101 | 0.644722 |
339c781373c0dcb77338c2d886ae3a3259953398 | 1,766 | py | Python | examples/coffee_bot/actions/actions.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | null | null | null | examples/coffee_bot/actions/actions.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | 1 | 2021-12-20T07:05:33.000Z | 2021-12-29T01:35:37.000Z | examples/coffee_bot/actions/actions.py | ajay-cz/chatbot-engine | df58f3e7e899151feedb847e56d9fc699e66f60c | [
"MIT"
] | null | null | null | import requests
from rasa_sdk import Action
class ActionJoke(Action):
def name(self):
return "action_joke"
def run(self, dispatcher, tracker, domain):
request = requests.get('http://api.icndb.com/jokes/random').json() # make an api call
joke = request['value']['joke'] # extract a joke from returned... | 27.169231 | 90 | 0.731031 |
633f1009f78f07b3c6aa75305b25a5db1bd65013 | 1,610 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/net/generator/cross.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | sumolib/net/generator/cross.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | sumolib/net/generator/cross.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2013-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 available at
# https://www.ec... | 41.282051 | 77 | 0.716149 |
987dad857cddb8d37c1f72aa32fd0d953c172ad9 | 1,118 | py | Python | database_connection.py | l0ggik/Rezepdatenbank | a6bdd63909263c6fe39daac5ad69dec0654a43d0 | [
"Apache-2.0"
] | null | null | null | database_connection.py | l0ggik/Rezepdatenbank | a6bdd63909263c6fe39daac5ad69dec0654a43d0 | [
"Apache-2.0"
] | null | null | null | database_connection.py | l0ggik/Rezepdatenbank | a6bdd63909263c6fe39daac5ad69dec0654a43d0 | [
"Apache-2.0"
] | null | null | null | import sqlite3
def init_database():
conn = sqlite3.connect('rezepte.db')
cursor = conn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS rezepte "
"(Rezept_ID INTEGER NOT NULL PRIMARY KEY, "
"Rezept_Name text, Rezept_Beschreibung text, Rezept_Bild text)")
cursor... | 29.421053 | 91 | 0.644007 |
f60a572537dba80613b967a061f1489eb08b1f8d | 2,168 | py | Python | examples/poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | examples/poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | 4 | 2019-04-24T12:56:34.000Z | 2020-06-25T20:16:56.000Z | examples/poll_example.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | import os
import time
import toml
import telegram_bot_api as api
def config_laden():
configfile = os.path.join(SKRIPTPFAD, "vorlage_example_cfg.toml")
with open(configfile) as file:
return toml.loads(file.read())
SKRIPTPFAD = os.path.abspath(os.path.dirname(__file__))
CONFIG = config_laden()
USER... | 27.794872 | 86 | 0.635609 |
1494aa81eb9a87dccd01e104bcf4eca33de27272 | 785 | py | Python | Algorithms/2_Implementation/27.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/2_Implementation/27.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/2_Implementation/27.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/beautiful-days-at-the-movies/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'beautifulDays' function below.
#
# The function is expected to return an INTEGER.
# The function accepts following parameters:
# 1. INTEGER i
# 2. I... | 20.128205 | 76 | 0.66879 |
37311b8d05fa7590251211b31bc6def31d025dfb | 16,832 | py | Python | kts/core/feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | import pprint
from collections import defaultdict
from copy import copy
from typing import Union, List, Tuple, Optional, Collection, Set
import numpy as np
import pandas as pd
import kts.ui.components as ui
from kts.core.backend.run_manager import run_manager
from kts.core.feature_constructor.base import BaseFeatureC... | 39.511737 | 116 | 0.648586 |
2e9c48e0119b9fe8bf9ed255b3a3013329c11dde | 504 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/Repeated_String.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/Repeated_String.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/Repeated_String.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | #!/bin/python3
# Complete the repeatedString function below.
def repeatedString(string, characters):
count=0
length=len(string)
remainder=characters%length
quotient=characters//length
temp_string=string*quotient
temp_add=string[0:remainder]
final_string=temp_string+temp_add
list_string... | 19.384615 | 45 | 0.714286 |
25c6d2fd0cd6dff3e35bc56c2db39a1d6029f628 | 2,563 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/annotations/views.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | import logging
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from annotations.models import Annotation
from recordings.models import Recording
#
# Views
#
def index(request):
annotations = Annotation.objects.all()
return ren... | 32.858974 | 86 | 0.617636 |
25f0cf1d2957e8428e266335c00959a4cbd36c7d | 2,323 | py | Python | reports/sep/code/crop.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | reports/sep/code/crop.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | reports/sep/code/crop.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from datetime import datetime
from os import path
import tensorflow as tf
processed = path.join('data', 'sep_processed_04')
feature_description = {
'image': tf.io.FixedLenFeature([], tf.string),
'label': tf.io.FixedLenFeature([], tf.int64)
}
def decode(exa... | 30.973333 | 89 | 0.694791 |
d3634667de2ad5057d4104afc9ee5886156c9302 | 1,882 | py | Python | files/math/Experiment_13/simulation.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/math/Experiment_13/simulation.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/math/Experiment_13/simulation.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 13 10:48:01 2019
@author: erichwentland
"""
import numpy as np
import matplotlib.pyplot as plt
# Simulieren Ausgangsverhalten DAC mit I/U Converter
Vin = 2
R1 = np.array([10e3, 10e3, 10e3, 10e3])
R2 = np.array([20e3, 40e3, 70e3, 100e3])
b = np.... | 28.515152 | 105 | 0.641339 |
6c9de5c8e665bed6b0d1d1dc9abf64050b50fcfb | 2,386 | py | Python | shinrl/solvers/continuous_ddpg/solver.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/solvers/continuous_ddpg/solver.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/solvers/continuous_ddpg/solver.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | """
Author: Toshinori Kitamura
Affiliation: NAIST & OSX
"""
from __future__ import annotations
from typing import List, Type
import gym
import shinrl as srl
from ._build_calc_params_mixin import BuildCalcParamsDpMixIn, BuildCalcParamsRlMixIn
from ._build_net_act_mixin import BuildNetActMixIn
from ._build_net_mixin ... | 34.085714 | 99 | 0.698659 |
2c4cb408eeca5f2ea468976eb2f4146aba853ea9 | 292 | py | Python | tools/legacy/pac-man/gui/shared.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/pac-man/gui/shared.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/pac-man/gui/shared.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | import tkinter.ttk as ttk
import tkinter as tk
def createParentAndLabel(parent, label):
newFrame = ttk.Frame(parent)
newFrame.pack(fill=tk.X, expand=True, padx=20, pady=20)
newLabel = ttk.Label(newFrame, text=label)
newLabel.pack(fill=tk.X, expand=True)
return newFrame | 26.545455 | 59 | 0.722603 |
204a417349f18ac2a8ec56a96a438d8782827d71 | 1,735 | py | Python | sparsify/spectral.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-08-31T07:16:40.000Z | 2018-08-31T07:16:40.000Z | sparsify/spectral.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | null | null | null | sparsify/spectral.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-07-01T18:03:01.000Z | 2018-07-01T18:03:01.000Z | """
__author__ = Yash Patel
__name__ = SpectralSparsifier.py
__description__ = Spectral sparsifier for graphs
"""
import numpy as np
import networkx as nx
import random
class SpectralSparsifier:
"""Spectral sparsifer class (https://www.cs.ubc.ca/~nickhar/Cargese3.pdf), that
is intended to select... | 35.408163 | 87 | 0.590202 |
64b05593993e77628c3e60eaeeec845848a1adcc | 2,394 | py | Python | display/_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | display/_menu_view.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._button_lights import ButtonLights
from ._view import View
from ._display import Display
class SubMenu:
def __init__(self, name: str, view_name: str):
self._name = name
self._view_name = view_name
def name(self) -> str:
return self._name
def view_name(self) -> str:
... | 28.843373 | 91 | 0.59858 |
8091aea752f69dbd3f70a716800c757640351019 | 1,236 | py | Python | VersuchCoG.py | Wonkandy/VWA | e7cf513c93d007251d85428ad1e712dcb25d7a09 | [
"MIT"
] | null | null | null | VersuchCoG.py | Wonkandy/VWA | e7cf513c93d007251d85428ad1e712dcb25d7a09 | [
"MIT"
] | null | null | null | VersuchCoG.py | Wonkandy/VWA | e7cf513c93d007251d85428ad1e712dcb25d7a09 | [
"MIT"
] | null | null | null | import sys
import numpy
import scipy.special
import matplotlib.pyplot as mpl
import os.path
import random
from PIL import Image
import cv2
import PIL.ImageOps
img = Image.open("drei.bmp")
cogimg = cv2.imread("drei.bmp", cv2.IMREAD_GRAYSCALE)
# Schwerpunktberechnung
(X, Y) = img.size
m = numpy.zeros((X, Y))
for x in ... | 17.913043 | 85 | 0.615696 |
0386d906fe90bff2f93b74b3a933cc59f5c170eb | 11,965 | py | Python | suche.py | stierlpz/python-suche | ee901589a7df1030d8f289e86866db9391051f86 | [
"Apache-2.0"
] | null | null | null | suche.py | stierlpz/python-suche | ee901589a7df1030d8f289e86866db9391051f86 | [
"Apache-2.0"
] | null | null | null | suche.py | stierlpz/python-suche | ee901589a7df1030d8f289e86866db9391051f86 | [
"Apache-2.0"
] | null | null | null | import time
import webbrowser
print(f'---------------------------------------------------------------------------------------')
print(f'Suche auf: ')
print(f'b für Google Bilder')
print(f'c für Wikmeidia Comans')
print(f'g für Google')
print(f'm für Goolge Maps')
print(f's für Google Shopping')
print(f't für... | 51.351931 | 472 | 0.347179 |
205ae92ac7fb4924126c98cf6886d98a34ec8bbe | 801 | py | Python | Oluwafemi_Tom/project 9/resize.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Oluwafemi_Tom/project 9/resize.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Oluwafemi_Tom/project 9/resize.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | #Simple function to copy and resize a jpg file ###
#Import required Image library
from PIL import Image
import shutil
#function to copy image
def CopyImage(path):
shutil.copy(path,"originalIMG.jpg")
#function to resize imaage
def ResizeIMAGE(path):
img = Image.open(path)
resized_im = img.resize((rou... | 22.25 | 77 | 0.692884 |
afd990e3e6b9cd22a920e2c39eb8e779d67b233b | 1,939 | py | Python | marsyas-vamp/marsyas/scripts/large-evaluators/mass-echonest-upload.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/mass-echonest-upload.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/mass-echonest-upload.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
import os
import time
import mar_collection
import pyechonest
import pyechonest.track
WAIT_SECONDS = 5.0
PROCESS_PROBLEMS = False
#PROCESS_PROBLEMS = True
def echonest_upload(full_filename):
print "trying: ", full_filename
try:
track = pyechonest.track... | 24.858974 | 67 | 0.655493 |
924e2669c8585fe8a1d6010aa102e154dfca817f | 1,608 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/01_raise_ausnahmen_triggern.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/01_raise_ausnahmen_triggern.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_10_Debugging/01_raise_ausnahmen_triggern.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 33_raise_ausnahmen_triggern.py
# In diesem Beispiel geht es darum eigene Fehlermeldungen zu produzieren mit der Funktion raise Exception(Fehlermeldung)
import re
maxl, dv= 50, 15
def output(string):
print(''.center(maxl, '█'))
string+=' '*(maxl)
suchmuster=re.compile(r'.{'+str(maxl-dv) + r',' + str(maxl)... | 36.545455 | 149 | 0.651741 |
a6cd5f6210fd336fdf102a0ca7746e5e467bc5af | 7,771 | py | Python | lightspeedconnection.py | fundthmcalculus/reserautomation | 31fb18815885815dffbb775dd019e28f57ac9228 | [
"MIT"
] | null | null | null | lightspeedconnection.py | fundthmcalculus/reserautomation | 31fb18815885815dffbb775dd019e28f57ac9228 | [
"MIT"
] | null | null | null | lightspeedconnection.py | fundthmcalculus/reserautomation | 31fb18815885815dffbb775dd019e28f57ac9228 | [
"MIT"
] | null | null | null | import logging
import webbrowser
from datetime import datetime, timedelta, timezone
from typing import Dict, List, Tuple, Callable, Any
import dateutil.parser
import lightspeed_api
import matplotlib.pyplot as plt
import numpy as np
from datafeed import get_sale_items
from httpconnection import HttpConnectionBase
de... | 40.9 | 132 | 0.662849 |
5b36542c206d425da2ba1d7f0406bd60e1c93f77 | 3,607 | py | Python | myspiders/spider_hr/cscb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/cscb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/cscb_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import JsonField, Item, Spider, Bs4HtmlField, Bs4AttrField, Bs4TextField
import json
from config import Target, Job
from urllib.parse import quote, urljoin
'''
companyName: null
deptOrgName: "浏阳支行"
endDate: "2040-08-10"
hiddenSiteApply: 1
importPost: 1
lastEditDate: null
orgId: 101259
orgName: "浏阳支... | 37.572917 | 274 | 0.714999 |
3419afe92c0a179d57fd563c3883dfc6d885f874 | 3,781 | py | Python | plugins/tff_backend/to/investor.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/to/investor.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/to/investor.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... | 39.385417 | 91 | 0.747686 |
cab0b5f7e7334273c3f8e6bbdbf937f70fb8a81b | 2,261 | py | Python | languages/python/exercises/concept/enums/enums_test.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | null | null | null | languages/python/exercises/concept/enums/enums_test.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | 45 | 2020-01-24T17:04:52.000Z | 2020-11-24T17:50:18.000Z | languages/python/exercises/concept/enums/enums_test.py | AlexLeSang/v3 | 3d35961a961b5a2129b1d42f1d118972d9665357 | [
"MIT"
] | null | null | null | import unittest
from enums import *
from enum import Enum
class TestEnums(unittest.TestCase):
def test_parse_log_level_set1(self):
self.assertIs(
parse_log_level("[INF]: File deleted"),
LogLevel.Info,
msg="The Log level returned is incorrect"
)
def test_pa... | 28.620253 | 72 | 0.563467 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.