hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
640629644c0139c1f133016845ff688c365a9f7e | 1,758 | py | Python | snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | 1 | 2020-11-02T07:05:09.000Z | 2020-11-02T07:05:09.000Z | snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | null | null | null | snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py | saketkc/EE-546-project | fb7eacd90f6c0a2cb3061837ec5427a14f521aa5 | [
"BSD-2-Clause"
] | null | null | null | ######## Snakemake header ########
import sys
sys.path.append(
"/home/cmb-panasas2/skchoudh/software_frozen/anaconda27/envs/riboraptor/lib/python3.5/site-packages"
)
import pickle
snakemake = pickle.loads(
b'\x80\x03csnakemake.script\nSnakemake\nq\x00)\x81q\x01}q\x02(X\t\x00\x00\x00resourcesq\x03csnakemake.io\n... | 92.526316 | 1,301 | 0.774175 | ######## Snakemake header ########
import sys
sys.path.append(
"/home/cmb-panasas2/skchoudh/software_frozen/anaconda27/envs/riboraptor/lib/python3.5/site-packages"
)
import pickle
snakemake = pickle.loads(
b'\x80\x03csnakemake.script\nSnakemake\nq\x00)\x81q\x01}q\x02(X\t\x00\x00\x00resourcesq\x03csnakemake.io\n... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -12 | 22 |
a1dc21e5d6855683102ce952e471161084c2eaec | 1,042 | py | Python | deepestNodeInTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-08-09T07:07:53.000Z | 2020-08-09T07:07:53.000Z | deepestNodeInTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | null | null | null | deepestNodeInTree.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-06-06T20:56:33.000Z | 2020-06-06T20:56:33.000Z |
# maxLevel : keeps track of maximum
# level seen so far.
# res : Value of deepest node so far.
# level : Level of root
# Returns value of deepest node
root = Node('a')
root.left = Node('b')
root.left.left = Node('d')
root.right = Node('c')
print(deepestNode(root))
# (d, 3) | 21.708333 | 48 | 0.553743 | class Node(object):
def __init__(self, data):
self.data = data
self.left = None
self.right = None
# maxLevel : keeps track of maximum
# level seen so far.
# res : Value of deepest node so far.
# level : Level of root
def find(root, level, maxLevel, res):
if (root != None):
leve... | 0 | 0 | 0 | 90 | 0 | 583 | 0 | 0 | 68 |
24cc1d98e53524c991b28f87db4df6271753536c | 919 | py | Python | project/nutrihacker/migrations/0017_auto_20201026_1006.py | COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper | a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8 | [
"MIT"
] | 1 | 2021-03-18T00:12:09.000Z | 2021-03-18T00:12:09.000Z | project/nutrihacker/migrations/0017_auto_20201026_1006.py | COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper | a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8 | [
"MIT"
] | 104 | 2020-09-09T18:52:33.000Z | 2020-12-16T15:17:56.000Z | project/nutrihacker/migrations/0017_auto_20201026_1006.py | COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper | a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8 | [
"MIT"
] | 1 | 2021-03-17T21:35:51.000Z | 2021-03-17T21:35:51.000Z | # Generated by Django 3.1.1 on 2020-10-26 14:06
| 27.848485 | 125 | 0.594124 | # Generated by Django 3.1.1 on 2020-10-26 14:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('nutrihacker', '0016_auto_20201026_0959'),
]
operations = [
migrations.RemoveField(
model_name='... | 0 | 0 | 0 | 772 | 0 | 0 | 0 | 30 | 68 |
5428e5c5bf92bb99e57a498974c6e2afe9f31719 | 558 | py | Python | src/data/91.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/91.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/91.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | import queue
#BFS
N, Q = map(int, input().split())
a = [[] for i in range(N + 1)]
for i in range(N - 1):
st, ed = map(int, input().split())
a[st].append(ed)
a[ed].append(st)
que = queue.Queue()
color = [-1] * (N + 1)
color[1] = 0
que.put(1)
while not que.empty():
now = que.get()
for i in a[now]:... | 19.241379 | 38 | 0.498208 | import queue
#BFSで街を色分け
N, Q = map(int, input().split())
a = [[] for i in range(N + 1)]
for i in range(N - 1):
st, ed = map(int, input().split())
a[st].append(ed)
a[ed].append(st)
que = queue.Queue()
color = [-1] * (N + 1)
color[1] = 0
que.put(1)
while not que.empty():
now = que.get()
for i in a... | 18 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
972877753d3d2f0b9394a7830279c3f73d53d4c6 | 758 | py | Python | mainTelefoon.py | daan-bit/ipmedt5 | 999dc29b93e0ead5da88b3d89708cfdd5729cd5e | [
"MIT"
] | null | null | null | mainTelefoon.py | daan-bit/ipmedt5 | 999dc29b93e0ead5da88b3d89708cfdd5729cd5e | [
"MIT"
] | null | null | null | mainTelefoon.py | daan-bit/ipmedt5 | 999dc29b93e0ead5da88b3d89708cfdd5729cd5e | [
"MIT"
] | null | null | null | import serial
import os
import mysql.connector
import time
mydb = mysql.connector.connect(
host="185.104.29.34",
user="schoolproject_laravel",
passwd="kvLXsjsPS",
database="schoolproject_laravel"
)
port = serial.Serial("/dev/ttyUSB0", 9600, timeout=3.0)
mycursor = mydb.cursor()
while True:
mycur... | 19.947368 | 55 | 0.593668 | import serial
import os
import mysql.connector
import time
mydb = mysql.connector.connect(
host="185.104.29.34",
user="schoolproject_laravel",
passwd="kvLXsjsPS",
database="schoolproject_laravel"
)
port = serial.Serial("/dev/ttyUSB0", 9600, timeout=3.0)
mycursor = mydb.cursor()
while True:
mycur... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a11f52a3547c2c68c81ae8f164ea44f036768cbd | 5,985 | py | Python | tests/test_basic.py | MacHu-GWU/constant2-project | fb18bc5fe36c73b98d8ad977d83f9948050ff8e7 | [
"MIT"
] | 1 | 2018-12-19T16:35:38.000Z | 2018-12-19T16:35:38.000Z | tests/test_basic.py | MacHu-GWU/const-project | fb18bc5fe36c73b98d8ad977d83f9948050ff8e7 | [
"MIT"
] | null | null | null | tests/test_basic.py | MacHu-GWU/const-project | fb18bc5fe36c73b98d8ad977d83f9948050ff8e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test:
- MyClass.Items()
- MyClass.Keys()
- MyClass.Values()
- MyClass.Subclasses()
- my_class.items()
- my_class.keys()
- my_class.values()
- my_class.subclass()
"""
import pytest
food = Food()
if __name__ == "__main__":
import os
basename = os.path.bas... | 28.774038 | 73 | 0.536174 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test:
- MyClass.Items()
- MyClass.Keys()
- MyClass.Values()
- MyClass.Subclasses()
- my_class.items()
- my_class.keys()
- my_class.values()
- my_class.subclass()
"""
import time
import pytest
from constant2 import Constant
from constant2._constant2 import is_same_dic... | 0 | 0 | 0 | 5,464 | 0 | 0 | 0 | 23 | 113 |
96ae6f100fb39055509927f78b8e6760d61dfabd | 1,142 | py | Python | cloudshare/__init__.py | cloudshare/cloudshare-py-sdk | d2bb22272c84a5b58a263130cb90c2f80cae66f1 | [
"Apache-2.0"
] | 2 | 2020-07-09T14:40:40.000Z | 2021-07-09T04:30:33.000Z | cloudshare/__init__.py | cloudshare/cloudshare-py-sdk | d2bb22272c84a5b58a263130cb90c2f80cae66f1 | [
"Apache-2.0"
] | null | null | null | cloudshare/__init__.py | cloudshare/cloudshare-py-sdk | d2bb22272c84a5b58a263130cb90c2f80cae66f1 | [
"Apache-2.0"
] | 1 | 2021-12-10T07:27:05.000Z | 2021-12-10T07:27:05.000Z | # Copyright 2015 CloudShare Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in ... | 39.37931 | 83 | 0.600701 | # Copyright 2015 CloudShare Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in ... | 0 | 0 | 0 | 0 | 0 | 499 | 0 | 0 | 50 |
0790d8c6b2c4971fdbbd2e8dfb178e214358bb71 | 866 | py | Python | extractor/haokan.py | wwping/spiders | ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3 | [
"MIT"
] | 30 | 2020-05-13T06:49:32.000Z | 2021-04-01T23:20:04.000Z | extractor/haokan.py | wwping/spiders | ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3 | [
"MIT"
] | null | null | null | extractor/haokan.py | wwping/spiders | ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3 | [
"MIT"
] | 8 | 2020-06-03T06:58:08.000Z | 2020-12-31T04:02:05.000Z |
import re
import requests
def get(url: str) -> dict:
"""
titlevideos
"""
data = {}
headers = {
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
}
re_title = r'<title>(.*?)</title>'
re_video = r'<video cla... | 26.242424 | 129 | 0.550808 |
import re
import requests
def get(url: str) -> dict:
"""
title、videos
"""
data = {}
headers = {
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
}
re_title = r'<title>(.*?)</title>'
re_video = r'<video cl... | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67476155226c2c0425cc70c6bcc651cc1cd94def | 3,242 | py | Python | imgpedia/dataproc/descriptor_benchmark.py | pection-zz/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | 1 | 2022-02-22T06:20:39.000Z | 2022-02-22T06:20:39.000Z | imgpedia/dataproc/descriptor_benchmark.py | pection/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | null | null | null | imgpedia/dataproc/descriptor_benchmark.py | pection/Lenquality-MachineLearning | 61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff | [
"MIT"
] | 1 | 2020-11-24T18:18:44.000Z | 2020-11-24T18:18:44.000Z | import numpy as np
import cv2, sys, os
from datetime import datetime
from OrientedGradientsComputer import OrientedGradientsComputer
from GrayHistogramComputer import GrayHistogramComputer
from DeCAF7Computer import DeCAF7Computer
from ColorLayoutComputer import ColorLayoutComputer
'''
This scripts computes the time i... | 38.141176 | 110 | 0.741518 | import numpy as np
import cv2, sys, os
from datetime import datetime
from OrientedGradientsComputer import OrientedGradientsComputer
from GrayHistogramComputer import GrayHistogramComputer
from DeCAF7Computer import DeCAF7Computer
from ColorLayoutComputer import ColorLayoutComputer
'''
This scripts computes the time i... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
cebe2eb7d974a15c8655cad986206b7040370b87 | 3,087 | py | Python | vaws/model/tests/test_curve.py | GeoscienceAustralia/vaws | 19b31e2402f7d5ad4cbec864523567d7bc46720e | [
"Apache-2.0"
] | 6 | 2018-06-02T04:39:34.000Z | 2021-11-12T12:07:04.000Z | vaws/model/tests/test_curve.py | GeoscienceAustralia/vaws | 19b31e2402f7d5ad4cbec864523567d7bc46720e | [
"Apache-2.0"
] | null | null | null | vaws/model/tests/test_curve.py | GeoscienceAustralia/vaws | 19b31e2402f7d5ad4cbec864523567d7bc46720e | [
"Apache-2.0"
] | null | null | null | import unittest
import numpy as np
def single_exponential_given_V(beta_, alpha_, x_arr):
"""
compute
Args:
beta_: parameter for vulnerability curve
alpha_: parameter for vulnerability curve
x_arr: 3sec gust wind speed at 10m height
Returns: damage index
"""
exponent_ = ... | 32.15625 | 77 | 0.594104 | import unittest
import matplotlib.pyplot as plt
import numpy as np
from vaws.model.curve import vulnerability_weibull, vulnerability_weibull_pdf
def single_exponential_given_V(beta_, alpha_, x_arr):
"""
compute
Args:
beta_: parameter for vulnerability curve
alpha_: parameter for vulnerabi... | 0 | 0 | 0 | 2,377 | 0 | 0 | 0 | 66 | 68 |
e05363a7d36d1a678843d4c6b481e2f4bb1b5b9c | 1,407 | py | Python | Daily_code/Day_20210208.py | renqiang06/Data_Engine_with_Python_renqiang | 78077d30b5ee63225c7672db3d17bafa82b10f37 | [
"MIT"
] | null | null | null | Daily_code/Day_20210208.py | renqiang06/Data_Engine_with_Python_renqiang | 78077d30b5ee63225c7672db3d17bafa82b10f37 | [
"MIT"
] | null | null | null | Daily_code/Day_20210208.py | renqiang06/Data_Engine_with_Python_renqiang | 78077d30b5ee63225c7672db3d17bafa82b10f37 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Author : Ren Qiang
# ACtion2 DNA ATCGDNA_strand(dna)
# %%
DNA_strand("ATTGC")
DNA_strand("AAAA")
DNA_strand("ATCGT")
# %% 1
Dict = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
DNA_input = ['ATTGC', 'AAAA', 'ATCGT']
print('1:')
result = list(map(DNA_trans_1, DNA_i... | 20.391304 | 52 | 0.474058 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# @Author : Ren Qiang
# ACtion2 互补DNA 其中,A与T互补,C与G互补编写函数DNA_strand(dna)
# %% 自己的做法
def DNA_strand(dna):
out = ''
for i in dna:
# print(i)
if i == 'A':
out += 'T'
elif i == 'T':
out += 'A'
elif i == 'C':
... | 345 | 0 | 0 | 0 | 0 | 778 | 0 | 0 | 69 |
fd85567c3f9bf71e2cc51bfe1d872df3f768c89b | 1,533 | py | Python | api/tacticalrmm/clients/migrations/0006_deployment.py | BaDTaG/tacticalrmm | 7bdd8c4626e0629d393edb5dec2541150d1802ef | [
"MIT"
] | 1 | 2021-01-19T20:39:02.000Z | 2021-01-19T20:39:02.000Z | api/tacticalrmm/clients/migrations/0006_deployment.py | BaDTaG/tacticalrmm | 7bdd8c4626e0629d393edb5dec2541150d1802ef | [
"MIT"
] | null | null | null | api/tacticalrmm/clients/migrations/0006_deployment.py | BaDTaG/tacticalrmm | 7bdd8c4626e0629d393edb5dec2541150d1802ef | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-25 01:03
| 47.90625 | 145 | 0.622962 | # Generated by Django 3.1.2 on 2020-10-25 01:03
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('knox', '0007_auto_20190111_0542'),
('clients', '0005_auto_20200922_1344'),
]
operations = [
... | 0 | 0 | 0 | 1,374 | 0 | 0 | 0 | 20 | 90 |
7ca14e0140dcfa8964790e97e38f0c770da66bb0 | 384 | py | Python | smart_meter/migrations/0004_auto_20200921_0926.py | GPXenergy/gpx_server_api | 9b021522be4414ac95159a0ed576848c463637f9 | [
"MIT"
] | null | null | null | smart_meter/migrations/0004_auto_20200921_0926.py | GPXenergy/gpx_server_api | 9b021522be4414ac95159a0ed576848c463637f9 | [
"MIT"
] | null | null | null | smart_meter/migrations/0004_auto_20200921_0926.py | GPXenergy/gpx_server_api | 9b021522be4414ac95159a0ed576848c463637f9 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-09-21 09:26
| 21.333333 | 51 | 0.609375 | # Generated by Django 3.0.8 on 2020-09-21 09:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('smart_meter', '0003_auto_20200921_0849'),
]
operations = [
migrations.RenameField(
model_name='smartmeter',
old_name='last_up... | 0 | 0 | 0 | 278 | 0 | 0 | 0 | 11 | 46 |
5c77a0227824d40d7627f1e7d0084fba99e4b63e | 2,367 | py | Python | idact/detail/deployment_sync/discard_expired_deployments.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 5 | 2018-12-06T15:40:34.000Z | 2019-06-19T11:22:58.000Z | idact/detail/deployment_sync/discard_expired_deployments.py | garstka/idact | b9c8405c94db362c4a51d6bfdf418b14f06f0da1 | [
"MIT"
] | 9 | 2018-12-06T16:35:26.000Z | 2019-04-28T19:01:40.000Z | idact/detail/deployment_sync/discard_expired_deployments.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 2 | 2019-04-28T19:18:58.000Z | 2019-06-17T06:56:28.000Z | from datetime import timedelta
from idact.detail.deployment_sync.deployment_definitions import DeploymentDefinitions
from idact.detail.helper.stage_info import stage_debug
from idact.detail.helper.utc_now import utc_now
from idact.detail.log.get_logger import get_logger
DISCARD_DELTA_SECONDS = 30
"""Discard deploymen... | 38.177419 | 78 | 0.65019 | from datetime import timedelta
from idact.detail.deployment_sync.deployment_definitions import \
DeploymentDefinitions
from idact.detail.helper.stage_info import stage_debug
from idact.detail.helper.utc_now import utc_now
from idact.detail.log.get_logger import get_logger
DISCARD_DELTA_SECONDS = 30
"""Discard dep... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 |
aabc4177ee4839c1da040250611caeb7c9630b47 | 11,607 | py | Python | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | accounting/test/test_sie_export.py | jacob22/accounting | e2fceea880e3f056703ba97b6cf52b73cd7af93b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Open End AB
#
# 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 o... | 40.583916 | 119 | 0.619109 | # -*- coding: utf-8 -*-
# Copyright 2019 Open End AB
#
# 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 o... | 64 | 0 | 0 | 10,172 | 0 | 0 | 0 | 480 | 260 |
e4919c8e6d3106722df5f348426fa641c5ca7582 | 9,434 | py | Python | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | 6 | 2016-11-20T22:37:24.000Z | 2020-09-13T02:19:16.000Z | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | null | null | null | HostedConfigFile.py | robdobsn/QtStockTicker | c9182b3c8c092da0739c9a2f788809a382a93c2a | [
"MIT"
] | 7 | 2015-11-12T13:16:40.000Z | 2021-02-19T05:52:37.000Z |
'''
Created on 07 Sep 2013
@author: rob dobson
'''
| 41.196507 | 137 | 0.584694 | import ftplib
import requests
import tempfile
import json
import os
import sys
'''
Created on 07 Sep 2013
@author: rob dobson
'''
class HostedConfigFile():
hostedDataLocations = []
latestFileVersion = -1
def initFromFile(self, fName):
with open(fName, 'r') as jsonFile:
local... | 0 | 0 | 0 | 9,270 | 0 | 0 | 0 | -53 | 155 |
726771bce28f154fafe3081f10c79889e9b886df | 1,376 | py | Python | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | lecrad/radsort.py | SGBon/algo | 331b77cbd4c8c99916c50633e8dcbc9c6048dfb7 | [
"MIT"
] | null | null | null | # convert decimal to binary
# Get the i-th digit of binary string x
# sort A using binary digit i
from random import choice
from string import uppercase
if __name__ == "__main__":
strings = []
for i in range(27):
strings.append(genstring(5))
print strings
strings = RADIX_SORT(strings)
print strings
| 22.557377 | 84 | 0.574128 | # convert decimal to binary
def radix2(data):
if type(data) is int: # convert integer to bit string
return "{0:b}".format(data)
elif type(data) is str: # convert a character string to bit string
ret = ''.join('{0:08b}'.format(ord(x), 'b') for x in data) # need full bytes
return ret
# Ge... | 0 | 0 | 0 | 0 | 0 | 921 | 0 | 0 | 135 |
53130fd814711eb7c22483926750e6985e225ebb | 945 | py | Python | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/dcc/marmoset/stub.py | prophetl33t/o3de | eaeeb883eee1594b1b93327f6909eebd1a826caf | [
"Apache-2.0",
"MIT"
] | null | null | null | # coding:utf-8
#!/usr/bin/python
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
# ------------------------------------------------------------------------... | 31.5 | 99 | 0.511111 | # coding:utf-8
#!/usr/bin/python
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
# ------------------------------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8a342b38a358bb688fbdb88d59333294dd729b20 | 336 | py | Python | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 39 | 2020-09-27T05:32:05.000Z | 2022-01-08T18:04:05.000Z | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 5 | 2020-10-02T13:33:00.000Z | 2021-03-01T14:06:08.000Z | Hackerrank_python/2.basic data types/10.Nested Lists.py | manish1822510059/Hackerrank | 7c6e4553f033f067e04dc6c756ef90cb43f3c4a8 | [
"MIT"
] | 6 | 2020-10-03T04:04:55.000Z | 2021-10-18T04:07:53.000Z | marksheet=[]
scoresheet=[]
if __name__ == '__main__':
for _ in range(int(input())):
name = input()
score = float(input())
marksheet=marksheet+[[name,score]]
scoresheet+=[score]
x=sorted(set(scoresheet))[1]
for n, s in sorted(marksheet):
if s==x:
print(n) ... | 22.4 | 42 | 0.520833 | marksheet=[]
scoresheet=[]
if __name__ == '__main__':
for _ in range(int(input())):
name = input()
score = float(input())
marksheet=marksheet+[[name,score]]
scoresheet+=[score]
x=sorted(set(scoresheet))[1]
for n, s in sorted(marksheet):
if s==x:
print(n) ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
63d4e1ca33b5fd38661cbad39204f8b798ac64c9 | 446 | py | Python | tests/spider-integration/spiders/sina_news_parser.py | RuixiangS/feapder | e21098c9d4f4ba001275f4d4d57d6ea4687b93a8 | [
"MIT"
] | 876 | 2021-02-09T11:08:04.000Z | 2022-03-31T21:14:11.000Z | tests/spider-integration/spiders/sina_news_parser.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 94 | 2021-02-20T07:59:28.000Z | 2022-03-28T09:54:53.000Z | tests/spider-integration/spiders/sina_news_parser.py | lovebull/feapder | 1cee596380b6ce5e1615ef81d3e57a1b290129d9 | [
"MIT"
] | 172 | 2021-02-22T08:24:44.000Z | 2022-03-29T08:15:27.000Z | # -*- coding: utf-8 -*-
"""
Created on 2021-03-02 23:40:37
---------
@summary:
---------
@author: Boris
"""
| 19.391304 | 64 | 0.587444 | # -*- coding: utf-8 -*-
"""
Created on 2021-03-02 23:40:37
---------
@summary:
---------
@author: Boris
"""
import feapder
class SinaNewsParser(feapder.BaseParser):
def start_requests(self):
"""
注意 这里继承的是BaseParser,而不是Spider
"""
yield feapder.Request("https://news.sina.com.cn/")
... | 36 | 0 | 0 | 286 | 0 | 0 | 0 | -7 | 46 |
ee954e9c11558fc576daa82ea8a397eda11154dc | 17,176 | py | Python | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T16:50:42.000Z | 2020-02-18T16:50:42.000Z | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | null | null | null | blue_st_examples/example_ble_4.py | Higgcz/BlueSTSDK_Python | fdd2de0e891b901d35e94901ae06023ee2ab65a3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary for... | 41.487923 | 117 | 0.496041 | #!/usr/bin/env python
################################################################################
# COPYRIGHT(c) 2018 STMicroelectronics #
# #
# Redistribution and use in source and binary for... | 0 | 0 | 0 | 2,807 | 0 | 9,095 | 0 | 226 | 485 |
cbe6081514aec93c00604671f18f0eec79a367f0 | 640 | py | Python | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | db_api/database.py | akorzunin/telegram_auction_bot | d4d5042614ea11f8085815d8f9fb8b6fbebcfab0 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
#load .env variables
import os
from dotenv import load_dotenv
load_dotenv()
PWD = os.getenv('PWD')
import sys
sys.path.insert(1, PWD)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{PWD}/data_bas... | 30.47619 | 75 | 0.810938 | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
#load .env variables
import os
from dotenv import load_dotenv
load_dotenv()
PWD = os.getenv('PWD')
import sys
sys.path.insert(1, PWD)
SQLALCHEMY_DATABASE_URL = f"sqlite:///{PWD}/data_bas... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d3c7c30be04c8e11fb1790e39f258cb17c96675e | 82,999 | py | Python | pyNastran/op2/result_objects/table_object.py | fmamitrotta/pyNastran | 6f9592cf3a2ccb8c509918acb735282d6eef75aa | [
"BSD-3-Clause"
] | 293 | 2015-03-22T20:22:01.000Z | 2022-03-14T20:28:24.000Z | pyNastran/op2/result_objects/table_object.py | sean-engelstad/pyNastran | 90f957887a4f68f8e58b07c15e1ac69c66b9c6f4 | [
"BSD-3-Clause"
] | 512 | 2015-03-14T18:39:27.000Z | 2022-03-31T16:15:43.000Z | pyNastran/op2/result_objects/table_object.py | sean-engelstad/pyNastran | 90f957887a4f68f8e58b07c15e1ac69c66b9c6f4 | [
"BSD-3-Clause"
] | 136 | 2015-03-19T03:26:06.000Z | 2022-03-25T22:14:54.000Z | """
defines:
- TableObject
- RealTableArray
- ComplexTableArray
these are used by:
- RealDisplacementArray
- RealVelocityArray
- RealAccelerationArray
- RealEigenvaluesArray
- RealSPCForcesArray
- RealMPCForcesArray
- RealAppliedLoadsArray
- ComplexDisplacementArray
- ComplexVelocityArray
- ComplexAccele... | 42.629173 | 173 | 0.505271 | """
defines:
- TableObject
- RealTableArray
- ComplexTableArray
these are used by:
- RealDisplacementArray
- RealVelocityArray
- RealAccelerationArray
- RealEigenvaluesArray
- RealSPCForcesArray
- RealMPCForcesArray
- RealAppliedLoadsArray
- ComplexDisplacementArray
- ComplexVelocityArray
- ComplexAccele... | 0 | 5,043 | 0 | 68,671 | 0 | 1,861 | 0 | 325 | 335 |
4f5b4d95cdb787b00d8a2ead5fb57c49a2b208cd | 2,210 | py | Python | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Javascript-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | 3 | 2019-01-16T10:06:51.000Z | 2019-07-04T17:07:29.000Z | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Javascript-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | 6 | 2020-02-23T20:44:38.000Z | 2020-07-18T21:57:32.000Z | Datstructures&Algorithms/DataStructures/LinkedLists/__init__.py | MasherJames/Data-Structures-and-Algorithms | 5ea3e21dde34e513745ca84220ed6503c0bc0222 | [
"MIT"
] | null | null | null |
linkedList = LinkedList()
linkedList.insert(1)
linkedList.insert(4)
linkedList.insert(7)
linkedList.insert(8)
linkedList.printLinkedList()
print()
# linkedList.reverse_iteratively()
linkedList.reverse_recursively()
linkedList.printLinkedList()
| 27.625 | 81 | 0.634842 | class Node(object):
def __init__(self, data):
self.data = data
self.next = None
class LinkedList(object):
head = None
# def __init__(self):
# self.head = None
def insert(self, data):
new_node = Node(data)
if LinkedList.head is None:
LinkedList.head ... | 0 | 315 | 0 | 1,603 | 0 | 0 | 0 | 0 | 45 |
bcddff7a6e8f5161639e8a62328acfc56e8f0c0c | 10,254 | py | Python | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | python/zybo/test17_raw.py | DanielTisza/spectralcamera | 4fef93b3b4cd8f83e016070f1c0d68aa0cff5102 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------------
# test17.py
#
# Copyright 2021 Daniel Tisza
# MIT License
#
# Taking raw image with Zybo and saving to NETCDF
#
# LED calibration set: C
# Wavelength: 584.577535
# Setpoint: 11127
#
# -------------------------------------------------... | 29.130682 | 143 | 0.672225 | # ----------------------------------------------------------------------------
# test17.py
#
# Copyright 2021 Daniel Tisza
# MIT License
#
# Taking raw image with Zybo and saving to NETCDF
#
# LED calibration set: C
# Wavelength: 584.577535
# Setpoint: 11127
#
# -------------------------------------------------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 66 |
358da6fd4eaaa670b9f5cc40d8c2a27260258dd1 | 1,325 | py | Python | tests/rest/__init__.py | bontekasper/openeo-python-client | 3a3cfd4ce619dd648e7dec0684281f4fecf4c2e3 | [
"Apache-2.0"
] | 75 | 2017-11-17T11:49:15.000Z | 2022-02-15T14:21:42.000Z | tests/rest/__init__.py | jdries/openeo-python-client | 63e70bdb27749ba51553bb3fa46135125d8bc9d9 | [
"Apache-2.0"
] | 238 | 2017-12-05T14:48:30.000Z | 2022-03-31T15:42:38.000Z | tests/rest/__init__.py | jdries/openeo-python-client | 63e70bdb27749ba51553bb3fa46135125d8bc9d9 | [
"Apache-2.0"
] | 28 | 2018-01-24T08:42:54.000Z | 2022-01-27T09:16:26.000Z | import json
from typing import Union
import mock
from openeo.rest.datacube import DataCube
from openeo.rest.imagecollectionclient import ImageCollectionClient
def get_download_graph(cube: Union[DataCube, ImageCollectionClient]) -> dict:
"""
Do fake download of a cube and intercept the process graph
:par... | 30.813953 | 88 | 0.710189 | import json
from typing import Union
import mock
from openeo.rest.datacube import DataCube
from openeo.rest.imagecollectionclient import ImageCollectionClient
def get_download_graph(cube: Union[DataCube, ImageCollectionClient]) -> dict:
"""
Do fake download of a cube and intercept the process graph
:par... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
705de983d0da514bfb0f01d54db05374956338af | 4,631 | py | Python | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | Projects/project5/main.py | spacemanidol/CLSM473 | 67ff650c905f7a8799fc3c97bd4cfbeea5801995 | [
"MIT"
] | null | null | null | import os
import string
import sys
import math
languages = ['dan','deu','dut','eng','fin','fra','gla','ita','nob','pol','por','spa','swe','swh','tgl']
def smoothing(corpus):
'''
Addative Smoothing
args: corpus(dict): words to occourences based on langauge
returns: a modified corpus
increase the co... | 41.348214 | 216 | 0.641546 | import os
import string
import sys
import math
languages = ['dan','deu','dut','eng','fin','fra','gla','ita','nob','pol','por','spa','swe','swh','tgl']
def smoothing(corpus):
'''
Addative Smoothing
args: corpus(dict): words to occourences based on langauge
returns: a modified corpus
increase the co... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
50dee8caf3a68e7199f2089a3761c3ddf84dbc5e | 2,161 | py | Python | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/implement_trie.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | # DESCRIPTION
# Implement a trie with insert, search, and startsWith methods.
# EXAMPLE:
# Trie trie = new Trie();
# trie.insert("apple");
# trie.search("apple"); // returns true
# trie.search("app"); // returns false
# trie.startsWith("app"); // returns true
# trie.insert("app");
# trie.search("app"); // r... | 24.83908 | 83 | 0.554373 | # DESCRIPTION
# Implement a trie with insert, search, and startsWith methods.
# EXAMPLE:
# Trie trie = new Trie();
# trie.insert("apple");
# trie.search("apple"); // returns true
# trie.search("app"); // returns false
# trie.startsWith("app"); // returns true
# trie.insert("app");
# trie.search("app"); // r... | 0 | 0 | 0 | 1,493 | 0 | 0 | 0 | 0 | 46 |
09e2511b2e1ec0709ee599f31a84d3eadfc0c05f | 717 | py | Python | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | 5 | 2020-08-25T11:35:04.000Z | 2021-12-25T18:57:58.000Z | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | null | null | null | python/Client/Client.py | YushchenkoAndrew/template | 35c6bcd2121647015308f0cc110da71aa148d5fb | [
"MIT"
] | 3 | 2020-10-08T07:51:33.000Z | 2021-12-29T10:19:24.000Z | import socket
import cv2
import pickle
import zlib
HOST = '192.168.0.101'
PORT = 13327
video = cv2.VideoCapture(0)
video.set(3, 50)
video.set(4, 50)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
for i in range(5800):
ret, frame = video.read()
gray = cv2.cvtColor(fram... | 14.632653 | 57 | 0.617852 | import socket
import time
import cv2
import pickle
import zlib
import datetime
HOST = '192.168.0.101'
PORT = 13327
video = cv2.VideoCapture(0)
video.set(3, 50)
video.set(4, 50)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
for i in range(5800):
ret, frame = video.read()
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -16 | 44 |
f6a38fbe57ac40cc177a252be0af783d377d0d2a | 60,988 | py | Python | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | 1 | 2020-05-25T09:18:50.000Z | 2020-05-25T09:18:50.000Z | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | null | null | null | bin/stringrnautils.py | JungeAlexander/rain | c0ee5983dacea53ee27b9849c04a0f80fd8280d1 | [
"MIT"
] | 2 | 2020-04-22T15:57:14.000Z | 2021-05-12T13:03:48.000Z | # normal libaries
import os
import gzip
import collections
import logging
logger = logging.getLogger(os.path.basename(__file__))
logging.basicConfig(level=logging.INFO)
# 3rd party (all avalible trough pip!)
import numpy as np
import matplotlib as mp
mp.use("Agg")
###################################################... | 42.294036 | 160 | 0.610087 | # normal libaries
import os
import gzip
import re
import collections
import zipfile
import operator
import logging
logger = logging.getLogger(os.path.basename(__file__))
logging.basicConfig(level=logging.INFO)
# 3rd party (all avalible trough pip!)
import numpy as np
import matplotlib as mp
mp.use("Agg")
from matpl... | 0 | 1,312 | 0 | 2,005 | 0 | 31,384 | 0 | -19 | 747 |
979596b703c235ec5752e3e4d11521663f15087d | 7,226 | py | Python | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | 1 | 2016-03-04T09:47:42.000Z | 2016-03-04T09:47:42.000Z | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | null | null | null | src/Honeybee_Get Annual SQL Data.py | rdzeldenrust/Honeybee | e91e58badc1c9b082596d2cf97baeccdb6d7d0af | [
"CC-BY-3.0"
] | null | null | null | # By Mostapha Sadeghipour Roudsari
# Sadeghipour@gmail.com
# Ladybug started by Mostapha Sadeghipour Roudsari is licensed
# under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
"""
Export Honeybee Objects to OpenStudio
-
Provided by Honeybee 0.0.53
Args:
openStudioLibFolder:
Retur... | 47.854305 | 136 | 0.745918 | # By Mostapha Sadeghipour Roudsari
# Sadeghipour@gmail.com
# Ladybug started by Mostapha Sadeghipour Roudsari is licensed
# under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
"""
Export Honeybee Objects to OpenStudio
-
Provided by Honeybee 0.0.53
Args:
openStudioLibFolder:
Retur... | 0 | 0 | 0 | 60 | 0 | 345 | 0 | 0 | 46 |
9c102de787efda5a28f80cb814586d5e1785b611 | 10,689 | py | Python | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | null | null | null | gmsh_cad/emi_system_sz.py | MiroK/emi-cylinders | ccbbfa51003fc4fe8abc257dee916e229398c520 | [
"MIT"
] | 1 | 2018-05-30T14:26:59.000Z | 2018-05-30T14:26:59.000Z | import petsc4py, sys
# I like to be in control of the command line
petsc4py.init(sys.argv)
from petsc4py import PETSc
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -march=native'
paramete... | 42.756 | 125 | 0.749181 | import petsc4py, sys
# I like to be in control of the command line
petsc4py.init(sys.argv)
from dolfin import *
from petsc4py import PETSc
parameters['form_compiler']['representation'] = 'uflacs'
parameters['form_compiler']['cpp_optimize'] = True
parameters['form_compiler']['cpp_optimize_flags'] = '-O3 -ffast-math -... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 23 |
0f3b99d6006545048cfe87fd8703abe66af1f1a9 | 5,950 | py | Python | src/utils.py | pabloguarda/ProbabilisticGraphicalTransportationNetworks | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | 1 | 2022-03-11T00:48:08.000Z | 2022-03-11T00:48:08.000Z | src/utils.py | pabloguarda/pgtn | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | null | null | null | src/utils.py | pabloguarda/pgtn | d2b6a3f3d8f41e529a370acb540b9103370f7965 | [
"MIT"
] | null | null | null | import numpy as np
# remove cv2 before you submit to autograder
import cv2
import os
from PIL import Image
def img_tile(imgs, path, filename, save, aspect_ratio=1.0, border=1, border_color=0):
"""
Visualize the WGAN result for each step
:param imgs: Numpy array of the generated images
:param path: ... | 30.512821 | 86 | 0.596134 | import numpy as np
import matplotlib.pyplot as plt
# remove cv2 before you submit to autograder
import cv2
import os
from PIL import Image
class Activation:
def __call__(self, inp):
return self.forward(inp)
def forward(self, inp):
pass
def backward(self, inp):
pass
class Sigmoi... | 0 | 0 | 0 | 994 | 0 | 0 | 0 | 10 | 137 |
dfea8f2f791a2de5abc70a40de718e091bfb828a | 2,389 | py | Python | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | accounts/views.py | gootaa/event_manager | 21943568c8d2de1a841e9c61e8289ffebf14e183 | [
"BSD-2-Clause"
] | null | null | null | from django.contrib.auth import authenticate, login
from django.shortcuts import redirect, render
from .forms import RegistrationForm
def register(request):
"""
Handles RegistrationForm, login the new user,
and redirects to home page
"""
if request.user.is_authenticated():
return redirect... | 31.434211 | 80 | 0.660946 | from django.contrib import messages
from django.contrib.auth import authenticate, login, update_session_auth_hash
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import PasswordChangeForm
from django.shortcuts import redirect, render
from .forms import EmailForm, RegistrationFo... | 0 | 1,310 | 0 | 0 | 0 | 0 | 0 | 122 | 135 |
a3b80176afc01bc4f3b7cc4c4cfdf0983e67ede8 | 2,696 | py | Python | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | flask_api_website2.py | rwzlock/ORM-Homework | e5743b3e7cb79afa759fab2d56ce59db3f39be38 | [
"ADSL"
] | null | null | null | #Dependencies
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine
from flask import Flask
#Boilerplate
engine = create_engine("sqlite:///Resources/hawaii.sqlite")
Base = automap_base()
Base.prepare(engine, reflect=True)
Measurements = Base.classe... | 29.626374 | 116 | 0.722923 | #Dependencies
import datetime as dt
import numpy as np
import pandas as pd
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#Boilerplate
engine = create_engine("sqlite:///Resources/hawaii.... | 0 | 1,523 | 0 | 0 | 0 | 0 | 0 | 6 | 221 |
f7c28f37034864f08f96fc8e47ff7051aff066e5 | 3,247 | py | Python | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | qf_lib/analysis/rolling_analysis/rolling_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN European Organization for Nuclear Research
#
# 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.... | 42.168831 | 118 | 0.666769 | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... | 3 | 1,813 | 0 | 569 | 0 | 0 | 0 | 85 | 117 |
f2dfd3c82910a87968402103b082965c591c0c11 | 11,667 | py | Python | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null | RobotCode/HardwareModel.py | HeapArt/DarkPaw | 183c8943ed7bb3e771af019468566ff9d5ad6b2f | [
"MIT"
] | null | null | null |
eRobotState_VOID = 0
eRobotState_LOAD = 1
eRobotState_WAKE = 2
eRobotState_RUN = 3
eRobotState_DROWZEE = 4
eRobotState_SLEEP = 5
cServoOffPosition = 360
| 27.844869 | 115 | 0.636839 | import json
from os import wait
import time
import math
import threading
from .HWIO.LEDController import LEDController
from .HWIO.SwitchController import SwitchController
from .HWIO.ServoController import ServoController
from .KinematicsDB import getKinematicsDB
eRobotState_VOID = 0
eRobotState_LOAD = 1
eRobotState_... | 0 | 0 | 0 | 11,224 | 0 | 0 | 0 | 65 | 222 |
43db27afa66c58dabd9724581461c96351dbe403 | 1,552 | py | Python | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 12 | 2019-12-27T17:43:46.000Z | 2021-08-12T03:44:38.000Z | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 17 | 2020-01-22T20:43:06.000Z | 2021-11-10T20:10:30.000Z | example-client.py | electric-monk/pyflowater | 56a51ab3fdb044a3dc7ebe29d10f6e19f3af5337 | [
"Apache-2.0"
] | 6 | 2020-01-24T20:02:40.000Z | 2021-09-04T21:16:38.000Z | #!/usr/local/bin/python3
if __name__ == "__main__":
main()
| 23.164179 | 75 | 0.606959 | #!/usr/local/bin/python3
import os
import sys
import pprint
import logging
import json
from pyflowater import PyFlo
def setup_logger():
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.For... | 0 | 0 | 0 | 0 | 0 | 1,348 | 0 | -41 | 180 |
5c76945db5e79e53e6970986e77e8a3842696418 | 974 | py | Python | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | 1 | 2021-08-30T19:40:46.000Z | 2021-08-30T19:40:46.000Z | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | null | null | null | visualization/app.py | endridollani/sorting-algorithms-visualized | 0f3dc893f67298a00d315b5e1399bc822e4d9b67 | [
"MIT"
] | null | null | null | import pygame
import draw
from window import Window
import event_handler
pygame.init()
ARRAY_SIZE,DELAY = event_handler.get_user_input()
if __name__ == "__main__":
running = True
clock = pygame.time.Clock()
FPS = 60
window = Window()
handler = event_handler.Handler(window.get_manage... | 27.828571 | 90 | 0.691992 | import pygame
import time
import draw
from window import Window
import event_handler
pygame.init()
ARRAY_SIZE,DELAY = event_handler.get_user_input()
if __name__ == "__main__":
running = True
clock = pygame.time.Clock()
FPS = 60
window = Window()
handler = event_handler.Handler(windo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -10 | 22 |
43a1d6b37a7c28b41c80e4bc0b55828cd6a11d08 | 1,390 | py | Python | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | pyglobe3d/core/icosalogic/triangle.py | ka-tet19/pyglobelib | d62f7636f5f971b897eba8fcf787fabb5ed181f1 | [
"BSD-3-Clause"
] | null | null | null | from pyglobe3d.core.icosalogic.grid_consts import Grid
from pyglobe3d.core.icosalogic.triangle_attrs import TriangleIndex
if __name__ == '__main__':
from pyglobe3d.core.icosalogic.grid_consts import Grid
tr45 = Triangle(
index_object=TriangleIndex(
grid=Grid(4),
index=45
... | 30.217391 | 88 | 0.664748 | from pyglobe3d.core.icosalogic.grid_consts import Grid
from pyglobe3d.core.icosalogic.elements import ElementWithIndexAndLocationObjects
from pyglobe3d.core.icosalogic.triangle_attrs import TriangleIndex, TriangleLocation
class Triangle(ElementWithIndexAndLocationObjects):
"""
Describes a logical triangle loc... | 0 | 436 | 0 | 440 | 0 | 0 | 0 | 78 | 45 |
e0d7760a1648d455aace79b5b45f8f6e8d1020d8 | 690 | py | Python | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | 5 | 2020-08-06T11:59:41.000Z | 2022-01-24T15:48:04.000Z | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | 9 | 2021-06-04T23:54:35.000Z | 2022-02-10T12:39:01.000Z | project1-books/import.py | ish-u/cs50w-projects | 16b9ca280d0fe8bc6359d4091ef8153233f9b5eb | [
"MIT"
] | null | null | null | import os
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
if not os.getenv("DATABASE_URL"):
raise RuntimeError("DATABASE_URL is not set")
# Set up database
engine = create_engine(os.getenv("DATABASE_URL"))
db = scoped_session(sessionmaker(bind=engine))
if __name__ =... | 27.6 | 154 | 0.7 | import csv
import os
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
if not os.getenv("DATABASE_URL"):
raise RuntimeError("DATABASE_URL is not set")
# Set up database
engine = create_engine(os.getenv("DATABASE_URL"))
db = scoped_session(sessionmaker(bind=engine))
de... | 0 | 0 | 0 | 0 | 0 | 311 | 0 | -11 | 45 |
11d1be4b96aafe05dc127f6d755f39d04a6050a1 | 2,276 | py | Python | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | 4 | 2019-12-12T20:44:16.000Z | 2021-01-19T14:39:22.000Z | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | null | null | null | purano/training/train_tfidf.py | IlyaGusev/purano | 07234a55e8c80d1e9d8aeb8197c58e36dd26da54 | [
"Apache-2.0"
] | null | null | null | import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--config-file", type=str, required=True)
parser.add_argument("--input-file", type=str, required=True)
parser.add_argument("--output-file", type=str, required=True)
parser.add_argument("--svd-matrix-... | 32.056338 | 92 | 0.689367 | import argparse
import json
from _jsonnet import evaluate_file as jsonnet_evaluate_file
from sklearn.decomposition import TruncatedSVD
from scipy.sparse import csr_matrix
import torch
from tqdm import tqdm
from purano.io import read_tg_jsonl
from purano.training.models.tfidf import build_idf_vocabulary, get_tfidf_vec... | 0 | 0 | 0 | 0 | 0 | 1,480 | 0 | 159 | 223 |
eb405231cae1a9571f0c0571f2df4f53ee5fc1df | 1,644 | py | Python | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | model/baseline.py | Silenthinker/LM-LSTM-CRF | c1d6321f0b405691211debf94f8e2b6a418914f6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: jyao
Go over all n-grams up to length k (say 5) in a text, check which of these n-grams appear in the p(e|m) dictionary.
For each mention that appears, take the top scored entity e based on p(e|m) value,
and check its wikipedia page to see if it contains a D... | 36.533333 | 116 | 0.558394 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: jyao
Go over all n-grams up to length k (say 5) in a text, check which of these n-grams appear in the p(e|m) dictionary.
For each mention that appears, take the top scored entity e based on p(e|m) value,
and check its wikipedia page to see if it contains a D... | 0 | 0 | 0 | 1,163 | 0 | 0 | 0 | 30 | 69 |
ea6e039e891fcaa67d0d40b96a11a0e85be7239a | 615 | py | Python | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | 4 | 2021-01-15T15:36:23.000Z | 2021-09-01T06:52:05.000Z | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | 63 | 2020-05-04T13:48:04.000Z | 2020-06-06T02:32:58.000Z | tests/mowgli_etl_test/pipeline/usf/conftest.py | tetherless-world/mowgli-etl | 28c19eba41e03e053ae4addff56a313d926e18d7 | [
"MIT"
] | null | null | null | from pathlib import Path
_sample_usf_file_path = Path(__file__).parent / "usf_test_data.xml"
_sample_usf_zip_file_path = Path(__file__).parent / "usf_test_data.zip"
| 21.964286 | 84 | 0.795122 | import bz2
import pytest
from io import TextIOWrapper
from pathlib import Path
from tests.mowgli_etl_test.http_client.mock_etl_http_client import MockEtlHttpClient
_sample_usf_file_path = Path(__file__).parent / "usf_test_data.xml"
_sample_usf_zip_file_path = Path(__file__).parent / "usf_test_data.zip"
@pytest.fix... | 0 | 236 | 0 | 0 | 0 | 0 | 0 | 51 | 157 |
15912ce0b7771f3c168a8db834753b23f477a154 | 3,995 | py | Python | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 1 | 2020-01-23T14:16:01.000Z | 2020-01-23T14:16:01.000Z | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 8 | 2020-01-23T07:03:26.000Z | 2020-04-09T20:14:09.000Z | software/source/trial_interpreter.py | jeremyparadie/CASPER | 315875bce612560b005003cc4ecf77c0df80097f | [
"MIT"
] | 4 | 2020-01-23T06:29:11.000Z | 2020-02-14T21:44:37.000Z |
# When instantiating a trial class both of the inputs, name and trial, should be included.
#Their current defaults are for demonstration/testing purposes only.
def loop(que):
"""
desc: the loop used to manage talking to the trial interpreter.
possible commands:
'trial.start' -> runs the specified ... | 38.413462 | 121 | 0.622528 | import os
import sys
import subprocess
import csv
# When instantiating a trial class both of the inputs, name and trial, should be included.
#Their current defaults are for demonstration/testing purposes only.
class Trial: # this will be an instance of a trial, re-instantiated for each new trial
def __init__(sel... | 0 | 34 | 0 | 2,370 | 0 | 0 | 0 | -38 | 111 |
1ccd350533617c5c85aa2dc689e4558446119dac | 9,417 | py | Python | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 4 | 2019-09-16T15:50:22.000Z | 2021-04-08T15:32:48.000Z | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 3 | 2018-05-04T09:28:24.000Z | 2018-12-03T09:00:31.000Z | pyvims/isis/isis.py | seignovert/pyvims | a70b5b9b8bc5c37fa43b7db4d15407f312a31849 | [
"BSD-3-Clause"
] | 1 | 2020-10-12T15:14:17.000Z | 2020-10-12T15:14:17.000Z | """VIMS ISIS header."""
| 25.8 | 79 | 0.561856 | """VIMS ISIS header."""
import os
import numpy as np
import pvl
from .errors import ISISError
from .history import ISISHistory
from .labels import ISISLabels
from .tables import ISISTables
from .time import time as _dt
from .vars import BYTE_ORDERS, FIELD_TYPES
from ..misc import get_md5
class ISISCube:
"""VIM... | 0 | 5,487 | 0 | 3,614 | 0 | 0 | 0 | 45 | 247 |
b59b170fa95c1980fd3206bf278367b39fc48abd | 317 | py | Python | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | 1 | 2015-12-29T09:52:58.000Z | 2015-12-29T09:52:58.000Z | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | null | null | null | fann_train.py | Apkawa/simple-captcha-ocr-opencv | b0c20c8cac75feac1d10b21b99629ac5d66cd744 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from test_opencv import PROJECT_ROOT
imgW = 83
imgH = 23
factor = 2
rimgW = imgW * factor
rimgH = imgH * factor
nSegs = 5
segW = 18
segH = 18
segSize = (segW, segH)
num_input = segW * segH
TRAIN_FILE = os.path.join(PROJECT_ROOT, "fann.train")
| 10.931034 | 53 | 0.675079 | # -*- coding: utf-8 -*-
import os
from pyfann import libfann
from test_opencv import PROJECT_ROOT
imgW = 83
imgH = 23
factor = 2
rimgW = imgW * factor
rimgH = imgH * factor
nSegs = 5
segW = 18
segH = 18
segSize = (segW, segH)
num_input = segW * segH
TRAIN_FILE = os.path.join(PROJECT_ROOT, "fann.train")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 23 |
1ce173adace5669ce87261460f62b4304ea52578 | 835 | py | Python | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | Fund/FundVisualizer.py | 5cr009e/qianjinqiu | 68b5cd55440d0bebbd5a023b7dcce97a2bc86c75 | [
"MIT"
] | null | null | null | #coding:utf-8
| 27.833333 | 71 | 0.59521 | #coding:utf-8
import matplotlib.pyplot as plt
import matplotlib
import platform
def setup_mpl():
fonts_dict = {
"Linux": "WenQuanYi Zen Hei",
"Windows": "SimHei",
}
# print(platform.platform())
for system in ["Linux", "Windows"]:
if system in platform.platform():
m... | 36 | 0 | 0 | 264 | 0 | 422 | 0 | 0 | 114 |
58dfc970b88465bd9bd63232e1b8113cfa76ba8c | 823 | py | Python | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | 10 | 2018-07-02T01:48:58.000Z | 2021-09-01T09:27:18.000Z | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | null | null | null | ML/code/softmax_validator.py | DistributedML/TorML | f41a0378f5e46e578c6bd9c8bfd56037d1a228cf | [
"MIT"
] | 3 | 2017-10-19T21:20:59.000Z | 2022-02-23T21:39:01.000Z | from __future__ import division
import utils
import pdb
data = utils.load_dataset("mnist/mnist_test", npy=True)
Xvalid, yvalid = data['X'], data['y']
if __name__ == "__main__":
pdb.set_trace()
| 18.288889 | 55 | 0.613609 | from __future__ import division
import numpy as np
import utils
import pdb
data = utils.load_dataset("mnist/mnist_test", npy=True)
Xvalid, yvalid = data['X'], data['y']
def kappa(ww, delta):
ww = np.array(ww)
yhat = np.sign(np.dot(Xvalid, ww))
ww2 = np.array(ww + delta)
yhat2 = np.sign(np.dot(Xvali... | 0 | 0 | 0 | 0 | 0 | 532 | 0 | -3 | 91 |
ce9c709d3be6b419c059d7e481d3cf31a6b44d80 | 8,106 | py | Python | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/availability_set.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
from .. import utilities, tables
| 60.947368 | 280 | 0.717987 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Availa... | 0 | 2,646 | 0 | 5,129 | 0 | 0 | 0 | -13 | 112 |
7930550813764e073706b6255ac40cdb8744cfb2 | 3,410 | py | Python | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 7 | 2019-07-17T06:59:53.000Z | 2021-05-13T15:23:37.000Z | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | null | null | null | src/python2/request/calendar_request_builder.py | microsoftarchive/msgraph-sdk-python | 1320ba9116be0d00a1d7fce3484ea979e24ee82d | [
"MIT"
] | 2 | 2020-06-30T13:06:59.000Z | 2021-06-03T09:47:35.000Z | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
| 36.666667 | 151 | 0.660997 | # -*- coding: utf-8 -*-
"""
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
"""
from __future__ import unicode_literals
from .calendar_request impo... | 0 | 845 | 0 | 2,108 | 0 | 0 | 0 | 73 | 89 |
68494f058cffe420454c82ee2d7f59f07781ffd2 | 3,719 | py | Python | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 2,122 | 2019-07-02T13:19:10.000Z | 2022-03-22T09:59:42.000Z | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 206 | 2019-07-02T14:19:42.000Z | 2022-02-15T02:34:28.000Z | rlpyt/ul/models/ul/encoders.py | traffic-lights/rlpyt | ec4689cddd55d98c037194685cfd6ca8e6785014 | [
"MIT"
] | 369 | 2019-07-02T13:38:28.000Z | 2022-03-28T11:16:39.000Z |
import torch
def weight_init(m):
"""Kaiming_normal is standard for relu networks, sometimes."""
if isinstance(m, (torch.nn.Linear, torch.nn.Conv2d)):
torch.nn.init.kaiming_normal_(m.weight, mode="fan_in",
nonlinearity="relu")
torch.nn.init.zeros_(m.bias)
| 29.752 | 74 | 0.590481 |
import torch
from rlpyt.models.conv2d import Conv2dModel
from rlpyt.models.mlp import MlpModel
from rlpyt.ul.models.dmlab_conv2d import DmlabConv2dModel
from rlpyt.utils.tensor import infer_leading_dims, restore_leading_dims
def weight_init(m):
"""Kaiming_normal is standard for relu networks, sometimes."""
... | 0 | 196 | 0 | 2,967 | 0 | 0 | 0 | 124 | 135 |
16364fea52fdb66cb3d64e6653f970390c662062 | 42 | py | Python | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | pgw/__main__.py | wk1093/pgw | f3ba055dd685e0e3ca530ed0e8dd0d45dee2f9a0 | [
"MIT"
] | null | null | null | import __version
print(__version.version) | 21 | 24 | 0.857143 | import __version
print(__version.version) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
69f635fff38fc20ca93785457520bd047c422f5f | 1,580 | py | Python | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | 1 | 2017-10-26T22:22:31.000Z | 2017-10-26T22:22:31.000Z | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | null | null | null | src/dialogs/authenticate_mechanic.py | arthurljones/bikechurch-signin-python | 8d086ac508db0086d82b6d6c8864bfec6bd40b5e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 30.980392 | 75 | 0.744304 | # -*- coding: utf-8 -*-
import wx
from src.ui import MakeInfoEntrySizer, AddField, MedFont, winSizes
import hashlib
from strings import trans
class AuthenticateMechanicDialog(wx.Dialog):
passHash = "e82b4263a7d8618a5b458dda8658f35bdef7e14b" #sha1
def __init__(self, parent, actionDescription = trans.authenticateGe... | 0 | 0 | 0 | 1,414 | 0 | 0 | 0 | 30 | 112 |
dab02c2cbb55b4a2a8cc2c8452bf3af69e78761c | 400 | py | Python | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | python-projects/uppercase_and_reverse.py | iamvalentin23/onemonth | a44a4eb131824d9224170b55264902e63354da6e | [
"MIT"
] | null | null | null | # Create a function called uppercase_and_reverse that takes a little bit of text,
# uppercases it all, and then reverses it (flips all the letters around)
text = uppercase_and_reverse("Do not go gentle into that good night.") #"THGIN DOOG TAHT OTNI ELTNEG OG TON OD"
print(text) | 36.363636 | 112 | 0.77 | # Create a function called uppercase_and_reverse that takes a little bit of text,
# uppercases it all, and then reverses it (flips all the letters around)
def uppercase_and_reverse(sentence):
return reverse(sentence.upper())
def reverse(sentence):
return sentence[::-1]
text = uppercase_and_reverse("Do not go gent... | 0 | 0 | 0 | 0 | 0 | 73 | 0 | 0 | 46 |
c6ce80e178644e1f29c20e47a8b2f1716a9fba84 | 1,108 | py | Python | contrib/hooks/mypy-after-commit.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 516 | 2015-07-30T19:08:55.000Z | 2018-07-03T20:53:42.000Z | contrib/hooks/mypy-after-commit.py | BD2KGenomics/toil | 88d73fbfd42ec22fd692940fc1efdacaf53b1b76 | [
"Apache-2.0"
] | 1,949 | 2015-07-29T23:38:49.000Z | 2018-07-05T12:42:04.000Z | contrib/hooks/mypy-after-commit.py | BD2KGenomics/slugflow | ec83920e1636fd24814688bf1569feebfae73620 | [
"Apache-2.0"
] | 193 | 2015-07-31T18:52:57.000Z | 2018-07-05T08:54:11.000Z | #!/usr/bin/env python3
"""
mypy-after-commit.py: Git post-commit script to type-check commits in the background.
Install with:
ln -rs ./contrib/hooks/mypy-after-commit.py .git/hooks/post-commit
"""
import sys
if __name__ == "__main__":
sys.exit(main(len(sys.argv), sys.argv))
| 30.777778 | 119 | 0.662455 | #!/usr/bin/env python3
"""
mypy-after-commit.py: Git post-commit script to type-check commits in the background.
Install with:
ln -rs ./contrib/hooks/mypy-after-commit.py .git/hooks/post-commit
"""
import sys
import subprocess
import os
from lib import announce, complain, file_link, in_acceptable_environment, chec... | 0 | 0 | 0 | 0 | 0 | 651 | 0 | 82 | 90 |
cf5b5fa65ec48875377f8b64f7f69b2b857ed940 | 3,681 | py | Python | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | benchmark.py | janmotl/iinc | 45c08b7aa341969e9cbcb8e4e8f757df8611c143 | [
"BSD-3-Clause"
] | null | null | null | import openml
import pandas as pd
import numpy as np
from sklearn import metrics
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
# Measures
# Dataset list
openml_list = openml.datasets.list_datasets()
datalist = pd.DataFrame.from_dict(openml_list, orient='index... | 49.743243 | 315 | 0.732681 | import openml
import pandas as pd
import numpy as np
from sklearn import metrics
from sklearn.neighbors import KNeighborsClassifier
from sklearn.preprocessing import OneHotEncoder
from sklearn.model_selection import train_test_split
import iinc
# Measures
def brier_multi(targets, probs):
enc = OneHotEncoder(handl... | 0 | 0 | 0 | 0 | 0 | 179 | 0 | 16 | 66 |
25349641f6de6d6a7781623e9b135442bcf04a8a | 234 | py | Python | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | src/config.py | takeruadelbert/epass-barrier-gate | 62af69bef52dddc6da74b74bd2fdaff1ee166988 | [
"Unlicense"
] | null | null | null | # Server Configuration
ip_address_server = "http://192.168.88.204"
url = "/epass2018/parking_outs/api_member_out"
timeout_connection = 30 # in second(s)
retry_connect = 3 # in second(s)
# HID Configuration
hid_name = "Sycreader RFID" | 29.25 | 46 | 0.760684 | # Server Configuration
ip_address_server = "http://192.168.88.204"
url = "/epass2018/parking_outs/api_member_out"
timeout_connection = 30 # in second(s)
retry_connect = 3 # in second(s)
# HID Configuration
hid_name = "Sycreader RFID" | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6fe86046db560d660afca7e32d8640d5918dda43 | 19,494 | py | Python | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | textworld/generator/text_grammar.py | zhaozj89/TextWorld | c6b626af9e5fbd3bc03e98cbf154f85bfc365373 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
NB_EXPANSION_RETRIES = 20
| 36.437383 | 120 | 0.579306 | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
import glob
import re
import warnings
from os.path import join as pjoin
from collections import OrderedDict, defaultdict
from typing import Any, Optional, Mapping, List, Tuple, Container, Union
from numpy.random import Rand... | 0 | 968 | 0 | 17,456 | 0 | 442 | 0 | 142 | 359 |
5264a57f02fed651ceacadfeeeba02d14ca19210 | 9,877 | py | Python | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | 2 | 2021-11-11T18:05:04.000Z | 2022-03-14T05:58:01.000Z | WMemPy/wmem_process.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | # pylint: disable=unused-wildcard-import,c-extension-no-member,too-many-instance-attributes,no-self-use,raise-missing-from,no-member,wildcard-import
"""Provides a wrapper for Windows Process defined by PID"""
| 45.100457 | 148 | 0.625899 | # pylint: disable=unused-wildcard-import,c-extension-no-member,too-many-instance-attributes,no-self-use,raise-missing-from,no-member,wildcard-import
"""Provides a wrapper for Windows Process defined by PID"""
from ctypes import *
from ctypes.wintypes import *
from wmempy.wmem_system import WinSys as WSys
from wmempy.wm... | 0 | 0 | 0 | 9,236 | 0 | 0 | 0 | 144 | 287 |
7d451f5323aa19b8599666accc236e26ee518fd2 | 229 | py | Python | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | setup.py | vankhoa21991/patho_toolbox | 11489e958500505d501bcd11ea5c944d7629ea0f | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='patho_toolbox',
version='',
packages=[''],
url='',
license='',
author='vankhoa',
author_email='vankhoa21991@gmail.com',
description='pathology toolbox'
)
| 17.615385 | 42 | 0.628821 | from setuptools import setup
setup(
name='patho_toolbox',
version='',
packages=[''],
url='',
license='',
author='vankhoa',
author_email='vankhoa21991@gmail.com',
description='pathology toolbox'
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
47c2512a34ee31d766ae393446ae08da6bf325c4 | 5,982 | py | Python | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 1 | 2020-05-11T14:31:54.000Z | 2020-05-11T14:31:54.000Z | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 4 | 2017-08-31T11:16:08.000Z | 2020-07-10T22:31:45.000Z | KaSaAn/scripts/kappa_snapshot_largest_complex_time.py | hmedina/KaSaAn | 83e4e31ff0e0062762aacfbc65bbdd290808bb51 | [
"MIT"
] | 2 | 2018-02-06T20:53:26.000Z | 2019-05-11T18:05:38.000Z | #! /usr/bin/env python3
"""
Plot the compostion of the giant component in time from a set of snapshots located in a directory.
``` {.text}
usage: kappa_snapshot_largest_complex_time
[-h] Show detailed help.
[-d DIRECTORY] Directory where snapshots are stored, default is <.>
[-p PATTERN] ... | 62.3125 | 120 | 0.643765 | #! /usr/bin/env python3
"""
Plot the compostion of the giant component in time from a set of snapshots located in a directory.
``` {.text}
usage: kappa_snapshot_largest_complex_time
[-h] Show detailed help.
[-d DIRECTORY] Directory where snapshots are stored, default is <.>
[-p PATTERN] ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
338d79644608d97295496fc4dd95f33db6d74aa4 | 13,806 | py | Python | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | tempest/api/orchestration/stacks/test_existing_stacks.py | BeenzSyed/tempest | 7a64ee1216d844f6b99928b53f5c665b84cb8719 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | 42.349693 | 118 | 0.582211 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | 0 | 7,036 | 0 | 5,811 | 0 | 0 | 0 | 8 | 244 |
16433fd0eaba504876fc441b4688280ba16568d0 | 3,413 | py | Python | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | mlcl/profiling/__main__.py | tmplxz/carelabels | 7e9b93ffa05d6f3e6a598ffb79cef3df7aecac68 | [
"MIT"
] | null | null | null | import json
import argparse
from mlcl.init_implementation import init_implementation
if __name__ == '__main__':
try:
parser = argparse.ArgumentParser()
parser.add_argument('--profiling-method', help='Type of profiling that shall be run.')
parser.add_argument('--implementation', help='Imp... | 39.229885 | 105 | 0.592148 | import json
import argparse
from mlcl.init_implementation import init_implementation
if __name__ == '__main__':
try:
parser = argparse.ArgumentParser()
parser.add_argument('--profiling-method', help='Type of profiling that shall be run.')
parser.add_argument('--implementation', help='Imp... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46255fc0076b78ef7dea4769f2f2add194d3ad05 | 3,208 | py | Python | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | tests/bugs/core_4653_test.py | reevespaul/firebird-qa | 98f16f425aa9ab8ee63b86172f959d63a2d76f21 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# id: bugs.core_4653
# title: Crash on infinite mutual SP calls (instead of "Too many concurrent executions of the same request.")
# decription: 20150108: crach every even run, WI-T3.0.0.31529, Win XP SP3
# tracker_id: CORE-4653
# min_versions: ['3.0']
# versions: 3.0
# qmid: ... | 28.900901 | 116 | 0.620012 | #coding:utf-8
#
# id: bugs.core_4653
# title: Crash on infinite mutual SP calls (instead of "Too many concurrent executions of the same request.")
# decription: 20150108: crach every even run, WI-T3.0.0.31529, Win XP SP3
# tracker_id: CORE-4653
# min_versions: ['3.0']
# versions: 3.0
# qmid: ... | 0 | 269 | 0 | 0 | 0 | 0 | 0 | 0 | 46 |
fe6fd95012a32e29c0720d68aab1f4f2e92a6982 | 3,003 | py | Python | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null | day16/main.py | urosZoretic/adventofcode2021 | aa55b9ba9d07ef70ad2ecfd0b72b14329e7685ba | [
"Apache-2.0"
] | null | null | null |
## these code solution is from: https://github.com/danielgaylord/coding-exercises/blob/main/Advent%20of%20Code/2021-Day16.py
# Read puzzle input and return as usable data structure
# Find value of a literal value subpacket
# Recursive function to decode packets and subpackets
if __name__ == "__main__":
# ... | 32.641304 | 124 | 0.594073 | import functools
## these code solution is from: https://github.com/danielgaylord/coding-exercises/blob/main/Advent%20of%20Code/2021-Day16.py
# Read puzzle input and return as usable data structure
def parse_input(file):
hex_vals = []
with open(file, 'r') as input:
for line in input:
hex_v... | 0 | 0 | 0 | 0 | 0 | 2,310 | 0 | -5 | 111 |
170d9421a56a71f1df8912ac209bb0aa9e5b3e00 | 2,278 | py | Python | simulations/old/player_model/get_parameters.py | hawkrobe/fish | 2000e46c397f7c95bba8ecb0c6afd26013929ff8 | [
"MIT"
] | 1 | 2015-12-11T16:51:08.000Z | 2015-12-11T16:51:08.000Z | simulations/old/player_model/get_parameters.py | hawkrobe/fish | 2000e46c397f7c95bba8ecb0c6afd26013929ff8 | [
"MIT"
] | 3 | 2020-02-11T21:36:11.000Z | 2020-11-01T21:25:17.000Z | simulations/old/player_model/get_parameters.py | hawkrobe/couzin_replication | ff491639954f0652d6b4b2a318477bb54c38fadf | [
"MIT"
] | null | null | null |
import os
import pandas as pd
from sklearn import gaussian_process
data = []
in_dir = '../../new-processed/'
out_dir = '../../modeling/'
light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01']
pars = None
smoothed = {}
x = []
y = []
for light_field in light_fields:
par_sweep = pd.read_csv(out_dir + light... | 24.494624 | 90 | 0.585162 |
import os
import pandas as pd
from fit_simple import *
from social_heuristic import *
from baseline_model import *
from test_model import *
from sklearn import gaussian_process
data = []
in_dir = '../../new-processed/'
out_dir = '../../modeling/'
light_fields = ['0-1en01', '1-1en01', '2-1en01', '3-1en01']
pars ... | 0 | 0 | 0 | 0 | 0 | 146 | 0 | 22 | 112 |
bcbeceac480554b5faf16ed262ff680290dfda1a | 3,123 | py | Python | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | 1 | 2021-07-28T15:17:58.000Z | 2021-07-28T15:17:58.000Z | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | null | null | null | misc/make_compare_red_crn_lvls.py | LBJ-Wade/correlated_noise_pta_2020 | 1990d3aa4f2d436f84fcfb19317b00b11590c230 | [
"MIT"
] | 2 | 2021-08-17T01:57:23.000Z | 2022-01-21T21:36:50.000Z | import os
import json
import glob
import numpy as np
from matplotlib import pyplot as plt
from enterprise_warp.results import suitable_estimator
crn_lvl_dir = '/fred/oz002/bgoncharov/correlated_noise_pta_2020_out/dr2_timing_20200607/20200908_20200917_cpl_vargam_x1psr/noisefiles/'
pe_lvl_dir = '/fred/oz002/bgoncharov/... | 32.873684 | 135 | 0.685239 | import os
import json
import glob
import numpy as np
from matplotlib import pyplot as plt
from enterprise_warp.results import suitable_estimator
crn_lvl_dir = '/fred/oz002/bgoncharov/correlated_noise_pta_2020_out/dr2_timing_20200607/20200908_20200917_cpl_vargam_x1psr/noisefiles/'
pe_lvl_dir = '/fred/oz002/bgoncharov/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b48a9b03108984d9c53cc37df35ae30bc5e8b2ac | 455 | py | Python | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | null | null | null | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | null | null | null | equipment/serializers/weapon.py | SamusChief/myth-caster-api | 76a43f48b70c6a4b509c90757d7906689799cc25 | [
"MIT"
] | 1 | 2021-08-14T18:46:52.000Z | 2021-08-14T18:46:52.000Z | """ Weapon serializers. """
| 28.4375 | 57 | 0.727473 | """ Weapon serializers. """
from rest_framework import serializers
from common.serializers import OwnedModelSerializer
from equipment.models import Weapon, WeaponProperty
class WeaponSerializer(OwnedModelSerializer):
""" Serializer for Weapon model """
properties = serializers.PrimaryKeyRelatedField(
... | 0 | 0 | 0 | 259 | 0 | 0 | 0 | 77 | 90 |
95ddb6071c386db85b8d25141121cc15bb2ee64a | 1,485 | py | Python | script/gen_on.py | tmattio/js-bindings | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 18 | 2021-04-14T02:52:09.000Z | 2021-11-14T17:08:09.000Z | script/gen_on.py | tmattio/ocaml-ecmascript | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 4 | 2021-04-14T16:23:13.000Z | 2021-05-22T00:00:55.000Z | script/gen_on.py | tmattio/ocaml-ecmascript | 109076fe682c84eb1cf01c7f38ee1f4163fb3a9a | [
"MIT"
] | 1 | 2021-04-14T15:29:24.000Z | 2021-04-14T15:29:24.000Z | l = []
for el in l:
print(
f"""
module {el.capitalize().replace(".", "_")}Listener : sig
type t = ???
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
"""
)
print(
"""
type listener =
([
"""
)
for el in l:
print(
f"""
| `{el.capitalize().replace(".", "_")} of ... | 16.875 | 87 | 0.587879 | l = []
for el in l:
print(
f"""
module {el.capitalize().replace(".", "_")}Listener : sig
type t = ???
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
end
"""
)
print(
"""
type listener =
([
"""
)
for el in l:
print(
f"""
| `{el.capitalize().replace(".", "_")} of ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
255693d27895452ebb78b587fadbd7a5416d518a | 10,802 | py | Python | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | 1 | 2021-11-26T00:29:28.000Z | 2021-11-26T00:29:28.000Z | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | FIGURE5/figure5.py | adagj/ECS_SOconvection | d1bb935b37380f11e021a463c6a807d7527220a6 | [
"MIT"
] | null | null | null | i#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
YEAR: 2019 - 2021
@author: ADA GJERMUNDSEN
This script will reproduce FIGURE 5 in Gjermundsen et. al 2021
The data used for plotting is generated by scripts
contained in the same folder as this (FIGURE5)
"""
import xarray as xr
import warnings
warnings.simplefilte... | 44.089796 | 116 | 0.583781 | i#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
YEAR: 2019 - 2021
@author: ADA GJERMUNDSEN
This script will reproduce FIGURE 5 in Gjermundsen et. al 2021
The data used for plotting is generated by scripts
contained in the same folder as this (FIGURE5)
"""
import xarray as xr
import warnings
warnings.simplefilte... | 8 | 0 | 0 | 0 | 0 | 124 | 0 | 13 | 45 |
d95ddc6480d4533f071e64f4879e9316d5734897 | 15,513 | py | Python | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | 1 | 2020-08-30T01:47:45.000Z | 2020-08-30T01:47:45.000Z | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | null | null | null | test/test_5_export.py | meracan/s3-netcdf-api | 920d09ef7b1a205230ea2c76eabcb4853616992c | [
"MIT"
] | null | null | null | # from netCDF4 import Dataset,chartostring
# import binpy
import s3netcdfapi.export as export
input={
"name":"s3netcdfapi_test",
"cacheLocation":"../s3",
"localOnly":True,
"verbose":True,
"maxPartitions":40,
"autoRemove":False,
}
# def test_slf():
# with S3NetCDFAPI(input) as netcdf:
# ... | 49.5623 | 169 | 0.666667 | import os
import numpy as np
import pandas as pd
import json
import base64
# from netCDF4 import Dataset,chartostring
from netcdf import NetCDF
from s3netcdfapi import S3NetCDFAPI
# import binpy
import scipy.io as sio
from mbtilesapi import getTile,getVT,readVT,send,VT2Tile,Points2VT,getVTfromBinary
from s3netcdfapi.d... | 0 | 0 | 0 | 0 | 0 | 11,064 | 0 | 60 | 392 |
c3684a987ec596068589973e3b2e6fe8dbed7fec | 3,003 | py | Python | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | 13 | 2016-06-29T09:49:15.000Z | 2021-06-08T02:07:08.000Z | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | null | null | null | Average.py | litrin/MACD | 0a289967a7f0079f34807b038613a5acb9013a0f | [
"MIT"
] | 8 | 2016-07-26T09:21:20.000Z | 2020-09-16T02:08:38.000Z | # The MIT License (MIT)
#
# Copyright (c) 2016 Litrin Jiang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modi... | 26.342105 | 80 | 0.663337 | # The MIT License (MIT)
#
# Copyright (c) 2016 Litrin Jiang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modi... | 0 | 0 | 0 | 1,674 | 0 | 0 | 0 | 2 | 138 |
936a9a1671608a9987d9267ad61b1927c3c7eb55 | 4,676 | py | Python | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | 3 | 2020-09-21T15:12:29.000Z | 2021-02-19T08:17:51.000Z | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | null | null | null | GlobalNetConfirmed.py | UtopiaXC/CovidVisualization | 157d7c5585086a04396141ff3fa6bf9c373f8c58 | [
"MIT"
] | null | null | null | # coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
FileConfirmed=open('source/GlobalConfirm.csv', 'r')
lines_confirm=FileConfirmed.readlines()
lines_confirm.pop(0)
FileRecovered=open('source/GlobalRecovered.csv', 'r')
lines_recovered=FileRecovered.readlines()
lines_recovered.pop(0)
FileDeath=open('sou... | 27.186047 | 53 | 0.634731 | # coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
FileConfirmed=open('source/GlobalConfirm.csv', 'r')
lines_confirm=FileConfirmed.readlines()
lines_confirm.pop(0)
FileRecovered=open('source/GlobalRecovered.csv', 'r')
lines_recovered=FileRecovered.readlines()
lines_recovered.pop(0)
FileDeath=open('sou... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ec5c2456ac29075c683ca0c51c1b60da03a7b241 | 2,564 | py | Python | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | src/wavelet-FE/self_attention.py | Omekaago101/Intracranial-Hemorrhage-Classification | 4f53da3a3869be7b451edc558ef06c5c41083b4b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
#from nystrom_attention import Nystromformer
if __name__ == '__main__':
x = torch.rand((8,48,56,56))
net = SelfAttention().to(device="cuda")
y = net(x)
print(y.shape) | 30.52381 | 96 | 0.576443 | import torch
import torch.nn as nn
import numpy as np
from einops import rearrange
#from nystrom_attention import Nystromformer
import gc
import collections
import torch.nn.functional as F
class ConvBlock(nn.Module):
"""Some Information about ConvBlock"""
def __init__(self,channels,bn=False, activation=False,p... | 0 | 0 | 0 | 2,149 | 0 | 0 | 0 | -1 | 187 |
3cf160f7a77fc6b6dfd6144ab0fd462e658870c0 | 4,018 | py | Python | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 15 | 2020-12-23T13:56:49.000Z | 2021-12-10T11:04:23.000Z | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 41 | 2021-03-19T07:51:48.000Z | 2021-11-22T09:45:46.000Z | backend/commentapp/views.py | Lenend-KPU/LBS-Platform | 75ba24db8969248e74e9d974638977de1c0bc36a | [
"MIT"
] | 3 | 2021-03-24T15:18:24.000Z | 2021-09-11T14:51:35.000Z | import sys
sys.path.append("..")
# Create your views here.
| 36.862385 | 87 | 0.669487 | import sys
sys.path.append("..")
from utils import utils, responses
from django.http import HttpResponse, HttpRequest
from django.views import View
from rest_framework.views import APIView # For swagger
from documentapp.models import Document
from profileapp.models import Profile
from .models import Comment
# Create... | 147 | 0 | 0 | 3,585 | 0 | 0 | 0 | 108 | 214 |
e01dfca3e82b099db8f27bf53ee082c79b861ce9 | 425 | py | Python | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | 3 | 2020-02-18T20:12:05.000Z | 2020-05-03T02:32:00.000Z | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | 4 | 2021-04-08T20:17:43.000Z | 2021-06-10T19:03:57.000Z | config/settings/dev.py | oleg45202/serverless-django-zeit-now-master | 2b5ba45835f272870c6812e70857dda3047a1347 | [
"MIT"
] | null | null | null |
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ('*',)
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
INTERNAL_IPS = ('127.0.0.1',)
# Email settings for Mailhog.
# These need to match the settings in docker-compose.yml.
#
EMAIL_BACKEND = 'django.core.mail.b... | 20.238095 | 65 | 0.745882 | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ('*',)
CSRF_COOKIE_SECURE = False
SESSION_COOKIE_SECURE = False
INTERNAL_IPS = ('127.0.0.1',)
# Email settings for Mailhog.
# These need to match the settings in docker-compose.yml.
#
EMAIL_BACKEND =... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 22 |
15efe449f0f5e9d62a2db828a7eaba78409f172c | 665 | py | Python | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | examples/first/docxgen.py | ehki/WdBibTeX | f7c2e06dc920df9fe7d002310811c514b3c03848 | [
"MIT"
] | null | null | null | import os
import win32com.client as client
text = """
This sample document is generated by WdBibTeX.
Some text with dummy citation \\cite{enArticle1} will be converted \
to [1] by executing wdbibtex.
The list of bibliography is placed to the thebibliography command as follows:
\\thebibliography
"""
ap = client.Dis... | 19 | 77 | 0.712782 | import os
import win32com.client as client
text = """
This sample document is generated by WdBibTeX.
Some text with dummy citation \\cite{enArticle1} will be converted \
to [1] by executing wdbibtex.
The list of bibliography is placed to the thebibliography command as follows:
\\thebibliography
"""
ap = client.Dis... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
134979c651476ad581f1700b2b85aef18579d427 | 1,679 | py | Python | visitor_manage/src/migrations/0002_auto_20200616_1303.py | parth-27/Visitor-Management-System | 575b7ad1a4eecf65e764399ea53e836b8cf1768d | [
"MIT"
] | 3 | 2020-06-30T15:46:56.000Z | 2021-11-17T13:13:15.000Z | visitor_manage/src/migrations/0002_auto_20200616_1303.py | DipikaPawar12/Visitor-Management-System | 9585d8613daa4f5a0b0a81cce6850f79db768a64 | [
"MIT"
] | 1 | 2021-06-10T19:39:03.000Z | 2021-06-10T19:39:03.000Z | visitor_manage/src/migrations/0002_auto_20200616_1303.py | DipikaPawar12/Visitor-Management-System | 9585d8613daa4f5a0b0a81cce6850f79db768a64 | [
"MIT"
] | 1 | 2020-06-30T15:49:07.000Z | 2020-06-30T15:49:07.000Z | # Generated by Django 3.0.6 on 2020-06-16 13:03
| 34.265306 | 130 | 0.536629 | # Generated by Django 3.0.6 on 2020-06-16 13:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('src', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Admin',
fields=[
('gate', mode... | 0 | 0 | 0 | 1,565 | 0 | 0 | 0 | 19 | 46 |
4497e8a1d85d7e8c85a5ca1f77d24d913b7cbfce | 924 | py | Python | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2020-08-25T03:43:07.000Z | 2020-08-25T03:43:07.000Z | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | 1 | 2019-07-08T16:57:48.000Z | 2019-07-08T16:57:48.000Z | fn_geocoding/fn_geocoding/util/selftest.py | rudimeyer/resilient-community-apps | 7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from fn_geocoding.util.request_common import execute_call
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
log.addHandler(logging.... | 25.666667 | 83 | 0.600649 | # -*- coding: utf-8 -*-
# (c) Copyright IBM Corp. 2018. All Rights Reserved.
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
from fn_geocoding.util.request_common import execute_call
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
log.addHandler(logging.... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
37ea1c0d0887663f1225e51a7f63312d2bf8d531 | 17,560 | py | Python | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null | feder/monitorings/tests.py | efefre/feder | fdfe2f213266548fc40cea68ac72f739c8394b8e | [
"MIT"
] | null | null | null |
EXAMPLE_DATA = {
"name": "foo-bar-monitoring",
"description": "xyz",
"notify_alert": True,
"subject": "example subject",
"template": "xyz {{EMAIL}}",
"email_footer": "X",
"domain": 1,
}
| 38.091106 | 88 | 0.684624 | from unittest import skip
from unittest.mock import Mock, patch
from django.core import mail
from django.urls import reverse
from django.test import TestCase
from guardian.shortcuts import assign_perm, get_user_perms
from django.db.models import Count
from feder.cases.factories import CaseFactory
from feder.cases.mode... | 0 | 1,041 | 0 | 14,804 | 0 | 0 | 0 | 583 | 901 |
a569e6f7db2f9416cbb7b04dfb43953fd8372e18 | 5,596 | py | Python | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T06:54:08.000Z | 2022-01-05T06:54:08.000Z | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | null | null | null | noiseceiling/utils.py | lukassnoek/noiseceiling | b61beef7fc53ea931c6ad01a615cf17fa49e9569 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from tqdm import tqdm
def get_percentiles(x, n_percentiles=5):
""" Utility function to divide a particular variable up into
percentiles. """
return pd.qcut(x, q=n_percentiles, retbins=False, labels=False)
def reduce_repeats(X, y, categorical=False, use_index=Fa... | 32.16092 | 78 | 0.619371 | import numpy as np
import pandas as pd
from tqdm import tqdm
def get_percentiles(x, n_percentiles=5):
""" Utility function to divide a particular variable up into
percentiles. """
return pd.qcut(x, q=n_percentiles, retbins=False, labels=False)
def reduce_repeats(X, y, categorical=False, use_index=Fa... | 0 | 0 | 0 | 0 | 0 | 626 | 0 | 0 | 46 |
6bcb2c4bcb30f7c35923a1623f8b43a52b2f8b8a | 386 | py | Python | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | 6 | 2015-02-06T23:41:01.000Z | 2015-10-21T03:08:51.000Z | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | null | null | null | src/trusted/python_bindings/test_prog.py | MicrohexHQ/nacl_contracts | 3efab5eecb3cf7ba43f2d61000e65918aa4ba77a | [
"BSD-3-Clause"
] | 1 | 2019-10-02T08:41:50.000Z | 2019-10-02T08:41:50.000Z | # Copyright (c) 2010 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
if __name__ == "__main__":
Main(sys.argv[1:])
| 21.444444 | 72 | 0.722798 | # Copyright (c) 2010 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import naclimc
def Main(args):
sock_fd = int(args[0])
socket = naclimc.from_os_socket(sock_fd)
socket.imc_sendmsg("message from ... | 0 | 0 | 0 | 0 | 0 | 113 | 0 | -7 | 46 |
c281419785cad72978270652cfc1fc5ae7498622 | 1,272 | py | Python | redbrick/cli/input/uuid.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2020-11-26T04:25:15.000Z | 2020-11-26T04:25:15.000Z | redbrick/cli/input/uuid.py | redbrick-ai/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 33 | 2021-02-04T17:51:53.000Z | 2022-03-17T07:28:36.000Z | redbrick/cli/input/uuid.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2021-06-09T10:06:35.000Z | 2021-06-09T10:06:35.000Z | """Input uuid handler."""
| 30.285714 | 86 | 0.566038 | """Input uuid handler."""
import re
from typing import Optional
from InquirerPy import inquirer # type: ignore
from redbrick.cli.cli_base import CLIInputParams
class CLIInputUUID(CLIInputParams):
"""Input uuid handler."""
def __init__(self, entity: Optional[str], name: str) -> None:
"""Init handle... | 0 | 0 | 0 | 1,085 | 0 | 0 | 0 | 31 | 129 |
33c5e9480b93ef4989ecf1b8a8fb313a5cff3eb2 | 1,503 | py | Python | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 29 | 2021-07-26T07:16:38.000Z | 2022-03-27T15:10:34.000Z | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 176 | 2021-07-23T08:30:21.000Z | 2022-03-14T12:29:06.000Z | jinahub/rankers/SimpleRanker/tests/integration/test_ranker.py | albertocarpentieri/executors | 3b025b6106fca9dba3c2569b0e60da050273fa6e | [
"Apache-2.0"
] | 16 | 2021-07-26T20:55:40.000Z | 2022-03-18T15:32:17.000Z | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
| 28.358491 | 86 | 0.590153 | __copyright__ = "Copyright (c) 2021 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import subprocess
import numpy as np
import pytest
from jina import Document, DocumentArray, Flow
from simpleranker import SimpleRanker
def test_integration():
query = Document()
chunks = [Document(), Docum... | 0 | 319 | 0 | 0 | 0 | 896 | 0 | 26 | 158 |
68cafc3facaaf4c703925689eae9c1ac69c3d990 | 4,540 | py | Python | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | 1 | 2020-07-07T07:41:44.000Z | 2020-07-07T07:41:44.000Z | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | null | null | null | recsim/agents/cluster_bandit_agent_test.py | kittipatv/recsim | 63fcacb177a029196abe57910bde88f737d5cca0 | [
"Apache-2.0"
] | 1 | 2020-04-03T14:21:02.000Z | 2020-04-03T14:21:02.000Z | # coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 35.46875 | 80 | 0.680176 | # coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 0 | 0 | 0 | 3,609 | 0 | 0 | 0 | 60 | 112 |
0e2982b42679826389fae24fb2b70356f90c6791 | 1,045 | py | Python | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null | setup.py | aaronlyy/steamprofile | 43002e62f4924a2a2040a240ed1362c28ad7a8f5 | [
"MIT"
] | null | null | null |
from distutils.core import setup
setup(
name = 'steamprofile',
packages = ['steamprofile'],
version = '0.1.2',
license='MIT',
description = 'Gather Information about Profiles on Steam.',
author = 'Aaron Levi Can (aaronlyy)',
author_email = 'aaronlevican@gmail.com',
url = 'https://github.com/aaronlyy/... | 38.703704 | 146 | 0.650718 |
from distutils.core import setup
setup(
name = 'steamprofile',
packages = ['steamprofile'],
version = '0.1.2',
license='MIT',
description = 'Gather Information about Profiles on Steam.',
author = 'Aaron Levi Can (aaronlyy)',
author_email = 'aaronlevican@gmail.com',
url = 'https://github.com/aaronlyy/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
84b160cc341ab8df8be05b1c91068e2a5a7d3596 | 5,517 | py | Python | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/libs/indexing/report/report_generator.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | #!coding=utf8
from __future__ import unicode_literals
| 41.795455 | 111 | 0.686424 | #!coding=utf8
from __future__ import unicode_literals
import datetime
from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.template.loader import render_to_string
from django.utils import timezone
from django_datajsonar.models import Catalog, Node, Distribution
from series_tie... | 16 | 319 | 0 | 4,283 | 0 | 0 | 0 | 541 | 311 |
815f1e1abbc78fc9ddd8eca39275fd9d16addef8 | 816 | py | Python | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | 1 | 2020-09-08T03:38:23.000Z | 2020-09-08T03:38:23.000Z | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | null | null | null | tonic/torch/models/__init__.py | smallguoan/tonic | 245bf781952d418d39dda300e92afc2c47b661a3 | [
"MIT"
] | null | null | null | from .actor_critics import ActorCritic
from .actor_critics import ActorCriticWithTargets
from .actor_critics import ActorTwinCriticWithTargets
from .actors import Actor
from .actors import DetachedScaleGaussianPolicyHead
from .actors import DeterministicPolicyHead
from .actors import GaussianPolicyHead
from .actors im... | 34 | 67 | 0.852941 | from .actor_critics import ActorCritic
from .actor_critics import ActorCriticWithTargets
from .actor_critics import ActorTwinCriticWithTargets
from .actors import Actor
from .actors import DetachedScaleGaussianPolicyHead
from .actors import DeterministicPolicyHead
from .actors import GaussianPolicyHead
from .actors im... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
258d1e80ddda45c7467bbff9fa201635f907f6a3 | 104 | py | Python | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/tests/smoke_tests/__init__.py | Steamboat/cookiecutter-devops | 6f07329c9e54b76e671a0308d343d2d9ebff5343 | [
"BSD-3-Clause"
] | null | null | null | """
Tests to be run against production servers and APIs to make sure nothing broke in production.
"""
| 17.333333 | 93 | 0.740385 | """
Tests to be run against production servers and APIs to make sure nothing broke in production.
"""
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2bacc438a602edda92c3b4335b5c80c6ffff2cb0 | 5,018 | py | Python | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | 3 | 2021-10-24T01:26:14.000Z | 2021-11-15T12:04:47.000Z | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | 1 | 2022-03-23T11:39:39.000Z | 2022-03-23T11:39:39.000Z | scripts/knn.py | mhw32/temperature-as-uncertainty-public | d6c6f05dc217b6169f31ba25385cb4bcdd28ab6a | [
"MIT"
] | null | null | null | """
Nearest neighbor accuracy.
"""
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('exp_dir', type=str, help='experiment directory')
parser.add_argument('checkpoint_name', type=str, help='checkpoint name')
parser.add_argument('--dataset', type=st... | 35.338028 | 85 | 0.63053 | """
Nearest neighbor accuracy.
"""
import os
import torch
import numpy as np
from tqdm import tqdm
from copy import deepcopy
from dotmap import DotMap
from src.utils import utils
from torchvision import transforms
import torch.nn.functional as F
from torch.utils.data import DataLoader
from src.systems.simclr import Sim... | 0 | 2,964 | 0 | 0 | 0 | 897 | 0 | 166 | 355 |
7900766802225ae53d0725336087e8a594ca609e | 2,870 | py | Python | imcsdk/mometa/chassis/ChassisPowerMonitor.py | ecoen66/imcsdk | b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab | [
"Apache-2.0"
] | 31 | 2016-06-14T07:23:59.000Z | 2021-09-12T17:17:26.000Z | imcsdk/mometa/chassis/ChassisPowerMonitor.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 109 | 2016-05-25T03:56:56.000Z | 2021-10-18T02:58:12.000Z | imcsdk/mometa/chassis/ChassisPowerMonitor.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 67 | 2016-05-17T05:53:56.000Z | 2022-03-24T15:52:53.000Z | """This module contains the general information for ChassisPowerMonitor ManagedObject."""
| 42.835821 | 234 | 0.619164 | """This module contains the general information for ChassisPowerMonitor ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class ChassisPowerMonitorConsts:
pass
class ChassisPowerMonitor(ManagedObject):
"""This is Chassi... | 0 | 0 | 0 | 2,610 | 0 | 0 | 0 | 54 | 113 |
5fc4b0bd36b5d0e62e37982374c8b2782c3ea8b9 | 2,628 | py | Python | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | 2021/01/09.py | frankpiva/leetcode | 85540af1fd72ad9e92c5a6ad253b1aaeec5065d9 | [
"MIT"
] | null | null | null | """
Word Ladder
Given two words beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that:
Only one letter can be changed at a time.
Each transformed word must exist in the word list.
Return 0 if there is no such transform... | 32.444444 | 161 | 0.554795 | """
Word Ladder
Given two words beginWord and endWord, and a dictionary wordList, return the length of the shortest transformation sequence from beginWord to endWord, such that:
Only one letter can be changed at a time.
Each transformed word must exist in the word list.
Return 0 if there is no such transform... | 0 | 0 | 0 | 1,420 | 0 | 0 | 0 | 0 | 22 |
53a80c32182b4998b99ee4ddf1047e50efb124b9 | 838 | py | Python | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | zero_week/regular_strings/disemvowel_trolls.py | myusernameisuseless/rolling_scopes_ml | b29b6cdf0b4b0878fa2de7772e03885e61a86207 | [
"Apache-2.0"
] | null | null | null | """
Trolls are attacking your comment section!
A common way to deal with this situation is to remove all of the vowels from the trolls' comments,
neutralizing the threat.
Your task is to write a function that takes a string and return a new string with all vowels removed.
For example, the string "This website is for... | 29.928571 | 101 | 0.700477 | """
Trolls are attacking your comment section!
A common way to deal with this situation is to remove all of the vowels from the trolls' comments,
neutralizing the threat.
Your task is to write a function that takes a string and return a new string with all vowels removed.
For example, the string "This website is for... | 0 | 0 | 0 | 0 | 0 | 348 | 0 | 0 | 23 |
1a1008b893fec986a2c4d451a5a22a5023e07d2b | 254 | py | Python | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 28 | 2017-12-16T20:30:52.000Z | 2021-08-11T17:35:04.000Z | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 446 | 2017-11-16T15:21:40.000Z | 2021-06-10T20:14:21.000Z | series_tiempo_ar_api/apps/management/migrations/py3_empty_failed_queue.py | datosgobar/series-tiempo-ar-api | 6b553c573f6e8104f8f3919efe79089b7884280c | [
"MIT"
] | 12 | 2018-08-23T16:13:32.000Z | 2022-03-01T23:12:28.000Z | #! coding: utf-8
| 16.933333 | 50 | 0.633858 | #! coding: utf-8
from django.db import migrations
def noop(*_):
pass
class Migration(migrations.Migration):
dependencies = [
('management', '0016_auto_20180406_0916'),
]
operations = [
migrations.RunPython(noop),
]
| 0 | 0 | 0 | 156 | 0 | 1 | 0 | 11 | 68 |
523dbadf332a914724e35df3ab6697633b05a85a | 3,501 | py | Python | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 15 | 2019-02-25T20:25:29.000Z | 2021-02-27T17:57:38.000Z | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 3 | 2020-02-21T22:35:38.000Z | 2020-10-05T02:25:30.000Z | nrf5_mesh/tools/deviceutil/deviceutil.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 5 | 2019-06-29T21:03:57.000Z | 2021-06-15T06:16:20.000Z | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 38.472527 | 80 | 0.676949 | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 0 | 0 | 0 | 0 | 0 | 1,633 | 0 | -10 | 184 |
af4b523e4ed6e32ecd5ebfd3296d1d705a18543a | 6,586 | py | Python | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/client/database.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null |
#
if __name__ == '__main__':
test_db = ClientDatabase('test1')
# for i in ['test3', 'test4', 'test5']:
# test_db.add_contact(i)
# test_db.add_contact('test4')
# test_db.add_users(['test1', 'test2', 'test3', 'test4', 'test5'])
# test_db.save_message('test2', 'in', f'! {datetime.dateti... | 35.989071 | 112 | 0.601275 | import datetime
from common.variables import *
from sqlalchemy import create_engine, Table, Column, Integer, String, Text, MetaData, DateTime
from sqlalchemy.orm import mapper, sessionmaker
import os
class ClientDatabase:
'''
Класс - оболочка для работы с базой данных клиента.
Использует SQLite базу данн... | 2,256 | 0 | 0 | 4,524 | 0 | 0 | 0 | 90 | 133 |
f84a8397ef3e851abd2a53fbd8a1a9f8d9f8e337 | 1,348 | py | Python | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 7 | 2018-04-01T17:24:56.000Z | 2021-06-07T09:39:52.000Z | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 5 | 2018-03-31T18:24:52.000Z | 2019-10-09T16:27:49.000Z | functions/speed_final_mean.py | Hilvcha/PINGAN | 0eb1435750c2ce3dc5de3a50d390aae044360fd5 | [
"MIT"
] | 2 | 2020-03-04T08:48:54.000Z | 2021-06-07T09:39:51.000Z | # coding : utf-8
# created by wyj
# TERMINALNO, TIME, TRIP_ID, LONGITUDE, LATITUDE, DIRECTION, HEIGHT, SPEED, CALLSTATE, Y
| 49.925926 | 116 | 0.716617 | # coding : utf-8
# created by wyj
import pandas as pd
# TERMINALNO, TIME, TRIP_ID, LONGITUDE, LATITUDE, DIRECTION, HEIGHT, SPEED, CALLSTATE, Y
def speed_final_mean(train, test):
train_data = train[['TERMINALNO', 'TRIP_ID', 'SPEED']].groupby(['TERMINALNO', 'TRIP_ID'], as_index=False).mean()
train_final_data =... | 0 | 0 | 0 | 0 | 0 | 1,180 | 0 | -2 | 45 |
073eaa28b720cb3f5411d11770184747fee26b0a | 3,719 | py | Python | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 7 | 2015-01-30T04:38:42.000Z | 2017-09-05T13:22:48.000Z | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 1 | 2017-03-12T15:48:42.000Z | 2017-03-12T15:48:42.000Z | cryptopals/Set2/c16.py | arvinddoraiswamy/blahblah | 1b88a04d5fa479a49ee83464ff69ba49f22c1bd0 | [
"MIT"
] | 5 | 2016-03-28T17:32:14.000Z | 2021-12-15T16:35:12.000Z | import sys
import os
import re
import binascii
#Adding directory to the path where Python searches for modules
cmd_folder = os.path.dirname('/home/arvind/Documents/Me/My_Projects/Git/Crypto/modules/')
sys.path.insert(0, cmd_folder)
#Importing common crypto module
import block
if __name__ == "__main__":
userdata= ... | 36.821782 | 141 | 0.658241 | import sys
import os
import re
import binascii
#Adding directory to the path where Python searches for modules
cmd_folder = os.path.dirname('/home/arvind/Documents/Me/My_Projects/Git/Crypto/modules/')
sys.path.insert(0, cmd_folder)
#Importing common crypto module
import block
def process_and_decrypt_string(encrypted_... | 0 | 0 | 0 | 0 | 0 | 1,603 | 0 | 0 | 46 |
c8ddc217c109ee906b4b254b7f9aeec0652e9fd0 | 1,434 | py | Python | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | lib/CliPrinter.py | cynay/CynCrypto | 4ba920532588c9164f62b28f3f198c67b2ca374b | [
"WTFPL"
] | null | null | null | """
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = 'Yannic Schneider (v@vendetta.ch)'
__copyright__ = 'Copyright (c) 20xx Yannic Schneider'
__license__ = 'WTFPL'
__vcs_id__ = '$Id$'
__version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/
#
## Code goes here.
#... | 28.117647 | 86 | 0.569038 | """
Module Docstring
Docstrings: http://www.python.org/dev/peps/pep-0257/
"""
__author__ = 'Yannic Schneider (v@vendetta.ch)'
__copyright__ = 'Copyright (c) 20xx Yannic Schneider'
__license__ = 'WTFPL'
__vcs_id__ = '$Id$'
__version__ = '0.1' #Versioning: http://www.python.org/dev/peps/pep-0386/
#
## Code goes here.
#... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 |