repo_name stringlengths 7 111 | __id__ int64 16.6k 19,705B | blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 151 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_url stringlengths 26 130 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 42 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 14.6k 687M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 12
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 10.2M ⌀ | gha_stargazers_count int32 0 178k ⌀ | gha_forks_count int32 0 88.9k ⌀ | gha_open_issues_count int32 0 2.72k ⌀ | gha_language stringlengths 1 16 ⌀ | gha_archived bool 1
class | gha_disabled bool 1
class | content stringlengths 10 2.95M | src_encoding stringclasses 5
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 10 2.95M | extension stringclasses 19
values | num_repo_files int64 1 202k | filename stringlengths 4 112 | num_lang_files int64 1 202k | alphanum_fraction float64 0.26 0.89 | alpha_fraction float64 0.2 0.89 | hex_fraction float64 0 0.09 | num_lines int32 1 93.6k | avg_line_length float64 4.57 103 | max_line_length int64 7 931 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
maksim-prost/plan_for_day | 14,989,435,889,856 | 7385dbc66505c4a7a42638e4f71f25ca7635b992 | f832007907c8f18d9d9bbc702fad6880823e0d95 | /config.py | cf011518d1e0e16521a29f3338cfe1acc9e2f47e | [] | no_license | https://github.com/maksim-prost/plan_for_day | 2b1f18d76a67150964ba4dc06965544d8dbf9295 | 2d745d47cc5477d6b8399493fa23ddf48e2f8176 | refs/heads/main | 2023-07-19T09:19:19.897443 | 2021-09-08T11:08:35 | 2021-09-08T11:08:35 | 402,810,528 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import datetime
begin_day = 1
begin_month = 9
begin_year = 2021
BEGIN_DAY = datetime.datetime( begin_year,begin_month,begin_day)
TEMPLATE_WORKING_OUT = "Повторение обязанностей, работа с документацией, изучение документацией предварительного планирования."
list_dict_wath = [
{
'post' : "Помощник начал... | UTF-8 | Python | false | false | 1,573 | py | 3 | config.py | 3 | 0.560411 | 0.548415 | 0 | 42 | 26.47619 | 127 |
derickbenites/CS50-Course | 13,769,665,190,502 | 6af753ecc3cbf207b295fdae9e1111d9750d1583 | fa2ff2fbf70bebddffe206fe2a0663953cd22cfe | /pset6 - Python 🐍🧡/cash/cash.py | 693ddee7cf118968146cf54b5ffe14beeb254c24 | [] | no_license | https://github.com/derickbenites/CS50-Course | e51aaf8c1fedb37587c61540739fc9e970288322 | 7ec989aca875c34200a0e97eb479a3d241e95568 | refs/heads/master | 2023-03-17T18:14:53.707017 | 2020-12-23T20:46:00 | 2020-12-23T20:46:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from cs50 import get_float
cash = get_float("cash: ")
while True:
if cash >= 0:
cents = int(cash * 100)
c25 = int(cents / 25)
c10 = int((cents - (c25 * 25)) / 10)
c5 = int((cents - (c25 * 25) - (c10 * 10)) / 5)
c1 = int(cents - (c25 * 25) - (c10 * 10) - (c5 * 5))
... | UTF-8 | Python | false | false | 408 | py | 31 | cash.py | 6 | 0.45098 | 0.340686 | 0 | 18 | 21.611111 | 60 |
Hoheckell/djang2crud | 3,367,254,400,418 | acfa1e3a954cd1cabc98c9001fa5a457e24f8f62 | 69ee4238213b252f52b8e8e908829a0caf88d629 | /crud/forms.py | 74e400afe2b22c81d7e2a38d3475b2e123d2c1e5 | [] | no_license | https://github.com/Hoheckell/djang2crud | bd3c29aa78c707f1e09bdd336bb41a3d03c1932a | 7214287a31c212fa2d704a71898b57044e6f1719 | refs/heads/master | 2022-12-13T13:38:00.371805 | 2022-12-05T21:53:45 | 2022-12-05T21:53:45 | 134,580,708 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from crud.models import User
class UserForm(forms.Form):
nome = forms.CharField(label='Nome', max_length=100,widget=forms.TextInput(attrs={'class': 'form-control'}))
email = forms.EmailField(label='Email',max_length=100,widget=forms.TextInput(attrs={'class': 'form-control'}))
passw... | UTF-8 | Python | false | false | 831 | py | 6 | forms.py | 3 | 0.708785 | 0.694344 | 0 | 15 | 54.4 | 115 |
dartrevan/ChemTextMining | 4,475,355,944,569 | 21dcb23210491b2e47d82180d10ae6ccb64ebd97 | c40bffd0b96cee19fba7eee4dc7cadcd9b978f97 | /evaluation/eval.py | c252dfb06bb957950dafff706a37181ed3ffb494 | [] | no_license | https://github.com/dartrevan/ChemTextMining | 926bfd3adf07ca6aa59a07ef281881208813332c | 87756d1b088a0a366be43c9dbb1bd9528cdbf4b5 | refs/heads/master | 2022-12-11T11:37:36.497988 | 2019-10-25T08:59:54 | 2019-10-25T08:59:54 | 80,611,797 | 25 | 4 | null | false | 2022-11-21T20:45:05 | 2017-02-01T10:57:22 | 2022-05-18T11:01:16 | 2022-11-21T20:45:01 | 1,666,528 | 22 | 3 | 15 | Python | false | false | # coding=utf-8
import sys
import optparse
import codecs
import json
from lxml import etree
def get_terms(item, gold, task, type):
units = []
review_id = int(item.get("id"))
content = item.get("text")
if gold:
terms = item.get("entities").values()
else:
terms = item.get... | UTF-8 | Python | false | false | 6,109 | py | 51 | eval.py | 13 | 0.548535 | 0.542315 | 0 | 172 | 33.517442 | 128 |
Deathik/moneycalc | 1,262,720,420,979 | 44f818a92fb444586094691adf1c04e1bd64e68a | 1053e4eed739ea12557104de36b95c1b813c3d76 | /moneycalc/settings.py | 40594fb83223dd74394bb2c582e5c96589bac091 | [] | no_license | https://github.com/Deathik/moneycalc | 6afbc3a67d41cf8a1dc7b3e2f02eefd59138f253 | 7821b55d8b97cbda98943c76b30d720b90293e21 | refs/heads/master | 2021-01-11T23:54:14.065469 | 2018-10-05T12:35:53 | 2018-10-05T12:35:53 | 78,640,579 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Django settings for moneycalc project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
""... | UTF-8 | Python | false | false | 4,548 | py | 41 | settings.py | 24 | 0.67788 | 0.650616 | 0 | 152 | 27.934211 | 106 |
blancamm/k_pygame | 3,470,333,605,241 | b3cb2d2f586d06576b26c4c5ee6d2eb0ea955e88 | ca191c56f9b58793b3ce4bcb876cfee7d4ccea1a | /arkanoid/escenes.py | d450783f369a43b7af61886f4423089fc9c7ccff | [] | no_license | https://github.com/blancamm/k_pygame | 998b2ff1617472a8431996626e268aff176bd57d | 2e630b640d2b19ca0cbad8c3ba9c6f747d4ee7be | refs/heads/master | 2023-04-25T13:49:48.658440 | 2021-05-11T20:08:16 | 2021-05-11T20:08:16 | 361,891,993 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from arkanoid import ANCHO, ALTO, levels, FPS
from arkanoid.entities import Marcador, Bola, Raqueta, Ladrillo, CuentaVidas
from random import randint, choice
import sys
import pygame as pg
from enum import Enum
class Escene():
def __init__(self, pantalla):
self.pantalla = pantalla
self.TodoGroup... | UTF-8 | Python | false | false | 4,735 | py | 11 | escenes.py | 10 | 0.580904 | 0.570131 | 0 | 150 | 30.506667 | 156 |
picografix/learning101 | 12,936,441,533,523 | 8f236095ec558c6d6ff25d7a03247ab8284b3a06 | b4a08bfb058df822e4fd7c2fdb838dcd783e0af9 | /Task3/chapter2_tutorials/src/circle.py | e46bbd33b209b1406c6fec921966302721c229b3 | [] | no_license | https://github.com/picografix/learning101 | f059b2f01bb89be80eba486e78ab03ba99be2d93 | d0c964b437dd781a823b07bbd69d21ae97781e5d | refs/heads/master | 2022-12-27T09:24:18.726550 | 2020-04-18T10:14:39 | 2020-04-18T10:14:39 | 258,752,775 | 1 | 1 | null | true | 2020-10-16T14:45:24 | 2020-04-25T10:54:17 | 2020-04-25T10:54:19 | 2020-10-16T14:45:21 | 39,116 | 0 | 1 | 1 | null | false | false | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
def move():
# Starts a new node
rospy.init_node('robot_cleaner', anonymous=True)
velocity_publisher = rospy.Publisher('/turtle1/cmd_vel', Twist, queue_size=10)
vel_msg = Twist()
#Receiveing the user's input
print("Let's mak... | UTF-8 | Python | false | false | 1,678 | py | 22 | circle.py | 20 | 0.620381 | 0.607271 | 0 | 57 | 28.438596 | 82 |
BaskerShu/typeidea | 8,959,301,789,263 | d374aa9b8deb6f352f28d986c1dfb0a820355ace | 2408b2c4f15abfc2b2180a7670b0d5a272415b2e | /setup.py | 07f81dd0eda0de993ecf0616bbbecf63c5bfe462 | [
"MIT"
] | permissive | https://github.com/BaskerShu/typeidea | 3cae3ea65a1755a7761fd46364d0b7235391e768 | 3b09cd334510738721ec1c73a0713e9e9351456c | refs/heads/master | 2021-01-22T04:05:17.712814 | 2018-02-26T13:58:08 | 2018-02-26T14:05:17 | 102,263,492 | 0 | 0 | null | false | 2017-10-13T11:26:04 | 2017-09-03T12:36:37 | 2017-09-03T13:37:11 | 2017-10-13T11:26:04 | 28 | 0 | 0 | 0 | Python | null | null | from setuptools import find_packages, setup
packages = find_packages('typeidea')
print(packages)
setup(
name='typeidea',
version='1.0.4',
url='https://www.ysz.com/',
author='Lion',
author_email='yangshuzhi@outlook.com',
packages=packages,
package_dir={
'': 'typeidea',
},
inc... | UTF-8 | Python | false | false | 1,040 | py | 55 | setup.py | 34 | 0.530769 | 0.463462 | 0 | 39 | 25.666667 | 44 |
skoc/tumor-bud-detection | 3,710,851,785,737 | d0c06b80b0f3f88302a482ec7ade67cfa6e1fa13 | 685c8afe181d430491daa8f1214df64054b07431 | /utils/visualizations.py | 77b3d92a65f9da32bd6d47d414010fd1dedd9537 | [] | no_license | https://github.com/skoc/tumor-bud-detection | 48daf03041ccef4a4eecc33bcd4a11cbe8363e6a | 860635f6226dc033cbe7c39c4e297a999c1fab7a | refs/heads/main | 2023-07-29T15:06:15.922354 | 2021-09-15T15:05:20 | 2021-09-15T15:05:20 | 359,135,564 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from utils.utils import *
def get_iou(gt, pr, n_classes, EPS=1e-12):
class_wise = np.zeros(n_classes)
for cl in range(n_classes):
intersection = np.sum((gt == cl)*(pr == cl))
union = np.sum(np.maximum((gt == cl), (pr == cl)))
iou = float(intersection)/(union + EPS)
class_... | UTF-8 | Python | false | false | 6,985 | py | 18 | visualizations.py | 9 | 0.577237 | 0.558482 | 0 | 185 | 36.762162 | 179 |
pahaz/exploit_farm | 17,403,207,513,116 | 47e0b654d415ad1ca9386d3a99ce64006da78524 | b250a7de577648c363b08c23e7375496e930d73d | /spl_example2_never_exits.py | 3a3ce73ff5cb833de2f50cc4c85aee3fc3b08f76 | [] | no_license | https://github.com/pahaz/exploit_farm | 73fb8f42d56b77ec6db39934994f3502a3d7f8e2 | 4d539a5d6564a3a9281b51322e31b323a473f538 | refs/heads/master | 2023-08-26T20:00:24.434872 | 2012-06-16T07:17:18 | 2012-06-16T07:17:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python2
import random
import time
import os
import sys
# force line buffering for stdout
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1)
letters="1234567890abcdef"
while True:
flag=""
for i in range(32):
flag+=random.choice(letters)
print flag
time.... | UTF-8 | Python | false | false | 329 | py | 3 | spl_example2_never_exits.py | 3 | 0.629179 | 0.583587 | 0 | 18 | 17.277778 | 51 |
nedwilson/general_lib | 15,470,472,200,430 | 8e0d686c9598eb3d1ddea91c068916d118a73769 | 0e8baaecdb57ee7fb11ddb4013cc2b20c0ecfceb | /nuke/hiero/Python/Startup/SpreadsheetExportCSVMenu.py | e888a68a9e4871276d6c46d7bc3836b1add511f4 | [] | no_license | https://github.com/nedwilson/general_lib | 907361fb0f9c836a90b8f22cbf985eac9da94789 | 3d3578e7cff3f747d9e41fd37620aca51ea24132 | refs/heads/master | 2022-02-13T13:27:38.514514 | 2019-07-17T02:09:26 | 2019-07-17T02:09:26 | 112,660,433 | 3 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # This Example shows how to register a custom menu to the Spreadsheet View and exports the contents of the Spreadsheet as a CSV file.
# Usage: Right-click on a row of the Spreadsheet, select Export > Spreadsheet to .CSV
# Note: The 'Action' column is not currently hooked up and it does not currently take 'Drop Frame' i... | UTF-8 | Python | false | false | 6,373 | py | 73 | SpreadsheetExportCSVMenu.py | 67 | 0.678487 | 0.675663 | 0 | 176 | 35.215909 | 168 |
holderdeord/hdo-transcript-search | 2,121,713,875,294 | 6253eabdb4b6dae89ebee95f52d21d6e7a6e7c50 | ba793fb0b4b7bc56d53489bd19201c2099443ef2 | /indexer/lib/hdo-transcript-indexer/extract_entities.py | df50d5fc53f0fc9717f17fbbc05dd92cf8382cb3 | [] | permissive | https://github.com/holderdeord/hdo-transcript-search | 27d38bdaabe2ef01db96c974d49fa2f2bbd6ec30 | 6fe920007ac07bf1adf009af8146e94cbd515d4a | refs/heads/master | 2022-12-17T16:29:45.236641 | 2020-12-28T11:45:38 | 2020-12-28T11:45:38 | 30,436,208 | 34 | 7 | BSD-3-Clause | false | 2022-12-07T08:24:01 | 2015-02-06T22:36:00 | 2022-05-25T10:49:47 | 2022-12-07T08:24:00 | 1,106 | 31 | 23 | 35 | JavaScript | false | false | from polyglot.text import Text
import json
import sys
txt = Text(sys.stdin.read())
txt.language = "no"
result = []
types = {
'I-PER': "person",
'I-ORG': "organisation",
'I-LOC': "location"
}
for chunk in txt.entities:
result.append({
"type": types[chunk.tag],
"text": str.join(' ', chunk),
"words... | UTF-8 | Python | false | false | 366 | py | 77 | extract_entities.py | 48 | 0.617486 | 0.617486 | 0 | 23 | 14.913043 | 33 |
arosemena/ml-learning | 4,724,464,028,160 | c4ebbcdc8726650d677919121d786d5e896137e1 | 1081920d757188c517d520d379f41f8a68f71fbd | /main.py | faeffe11c77215a079501592bdf8ee1532b1aa5d | [] | no_license | https://github.com/arosemena/ml-learning | c0882a27364a490e8c186b1cb400d41fa6636c1b | 8ce6f5a78152844ca2db288e7fb0012f5b3c33e6 | refs/heads/master | 2023-01-13T21:22:59.609467 | 2020-11-09T17:42:51 | 2020-11-09T17:42:51 | 311,418,159 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/local/bin/python3
from regression.linear import cost
import csv
#
with open('test_data/fish_stats.csv') as file:
reader = csv.reader(file)
for row in reader:
print(', '.join(row))
| UTF-8 | Python | false | false | 205 | py | 3 | main.py | 1 | 0.663415 | 0.658537 | 0 | 10 | 19.5 | 46 |
KartikKapur/Small-Projects | 11,948,599,037,676 | f8aa2366cdcf50c67ae6f1db29901449a2809f26 | fabcb3fe7e641ba433c82f0ec4258b94b622ef5e | /Euler/One_Ten.py | 79a849f139b7091b4bfe20b811cfd3310a64b361 | [] | no_license | https://github.com/KartikKapur/Small-Projects | 7d9bd7259c6d809a59f0c146b815901eb93fed57 | 91a9aa98f68960a3c5128ffab508c879d721c0c8 | refs/heads/master | 2017-12-04T16:36:42.269729 | 2017-01-01T10:10:45 | 2017-01-01T10:10:45 | 69,705,069 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #PROBLEM 1
# If we list all the natural numbers below 10 that are multiples of 3 or 5,
# we get 3, 5, 6 and 9.
# The sum of these multiples is 23.
# Find the sum of all the multiples of 3 or 5 below n
def three_and_five(n):
n-=1
if n >0:
if n% 3 == 0 or n% 5==0:
return n+three_and_five(n)
... | UTF-8 | Python | false | false | 2,848 | py | 7 | One_Ten.py | 6 | 0.576896 | 0.543188 | 0 | 118 | 23.101695 | 97 |
openvax/mhctools | 2,456,721,340,848 | 33ba3788360ca0399ef68d00e67917edf0e78c94 | 7fbf21ac567cac7ef447aa17b27188ba32c812c7 | /mhctools/mhcflurry.py | 31ebf0ebbb2f93276eba18e0dba664414553ca10 | [
"Apache-2.0"
] | permissive | https://github.com/openvax/mhctools | 11267f241b3a9cd5b7b5a2df69207aaee9c6ad1e | 441a650da0f669e67e881adc96db4248f384a0e7 | refs/heads/master | 2023-08-08T18:52:33.516173 | 2023-08-01T19:03:09 | 2023-08-01T19:03:09 | 31,274,759 | 60 | 13 | Apache-2.0 | false | 2023-08-01T19:03:10 | 2015-02-24T18:23:59 | 2023-07-21T08:46:59 | 2023-08-01T19:03:09 | 462 | 74 | 16 | 16 | Python | false | false | # Copyright (c) 2017. Mount Sinai School of Medicine
#
# 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... | UTF-8 | Python | false | false | 3,784 | py | 45 | mhcflurry.py | 41 | 0.646142 | 0.641913 | 0 | 103 | 35.737864 | 74 |
ohtacaesar/hobby-electronics | 2,388,001,851,647 | 70298c536b0c44942cbe608357e6b15ac31824c5 | aaf075acd366db5348cdd4373f6889222fc73bfd | /setup.py | 4f1a4fb103e34025b359da27a56550a2f898d343 | [] | no_license | https://github.com/ohtacaesar/hobby-electronics | cc8eb344727dd04bcff04575b8a7180df1923d98 | 2fa54e014c7d2fd9045c1cb27db87d6812e40227 | refs/heads/master | 2019-05-23T11:08:17.460233 | 2017-05-22T05:13:16 | 2017-05-22T05:13:16 | 47,062,899 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from setuptools import setup
setup(
name='hobby-electronics',
version='0.0.1',
install_requires=[
'spidev',
'pytz',
],
packages=['hobbye'],
entry_points={
'console_scripts': [
'tempd = hobbye.temperature:main',
]
}
)
| UTF-8 | Python | false | false | 290 | py | 12 | setup.py | 2 | 0.517241 | 0.506897 | 0 | 16 | 17.125 | 46 |
malisal/streampie | 16,355,235,489,627 | c71c1ab55a27359c23e1b40ab1144b8e7f38cc15 | 1d1e1ff4614e085ad5187fbc6aa68a003a5f1ac2 | /examples/factor_pool.py | 89140849e5084cb9fb4b5657d00d148eca9bfbd8 | [
"MIT"
] | permissive | https://github.com/malisal/streampie | 9e83cf9ba51a7c241935d88f3821ed256de20133 | 7b1b24b01b234cd093a350f04ffaf1a4974282ad | refs/heads/master | 2021-01-10T07:51:44.333259 | 2016-04-20T17:11:07 | 2016-04-20T17:11:07 | 53,448,331 | 5 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from streampie import *
ints = [2498834631017, 14536621517459, 6528633441793, 1941760544137, 7311548077279,
8567757849149, 5012823744127, 806981130983, 15687248010773, 7750678781801,
2703878052163, 3581512537619, 12656415588017, 468180585877, 19268446801283,
5719647740869, 11493581481859, 36... | UTF-8 | Python | false | false | 644 | py | 9 | factor_pool.py | 5 | 0.666149 | 0.28882 | 0 | 20 | 31.15 | 84 |
llalma/IFB104_Assignment2 | 14,388,140,450,333 | 01dc09a47f156ba5f96c0cec82a8114e0ea53f3b | 5f8c2f6baec8ba0801819ed69aa3f42c444bc79f | /news_archivist.py | 7921234416550a63e2b50c4a0fbb9fdbd7af3d0f | [] | no_license | https://github.com/llalma/IFB104_Assignment2 | 0bcd31844854a095b4277a72245179ddba469e3c | 172fc9b133a7e2f2e70870a63aa1ca05ada68d22 | refs/heads/master | 2020-04-28T10:31:09.654702 | 2019-03-12T12:18:07 | 2019-03-12T12:18:07 | 175,204,043 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#-----Statement of Authorship----------------------------------------#
#
# This is an individual assessment item. By submitting this
# code I agree that it represents my own work. I am aware of
# the University rule that a student must not act in a manner
# which constitutes academic dishonesty as stated ... | UTF-8 | Python | false | false | 13,288 | py | 3 | news_archivist.py | 1 | 0.590321 | 0.570375 | 0 | 359 | 34.963788 | 234 |
ztkIsAlreadyTaken/rain | 6,622,839,617,417 | caec0efaad61c9fec42427c46931b71700a2e249 | 49b607d6ea398f1b25e3ae8f28ae158dc49d7ea2 | /rain/redis/cluster.py | 9e9f20b2337c6c4a775adb4d551c28284f4f86dd | [
"Unlicense"
] | permissive | https://github.com/ztkIsAlreadyTaken/rain | 3bb4c2d5dab80eb7a1543d77e90ffb2d452b49ea | 774e52d9d38c87d94105f77c2dfc70d99416b694 | refs/heads/master | 2020-03-18T04:04:55.409881 | 2019-12-01T09:51:05 | 2019-12-01T09:51:05 | 134,268,466 | 17 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import asyncio
from typing import List
from rain.redis.client import Redis
from rain.redis.others import crc16
# noinspection PyMissingConstructor
class RedisCluster(Redis):
def __init__(self, *nodes: dict):
self.nodes: List[Redis] = list(map(lambda x: Redis(**x), nodes))
self.size = len(nodes)
self._command... | UTF-8 | Python | false | false | 1,358 | py | 61 | cluster.py | 58 | 0.684831 | 0.681885 | 0 | 52 | 25.115385 | 71 |
abhinav-lv/Projects-Archive | 3,496,103,385,909 | 274a8b8aa39802b4e68dd82cb3976179bd355a26 | fa4c75393474723c2cf30048215d0d1eb923067a | /Machine Learning/14 OpenCV/ObjectTracking/main.py | e84d02be23c6f0fabf2758a7a1bdf1f01b288256 | [] | no_license | https://github.com/abhinav-lv/Projects-Archive | 9395bceb2ccd48904c1ae67154b263df4d28d5cc | 563c0d3cc2bd48db0974787952c4f2094e957767 | refs/heads/main | 2023-09-06T04:00:36.277052 | 2021-11-10T18:09:55 | 2021-11-10T18:09:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cv2
from tracker import *
tracker = EuclideanDistTracker()
cap = cv2.VideoCapture("highway.mp4")
# Object detection from stable camera
object_detector = cv2.createBackgroundSubtractorMOG2(
history=100, varThreshold=80)
while True:
ret, frame = cap.read()
frame = cv2.resize(frame, (720, 480))
... | UTF-8 | Python | false | false | 1,505 | py | 17 | main.py | 3 | 0.58804 | 0.528904 | 0 | 53 | 27.396226 | 66 |
staplezz/datathon2020 | 18,734,647,360,607 | 42922654252f675e33475d4beb8ab1f31c4ad1fc | f5884f559ec162f576715bc4afa63810251a897e | /paso1/parserXML.py | c4f0b47739dfecc1d2542040bd58503032546f50 | [
"MIT"
] | permissive | https://github.com/staplezz/datathon2020 | 1c04ce19ee59192f27ca1aaf5c2dcef200b4f002 | 476bdc85c3152cf1ed2aa1769ed0e4624eb5ca44 | refs/heads/master | 2022-03-29T14:03:19.634760 | 2020-01-25T16:17:02 | 2020-01-25T16:17:02 | 236,052,337 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from xml.etree import ElementTree
import os
import csv
'''
Parte 1 del proyecto de Datathon.
- Parser del xml dado de los autores hacia un archivo csv.
- Se incluyen los datos de los autores que tengan solo la etiqueta
- id_article y autor.
Además se extraen sólo las publicaciones con etiqueta "article" e
"inproceed... | UTF-8 | Python | false | false | 1,618 | py | 11 | parserXML.py | 6 | 0.719157 | 0.701178 | 0 | 60 | 25.883333 | 76 |
wecode-bootcamp-korea/22-Westagram-backend | 4,174,708,244,467 | 55ff2ef72477fa97cec958f19394f6f907b72aca | ecdb53a7a51f45c98a6a4447695048b7b730c51a | /students/sinjae/users/urls.py | ab5e9436b094f594f6bf136fecea4ff2b7a9ac83 | [] | no_license | https://github.com/wecode-bootcamp-korea/22-Westagram-backend | dd9e6df23c425c3cf1b9678ccf866638077eb95b | 843c8c2f52c6f74b725cbad1c4936dcaee630d94 | refs/heads/main | 2023-06-19T06:41:15.787859 | 2021-06-30T08:15:39 | 2021-06-30T08:15:39 | 379,212,367 | 0 | 0 | null | false | 2021-06-30T08:15:40 | 2021-06-22T09:24:40 | 2021-06-30T07:34:06 | 2021-06-30T08:15:40 | 399 | 0 | 1 | 10 | Python | false | false | from django.urls import path
from users.views import SignUp
urlpatterns = [
path("/signup", SignUp.as_view()),
path("/signin", SignUp.as_view()),
]
| UTF-8 | Python | false | false | 157 | py | 46 | urls.py | 41 | 0.66879 | 0.66879 | 0 | 7 | 21.428571 | 38 |
MaxPoon/Leetcode | 16,149,077,055,324 | 0dd51d6ee4ef9a937bcf41596125b45d1b30e15d | f0bbca88acab9f75a534c8b228f04abac33735f3 | /python/279.PerfectSquares_2.py | e128678f308588a560bd3ecefe382c56f2a51e91 | [] | no_license | https://github.com/MaxPoon/Leetcode | e4327a60d581f715a7c818b8e8e8aa472ed776c1 | 15f012927dc34b5d751af6633caa5e8882d26ff7 | refs/heads/master | 2020-09-17T05:33:13.877346 | 2019-05-09T04:34:54 | 2019-05-09T04:34:54 | 67,481,937 | 15 | 8 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def numSquares(self, n):
"""
:type n: int
:rtype: int
"""
if int(n**0.5)**2 == n: return 1
while n%4==0: n/=4
if n%8 == 7: return 4
for a in range(int(n**0.5),0,-1):
b = int((n-a*a)**0.5)
if a*a+b*b==n:
return 2
return 3 | UTF-8 | Python | false | false | 273 | py | 267 | 279.PerfectSquares_2.py | 265 | 0.516484 | 0.450549 | 0 | 14 | 18.571429 | 35 |
SindyPin/Python_Exercises | 3,547,643,029,961 | 628e21ffa75df19a0166bbc950f3536f12b89882 | 07734c4b43bb25a0ea0733e8dd35baa64cd33fcb | /Triangles.py | b3176b261332e52cb303c02a508ecb89dd614332 | [] | no_license | https://github.com/SindyPin/Python_Exercises | 0f99de4fbd79d4bcf0856aad0aeb45fe6acf4fd3 | 0080225f668bc62dc4fa620a90cc790ca031d6c4 | refs/heads/main | 2022-12-26T21:03:12.706001 | 2020-10-15T17:13:12 | 2020-10-15T17:13:12 | 304,394,918 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | sideA = float(input('Enter the first side value of the triangle: '))
sideB = float(input('Enter the second side value of the triangle: '))
sideC = float(input('Enter the third side value of the triangle: '))
if (sideA < sideB + sideC and sideB < sideA + sideC and sideC < sideA + sideB ) and (sideA == sideB == sideC):
... | UTF-8 | Python | false | false | 847 | py | 82 | Triangles.py | 81 | 0.68477 | 0.68477 | 0 | 12 | 69.583333 | 144 |
CallMeEricChiu/tensorflow2.0 | 755,914,268,868 | b5659627559fcb089ed6d6b306480bce48650d7b | 7902ebeeca1f603034ed3e1336a73db5a9d4c312 | /dropout.py | d8e028f1ca6a534c81773323e0da29115880cc36 | [] | no_license | https://github.com/CallMeEricChiu/tensorflow2.0 | 647c5058af4a91ca5c7b1bc5bc6745f2eb9b67a3 | 9abec41787ccf035613f6a793d220ff28138e138 | refs/heads/master | 2020-09-28T18:40:23.675583 | 2019-12-15T12:05:57 | 2019-12-15T12:05:57 | 226,837,215 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
import tensorflow as tf
from tensorflow.keras import datasets, layers, optimizers, Sequential
network = Sequential(
[
layers.Dense(256,'relu'),
layers.Dropout(0.5), # 0.5 rate to drop
layers.Dense(128,'relu'),
layers.Dropout(0.5),
layers.Dense(64,'relu'),
layers.Dense(32,'relu'),
... | UTF-8 | Python | false | false | 571 | py | 18 | dropout.py | 17 | 0.663063 | 0.61982 | 0 | 23 | 22.608696 | 69 |
dkyos/ai-architect | 6,270,652,254,541 | 6df1f1176571abe655acece3b154b4072ad3c543 | 897f3ae26b3d4b5b0b164db559fc40c61b64b9ef | /ai_architect/models/wd2vec.py | 401de87c6fd1170f919fcf0c0643c8beb11ca31f | [] | no_license | https://github.com/dkyos/ai-architect | 0b0dfa11df31774539ff05cddeba133a6a8bea22 | 1842cb5b409fd690a008ea787e0ce1b367abbc8b | refs/heads/master | 2020-05-23T12:05:33.683740 | 2019-05-20T14:38:52 | 2019-05-20T14:38:52 | 186,750,714 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# 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.apa... | UTF-8 | Python | false | false | 8,294 | py | 16 | wd2vec.py | 10 | 0.591994 | 0.578852 | 0 | 206 | 39.257282 | 99 |
bdgarcia/lpcoding_hsh | 12,051,678,271,946 | 49e9ac8c1d7b31a170b7c94b55250ba5eb135d92 | b1700806777706a0b43be41d0a60ebc9a7149d4b | /crearSubastas.py | d2965b085fa3a896473a4137410fceebcb063c8a | [] | no_license | https://github.com/bdgarcia/lpcoding_hsh | 62fffc2945ef50a3e9b6230144b73d1bbb6d9a58 | 1d99f850ee64f8855345ee1e3382080f4e3fcea1 | refs/heads/master | 2020-04-30T09:34:48.084356 | 2019-05-20T03:54:31 | 2019-05-20T03:54:31 | 176,752,160 | 0 | 0 | null | false | 2019-07-14T19:33:46 | 2019-03-20T14:30:01 | 2019-05-20T03:54:33 | 2019-07-14T19:33:46 | 2,981 | 0 | 0 | 0 | JavaScript | false | false | from modelos.models import (Subasta, Alquila, Residencia)
from application.cerrar_subasta import cerrarSubasta
import datetime
def cerrarSubastasDeLaSemana():
subastas = list(Subasta.objects.filter(semana_alquila=lunesEn6Meses))
print("Cerrando subastas de esta semana")
for subasta in subastas:
cer... | UTF-8 | Python | false | false | 1,503 | py | 22 | crearSubastas.py | 12 | 0.695276 | 0.683965 | 0 | 39 | 37.538462 | 184 |
mofei952/leetcode_python | 7,361,573,975,861 | fbb580f0ecc6fdc495fdc7093b61dcb34a9fbb52 | 9e2a209455beb93c1c0dc02c8b96eaa22780e7f3 | /array/059 Spiral Matrix II.py | f171a3026c01dba8d224ddbbd38be1c87c93cb32 | [] | no_license | https://github.com/mofei952/leetcode_python | 164f3e617b4a39348069c7db00571eaef9960152 | 7f8145f0c7ffdf18c557f01d221087b10443156e | refs/heads/master | 2022-08-21T08:26:22.397593 | 2022-07-17T13:13:05 | 2022-07-17T13:13:05 | 174,816,021 | 0 | 0 | null | false | 2021-08-06T15:27:20 | 2019-03-10T11:46:00 | 2021-08-06T15:26:44 | 2021-08-06T15:26:41 | 216 | 0 | 0 | 0 | Python | false | false | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : mofei
# @Time : 2019/12/1 12:14
# @File : 059 Spiral Matrix II.py
# @Software: PyCharm
"""
Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order.
Example:
Input: 3
Output:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
... | UTF-8 | Python | false | false | 2,249 | py | 156 | 059 Spiral Matrix II.py | 156 | 0.449978 | 0.417519 | 0 | 91 | 23.714286 | 104 |
engegreg/RefinanceML | 15,040,975,507,422 | ef2d9d060370611ecb32cd73f323d35c37e10b4c | 79d155bf2930c9e0b8e2107020fa77756669ad63 | /webapp.py | f574426f5cd17ee903c0ae3f1de04bcda0c204ed | [] | no_license | https://github.com/engegreg/RefinanceML | 64ff8eaeb79892b3047c977ce1b844cf9e833752 | 115b3f0b9c56fb09f7900d1db6cd8a023f5b3004 | refs/heads/main | 2023-07-01T10:22:04.187191 | 2021-08-10T05:48:24 | 2021-08-10T05:48:24 | 390,729,598 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pandas as pd
import streamlit as st
from xgboost import XGBClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, precision_score, \
recall_score, classification_report, roc_auc_score
df=pd.read_csv('loan_data_cl... | UTF-8 | Python | false | false | 1,578 | py | 4 | webapp.py | 1 | 0.726236 | 0.7218 | 0 | 58 | 26.206897 | 142 |
RomainL972/MachineMots | 1,391,569,444,834 | fa3f2006543687edae2ebc894a3f0a5b904e6bbf | 333d09084090cba0f86ff9d1fdd1d77faf2108c1 | /mots_trigrammes_generate.py | f84ad19a9dbab0967dcac4032cb3297bd522617a | [] | no_license | https://github.com/RomainL972/MachineMots | d4879fa6972632a03be7deac0e6c1d486a0ce889 | a7c724b512db4b42f9e08c27e8193cca42f36591 | refs/heads/main | 2023-08-25T02:08:35.083452 | 2021-10-09T14:02:17 | 2021-10-09T14:02:17 | 415,325,441 | 0 | 0 | null | true | 2021-10-09T14:02:38 | 2021-10-09T14:02:37 | 2021-10-02T10:45:48 | 2021-04-24T14:35:06 | 994 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Generates word from trigramm transition matrix stored in a binary file
Checks whether the word already exists
"""
import numpy as np
from numpy.random import choice
import codecs
# Build a dictionnary to check whether word already exists
filepath = "liste.de.mots.fra... | UTF-8 | Python | false | false | 1,232 | py | 4 | mots_trigrammes_generate.py | 2 | 0.563312 | 0.525162 | 0 | 52 | 22.692308 | 70 |
vincentndo/CS_168_-_Introduction_to_the_Internet-Architecture_and_Protocols | 14,147,622,289,106 | d313d3edd74203b3546079f4e3959318a547bfd8 | 74cc2c066c42ab3dac830273d4917d6b6e25d28a | /projects/proj1_chat/client.py | de81eba7d2f9d45e906816a61687bd95b452d64e | [] | no_license | https://github.com/vincentndo/CS_168_-_Introduction_to_the_Internet-Architecture_and_Protocols | f4fbb83dc1d01e0c77dc648e3ee06a8a242f7a7f | 23a876b27108111a7f88dabc7106ee8a33c9f11d | refs/heads/master | 2021-08-31T00:33:04.111430 | 2017-12-20T00:55:55 | 2017-12-20T00:55:55 | 105,010,790 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from MySocket import *
def process_string(client_socket, string):
string_list = string.split(" ")
if string_list[0] == "/join":
if len(string_list) < 2:
error_msg = utils.SERVER_JOIN_REQUIRES_ARGUMENT + '\n'
sys.stdout.write(error_msg)
else:
client_sock... | UTF-8 | Python | false | false | 2,797 | py | 9 | client.py | 8 | 0.540937 | 0.534144 | 0 | 99 | 27.252525 | 137 |
Tsingzao/MyLeetCode | 1,254,130,498,565 | ac96b58beb4726c18e18327980cb428704cb866c | 12ffde97db08a1d66fcee416a3aaf4607c153c50 | /Power of Three.py | 519505e90c153c7aafd07aa5b3a66b9f0ab1af4e | [] | no_license | https://github.com/Tsingzao/MyLeetCode | dc44ae5685bd6c8a62240394e8ae8dbfcec24301 | 421ea32d9fbe8d85479be6afa34881d1aa218ce3 | refs/heads/master | 2020-03-07T17:41:35.615720 | 2018-04-28T07:23:00 | 2018-04-28T07:23:00 | 127,617,953 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 12 09:13:50 2018
@author: Tsingzao
"""
class Solution(object):
def isPowerOfThree(self, n):
"""
:type n: int
:rtype: bool
"""
if n <= 0:
return False
while n == round(n) and n != 1:
... | UTF-8 | Python | false | false | 419 | py | 147 | Power of Three.py | 146 | 0.412888 | 0.372315 | 0 | 21 | 18.047619 | 39 |
BenJoey/felev4 | 14,139,032,367,261 | 03e7a706dfa0d5738935f1398916b84fcccda396 | 648faac19a60118ff1021be69ed4ce08d95356cf | /Script Nyelvek/bead3.py | b261535dbae6fac91ed5872eb59c10903428640f | [] | no_license | https://github.com/BenJoey/felev4 | 29324954dd2691be1b27b96a86741edd791a65db | 389240edf4a81f532f9a2a09ef68c658e3cb4d42 | refs/heads/master | 2020-03-08T19:35:35.623191 | 2018-06-23T10:28:29 | 2018-06-23T10:28:29 | 128,358,030 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import glob, os, io
files = []
def CreateFunc(str):
vissza=[]
tmp=str[:str.find('{')]
arg=str[str.find('{'):]
if "CIKLUS" in tmp:
vissza.append("for"+tmp.lstrip("CIKLUS").rstrip()+" :")
else:
vissza.append("if"+tmp.lstrip("ELAGAZAS").rstrip()+" :")
val = arg.split(";;")
tmp... | UTF-8 | Python | false | false | 932 | py | 46 | bead3.py | 34 | 0.51073 | 0.506438 | 0 | 36 | 24.916667 | 64 |
yzspku/BiCNN | 9,792,525,450,760 | 624895427f16519bc21aa625a220f6b8c7581a1e | 08e6d7b7a390fc28a3397a9df137b0fa8728a294 | /main.py | 9fa2b274050d9ba15d7d8c94139279d476bbdc12 | [] | no_license | https://github.com/yzspku/BiCNN | a6438e22450d2d1b3de5a510760d69f121134491 | 97c74dfef675a82db0a6f9600d90aaf6164ef845 | refs/heads/master | 2020-04-07T02:35:21.984955 | 2018-11-17T12:24:54 | 2018-11-17T12:24:54 | 157,981,918 | 10 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import cub_200_2011 as dataset
import helper, utils
import model_global as glb, model_object as obj
import time
import torch
import torch.multiprocessing as mp
train_batch_size = 32
test_batch_size = 32
random_seed = 96
validation_size = 0.1
predict_weights = [0.2, 0.8]
use_multiple_gpu = False # run global model on... | UTF-8 | Python | false | false | 9,830 | py | 11 | main.py | 10 | 0.693591 | 0.686775 | 0 | 235 | 40.821277 | 158 |
Bejjox/BejjoLib | 12,670,153,575,084 | 6540f6d4e29fad489981ce0d556106263e305dcd | c56c053fac30f6af4a92becd4e6f4f1722967732 | /statc/static.py | c79e7fc43e6ececc6f5cde2d05c33b0747b5f2aa | [
"MIT"
] | permissive | https://github.com/Bejjox/BejjoLib | cee2f7c8a9f76f620c855818461246d50fb936b9 | ba0e595d40b49a025ef37ca3122c7b25d1a7ecca | refs/heads/master | 2022-11-26T01:29:00.810556 | 2020-08-04T18:20:39 | 2020-08-04T18:24:20 | 279,634,369 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | class statistika(object):
"""docstring for statistika"""
def __init__(self, arg):
super(statistika, self).__init__()
self.arg = arg
import numpy as np
print(dir(np.sum))
print(np.sum((3,4,5)))
| UTF-8 | Python | false | false | 217 | py | 12 | static.py | 10 | 0.603687 | 0.589862 | 0 | 8 | 26.125 | 42 |
ericfaurot/udon | 8,967,891,728,992 | ce97a70d3ddcef937e53e641126f22bc2fe1bc2b | 697136106fdb41256a0b3f75222880859ff2aa1b | /setup.py | 17f31d111cf66d41e4715a768b52f5e486f072a1 | [
"ISC"
] | permissive | https://github.com/ericfaurot/udon | bcf673cf8585a63077995ba8b17f5d8dd970c1f6 | 27c682d77a7236b73255d39505cff0f5b8e7d88f | refs/heads/master | 2021-06-21T17:11:59.502287 | 2020-11-13T15:25:20 | 2020-11-13T15:25:20 | 151,249,431 | 1 | 3 | ISC | false | 2020-11-26T21:01:01 | 2018-10-02T12:18:24 | 2020-11-13T15:25:33 | 2020-11-13T15:25:31 | 79 | 1 | 2 | 2 | Python | false | false | from distutils.core import setup
setup(name="udon",
description="Simple helpers for python apps",
version="0.17-dev",
author="Eric Faurot",
author_email="eric@faurot.net",
url="https://github.com/ericfaurot/udon",
classifiers = [
"Programming Language :: Python",
... | UTF-8 | Python | false | false | 681 | py | 27 | setup.py | 26 | 0.587372 | 0.580029 | 0 | 18 | 36.833333 | 73 |
dgpb/jobarts | 8,993,661,567,181 | 09db7d4ad1ee73e787af372cc4a56b90abd3b164 | b154ec1337c4b685062587498bfb8dec355a00b5 | /jobs/migrations/0006_auto_20201115_1336.py | 5de3184ccfff15968c0146c2ad0c3f92ce5830bb | [] | no_license | https://github.com/dgpb/jobarts | 759be69ac3a28f1e841024721115763dfe9d4231 | 07358e1a7907afc539eadf2052599b13edc7472a | refs/heads/main | 2023-05-12T04:15:25.848814 | 2021-06-02T14:33:19 | 2021-06-02T14:33:19 | 311,393,523 | 0 | 1 | null | false | 2021-06-02T01:55:11 | 2020-11-09T16:10:17 | 2021-06-02T01:18:54 | 2021-06-02T01:55:11 | 842 | 0 | 1 | 1 | JavaScript | false | false | # Generated by Django 3.1.2 on 2020-11-15 18:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0005_auto_20201113_2314'),
]
operations = [
migrations.AlterField(
model_name='job',
name='publication_date'... | UTF-8 | Python | false | false | 381 | py | 38 | 0006_auto_20201115_1336.py | 16 | 0.582677 | 0.501312 | 0 | 18 | 20.166667 | 47 |
castodius/adventofcode | 17,952,963,321,118 | f1d37394bb4c29f096487237b0f636da98e99a62 | a435c5d6b5e45550ad953bb88d3a98fbbabbab8a | /2018/3/easy.py | 20d72d532a83946d3d4c89ae968a2a42bcf1207c | [] | no_license | https://github.com/castodius/adventofcode | adc6aa275fab2c17dc2eb85a223171ef01acb03e | b5e3308da8a3f142b86f423ca70e81f1e99d390b | refs/heads/master | 2022-12-26T09:32:51.458765 | 2022-12-18T13:59:18 | 2022-12-18T13:59:18 | 161,826,301 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
side = 1200
m = [[0 for i in range(side)] for j in range(side)]
count = 0
for line in sys.stdin:
inp = line.strip().split(' ')
x,y = map(int, inp[2].strip(':').split(','))
sx,sy = map(int, inp[3].split('x'))
for cx in range(x,x+sx):
for cy in range(y,y+sy):
m[cx][cy] += 1
if(m[cx][... | UTF-8 | Python | false | false | 359 | py | 117 | easy.py | 114 | 0.537604 | 0.506964 | 0 | 18 | 18.944444 | 51 |
misrashashank/Competitive-Problems | 10,746,008,218,838 | 5360e1ffd617d80094dce776e5d012f45ead17ff | 1165e63f222dc7a139cb3005e205f27e44ed0826 | /implement_power_function.py | eaedf0b1a17fb0a6bc7199ed1f2f54fd378915d9 | [] | no_license | https://github.com/misrashashank/Competitive-Problems | ac6c80c6a7d8365004452552a06801ac002ef809 | bcd5517fe834062c9e941300ad07a37efdff9c75 | refs/heads/master | 2021-07-19T09:42:41.221405 | 2020-05-16T22:04:46 | 2020-05-16T22:04:46 | 162,201,028 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | '''
Implement pow(x, n), which calculates x raised to the power n (xn).
Example 1:
Input: 2.00000, 10
Output: 1024.00000
Example 2:
Input: 2.10000, 3
Output: 9.26100
Example 3:
Input: 2.00000, -2
Output: 0.25000
Explanation: 2-2 = 1/22 = 1/4 = 0.25
Note:
-100.0 < x < 100.0
n is a 32-bit signed integer, within the r... | UTF-8 | Python | false | false | 1,959 | py | 114 | implement_power_function.py | 114 | 0.472634 | 0.401535 | 0 | 85 | 22 | 77 |
zaoyuaner/Learning-materials | 1,795,296,344,027 | fc4160b5dfcad03bef4b8e8858ba39fe2ac135db | 07917881310fc81d85a2cbdf27c9b3c4fa03c694 | /python1901/1_python基础/day08/9.栈.py | 026aaab051eca256ee8021e2f7ba8946ab54c5af | [] | no_license | https://github.com/zaoyuaner/Learning-materials | 9bc9a127d1c6478fb6cebbb6371b1fd85427c574 | 1f468a6f63158758f7cbfe7b5df17f51e3205f04 | refs/heads/master | 2020-05-18T11:38:45.771271 | 2019-05-20T09:07:44 | 2019-05-20T09:07:44 | 184,384,050 | 2 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
# author:zhangjiao
'''
栈特点:先进后出
在python中,我们使用列表来模仿的栈结构
'''
mystack = []
mystack.append("1")
mystack.append("2")
mystack.append("3")
mystack.append("4")
mystack.append("5")
print(mystack)
print(mystack.pop())
print(mystack.pop())
print(mystack.pop())
print(mystack.pop())
pri... | UTF-8 | Python | false | false | 1,162 | py | 1,070 | 9.栈.py | 684 | 0.611828 | 0.592473 | 0 | 52 | 16.903846 | 49 |
soasme/riotpy | 14,379,550,524,492 | 5939193d5337906d2f4787c91a24c4559b0abc43 | 5a4784ae6326eec57b40d76b9dfa7d175770dfaa | /riot/tags/utils.py | dd85ad6269fd5dbf2b73d5cf7411d6de46a1d2f8 | [
"MIT"
] | permissive | https://github.com/soasme/riotpy | 1f6ab8fc6d138d23f0e7682bd75a670373e575c8 | 41b61bb2e1d0d6e60c62f514d90b77bd7c80204b | refs/heads/master | 2021-01-10T01:01:11.567560 | 2015-09-05T11:54:40 | 2015-09-05T11:54:40 | 40,594,039 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from functools import wraps
from urwid import AttrMap
from pyquery import PyQuery
from ..ui import IfWidget
def convert_string_to_node(string):
return PyQuery(string)
def detect_class(f):
@wraps(f)
def _detect_class(*args, **kwargs):
pq = kwargs.get('node', args[0])
... | UTF-8 | Python | false | false | 917 | py | 48 | utils.py | 44 | 0.562704 | 0.559433 | 0 | 35 | 25.2 | 48 |
seasa2016/Data_Science_2018Spring | 4,020,089,433,657 | 4121c5570c928543f988796554a1120ec1c842dd | dfc275b867e0117f4615041432246643e89deabb | /hw6/check_clique.py | a36da5db5801c495b257cf59fb895b8181210c0e | [] | no_license | https://github.com/seasa2016/Data_Science_2018Spring | 3e477b666cae15e91a84262ff00f329a1b9db8c3 | 9877460872d228f7ee1584b531228d0c9b49201f | refs/heads/master | 2020-03-06T17:30:56.655137 | 2019-04-04T03:47:23 | 2019-04-04T03:47:23 | 126,991,315 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sys
import networkx as nx
if len(sys.argv) != 3:
print("usage: python check_clique.py [graph] [nodes]")
graph_data = sys.argv[1]
node_data = sys.argv[2]
with open(node_data,'r') as f, open(graph_data,'r') as g:
UG=nx.Graph()
nodes = [ line.strip() for line in f.readlines() if line!="\n"]
for line in... | UTF-8 | Python | false | false | 677 | py | 10 | check_clique.py | 8 | 0.608567 | 0.587888 | 0 | 22 | 28.590909 | 68 |
OmarMeriwani/ElDardeer | 6,047,313,980,013 | 248abad2020c11bc28afccc75c13bf4648cac168 | 6d4de3e5976349252374d6248a0c941eb417cfe2 | /boom.py | ae4a799d8050af485745534e168371b0f04865da | [] | no_license | https://github.com/OmarMeriwani/ElDardeer | 56fd7f2228e54d406f7ead30f09998e3188bc21c | 7e03749ef67ff7725de434c3da0bb1954c054491 | refs/heads/master | 2022-11-25T04:37:48.776098 | 2020-07-28T22:21:02 | 2020-07-28T22:21:02 | 283,340,439 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
locations = [ 0.225, 0.075, -0.075,0.225]
#* time_stamp location state time_stamp
df =pd.read_csv('Data 28_7/Linda 01/boardStates/data.log',header=None, delimiter=' ').values.tolist()
points = []
for i in df:
if i[3] == 1:
... | UTF-8 | Python | false | false | 1,161 | py | 1 | boom.py | 1 | 0.618432 | 0.56503 | 0 | 33 | 34.212121 | 114 |
SamB2653/ml_course | 8,684,423,918,398 | beedb37f69e64b3687f72409fb051cbe4f267c3f | c88c6e0c277f846a1e964643bdebbfbce86500a2 | /ml_course/prerequisites/numpy_basic.py | 630b7ebb1e86ededf136c0d2bf3067b162cf3083 | [] | no_license | https://github.com/SamB2653/ml_course | 48d95d1deaf06daead68f4b85d6250515d4b60fb | 2416cacaf1ec4ac46fb08ce4632e0e486ea6cee7 | refs/heads/master | 2023-02-25T01:43:39.479966 | 2021-01-31T16:07:13 | 2021-01-31T16:07:13 | 331,679,077 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
'''
Following the NumPy UltraQuick Tutorial but with some minor changes and additions. Source:
https://colab.research.google.com/github/google/eng-edu/blob/master/ml/cc/exercises/numpy_ultraquick_tutorial.ipynb
'''
# 1D array (8 element vector)
one_dimensional_array = np.array([1.2, 2.4, 3.5, 4.7, ... | UTF-8 | Python | false | false | 2,695 | py | 44 | numpy_basic.py | 12 | 0.715028 | 0.659369 | 0 | 50 | 52.9 | 119 |
KartikKannapur/Algorithms | 4,312,147,191,204 | 5423e39c9608c68efe73a388eb8eafbc3b40e93f | 7410903c6cd5ef35c592af00c934fb21c369cbf2 | /00_Code/02_HackerRank/01_Math_FindthePoint.py.py | fe62a00f4bcb82e1aaacea10aae7c95b6a84e1a7 | [
"MIT"
] | permissive | https://github.com/KartikKannapur/Algorithms | f4e4726170599db0622d18e8c06a382e9bce9e77 | 66e3c8112826aeffb78bd74d02be1a8d1e478de8 | refs/heads/master | 2020-12-25T18:32:41.086518 | 2020-10-19T02:59:47 | 2020-10-19T02:59:47 | 93,961,043 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # #Read Input
N = int(input())
# #Looping through each set of inputs
for counter in range(N):
val_input = input()
px, py, qx, qy = [int(ele) for ele in val_input.split(" ")]
# #Compute Distances
print(((2*qx) - px), ((2*qy) - py))
| UTF-8 | Python | false | false | 262 | py | 304 | 01_Math_FindthePoint.py.py | 296 | 0.549618 | 0.541985 | 0 | 10 | 24.3 | 63 |
olorin-grey/computer_science | 14,920,716,410,879 | 9f989b18f955fe1d93dd2a847c99fa674558c5dd | f41686b692dd16c228bef108d63203ae276ad5f8 | /math_solutions/mult_x_add_y.py | 04a6e4eec7dc4083d7f435cb573b8f8fc01b79d8 | [] | no_license | https://github.com/olorin-grey/computer_science | 3a36f94eb412d211d24e7d3025fcf20f757ce564 | 934c7786b105649516115f9494e4d737715ac9dd | refs/heads/master | 2020-07-04T08:52:51.669590 | 2020-01-14T03:03:33 | 2020-01-14T03:03:33 | 202,229,843 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def mult_x_add_y(number, x, y):
print(number*x + y)
mult_x_add_y(5, 2, 3)
# 13
| UTF-8 | Python | false | false | 85 | py | 16 | mult_x_add_y.py | 15 | 0.552941 | 0.494118 | 0 | 6 | 13.166667 | 31 |
Gary-Joan/Proyecto_AYD2_fase4 | 8,839,042,706,900 | e2550ab958508793ba4ba3280b5659cb2e9783ab | 7147be7be4579405af86f0a82e0035b3c18f66aa | /Contrato/forms.py | db8699496d5e9a3e0bbf7f6974623233473f78ec | [] | no_license | https://github.com/Gary-Joan/Proyecto_AYD2_fase4 | 0fff677d2d42c127e36887db0d6f50f9f196b664 | bcb8d31ee17a0cb603561b1b9ed7fa30995d5494 | refs/heads/master | 2023-08-18T17:44:50.044743 | 2021-04-04T22:44:55 | 2021-04-04T22:44:55 | 259,494,228 | 0 | 0 | null | false | 2021-09-22T18:56:23 | 2020-04-28T01:00:21 | 2021-04-04T22:44:58 | 2021-09-22T18:56:21 | 2,726 | 0 | 0 | 1 | JavaScript | false | false | from django import forms
from .models import Contrato
class ContratoForm(forms.ModelForm):
class Meta:
model = Contrato
fields = ('Cliente', 'Gerente','Menu','Montaje','Restaurante','Salon') | UTF-8 | Python | false | false | 213 | py | 46 | forms.py | 40 | 0.680751 | 0.680751 | 0 | 9 | 22.777778 | 78 |
alvas-education-foundation/Krishna_Katira | 15,736,760,192,931 | 7fadb1684ce5f238d5ff1ca7c9a14ea7d84634c4 | 721cf86f26a44ea333b904c6bedf407315347e0f | /coding_solutions/22-06-20.py | eae1a5911d9667be36d673ec20c23730239065da | [] | no_license | https://github.com/alvas-education-foundation/Krishna_Katira | f76a00bad22c63597d040844720983943b1c97e0 | 8ff391f8a4b5082deb50b03460be2939fa611f4c | refs/heads/master | 2022-11-20T16:05:47.203175 | 2020-07-21T10:09:36 | 2020-07-21T10:09:36 | 265,737,615 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class A(object):
def __init__(self):
self.A=1
self.B=2
obj=A()
print(obj.__dict__) | UTF-8 | Python | false | false | 115 | py | 19 | 22-06-20.py | 19 | 0.443478 | 0.426087 | 0 | 6 | 18.333333 | 26 |
kevinyangff/Python-programming-exercises | 12,618,613,954,514 | c199232dc253c81316c8d39693772ed045bd3ddc | 7a244d033c1070b82075f85472ff74d108da26e8 | /level0/question42.py | adf712900b04cd7f417e1a48bd350359183b1887 | [
"MIT"
] | permissive | https://github.com/kevinyangff/Python-programming-exercises | 0c82536dc7ca98ee534fbae9392dda704af61ee4 | 87546906d817263ae7ddbd0276f0bb36e0d63c41 | refs/heads/master | 2021-09-03T08:19:27.888182 | 2018-01-07T13:15:17 | 2018-01-07T13:15:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | tupleOriginal = (1,2,3,4,5,6,7,8,9,10)
t = tuple([x for x in tupleOriginal if x%2==0])
print(t) | UTF-8 | Python | false | false | 95 | py | 87 | question42.py | 86 | 0.642105 | 0.505263 | 0 | 3 | 31 | 47 |
Ntare-Katarebe/ICS3U-Unit6-03-Python-Array_Min | 6,854,767,854,788 | 9bedcd53cfbacc112de81d100a63b13436b49194 | 4f7990c345192f87ef76cfb72bc1c214fdc5540f | /array_min.py | 59cfa9a1f7f48029299fe0e91f476089960a276f | [] | no_license | https://github.com/Ntare-Katarebe/ICS3U-Unit6-03-Python-Array_Min | 24346f16f20e4cfcc8b04aa53794bb12dccee606 | f4cf6538b7319ac8c2a0a8964bfb0b7c649e3ba1 | refs/heads/main | 2023-05-13T01:49:03.800249 | 2021-06-04T16:21:06 | 2021-06-04T16:21:06 | 373,896,578 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# Created by: Ntare-Katarebe
# Created on: June 2021
# This program uses an array(list) to find the largest number
import math
import random
my_numbers = []
def min_number(my_numbers):
min = my_numbers[0]
for loop_counter in my_numbers:
if loop_counter < min:
mi... | UTF-8 | Python | false | false | 784 | py | 2 | array_min.py | 1 | 0.603316 | 0.585459 | 0 | 40 | 18.6 | 69 |
louyanqi/leo | 8,839,042,695,562 | 393cefb80c22d618f89a6cb0c1a9cd1aee43d7bf | fd27dcde79c47b20699b43288d6bb2fb7e3ee417 | /controllers/manage/views.py | 988a3106d9cc75ed23b86686956fc083aeb8fc8e | [] | no_license | https://github.com/louyanqi/leo | 4be31cfe34e3aecdf89fe3696e9ecbbe426d4814 | 706d603ab08df8f3e50e9dc9428dab334540dc75 | refs/heads/master | 2021-09-09T03:35:10.405606 | 2018-03-13T14:59:24 | 2018-03-13T14:59:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import render_template, Blueprint, redirect, url_for, request
from models import db, User
from forms import RegisterForm, LoginForm
from flask_login import login_user, logout_user, login_required
control_blueprint = Blueprint('manage', __name__, template_folder='templates/control_template')
@control_blue... | UTF-8 | Python | false | false | 1,412 | py | 32 | views.py | 15 | 0.679887 | 0.679887 | 0 | 41 | 33.463415 | 104 |
ANh0r/LeetCode-Daily | 11,922,829,260,907 | a24189a1e2caa57a127681e368c6f327f9d4ad6a | 5da6b63331783b2728bc6b908c75c17864d1abe4 | /3.8 minCut.py | a7213b5e1e99fac5a645fa01a4833822e9c78885 | [] | no_license | https://github.com/ANh0r/LeetCode-Daily | 1c34baca46263da67e5a2b1b184dd441b90ef583 | a9ad5b5bc912a4ce5613000fbc47905510cde5ea | refs/heads/master | 2023-08-24T20:38:40.885292 | 2021-09-13T04:17:09 | 2021-09-13T04:17:09 | 283,934,963 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def minCut(self, s: str) -> int:
n = len(s)
g = [[True] * n for _ in range(n)]
for i in reversed(range(n)):
for j in range(i + 1, n):
g[i][j] = (s[i] == s[j]) and g[i + 1][j - 1]
f = [0] * n
for i in range(n):
if not g[0... | UTF-8 | Python | false | false | 416 | py | 314 | 3.8 minCut.py | 313 | 0.387019 | 0.367788 | 0 | 12 | 33.75 | 69 |
r-valitov/Malicious-network-activity-detection-system | 5,102,421,153,757 | 9f30710ec3b3b999664476851e7d275371abc341 | 4771d1843c5f011f49dfdfb87ccc30294d6753fb | /DetectionRetrainSystem.py | 15fbed204173d6f2baf402e7bb51556ed2ca0775 | [] | no_license | https://github.com/r-valitov/Malicious-network-activity-detection-system | c8bae085fa22753b27cabb8f02be41fb5e2dd8a8 | 3e911a18f111dff08278c394809a3710c5d900da | refs/heads/master | 2022-10-03T18:57:14.211871 | 2020-06-05T13:36:59 | 2020-06-05T13:36:59 | 262,602,852 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pyshark
from DetectionSystem import DetectionSystem
from Trainer import Trainer
from enums.Behavior import Behavior
from enums.Kind import Kind
from enums.Mode import Mode
from history.notes.TCPHistoryNote import TCPHistoryNote
from history.notes.UDPHistoryNote import UDPHistoryNote
class DetectionRetrainSyst... | UTF-8 | Python | false | false | 1,822 | py | 30 | DetectionRetrainSystem.py | 27 | 0.613063 | 0.607025 | 0 | 48 | 36.958333 | 96 |
harvey1327/Hack_Tools | 850,403,545,528 | 37e11906f20a764a8346328c133b18fb35f762a0 | f3710ce9160b81d4320e664599857ba2182d14ea | /hack.py | 71e48b90c3984f788aac16cda2dfad1cab3ef158 | [] | no_license | https://github.com/harvey1327/Hack_Tools | 69aed73efab511b705d744139a3b865d8d5e503a | a3213a2738bc21b69f01f0c205ad2de3484115ce | refs/heads/master | 2021-06-30T22:17:59.084209 | 2017-09-14T22:04:54 | 2017-09-14T22:04:54 | 103,585,621 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import requests
#token_array = [{'user_id': 1, 'token': 'JhjqCzT79ofx94SxL6rn', 'user_name':'admin'},{'user_id': 2, 'token': '7Dsk5VR6xD_goeKcxFps', 'user_name':'balh'},{'user_id': 3, 'token': 'EmSLzXwfKddc2y28pcxW', 'user_name':'test1'}, {'user_id': 4, 'token': 'yBETvpQLH7UkAmXbdGo-', 'user_nam... | UTF-8 | Python | false | false | 1,651 | py | 1 | hack.py | 1 | 0.572986 | 0.538462 | 0 | 33 | 49.030303 | 292 |
darksidergod/Crawler-Of-Lianjia | 9,629,316,701,081 | f1506d70e06626b5091c26fe2b879f67b692ec10 | 7581ab40041144fea6bf55bc68f4483c35476361 | /crawler/crawler_domain.py | 6029d43af26d4abe37872708e23324eb9428a52a | [] | no_license | https://github.com/darksidergod/Crawler-Of-Lianjia | 9979733654fc55c03eb1129123bba3c6591a5a3a | a5139da27e74f3fb6bf0ebf4dacd0823f2c7307d | refs/heads/master | 2020-08-22T13:16:21.030546 | 2019-10-20T17:53:25 | 2019-10-20T17:53:25 | 216,402,901 | 0 | 0 | null | true | 2019-10-20T17:50:19 | 2019-10-20T17:50:19 | 2019-01-31T10:01:08 | 2016-09-10T11:11:11 | 5,668 | 0 | 0 | 0 | null | false | false | #!/usr/bin/env python
import requests
def get_request(url):
try:
get_response = requests.get("https://" + url)
return get_response
except requests.exceptions.ConnectionError:
pass
target_url = "<target_url>"
with open("<name of domains to guess", 'r') as word_l... | UTF-8 | Python | false | false | 568 | py | 13 | crawler_domain.py | 8 | 0.573944 | 0.573944 | 0 | 24 | 22.666667 | 64 |
kohnakagawa/ghidra_scripts | 18,399,639,913,255 | e9719d70a502f4d14615cc027470fb0db17360cf | 786027545626c24486753351d6e19093b261cd7d | /ghidra9.2.1_pyi/ghidra/app/plugin/assembler/AssemblySelector.pyi | 56a54088f1573362bff2a763f54d769285c26493 | [
"MIT"
] | permissive | https://github.com/kohnakagawa/ghidra_scripts | 51cede1874ef2b1fed901b802316449b4bf25661 | 5afed1234a7266c0624ec445133280993077c376 | refs/heads/main | 2023-03-25T08:25:16.842142 | 2021-03-18T13:31:40 | 2021-03-18T13:31:40 | 338,577,905 | 14 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ghidra.app.plugin.assembler.sleigh.sem
import java.lang
import java.util
class AssemblySelector(object):
"""
Provides a mechanism for pruning and selecting binary assembled instructions from the results
of parsing textual assembly instructions. There are two opportunities: After parsing, but befor... | UTF-8 | Python | false | false | 3,704 | pyi | 3,297 | AssemblySelector.pyi | 3,294 | 0.698164 | 0.696544 | 0 | 87 | 41.574713 | 227 |
Syyan7979/Kattis-Solutions-python- | 1,614,907,748,174 | ad07a729d18e8354c5dcfef06fdb404134a11fb6 | a7f80e213b521cac38c45b91c697d88233d4e67e | /Python Kattis/Kattis130(missingnumbers).py | 042a1b0f4f285fcd1c7a1c608088a91708675b1e | [] | no_license | https://github.com/Syyan7979/Kattis-Solutions-python- | d96c2d880999cf50a206a15a89c2a9f3da29a623 | 8a2363faa4efd8c0418464b7d558db718ea5eb83 | refs/heads/master | 2022-05-28T06:56:36.624530 | 2020-05-02T04:39:45 | 2020-05-02T04:39:45 | 260,613,426 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def out(someList):
counter = True
for i in range(1, someList[-1]+1):
if i not in someList:
print(i)
counter = False
if counter:
print("good job")
n = int(input())
out([int(input()) for i in range(n)]) | UTF-8 | Python | false | false | 214 | py | 129 | Kattis130(missingnumbers).py | 128 | 0.626168 | 0.61215 | 0 | 11 | 18.545455 | 37 |
SimonXu666j/pycode_learning | 11,149,735,110,305 | 38b32545e41a62322dfe20962f5dfdf403341166 | 60700f1fa67110cd68a337186f0da6e2319329a9 | /实用编程技巧/文件IO操作相关话题/test01.py | 283b33d71422392316a1948ebb352195e1c318d5 | [] | no_license | https://github.com/SimonXu666j/pycode_learning | 24660b5c9b90e0ef5da43dd99bd62caebbbe7b95 | 3104a497dc2032512d36d0671d319de9fe8eeedd | refs/heads/master | 2021-01-24T17:31:39.342918 | 2018-12-03T14:30:50 | 2018-12-03T14:30:50 | 123,224,426 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #-*-coding:utf-8-*-
#如何读写文本文件?
'''
python2.x-->python3.x字符串的语义发生了变化:
str -> bytes
unicode -> str
python2.x中:写入文件前对unicode编码,读入文件后对二进制字符串编码
python3.x中,open函数指定't'的文本模式,encoding指定编码格式。
'''
print(u"****python2.x中******")
s=u'你好'
print(s)
#encode编码变成str
print(s.encode('utf-8'))
print(s.encode('gbk'))
#decode解码变成u... | UTF-8 | Python | false | false | 647 | py | 66 | test01.py | 64 | 0.635438 | 0.613035 | 0 | 27 | 17.222222 | 43 |
HyuncheolOh/snopes | 111,669,184,547 | 79062b89833edbacf3dc0ae687d92e279b9b8e45 | f1056661b869efe5f8080042ecc0eb8e05853e13 | /characterization/draw_tools/box_plot.py | c37fe969965cd1076b2755fa000b9d930db09161 | [] | no_license | https://github.com/HyuncheolOh/snopes | 16e631dc390e36c56c10b48fc0a62ba6a6e1f44b | 5ab76dc99f8ab1024cf36a82de99fba7d9c7310f | refs/heads/master | 2020-03-11T14:05:07.326024 | 2018-06-20T06:13:16 | 2018-06-20T06:13:16 | 130,043,528 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
class BoxPlot:
'''
def __init__(self, data):
self.data = data
plt.boxplot(data, showfliers=False)
'''
def __init__(self, subplot_num):
self.fig_num = 1
self.fig = plt.figure(figsiz... | UTF-8 | Python | false | false | 1,147 | py | 87 | box_plot.py | 52 | 0.599826 | 0.593723 | 0 | 41 | 26.95122 | 84 |
setsunaki/setsu | 10,256,381,933,176 | 0ab67c49b4e17c471622458ece384d20539b71d2 | 1c1bc6d6a221bd5e8346ce3acdae7fa6487434cd | /test.py | ad4798e0ac626d07ebbda9b9634b477316eb7182 | [] | no_license | https://github.com/setsunaki/setsu | 364c1ba83285b0a2fe1ce8a24753e8ace14f3d31 | b5d9db968bc277684ce0ef2bf97474bcfb8863ff | refs/heads/master | 2020-08-01T06:33:21.558279 | 2020-04-21T01:36:56 | 2020-04-21T01:36:56 | 210,900,296 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #comentarios
'''varias lineas
de comentarios wacho'''
#CALCULADORA
from os import system
def Pausa():
print("Apreta algo loko")
input()
system("cls")
def Sumar(a,b):
resta = a-b
print(f"Tu suma hermano {resta}")
def Restar(a,b):
print("Tu resta hermano ",str(a-b))
def Multiplicar(a,b):
... | UTF-8 | Python | false | false | 1,013 | py | 4 | test.py | 3 | 0.5923 | 0.572557 | 0 | 54 | 17.777778 | 48 |
chenpengpython/youdaoTranslation | 15,144,054,713,112 | 862e3ac48ab05cf451e1dddd0338c10301b43e1e | e004073354db14f1f16fe2df74e4a4ede4b01f2b | /demo.py | d4aac005f930817cb0d21b7d78410f825ef65d84 | [] | no_license | https://github.com/chenpengpython/youdaoTranslation | f34d4e5e24d547ae4343262230f535ef13a6664a | 269d844ef1e6f6c07438057e28317fa30d9e34ba | refs/heads/master | 2020-09-15T02:06:52.875742 | 2019-07-07T14:36:57 | 2019-07-07T14:36:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2019/7/7 22:02
# @Author : xuzhihai0723
# @Email : 18829040039@163.com
# @File : youdao.py
# @Software: PyCharm
import hashlib
import requests
import time
import execjs
def md5_encrypt(text):
md5 = hashlib.md5()
md5.update(text.encode('utf-8'))
return md5.hexdige... | UTF-8 | Python | false | false | 1,764 | py | 1 | demo.py | 1 | 0.587799 | 0.513683 | 0 | 60 | 28.2 | 185 |
jyotipatel/deep-learning | 910,533,112,503 | 71a0d23541fbc5d8bea261b8e9a8510eb02ff5b4 | c53663ca2a103887cc382ef338586d25807429e2 | /Convolutional_Neural_Networks/cnn_practise.py | b59673ab062141439019461ae96370a950da96d9 | [] | no_license | https://github.com/jyotipatel/deep-learning | 134dce38def08e03b16a9dcb17553f98144b80f7 | 59f35d0e26c3dd43e9df263bb225655b433fe0cb | refs/heads/master | 2020-03-23T04:41:13.799056 | 2018-07-16T07:09:31 | 2018-07-16T07:09:31 | 141,099,208 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 23 10:45:57 2018
@author: jyoti
"""
# Part 1 :Building the CNN
#importing the lib
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import Flatten
from keras.layers import D... | UTF-8 | Python | false | false | 1,636 | py | 1 | cnn_practise.py | 1 | 0.68154 | 0.632641 | 0 | 66 | 23.80303 | 93 |
kevinbarry7/python_test | 17,506,286,730,138 | a1ee92ced1f0c9b833ec65033e75b9903db37d3a | 45e4c7672e282d011947289d2f8d5b3a84c7f8a8 | /552/executing-functions/exercise4/game.py | c6ebaec0622671ee8df6b4967bd7088f4e7044c7 | [] | no_license | https://github.com/kevinbarry7/python_test | 3e660b534b17efd2aedff69f775c80a5b74eea41 | 57f31fd2b5429c86028706d667db192c23a6b107 | refs/heads/master | 2020-06-29T22:15:48.690049 | 2020-06-14T17:52:30 | 2020-06-14T17:52:30 | 200,638,583 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
A module providing a simple dice game.
The purpose of this module is to show off a slightly longer function that
could benefit from being broken up into smaller functions.
Author: Kevin Barry
Date: March 28, 2020
"""
import random
def roll_off(handicap1,handicap2):
"""
Returns true if player 1 wins the... | UTF-8 | Python | false | false | 1,591 | py | 58 | game.py | 58 | 0.683847 | 0.656191 | 0 | 58 | 26.431034 | 93 |
HangJie720/ATM | 13,073,880,469,496 | 3151317ae02278909cbab18efe63527d2f37315f | 27e7cd08334f4bef873f4c67b5632e9f1c052ca9 | /atm/enter_data.py | fb0d6eb76987aa53746d232529c48eccf97282b4 | [
"MIT"
] | permissive | https://github.com/HangJie720/ATM | 2f9734c88427784fe08ff588c5c736310453c782 | 9dfe5d9c883efc37d285c852fcc92a02c6cdd945 | refs/heads/master | 2020-03-24T20:28:36.780510 | 2018-05-16T22:20:15 | 2018-05-16T22:20:15 | 142,980,079 | 1 | 0 | MIT | true | 2018-07-31T07:42:21 | 2018-07-31T07:42:21 | 2018-07-28T06:08:01 | 2018-06-05T20:54:47 | 2,856 | 0 | 0 | 0 | null | false | null | from __future__ import absolute_import, division, unicode_literals
import logging
import os
from builtins import map
from datetime import datetime, timedelta
from past.utils import old_div
from .config import *
from .constants import *
from .database import Database
from .encoder import MetaData
from .method import ... | UTF-8 | Python | false | false | 6,783 | py | 60 | enter_data.py | 22 | 0.59885 | 0.597966 | 0 | 162 | 40.87037 | 81 |
YashKhant2412/MovieInfoBot | 7,224,135,012,480 | 33c5b21d8639c7b61f6ee0b64dd570f15445751f | 77dd316933398a5a88b7a57fedd583dee9e4be03 | /Code/conn.py | 548dc0e1fef4a3111f004a792be2fb4b9d4746cd | [] | no_license | https://github.com/YashKhant2412/MovieInfoBot | d29a3765f4db764ca35f5d4f18ce01487ec48ca9 | 77215eaeb6206241898fd527bc626757eab2c704 | refs/heads/main | 2023-06-16T15:33:27.729558 | 2021-07-10T07:21:01 | 2021-07-10T07:21:01 | 384,633,245 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import sqlite3
from openpyxl import load_workbook
conn = sqlite3.connect('Movie.db')
wb = load_workbook('Movie.csv')
ws = wb['Movie']
conn.execute("create table if not exists Movies (movie text, seat text, price int)")
for i in range(1,10):
temp_str = "insert into food_items (movie, seat, price) values ('{0}', '... | UTF-8 | Python | false | false | 522 | py | 8 | conn.py | 3 | 0.67433 | 0.653257 | 0 | 18 | 28 | 156 |
lvhaiyang/api_test_framework | 12,816,182,456,213 | 0cd622d02000e733793d2f885894ed7f36f10b6f | 52d42ac4d3307fba9aa36ab55b9a63012d168de9 | /test_framework/test_api/project_demo/mode_demo/case_demo.py | 5e4c4cdd3b9c0800d105edbd059b4eaecab8d71b | [] | no_license | https://github.com/lvhaiyang/api_test_framework | b0ce446babea7648f155fba0e4f6cd42e9b0db66 | 867507f3f59abc183e85e9e513cd03dfd4b7d772 | refs/heads/master | 2021-04-27T13:57:53.615223 | 2018-07-30T09:24:36 | 2018-07-30T09:24:36 | 122,449,192 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!encoding=utf-8
from __future__ import unicode_literals
import traceback
from lib.api_template import *
from lib.mysql import *
from config import *
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
CASE_INFO = ''
# 接口部分
class ... | UTF-8 | Python | false | false | 4,508 | py | 22 | case_demo.py | 16 | 0.574665 | 0.552781 | 0 | 115 | 32.756522 | 259 |
Razorro/Leetcode | 10,660,108,831,740 | c3626ea1efb1c930337e261be165d048d842d15a | a4e17629d83a738403c6426aa4b9495c21227a9c | /72. Edit Distance.py | 456c4fc9a647d15bd6ace177c229f67ca7ec5abc | [] | no_license | https://github.com/Razorro/Leetcode | dffacc1a9a51740727f94bfaf272b7f4d9abf229 | f18805698100fda4e06f63c06fe6295cf899d4b2 | refs/heads/master | 2021-06-16T23:17:09.825548 | 2021-02-25T11:25:57 | 2021-02-25T11:25:57 | 166,940,171 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on a word:
Insert a character
Delete a character
Replace a character
Example 1:
Input: word1 = "horse", word2 = "ros"
Output: 3
Explanation:
horse -> rorse (rep... | UTF-8 | Python | false | false | 4,021 | py | 68 | 72. Edit Distance.py | 67 | 0.553842 | 0.534444 | 0 | 111 | 35.234234 | 202 |
KD2199/Expense_management_with_drf | 5,738,076,346,161 | 726923c0f419d231ad7d63cddfc21348bf9a83ef | cde63ec17ec8c692a64ea5a5ebfa0322fccb010f | /expense/forms.py | 6f1b4956a807f08acd3698a4c4b6ddf1dde01cac | [] | no_license | https://github.com/KD2199/Expense_management_with_drf | e41355279f65810dc3ec445f0e0825e73b4c085b | e5281ff1a38647749e8252620f63dcc3a840903c | refs/heads/master | 2023-08-25T07:53:52.424586 | 2021-10-24T06:12:06 | 2021-10-24T06:12:06 | 420,596,787 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
from django import forms
from django.contrib.auth import get_user_model
from .models import Expenses, Categories, ExpenseMonths
from templatetags.get_month_name import get_month
from django.utils.translation import gettext_lazy as _
from decimal import Decimal
from django.http import HttpResponse
import csv
User = ge... | UTF-8 | Python | false | false | 6,010 | py | 47 | forms.py | 25 | 0.579368 | 0.577371 | 0 | 157 | 37.267516 | 131 |
aldld/auction-algos | 9,070,970,965,956 | d03727f38279658ef390be5a73204d1933aca2b5 | 5b819a087c004d6718ece4830a1d6ff4240dc64e | /auction/auction.py | 42935033fcb0a9bac101cf7c7e9512a729e1d9e0 | [
"MIT"
] | permissive | https://github.com/aldld/auction-algos | ecefdd583865f00e65b1d813712a9b0eeafbd793 | ac6c59d4dfaee353d5d2af137874448989a06e14 | refs/heads/master | 2021-01-11T11:51:48.376567 | 2017-04-29T02:09:50 | 2017-04-29T02:09:50 | 76,750,493 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """Implementations of various auction algorithms for min-cost flows."""
# TODO: If needed, make this quick-and-dirty implementation less inefficient.
def min_cost_flow(eps, graph, get_iter_nodes=None, select_edge=None,
get_delta=None, visualizer=None, max_iter=None,
debug=False):
... | UTF-8 | Python | false | false | 3,917 | py | 8 | auction.py | 5 | 0.602757 | 0.601225 | 0 | 102 | 37.401961 | 98 |
tapan17102001/ResponseApi | 15,917,148,838,678 | 1485d2743bbf7882dd46528199a953556b1606df | 656ab0f7a3ee3ccfd444ea4072daa38cc4082a56 | /recomand.py | a273b5d4912963346d0353c2ea29eca45ec936d0 | [] | no_license | https://github.com/tapan17102001/ResponseApi | d6ce1d09b910c015807e66a453e1f71e5a9fd3cf | 7624886d7ebfaf43ce14854b69b9628f5229df4f | refs/heads/master | 2022-07-15T09:33:34.851410 | 2020-05-13T11:53:35 | 2020-05-13T11:53:35 | 263,614,579 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import requests
import json
def recomand(word):
baseurl = "https://tastedive.com/api/similar"
params_d = {"q": word, "type": "movies", "limit": "5"}
resp = requests.get(baseurl, params=params_d)
# print(type(resp))
# print(resp.url)
# print(resp.text)
word_ds = resp.json()
... | UTF-8 | Python | false | false | 525 | py | 2 | recomand.py | 2 | 0.579048 | 0.577143 | 0 | 22 | 21.863636 | 58 |
trolen/advent-of-code | 9,552,007,314,005 | 0bf55739130e919a47471ce662cffcee84644677 | e7fcc1d64cd95805918ab1b5786bf81a92f973ef | /2019/day01/test_day01.py | dc880fed55875c9cd34fe2b279a915de6ff70387 | [] | no_license | https://github.com/trolen/advent-of-code | 8145c1e36fea04e53d4b7a885efcc2da71fbfe57 | 0a4e022a6a810d86e044a15036a2f5778f0d38af | refs/heads/master | 2023-02-26T13:11:58.341006 | 2023-02-20T23:22:27 | 2023-02-20T23:22:27 | 54,579,550 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #! /usr/env python3
import unittest
import day01
class TestDay01(unittest.TestCase):
def test_part1(self):
self.assertEqual(2, day01.fuel_required(12))
self.assertEqual(2, day01.fuel_required(14))
self.assertEqual(654, day01.fuel_required(1969))
self.assertEqual(33583, day01.fuel_... | UTF-8 | Python | false | false | 587 | py | 297 | test_day01.py | 296 | 0.67121 | 0.553663 | 0 | 21 | 27 | 61 |
Ajay-Kumar-py/Hello_world | 2,439,541,451,796 | 55f0f32a30c064f52bb0a35966646a8e6f85aaef | 2d84601219060cdf052b0aa7c187d68360f3ba7a | /tset.py | 85b7db42cd2445c6a8f39a8c52ec89fd5a994189 | [] | no_license | https://github.com/Ajay-Kumar-py/Hello_world | 649a1b76ede8edcf2fe7a7b2a60d36253bec131b | 55323c4289c4fe70b018ceb8e48d55a7aeccdde5 | refs/heads/main | 2023-06-04T02:36:49.385236 | 2021-06-19T13:13:13 | 2021-06-19T13:13:13 | 376,546,446 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | print("hello world")
print("kiop") | UTF-8 | Python | false | false | 34 | py | 2 | tset.py | 2 | 0.705882 | 0.705882 | 0 | 2 | 16.5 | 20 |
Tejaswini8898/30days_python | 8,263,517,127,514 | 9880ceacf7f7f980b14e91356f90e42686a6d5e5 | 1674cb301a2bf6cb2a4ad120ce97dc1a81e1b336 | /Day3.py | 99a72886cbe13b184055cde5e39b5346b444895c | [] | no_license | https://github.com/Tejaswini8898/30days_python | 5b586976ba4743b4ad36150009785b74972c8823 | 52f5142efe2a7eef6bd7927be49f2c2f2a4c8d39 | refs/heads/main | 2023-06-22T21:53:33.647796 | 2021-07-20T05:20:38 | 2021-07-20T05:20:38 | 382,576,953 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | val = int(input("enter a number: "))
if val / 10 == 0 and val / 20 == 0:
print ('yes')
else:
print('false') | UTF-8 | Python | false | false | 115 | py | 11 | Day3.py | 11 | 0.53913 | 0.486957 | 0 | 5 | 22.2 | 36 |
karthikpappu/pyc_source | 17,179,874,529 | 1b30c857461be3b1ee4723db898ffcb108451239 | 91fa095f423a3bf47eba7178a355aab3ca22cf7f | /pypi_install_script/OmiseGO-0.1.tar/setup.py | 48a94d762542b1acb1bc082abacf9ccd029d97bb | [] | no_license | https://github.com/karthikpappu/pyc_source | 0ff4d03e6d7f88c1aca7263cc294d3fa17145c9f | 739e7e73180f2c3da5fd25bd1304a3fecfff8d6e | refs/heads/master | 2023-02-04T11:27:19.098827 | 2020-12-27T04:51:17 | 2020-12-27T04:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from setuptools import setup
import sys
setup(name='OmiseGO',
version=0.1) | UTF-8 | Python | false | false | 77 | py | 114,545 | setup.py | 111,506 | 0.766234 | 0.74026 | 0 | 4 | 18.5 | 29 |
CiscoTestAutomation/genieparser | 15,685,220,606,817 | d261db339b57fa5df99567633611f22b5c523c72 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowLisp/cli/equal/golden_output2_expected.py | 4c3418b5285e399b788ab234395040b3c779e598 | [
"Apache-2.0"
] | permissive | https://github.com/CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | false | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | 2023-08-14T18:19:33 | 2023-08-29T22:32:03 | 74,102 | 231 | 346 | 100 | Python | false | false | expected_output = {
'lisp_id': {
0: {
'domain_id': 0,
'multihoming_id': 0,
'locator_table': 'default',
'locator_default_set': 'N/A',
'eid_instance_count': '7',
'capability': ['Publish-Subscribe Instance-ID', 'Domain-Info', 'Route-Tag', ... | UTF-8 | Python | false | false | 547 | py | 9,975 | golden_output2_expected.py | 4,563 | 0.531993 | 0.52468 | 0 | 13 | 41.153846 | 241 |
ouseful-backup/ergast-python | 11,046,655,885,964 | 5b41302eb8a2175e2567bebf43dc4855e2638fc6 | b93843eab98ec09ae20141335c30b3b77da405e8 | /ergast/request.py | fbe79f6c87d940fe7e6d7eb629b655e2e662930b | [
"MIT"
] | permissive | https://github.com/ouseful-backup/ergast-python | 708f6eabaac4982dafc85af0890d5ee52a1a75ec | e1d27b1c21f5e24c14729f05579e8c39646f8cda | refs/heads/master | 2021-06-21T13:04:48.335599 | 2017-07-10T02:23:44 | 2017-07-10T02:23:44 | 99,053,467 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
Request for describing requests to the ergast service
"""
from cerberus import Validator
from six.moves import UserDict
req_schema = {
'protocol': {'type': 'string', 'allowed': ['http', 'https'], 'required': True},
'host': {'type': 'string', 'allowed': ['www.ergast.com'], 'required': True},
'series': ... | UTF-8 | Python | false | false | 1,970 | py | 9 | request.py | 7 | 0.534518 | 0.530964 | 0 | 55 | 34.818182 | 88 |
blanu/InternetMeetupTime | 11,605,001,647,589 | 4817d042b2bef27f46c4c80bceec7b55ea817a0e | 40ba8a41adc2e1dfe37d44627faf6eae421b8bfa | /python/clock.py | 8310120966ebbf687076bffe444073b9dfea233b | [] | no_license | https://github.com/blanu/InternetMeetupTime | d085cc6ae355318d9cd647ba9432b8d51ae8b609 | e169ccfddea96888b9436737c22cc465b6151da7 | refs/heads/master | 2020-03-29T21:45:09.140296 | 2011-08-02T03:38:03 | 2011-08-02T03:38:03 | 2,115,040 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import time
if __name__=='__main__':
import curses
win=curses.initscr()
win.clear()
try:
while True:
sec=int(time.time())
esec=sec%86400
s=str(esec)
while len(s)<5:
s='0'+s
h=s[:1]
m=s[1:3]
s=s[3:]
# s='~'+h+':'+m+':'+s
s='~'+h+m+'.'+s
win.addnstr(11... | UTF-8 | Python | false | false | 422 | py | 5 | clock.py | 2 | 0.490521 | 0.447867 | 0 | 28 | 14.035714 | 34 |
lab-csx-ufmg/webmedia2018 | 17,729,625,029,588 | a3a167794024559bf3b7b08100468d9e18c90b2a | 57d64ba460b622ad056d006b1d7f67057a774677 | /crawling-github/GitHubAPI/GitHubBase.py | 1d7d84611b45cdb15514c14b32bb5317e07b2852 | [
"MIT"
] | permissive | https://github.com/lab-csx-ufmg/webmedia2018 | 0e158706f93d83f187597593e1856e5c331c8a96 | b0b2585096a8ba594bad330635c0ee7213795e07 | refs/heads/master | 2020-03-29T04:16:29.239542 | 2019-04-28T00:19:09 | 2019-04-28T00:19:09 | 149,523,561 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import requests
import json
from GitHubAPI.credentials import GIT_USER, GIT_TOKEN
'''
GitHubBase: class that is base for github requests
'''
class GitHubBase():
BASE_URL = "https://api.github.com"
def __init__(self, user=None, token=None):
self.user = user or ('GIT_USER' in os.environ and o... | UTF-8 | Python | false | false | 871 | py | 45 | GitHubBase.py | 25 | 0.623421 | 0.623421 | 0 | 27 | 31.259259 | 98 |
osilkin98/PyBry | 11,278,584,148,424 | 011f6a4213e2e156ae06ed124d570f7699aeb37b | a1cbc58a8f57d424fdedd4706f41362cc6944463 | /pybry/__init__.py | 878024ab69f27846b3b55ffe2d3fc64fc136e295 | [
"MIT"
] | permissive | https://github.com/osilkin98/PyBry | 697b9d612d3c37f6065a047b21b3854b88692f9d | af86805a8077916f72f3fe980943d4cd741e61f0 | refs/heads/master | 2018-12-19T01:22:21.321819 | 2018-10-18T02:47:09 | 2018-10-18T02:47:09 | 148,851,950 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from .lbryd_api import LbrydApi
from .lbrycrd_api import LbrycrdApi
from .LBRYException import LBRYException
__version__ = '1.6.4'
| UTF-8 | Python | false | false | 133 | py | 1 | __init__.py | 1 | 0.766917 | 0.744361 | 0 | 6 | 21.166667 | 40 |
eggied97/python2018 | 6,949,257,092,818 | a0fb1f10b82c5bacb025cddddad8e3fe5469542a | 471001240fd536b871eb35caa4d3319cf9a25057 | /graph-walkthrough.py | a52654ceee08bf40cdd2d5f315796e2c9fadee7f | [] | no_license | https://github.com/eggied97/python2018 | ebefb31ae22004cb4e3a38f5f2568a88cbfe2c80 | 1cfe71908a94752ab910f5d367ad811799c1fc53 | refs/heads/master | 2021-04-30T02:39:10.301779 | 2018-02-14T12:59:17 | 2018-02-14T12:59:17 | 121,505,133 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Slide 1
# from graph import *
#
# G = Graph(False, 4) # create instance G of class Graph with directed = False (so it is an undirected graph),
# # 4 vertices, and label the vertices with integers (0 to 3)
# print(G) # V=[0, 2, 3, 1] (list of vertex labels)
# # E=... | UTF-8 | Python | false | false | 2,481 | py | 5 | graph-walkthrough.py | 5 | 0.582426 | 0.573559 | 0 | 61 | 39.672131 | 111 |
osess/performance_management | 51,539,623,237 | 274d80a66579af0179caf2d2ed1652c2730d266a | f2e68031902a32330151ff09e5fe3fab577d38fe | /apps/companydepartment/forms.py | 04892c2d10f0572f2cf0d218107be9304357bab1 | [] | no_license | https://github.com/osess/performance_management | 1279c9bcf82fd45df6e225d2d880d776d6f86f4c | 02a1174ba5462b295799aab934b56418ed6630e5 | refs/heads/master | 2016-09-13T19:43:02.095213 | 2016-05-26T00:56:21 | 2016-05-26T00:56:21 | 59,707,683 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding:utf-8
from django import forms
from django.utils.translation import ugettext_lazy as _
from companydepartment.models import *
from question_answer.models import KHPlan
# 2015-03-16
# 创建部门
class DepartmentAddModelForm(forms.ModelForm):
class Meta:
model = Department
exclude= ('belong_to','... | UTF-8 | Python | false | false | 4,258 | py | 244 | forms.py | 91 | 0.676706 | 0.666353 | 0 | 106 | 39.103774 | 106 |
hillerliao/dtwt | 3,977,139,760,012 | 38924ae1502e9914b2f5b2ac6577bfc5a9661134 | f737ceed342e5d605603381608a3a783dbbae1a8 | /recipe/forms.py | 705ab9619ce244dbe702db76bf8f347099460e83 | [
"MIT"
] | permissive | https://github.com/hillerliao/dtwt | 34500b49d80cc79e491a645bb5f0611ee9ffae43 | 0e29e37d17a2e5a704885df87019ff0cdf006b8b | refs/heads/master | 2022-01-03T09:40:20.199817 | 2016-04-01T12:59:04 | 2016-04-01T12:59:04 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django import forms
from .models import Recipe
from channel.models import Channel
class RecipeForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(RecipeForm, self).__init__(*args, **kwargs)
if self.instance.id:
self.fields['trigger_channel'].initial = self.instance.t... | UTF-8 | Python | false | false | 650 | py | 26 | forms.py | 17 | 0.68 | 0.68 | 0 | 18 | 35.055556 | 82 |
palermog/Google_Drive_Student_Assignment_Management | 10,436,770,576,067 | a26cbabe9be4a3633a0cca0a07bc24be19d3ad99 | 42fa1eccb9c7cd4047d081ae8c1fd50e3867f6f7 | /RemovePermissions.py | a06fd8ad477043a9e65f0348287e82a8bb84fb0e | [] | no_license | https://github.com/palermog/Google_Drive_Student_Assignment_Management | 385bebbb19143980fce2a6e513301ab702495046 | 37c8264d64b45bb4343534ab93ae60e733cc9be4 | refs/heads/master | 2021-01-19T11:34:38.145294 | 2017-02-17T04:28:48 | 2017-02-17T04:28:48 | 82,254,604 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import gdata.docs
import gdata.docs.service
import gdata.spreadsheet.service
import re, os
import gdata.docs.client
import gdata.acl.data
import pprint
# DATA
username=
password=
students_data= # Google Sheets format : "timestamp / firstname / lastname / email"
classcode=
assignment=
#professor=
# Connect to Google-S... | UTF-8 | Python | false | false | 2,090 | py | 4 | RemovePermissions.py | 3 | 0.762679 | 0.755024 | 0 | 65 | 31.153846 | 89 |
delair-ai/python-delairstack | 1,022,202,222,955 | cdeef2e8a6eda03fd93e8acc68b25aa4f72a2130 | 7ba75e8d477d0e5463b7c7763992e8bad947639f | /delairstack/core/utils/srs.py | e431f24632540ece38b8cf08e094f693985470fb | [
"MIT"
] | permissive | https://github.com/delair-ai/python-delairstack | 1fd2f9082a0b156deb63c0f89ca61b6bac0419e8 | 4fb67ef8d1a95d4af9a4fab3168bc43c85cce420 | refs/heads/master | 2020-12-27T20:56:26.469637 | 2020-12-22T14:18:32 | 2020-12-22T14:18:32 | 238,050,263 | 9 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from pkg_resources import resource_string
from delairstack.core.utils.typing import AnyStr
def __name2wkt(name: AnyStr, *, wkts_path: AnyStr) -> AnyStr:
"""Convert a vert SRS name to WKT format.
Args:
name: Name of vertical SRS to convert.
wkts_path: Path to the WKTs directory.
Raises:... | UTF-8 | Python | false | false | 1,470 | py | 85 | srs.py | 64 | 0.606803 | 0.588435 | 0 | 49 | 29 | 74 |
AntoineMkr/PythonNLPBitcoin | 12,661,563,619,171 | 0749b564b21a7f6c6c79c285a48a39b6836ccffa | c51bb8b64994d99560f35e4d36a6bd48b9f0de95 | /top100Cypto/getTweetsTop100.py | 1e7534cdb2aa353497381b9384d970f7bcc0f07b | [] | no_license | https://github.com/AntoineMkr/PythonNLPBitcoin | 548864ad430ee1cd764296a5098f5e31a67d39f5 | 3a0d4098222e4170261050beb5c02a8d89c9c10a | refs/heads/main | 2023-02-23T17:41:16.150936 | 2021-01-25T17:52:29 | 2021-01-25T17:52:29 | 326,165,780 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import csv
import json
import re
import sys
from preprocessingTweets import format_syntax, format_semantic, remove_noise
import tweepy
from getTwitterHandles import getTwitterHandles
with open('./twitter_credentials.json') as cred_data:
info = json.load(cred_data)
consumer_key = info['CONSUMER_KEY']
consumer_secr... | UTF-8 | Python | false | false | 2,566 | py | 13 | getTweetsTop100.py | 5 | 0.714341 | 0.706157 | 0 | 84 | 29.559524 | 86 |
ermin-sakic/common-open-research-emulator-CORE | 4,380,866,667,414 | 2aadab4e66fbcde1fe9d126cc410283234704d60 | aedecd542cd751915376d1cac758c05a164cb56f | /coreemu-read-only/daemon/core/services/xorp.py | 062f4901672680089b6e1318525f62a4e851f71b | [
"BSD-2-Clause"
] | permissive | https://github.com/ermin-sakic/common-open-research-emulator-CORE | 4ee6223b339e0de3f9d807381b705969ce3a56f2 | 9c246b0ae0e9182dcf61acc4faee41841d5cbd51 | refs/heads/master | 2021-01-19T11:43:14.949496 | 2015-06-24T20:29:30 | 2015-06-24T20:29:30 | 38,001,753 | 3 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# CORE
# Copyright (c)2011-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
#
'''
xorp.py: defines routing services provided by the XORP routing suite.
'''
import os
from core.service import CoreService, addservice
from core.m... | UTF-8 | Python | false | false | 14,777 | py | 187 | xorp.py | 93 | 0.462272 | 0.453204 | 0 | 472 | 30.307203 | 108 |
shellshock1953/python | 13,039,520,731,596 | 74c1a9bdcae71505a51b18b77191944e5f7d8630 | 8beba9cf2a57630ee84cf1fe4dff00bd5c4f33e9 | /bin/Vidjener.py | 3d42699d8dd522670c37c73985f405cd9064b0ed | [] | no_license | https://github.com/shellshock1953/python | e58b284363f1d017ac4cffbff1d48ded3e2204a7 | 82132a7f202b8996850f70dbc32b6064e599f721 | refs/heads/master | 2021-01-20T19:06:13.622451 | 2018-11-19T07:15:49 | 2018-11-19T07:15:49 | 64,968,228 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import string
alphabet = []
crypt = []
text_file = open('text.file').read().lower()
key_int = []
# key = raw_input('Enter KEY:')
key = 'c'
for letter in string.printable.lower(): # making alphabet
alphabet.append(letter)
for char in key: # convert char key into int key
if char in alphabet:
key_int.a... | UTF-8 | Python | false | false | 724 | py | 27 | Vidjener.py | 24 | 0.651934 | 0.649171 | 0 | 25 | 28 | 92 |
sinojelly/python-scripts | 1,941,325,261,012 | 40aed9abb8f53dcbadb5ef896478c9e99301934e | 1d1fda62eeef26b03a494214a31a7806637ef4bf | /pyblogpost/3.x/BlogPost.py | df9843f5b23d94740003cf8638a83e97fe236038 | [] | no_license | https://github.com/sinojelly/python-scripts | 323343cf73ab6370e2e8cac00371f1f10a214fa2 | ed1bf74d7a714ba533d6dbe13719fef3c3ed91da | refs/heads/master | 2016-09-05T15:40:19.743728 | 2011-09-09T13:14:01 | 2011-09-09T13:14:01 | 2,355,346 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import xmlrpc.client
import sys
import os
import uuid
import pyblog
import HtmlProc
import BlogConfig
import BlogData
import Utility as u
import MIME
import UserException
__author__ = "Chen Guodong"
__copyright__ = "Copyright 2010, Guodong Workshop."
__credits__=["Wei Shijun", "Bao Fanfan"]
__lice... | UTF-8 | Python | false | false | 15,086 | py | 25 | BlogPost.py | 15 | 0.581798 | 0.570595 | 0 | 389 | 36.781491 | 294 |
LoopsUTD/ImageProcessing | 19,645,180,413,574 | c13b997de8767a824aa82cf93bf5895044846dff | a9be07d397c882dc9cd6485037824365af680d6c | /UI/watershed.py | 803eeaea04c02ad15c993a662acda9cff7b29e54 | [] | no_license | https://github.com/LoopsUTD/ImageProcessing | 1eb37fbae3aea3b6ef4fe909fcf0abc6d9ed6221 | 769ab14d31ab7b635b84f8699ae305e2f85625b6 | refs/heads/master | 2021-09-07T09:10:04.657967 | 2018-02-20T21:11:53 | 2018-02-20T21:11:53 | 105,183,779 | 0 | 0 | null | false | 2018-02-19T16:55:14 | 2017-09-28T18:19:03 | 2017-10-25T17:34:05 | 2018-02-19T16:55:14 | 67,139 | 0 | 0 | 1 | Matlab | false | null | def main():
import cv2
import numpy as np
from matplotlib import pyplot as plt
name = "croppedNoLens.jpg"
img = cv2.imread(name)
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(gray_img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
##Do kernel convolution noise reduction
# nois... | UTF-8 | Python | false | false | 1,073 | py | 33 | watershed.py | 3 | 0.679404 | 0.630009 | 0 | 37 | 28.027027 | 112 |
3jackdaws/market-bot | 3,444,563,775,477 | 6204bbc443319aabbef74d97821a31096e1eeb6a | 19317a5fb5fae3a784de8f52aa2eec20cf929344 | /marketbot/modules/base/ticker.py | 552c408150412c24d87457e4e0a8ea79a2df4222 | [] | no_license | https://github.com/3jackdaws/market-bot | 4b4a4afc28c107efdc80163165346d9df65b710a | 2677e9fe9c870ab62d650a8fdf8a8fc9e82cf62f | refs/heads/master | 2020-09-09T21:28:34.283392 | 2020-02-11T16:05:00 | 2020-02-11T16:05:00 | 221,576,041 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from marketbot import Bot, Message, util
from discord import Embed, Webhook, TextChannel
from . import api
import re
import logging
import asyncio
from time import time
logger = logging.getLogger("BASE.TICKER")
TICKER_PATTERN = r'\[([a-zA-Z]+)\]'
EXPRESSION_PATTERN = TICKER_PATTERN + r'([.][a-z]+\(([^_()]*)\))?'
def... | UTF-8 | Python | false | false | 3,743 | py | 12 | ticker.py | 9 | 0.516965 | 0.507614 | 0 | 126 | 28.68254 | 95 |
dawidjk/Interview-Practice | 695,784,702,429 | 49f0cf1b2e2a7fe9bfe977c7e8a0bc6f16095ad4 | 88f705139e8a2b0402579a943f6270f6042c61ba | /datatypes/test_string_builder.py | 5bc69117aaba599030241477224123e7129f385c | [] | no_license | https://github.com/dawidjk/Interview-Practice | df3275be3746ba74c9cdbd572946fc384ca69271 | c9d4f6e88617ebd9c75f30cd0a5c8e54081035a1 | refs/heads/master | 2020-06-13T19:26:16.658566 | 2019-07-03T23:15:28 | 2019-07-03T23:15:28 | 194,765,831 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import unittest
from string_builder import StringBuilder
class TestStringBuilder(unittest.TestCase):
def test(self):
string_builder = StringBuilder()
string_builder.append("I ")
string_builder.append("like ")
string_builder.append("pi!")
self.assertEqual(string_builder.toString(), "I like pi!")
if __name_... | UTF-8 | Python | false | false | 353 | py | 12 | test_string_builder.py | 12 | 0.719547 | 0.719547 | 0 | 14 | 24.285714 | 59 |
TyrnanBatch/Messanger-App | 9,491,877,746,235 | 16c34db402f0a4f5ebeab0881aea09ecd331cd61 | 1c7ffa6dd70591d6add81a422a1f4106e2350173 | /main.py | f6a9c257b1280fc2b330fde0f139736e62848521 | [] | no_license | https://github.com/TyrnanBatch/Messanger-App | 4cf68f8327af81eb373f4ddc262851ac7ec1378d | 246a2da968a48c727d72cee0ac0f7a7e63adb50a | refs/heads/main | 2023-08-22T20:36:34.459370 | 2021-09-21T17:18:16 | 2021-09-21T17:18:16 | 408,507,343 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tkinter as tk
from tkinter import ttk
from tkinter.messagebox import showinfo
import sys
# I will Put My cursor Here if im alt tabed:
# Create Tk window as 'root'
root = tk.Tk()
# Setting root settings (size, name, extra)
root.geometry('200x250')
root.configure(width=1600, height=900)
root.title('Messenger Ap... | UTF-8 | Python | false | false | 2,995 | py | 1 | main.py | 1 | 0.643406 | 0.631386 | 0 | 124 | 23.145161 | 144 |
pronay11/Hospital_Management_System | 9,431,748,203,039 | 10f7ee611dee3eff280fd25415a0eef67c7be0e9 | a6ed25e7155ec4b50f38681a03ff9bf702d8deb5 | /hospitalapp/migrations/0020_auto_20191202_0940.py | 9dd0ece1f0eda3897048715e9f391e47939a97c8 | [] | no_license | https://github.com/pronay11/Hospital_Management_System | 93fe448dd89b3ab15c064e8b20fa47e0b2ddcd86 | e7d2afff9b194ef9a0f2d9ca1cca9e7bee2ec9f5 | refs/heads/master | 2020-11-25T11:30:57.763491 | 2019-12-17T15:06:32 | 2019-12-17T15:06:32 | 228,637,957 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.2.5 on 2019-12-02 03:40
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('hospitalapp', '0019_auto_20191202_0923'),
]
operations = [
migrations.RenameField(
model_name='doctor',
old_name='img',
... | UTF-8 | Python | false | false | 365 | py | 31 | 0020_auto_20191202_0940.py | 20 | 0.569863 | 0.484932 | 0 | 18 | 19.277778 | 51 |
dabeiT3T/Data-Structures-Answer | 6,923,487,295,445 | 54e333f24ffc6806924579c8939a1022811de45f | 5486aa5c60ded82fa9851e19cda8229c1c55ce84 | /Chapter 8 Queues/Quiz 2/arrayqueue.py | 11bc4a67dd9dd85d5a6503dcc35766869a079844 | [] | no_license | https://github.com/dabeiT3T/Data-Structures-Answer | 1bea264b94e3233962fd8cdfe17af266cc757814 | d298cbfd22f998505b9e548e507a3ab9a3be47c0 | refs/heads/master | 2020-04-09T11:13:08.101875 | 2019-02-27T07:13:10 | 2019-02-27T07:13:10 | 160,300,167 | 5 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
'''
Author: dabei
My answer to Chapter 8 Quiz 2.
'''
import sys
from arrays import Array
from abstractqueue import AbstractQueue
class ArrayQueue(AbstractQueue):
'''Represents a linked queue'''
# default array's capacity
CAPACITY = 10
def __init__(self, items = None):
... | UTF-8 | Python | false | false | 3,793 | py | 46 | arrayqueue.py | 33 | 0.538624 | 0.533087 | 0 | 132 | 27.734848 | 90 |
eldojk/Workspace | 10,917,806,888,732 | 324e0aacabbc5d5f51390b07562888073a5aec5b | a9dfc35814bde9f387bb78db2e8566c08e38b635 | /WS/G4G/Problems/dp/__init__.py | 765f31619e9b09723edb05086a92179248057a57 | [] | no_license | https://github.com/eldojk/Workspace | b6c87f7ab74c4a3bb8585fdfa36a24a731f280f8 | 224626665a2b4c0cf701731f4e4dc96c93a26266 | refs/heads/master | 2021-01-19T13:33:09.378172 | 2017-11-14T17:53:09 | 2017-11-14T17:53:09 | 82,396,876 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
https://people.cs.clemson.edu/~bcdean/dp_practice/
""" | UTF-8 | Python | false | false | 58 | py | 586 | __init__.py | 583 | 0.672414 | 0.672414 | 0 | 3 | 18.666667 | 50 |
HayeonLee/ProjCA | 9,294,309,276,028 | 683202c3d176e042fb60752e0f924bb22fa4caea | e35057a23886ede5b1509d569f03a2ecfd7041a0 | /ours/preprocess/count_max_token.py | 24493bc4a843c13b17b8ac043d768b23d8b0ca30 | [] | no_license | https://github.com/HayeonLee/ProjCA | faad0b1e28fc0abdde5ca94ae3e60b06c4ce812f | 17e662340ddd3ec6390eaf97fe15b407f13032a9 | refs/heads/master | 2020-03-22T15:41:53.558744 | 2018-08-26T14:23:12 | 2018-08-26T14:23:12 | 140,270,566 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import json
import matplotlib
matplotlib.use('agg')
from pycocotools.coco import COCO
import nltk
jf = json.load(open('/DATA/cvpr19/coco/annotations/captions_train2017.json'))
jf_val = json.load(open('/DATA/cvpr19/coco/annotations/captions_val2017.json'))
cnt = 0
for i in range(len(jf['annotation... | UTF-8 | Python | false | false | 665 | py | 10 | count_max_token.py | 9 | 0.685714 | 0.663158 | 0 | 20 | 31.35 | 106 |
ArisChristoforidis/NAS-Timeseries | 2,559,800,521,080 | 8a323032df1c47bd25e785adad8b9d3e27e9a829 | a98698cddd1bc4beb7644d7122b0a28555903814 | /enums.py | 44052ad9d1e2f49820481a403a1ae24393360950 | [] | no_license | https://github.com/ArisChristoforidis/NAS-Timeseries | e256d6069d39822934067fbe7c7c3283d298b7cf | 3306a67f6d95af1576b85ab373a537367a7b4d31 | refs/heads/master | 2023-04-20T15:11:51.157478 | 2021-06-29T08:57:04 | 2021-06-29T08:57:04 | 316,300,630 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from enum import Enum
class ConnectMode(Enum):
IN = 0,
OUT = 1
class ModuleType(Enum):
NEURAL_LAYER = 0,
ABSTRACT_MODULE = 1
class SaveMode(Enum):
PICKLE = 0,
CONSOLE_LOG = 1
| UTF-8 | Python | false | false | 209 | py | 33 | enums.py | 32 | 0.602871 | 0.574163 | 0 | 14 | 13.5 | 24 |
Angel888/suanfa | 6,287,832,166,414 | fecb9a8faa4f3eec5a0aa1ce44b3129533d97351 | 87fe6ec76a16f1fb4712df0b6a497f0df75bd5d1 | /biao-shi-shu-zhi-de-zi-fu-chuan-lcof.py | 20d25438bc573dbe5b09ae8e4453cc30f175af8e | [] | no_license | https://github.com/Angel888/suanfa | 48d4f6f425d0075111517e7ea635a74b79df97a6 | 4a27fdd976268bf4daf8eee447efd754f1e0bb02 | refs/heads/master | 2023-05-09T06:29:44.649587 | 2021-05-29T00:45:33 | 2021-05-29T00:45:33 | 371,849,036 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # https://leetcode-cn.com/problems/biao-shi-shu-zhi-de-zi-fu-chuan-lcof/
# todo 有限状态自动机是什么鬼
class Solution:
def isNumber(self, s: str) -> bool:
pass | UTF-8 | Python | false | false | 182 | py | 154 | biao-shi-shu-zhi-de-zi-fu-chuan-lcof.py | 151 | 0.68125 | 0.68125 | 0 | 5 | 31.2 | 72 |
misbahulard/stix_api | 10,007,273,821,925 | e14249ed42431ae633c9c2197b8ce3f5041b91ca | 24c472e5a722b571feee1a5fc8345d9358595065 | /app/model/actor_analytics.py | 877196ec6b90a461c5e9b66fae377ae6bf5cebfc | [] | no_license | https://github.com/misbahulard/stix_api | b6270aa7f9ca05b6eb71363a7180a5aab661a758 | 348f72553b954b7b4802b660085b0317f77097e6 | refs/heads/master | 2022-05-29T22:08:06.035795 | 2019-07-19T09:53:01 | 2019-07-19T09:53:01 | 155,293,943 | 0 | 0 | null | false | 2022-05-25T02:07:03 | 2018-10-29T23:16:59 | 2019-07-19T09:53:14 | 2022-05-25T02:07:03 | 10,607 | 0 | 0 | 3 | Python | false | false | from app import mongo
from app.utils import jsonify_stix
class ActorAnalytics(object):
""" ActorAnalytics model for access actor_analytics collection in mongodb """
def __init__(self):
self.collection = mongo.db.actor_analytics
def get_actor_count(self):
pipeline = [
... | UTF-8 | Python | false | false | 2,122 | py | 15 | actor_analytics.py | 13 | 0.391612 | 0.386899 | 0 | 62 | 33.145161 | 81 |
greyhatchet/7P1A-Game | 4,715,874,097,568 | dd9b308b44359e0a9d37d82784c2cf31003611e7 | 3f926ee5300b659f3f36200178c9952f0f9199f1 | /test_scorereader.py | b88286103e28411fb94cd0839002607d9c437ce8 | [] | no_license | https://github.com/greyhatchet/7P1A-Game | 940efb71cad0f61068b1fd27fb5b95fd33fcc6c1 | a0c567116e8f5654f68ef18284505948f9496a27 | refs/heads/master | 2020-03-30T20:39:51.230256 | 2018-10-22T04:33:50 | 2018-10-22T04:33:50 | 151,598,111 | 1 | 0 | null | false | 2018-10-11T18:11:51 | 2018-10-04T15:56:45 | 2018-10-11T18:10:23 | 2018-10-11T18:11:50 | 2,916 | 1 | 0 | 0 | Python | false | null | import unittest
from scorereader import readScores
class ScoreReaderTestCase(unittest.TestCase):
# Tests for scorereader.py
def test_readScores(self):
self.assertTrue(readScores('scoresfile.txt'))
self.assertTrue(not readScores('notarealfilename.txt'))
self.assertTrue(not read... | UTF-8 | Python | false | false | 383 | py | 20 | test_scorereader.py | 14 | 0.678851 | 0.67624 | 0 | 14 | 25.5 | 63 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.