blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21a0054704f9dad928cbb3cfe57a1b7e32e69b16 | a7e121735b7e295afa725ffdf09d18493e8976ce | /0002/0002.py | e301f23dd8997d40031fe908163cba2023d88124 | [] | no_license | Vinceven/Python-Everyday | 989517569bd3ade3129202f8aae7c259e7d8d065 | 5045a267eca5a3b1c19ac2b2321e48d20c06dd53 | refs/heads/master | 2020-03-28T15:18:13.785045 | 2018-09-18T12:41:11 | 2018-09-18T12:41:11 | 148,578,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,527 | py | 0002.py | '''
-*- coding: utf-8 -*-
Created on Thur Sep 13 hh:mm:ss 2018
@author: 01378049
'''
from random import choice
import string
import pymysql.cursors
#根据给定字典长度来给出激活码
def get_code(dict, length, count):
for i in range(1,int(count)+1):
code = ''
for j in range(0,int(length)):
code = code + str(choice(dict))
s... |
543eb40fe7e7444acf1a3c15600cc395192f634c | d6cf604d393a22fc5e071a0d045a4fadcaf128a6 | /ABC/165/165_C_2.py | 528a3d7b0c81a036267e942eed04421351f15a05 | [] | no_license | shikixyx/AtCoder | bb400dfafd3745c95720b9009881e07bf6b3c2b6 | 7e402fa82a96bc69ce04b9b7884cb9a9069568c7 | refs/heads/master | 2021-08-03T21:06:45.224547 | 2021-07-24T11:58:02 | 2021-07-24T11:58:02 | 229,020,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 692 | py | 165_C_2.py | import sys
import itertools
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, M, Q = map(int, input().split())
ABCD = [list(map(int, input().split())) for _ in range(Q)]
def calsScore(lst):
s = 0
for a, b, c, d in ABC... |
56a481994633ad885bce148748d43c024da4abaf | d47e43c8fc90675ddc9f67c9f639be24d04e7a9e | /redis命令操作/string操作/1.set.py | a869d216d34ac5ee0bab1d5610740bec35b46890 | [] | no_license | xuhongtong/application | c5ed37cd9719f980ce25268b7a4d001fd5f55f2d | d80bca582dd24d844a162f8fd44b9c97cd96c0ae | refs/heads/master | 2020-04-04T09:54:21.513279 | 2018-11-14T10:30:56 | 2018-11-14T10:30:56 | 155,835,482 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | 1.set.py | import redis
HOST = '127.0.0.1'
PORT = 6379
DB = 1
pool = redis.ConnectionPool(host=HOST, port=PORT, db=DB)
rds = redis.Redis(connection_pool=pool)
# rds.set('name','ex',ex=5)
# rds.set('name','px',px=5000)
# a=rds.set('name','px',px=5000,nx=True)
rds.set('name','tom')
|
a4d41dab5dc96ba1460a87ea503f89a8e3a7fdea | 2d2d265fa15f1e5403428d9fa0d09de98a57ad16 | /manifold/embedding_functions.py | f92ee6ab1332a82e53001cc54fbbc5fbdb5ffb3e | [
"MIT"
] | permissive | FedeClaudi/manyfolds | 5577f685f2f86886ab17d87bfb4f0e327cf2a7e1 | 68f7abba9059e3063eae46285f1c95157ea454cf | refs/heads/main | 2023-08-21T15:05:11.631323 | 2021-10-07T10:07:46 | 2021-10-07T10:07:46 | 363,593,900 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,578 | py | embedding_functions.py | from numpy import sin, cos, pi
from manifold.decorators import parse, parse2D
"""
This scripts defines commonly used embedding functions \\phi.
"""
# ---------------------------------------------------------------------------- #
# R^N = 3 #
# -... |
f2c29d2bce7b754d23adf157b58b4e752d02d0c9 | 93a27e5b1da0bc3d48f2390b67f28085f5a505ad | /spectral_cube/tests/test_cube_utils.py | 330046428308cfddf455b88d3d8fd61f20f88fdf | [
"BSD-3-Clause"
] | permissive | julian-garrido/spectral-cube | 8a790e5a3c852e847a4c6e1eca3881277add1867 | 38ceca71a9e14a82e5d36e61e3422afa58829597 | refs/heads/master | 2020-05-27T09:49:00.547508 | 2017-02-20T10:28:39 | 2017-02-20T10:28:39 | 82,540,774 | 0 | 0 | null | 2017-02-20T09:35:54 | 2017-02-20T09:35:54 | null | UTF-8 | Python | false | false | 669 | py | test_cube_utils.py | import pytest
from .test_spectral_cube import cube_and_raw
from ..cube_utils import largest_beam, smallest_beam
try:
from radio_beam import beam, Beam
RADIO_BEAM_INSTALLED = True
except ImportError:
RADIO_BEAM_INSTALLED = False
@pytest.mark.skipif('not RADIO_BEAM_INSTALLED')
def test_largest_beam():
... |
49c93f95fad2c06c38cde04287e45e675ff35da2 | 9251a22c510cc8d179d7f40de9a0fb8ba5bf73d9 | /RelationRecognition/test.py | fce40b96a348bf87a5e1fa313a4cf8eb06c43726 | [] | no_license | nippleshot/CV_Relation_Recognition | af95b419bde960515ae0f521be2aab4e92977139 | d51f692904595ec5c973f74c7d8e1ad6391452ba | refs/heads/master | 2023-08-24T16:06:48.724599 | 2021-11-03T15:06:52 | 2021-11-03T15:06:52 | 273,929,586 | 0 | 0 | null | 2021-09-08T02:12:21 | 2020-06-21T15:16:41 | Python | UTF-8 | Python | false | false | 2,396 | py | test.py | import os
import pickle
import yaml
import torch
import numpy as np
from tqdm import tqdm
from model import Classifier
from dataset import VRD
class Container:
def __init__(self, model, dataset, cfg):
self.dataset = dataset
self.model = model
self.device = 'cuda' if torch.cuda.is_availab... |
85a470dc51882c156ab9e7266f87bf5366ce1917 | 334cd6adbad30fe18ac9f0c4c115f36f9eba5480 | /knn.py | 6d73a2b0864851f64025e3ff5b895d14102ac912 | [] | no_license | ryancdang/gradadmit | d762be489003d8df8b014fc64a9502d9f2284b89 | 5df53aef2c0ce518791d9846af890ef52faf768b | refs/heads/master | 2021-10-28T11:44:24.044224 | 2019-04-23T16:34:40 | 2019-04-23T16:34:40 | 176,570,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | knn.py | # Load libraries
import pandas as pd
data = pd.read_csv('Admission_Predict_Ver1.1.csv')
data.drop('Serial No.', inplace=True, axis=1)
data.rename({'Chance of Admit ': 'ChanceofAdmit', 'LOR ':'LOR'}, axis=1, inplace=True)
## Data has 500 rows and 8 columns, after erasing serial number
#print(data.head())
X=data.ilo... |
f47da3159dd6f64ce1660cf7fab5f75feb3541b7 | ae47c7a92e722109d62402a732d13a48c96111de | /tests/test_wrappers.py | c20fe350dfdae52bea09dbffe6685a2e9c9c9b54 | [
"Unlicense"
] | permissive | mikaelho/syncx | 40db0e8f54c2d1d3e3889322f9ef84669a81b5b9 | ea35c851071b34e09055bf2f0f1114c3a234b67e | refs/heads/main | 2023-06-26T04:54:27.987653 | 2021-07-27T04:50:40 | 2021-07-27T04:50:40 | 380,485,910 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,376 | py | test_wrappers.py | from types import SimpleNamespace
import pytest
from syncx import rollback
from syncx import tag
from syncx import untag
from syncx.manager import Manager
from syncx.wrappers import CustomObjectWrapper
from syncx.wrappers import DictWrapper
from syncx.wrappers import ListWrapper
from syncx.wrappers import SetWrapper
... |
bfe56010045c5bdef1f411020986788ac270a0fa | 187a5061e4c4e254a6486b372aa15f70b5988eae | /test/gen.py | 3279641e40f8c8762d510c4971acb491b4978f6c | [] | no_license | bedrock17/ps | bbc58f7a2cbe7a75190a35a804bdd91ce8f21ad5 | 115179c5f237cbc6949ae6716556cc76657095a1 | refs/heads/master | 2020-03-23T08:53:52.982455 | 2018-08-15T03:26:43 | 2018-08-15T03:26:43 | 141,354,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 331 | py | gen.py |
f = open("calc.txt", "wt")
for i in range(101):
for j in range(101):
f.write("7 9 10 " + str(i) + " " + str(j) + "\n")
f.close()
# f = open("calc.txt", "rt")
# txt = f.read(100 << 10)
# lines = txt.split('\n')
# f.close()
# f = open("calc.txt", "wt")
# for i in lines:
# if "!" in i:
# f.write(i+"\n")
... |
897cccd8597ff93198304fa0aa0d6f91107354eb | 7c642866b8e6a59234218d3063fc85559b87036e | /src/ner/lstm_crf_model/ner_char_train.py | 673ba3af96d91ff48e83d2b696755d5815a3b231 | [] | no_license | makai281/neural-network-tagger | e6ecee91077f0e5f7fa33ed131763a98643f1cad | 557515bcb0995311fc541b8e69779dfe3812ac3c | refs/heads/master | 2020-06-01T06:43:53.868227 | 2017-06-08T22:15:50 | 2017-06-08T22:15:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,707 | py | ner_char_train.py | import tensorflow as tf
from tensorflow.python.platform import tf_logging as logging
import utils
import time, os, codecs
from ner_dataset import Dataset
from collections import defaultdict, namedtuple
from lstm_char_model import EntityLSTM
from tensorflow.python.platform import gfile
import pickle
def load_token_vect... |
79ffc8dd72a18e166fa40a55a776f1f095fa5830 | adac8590112bd63139c778f620b765790ab45ee8 | /Week5/gbm_forest.py | 65f89221509b5868c5acadf46db9a2b33e5a4e56 | [] | no_license | tohanyich/IntroML | 021372bc7dcb49a14d8b74a10b001670376887c8 | fe7721c50ed19b3ad35b78a3ffc762979ff82fce | refs/heads/master | 2021-01-10T02:44:31.411313 | 2016-03-14T20:37:36 | 2016-03-14T20:37:36 | 51,579,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | gbm_forest.py | # -*- coding: UTF-8 -*-
import numpy as np
import pandas as pd
import sklearn.cross_validation as cross_val
from sklearn.metrics import log_loss
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.ensemble import RandomForestClassifier
import matplotlib.pyplot as plt
dt = pd.read_csv('gbm-data.csv')
y... |
1ea0f6685668b12895d526cf1dcb407afa43c8a9 | 863509e794b069c9688f6263454c06d2c48868b2 | /backend/backend/migrations/0025_auto_20200716_0942.py | 843ef506e1a62c0698648720763b613c46cf5b07 | [
"MIT"
] | permissive | TheDuckWhisperer/tournesol | c6df38185963bbecc6109dac275075a3ceca857a | 0fde7587e91a42e5a2218f2ffb70d4fc8cff7f73 | refs/heads/master | 2023-04-18T15:31:20.627952 | 2021-05-01T19:59:07 | 2021-05-01T19:59:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | 0025_auto_20200716_0942.py | # Generated by Django 3.0.7 on 2020-07-16 09:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0024_auto_20200706_2128'),
]
operations = [
migrations.AddField(
model_name='videocomment',
name='backfir... |
044bf3b05195cf332f03bb38cebba36af3cf095c | 5f2385ce71f8e2a1a692e41720249d9397519aa6 | /chameleon.py | 25edfa57965882f0e79588480c34abfb26828416 | [] | no_license | liam-mitchell/seal-shark | 95d111da03823a00df7206b402d8bfb0bcfbbbcc | cf60bda8c893dfcbfd0f9a456f18040650d13dac | refs/heads/master | 2016-09-05T15:02:11.096511 | 2014-12-09T02:17:45 | 2014-12-09T02:17:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,828 | py | chameleon.py | import pygame
from animation import Animation
from entity import Entity
from player import Player
from staticenemy import DynamicEnemy, DoctorMan, StaticEnemy
class Chameleon(Entity):
TONGUE_TIME = 1500
TONGUE_DELAY = 500
TONGUE_DURATION = 1000
LASER_TIME = 0
LASER_DELAY = 500
LASER2_DELAY = ... |
ce5b0729291e3750d32a6463ed567a3c00063cdb | 30b687240c06173d2fa80e5552d6c4216f7cd0aa | /monitoreo.py | 91d1e0eff440a962a3c5dd7f7411bb455183c042 | [] | no_license | mdmoctezuma/NTI | d3df6df397d190760d76d639fa25916411595823 | 6db2143c0502d682d335977b1e94f09af375d8d6 | refs/heads/master | 2020-04-27T02:17:28.558478 | 2019-03-05T16:52:32 | 2019-03-05T16:52:32 | 173,989,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,641 | py | monitoreo.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import socket
import json
import time
import numpy as np
import math
it = 75 #Número de muestras a tomar
nodosIndices = {"0002":0, "0004":1, "0005":2, "0006":3, "0008":4, "0010":5, "0014":6} #Indices para nodos
for m in range(it):
print("Inicié muestra " + str(m))
... |
4499ea16282661c4763cfc3e645552c2e5910dcc | 1419418226b6ba0f510649daaf62b71554cc2284 | /Melinka/tgf2dtopo.py | 46f70c524fe8e046bc0ef6c71d5d58a9398f2134 | [] | no_license | shineusn/mylife | 2ef48a777e39be2ef746c3dad16ea963d5b23e5e | 61dfa72d9047551746d26b7fe01fb5c2f1f0657a | refs/heads/master | 2020-03-22T13:44:42.422127 | 2018-02-13T18:09:43 | 2018-02-13T18:09:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 799 | py | tgf2dtopo.py | from mudpy import inverse
from obspy.core import UTCDateTime
project_name='Melinka_usgs'
model_name=u'maule.mod'
tgf_file='seafloor.sta'
coast_file=None
fault_name=u'melinka_usgs.fault'
time_epi=UTCDateTime('2016-12-25T14:22:26.00')
topo_dx_file=u'/Users/dmelgar/DEMs/SRTM30/melinka.dx.grd'
topo_dy_file=u'/Usersr/dmel... |
3ac5568fcc0ca461b5623a114be48552e78f32d9 | 463d2ec5da7c7908b27d06d26a51d9645b3d52f1 | /Algorithm/fibonacci.py | 999036a12651489b97fbcd30aa6f3f8dc4ba39e1 | [] | no_license | zhangdavids/workspace | 7b899d7385d0921be78658c60ad18578c12ab10a | 91f3c3e9b27018283132e3928ad2b84db5cc4b77 | refs/heads/master | 2021-07-11T13:21:32.445158 | 2018-11-02T01:04:06 | 2018-11-02T01:04:06 | 104,007,756 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,204 | py | fibonacci.py | #! usr/bin/env python
# _*_ coding: utf-8 _*_
__author__ = 'john cheung, zhangjohn202@gmail.com'
__mtime__ = '2018/4/4'
# 直接递归
def F(n):
if n == 0: return 0
elif n == 1: return 1
else: return F(n-1)+F(n-2)
# 数学公式
from math import sqrt
def f(n):
return ((1+sqrt(5))**n-(1-sqrt(5))**n)/(2**n*sqrt(5))
... |
7ba7e7ebce8d97e7aa422afff8d3e461892f8d18 | 12e94cd6b0f451125b001327a9ee154035c86fa5 | /src/person.py | 62602b9528e2db22eaee708baca795e765bff63f | [] | no_license | lmenna/python_unit_test | c2abed8030726441415c79693136f3d4dc128094 | 6294c14f3bcf62956f37f16c9ca1947506e00ba5 | refs/heads/master | 2020-12-29T07:32:54.226424 | 2020-02-23T02:16:40 | 2020-02-23T02:16:40 | 238,515,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | person.py | # application_code.py
#
# unittest example. Define a person class that will be used to show
# how to run unit tests using Python's built in unittest.
#
# To run the application use the command,
#
# > python person.py
#
# To run the unit tests use the command,
#
# > python -m unittest test_person
class Person:
nam... |
aecf3728cfd686558d9a3c52f99ad4fcf18046b2 | 2898929193fda685ccd58a7957955f945f9ac247 | /neurokit2/complexity/entropy_range.py | 8194261558288ae9ffebe00832526bba07bae0ac | [
"MIT"
] | permissive | minsooyeo/NeuroKit | 807e6e94023d18510ab865b5e8c7b6dc684a7523 | 09d35600e90ab82cdf76df81a60d12130b9096fb | refs/heads/master | 2023-09-05T15:10:09.026555 | 2021-11-17T03:33:09 | 2021-11-17T03:33:09 | 278,577,146 | 0 | 0 | MIT | 2020-07-10T08:12:06 | 2020-07-10T08:12:05 | null | UTF-8 | Python | false | false | 4,629 | py | entropy_range.py | import numpy as np
import pandas as pd
from .utils import _get_tolerance, _phi, _phi_divide
def entropy_range(signal, dimension=3, delay=1, tolerance="default", method="mSampEn", **kwargs):
"""Range Entropy (RangeEn)
Introduced by `Omidvarnia et al. (2018) <https://www.mdpi.com/1099-4300/20/12/962/htm>`_,
... |
43886b0739d10fad4a71e14881a36c03c1ce5b89 | f36c78782c22358f58cbab240f0263773fbb4d5d | /venv/Lib/site-packages/wirerope/rope.py | 5839a3c24d8fc5e985708fbcf514737cb2ab23f2 | [] | no_license | beerus789/Quizzomania | 223e2d1157889bdfe5cdfc5c835b4aab68299d76 | 35e938b24a5e88f1ccd61b3f6e2bbc8fe9e0083c | refs/heads/master | 2023-05-16T23:28:28.869237 | 2021-05-31T18:51:20 | 2021-05-31T18:51:20 | 372,574,109 | 2 | 1 | null | 2021-06-05T18:09:09 | 2021-05-31T16:53:02 | Python | UTF-8 | Python | false | false | 4,720 | py | rope.py | """:mod:`wirerope.rope` --- Universal method/function wrapper.
==============================================================
"""
import six
from .callable import Callable
from .wire import descriptor_bind
from ._compat import functools
class RopeCore(object):
def __init__(self, callable, rope):
super(Ro... |
82a82b080cce19888b56d25e26b641bd00bafee7 | 9e38e2a3a81771effcac98ccb1e0161076012b80 | /chsdi/tests/integration/test_file_storage.py | 7d4e9213945676667cd3c588422878a9292b2acf | [
"BSD-3-Clause"
] | permissive | ioda-net/geo-api3 | 6d3340e2d7798cdc5551d5b77d33282ed0ad6dfe | 6326cb20e8e7237bcebce77f29ad9f51e94a5a3c | refs/heads/master | 2021-01-24T04:08:27.488768 | 2017-04-28T13:28:08 | 2017-04-28T13:29:33 | 34,445,022 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,879 | py | test_file_storage.py | # -*- coding: utf-8 -*-
import os
from chsdi.tests.integration import TestsBase
WRONG_CONTENT_TYPE = 'nasty type'
VALID_KML = '''<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Simple placemark</name>
<description>Attached to the ground. Intelligently... |
aee8c385a6fe40edf62c56504ff24004dc03da33 | a0d0a7ef9ab2c7c06c864a1ae372171e15606b46 | /lib/modeling/detectors/__init__.py | 4f3674fe6d999abebdb2da71a4da336d793fe925 | [] | no_license | mmmcn/votenet-manhattan | 866c0d54ede6cf1c2f3dc4767441173656cc98ee | 88b0dafbaf367557c028db75abbe0f30d5abf65b | refs/heads/master | 2023-05-02T18:41:06.752471 | 2021-05-21T01:50:09 | 2021-05-21T01:50:09 | 366,908,020 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | __init__.py | from .votenet_test import VoteNetTest
__all__ = ['VoteNetTest']
|
8b5f3c027b663b6f2b6090a55e832c3c688d5a06 | 16dfe29a922bed26db9c0d8403b88736c5dcc774 | /music_albums/migrations/0002_auto_20160121_1947.py | df0e2765de2b30e77d4584b58a973e0318d13f3e | [
"MIT"
] | permissive | nloyolag/music-albums-django | c019502b69a298d795f7a936ef3dfc2251574377 | ead0fff524142af5454f5dd3f4dc7ef7bf70c452 | refs/heads/master | 2021-05-30T05:10:09.807087 | 2016-01-23T16:23:09 | 2016-01-23T16:23:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | 0002_auto_20160121_1947.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-22 01:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('music_albums', '0001_initial'),
]
operations = [
migrations.AlterField(
... |
c486f46f8100d4b356a09fdc7d8518027f14a86e | 1a33fbb9d84d25d1198d3faee450daa5c5a3c9dd | /258AddDigits.py | 4d936b8c9229b8bee6466e86a68183176b1127cd | [] | no_license | baihao8904/LeetCodeExerciese | ec882ff5fc87eef868484b7be6fe12478e53a320 | 2208052664d54f306ed8c386815cf1be07c05c7c | refs/heads/master | 2020-11-24T20:46:09.866511 | 2017-03-02T09:07:10 | 2017-03-02T09:07:10 | 67,759,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 560 | py | 258AddDigits.py | class Solution(object):
def addDigits(self, num):
"""
:type num: int
:rtype: int
"""
result = num
stepresult = 0
while True:
while result>=10:
stepresult += result%10
result //=10
stepresult += result
... |
5c5f5e7a3f95b8bae5fd41f0b40cad024ad9b7b7 | 16b4b834c108e29ffd41e0156f26217f0fe46790 | /proto-gen-python/proxyapi/proxyapi_pb2_grpc.py | fc4610d97b294dde8c0a52c9b97eb8def9d13a52 | [] | no_license | swarpf/swarpf-idl | fd0ef3d82254cb0cd309c3e5ca08ee1759a93235 | cde3ba14fe7eddbaa5d75fede0697ac55d656e32 | refs/heads/master | 2022-11-19T09:40:30.495524 | 2020-07-21T05:56:04 | 2020-07-21T05:56:46 | 276,749,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,271 | py | proxyapi_pb2_grpc.py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import proxyapi_pb2 as proxyapi__pb2
class ProxyApiStub(object):
"""Missing ass... |
0a2fcdcc4563b1420f8bee3f0b0a3d0d73dc96ea | ebe65beb871a50e6ea66a27f109f2ed2c9b54816 | /run.py | b15d549fa77476e7730471d6c3f77c0b744c6c3a | [] | no_license | e0en/tweet-sweeper | a83bd42e15ac34c24193f9823f19318709470c1d | 20ec50f2947ce3b80819e2cc99561a9a594c8bd2 | refs/heads/master | 2020-04-07T19:36:26.608696 | 2018-11-22T06:51:57 | 2018-11-22T07:39:43 | 158,655,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,050 | py | run.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import json
from pathlib import Path
import traceback
import twitter
PWD = Path(__file__).parents[0].resolve()
def write_log(filename, msg):
with open(filename, 'a') as fp:
ts = time.time()
fp.write(f'{ts}\t{msg}\n')
if __name__ == '__... |
bce6742e2dd3e831a5f2b8f32cdc8d4510820882 | 3ab91a57b3b7cb66e29188cf2d5825ee3c44f46f | /sms_wsj/visualization.py | 345757acfec230e937b64d70546ed0d97ab82d79 | [
"MIT"
] | permissive | fgnt/sms_wsj | 89bad51a356202c92ba2d99d093673df93a1ff9d | b882cb7851f86aa1666471a91d1a488beaabcb76 | refs/heads/master | 2023-02-22T18:41:27.597133 | 2023-02-06T15:32:42 | 2023-02-06T15:32:42 | 216,998,925 | 79 | 21 | MIT | 2023-02-06T15:32:44 | 2019-10-23T07:47:30 | Python | UTF-8 | Python | false | false | 1,639 | py | visualization.py | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches
def plot_scenario(ex, ax: plt.Axes = None, *, figsize=(12, 8)):
"""
Plot the source position, sensor position and room dimensions from an
SMS-WSJ example in the (x, y) plane, i.e. the z-axis is ignored.
Args:
ex: An ... |
0c8e59b6a719ddea1a42b473dd5f694d0f42c474 | bd56418a12d7f762c52cd21677ee9c1c426ba58c | /NuTau_Simulation/MCPEConverter.py | 777e5bf269d0d3ab0906b6273d09417f96556511 | [] | no_license | ka-til/PONE_NuTau | c9437b5df18bd73ac7c073f263062079cf5e68f1 | 6a534d55ad89b76b0e444f8b6fcd3ca99a8d338f | refs/heads/master | 2023-02-20T03:12:00.504755 | 2021-01-11T22:21:35 | 2021-01-11T22:21:35 | 238,031,685 | 1 | 1 | null | 2020-11-18T04:56:58 | 2020-02-03T18:21:22 | Python | UTF-8 | Python | false | false | 3,708 | py | MCPEConverter.py | from icecube import icetray, dataio, dataclasses, simclasses, clsim
from icecube.icetray import I3Units, OMKey, I3Frame
from icecube.dataclasses import ModuleKey
from os.path import expandvars
import numpy as np
import argparse
from SimFuncs import generateMCPEList
class makeHits(icetray.I3ConditionalModule):
"""
... |
266a361e78627e8e0b6c8b30868301d2499d71a6 | d46844ac1c4230579d6c87d800e07fb41bc99592 | /pwncat/platform/linux.py | 26c81519d596ef86013c26e3fd70672af80a9a6a | [
"MIT"
] | permissive | calebstewart/pwncat | 14ade3e424fb70ce3e62b8b5c5053959515799e7 | 37f04d4e16ff47c7fd70e95162f9fccd327cca7e | refs/heads/master | 2023-08-14T04:27:04.773361 | 2022-03-21T20:35:00 | 2022-03-21T20:35:00 | 261,925,766 | 2,177 | 267 | MIT | 2023-05-19T04:33:17 | 2020-05-07T02:02:40 | Python | UTF-8 | Python | false | false | 65,687 | py | linux.py | """
The Linux platform provides Linux shell support ontop of any channel.
The Linux platform expects the channel to expose a shell whose stdio
is connected directly to the channel IO. At a minimum stdin and stdout
must be connected.
Because of the way this platform interacts with the shell directly,
it is not able to ... |
ad83bda2a98e082f168db339e1e131a2291dc8d1 | bd28a1957f904219a0247f7a76914827953bb4ab | /Algo_DS/Sort/insertion_sort.py | 98d368107bd0a51d18d66411a89decf64fd511c1 | [] | no_license | dubblin27/algorithms | 7a653d39f62e7088d88ddf94e95574b773289bb8 | 7827fc70b1e3fdf7dcbef83c790ef292444e20f4 | refs/heads/master | 2021-04-17T06:46:35.851669 | 2020-04-07T20:15:59 | 2020-04-07T20:15:59 | 249,421,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | insertion_sort.py | # 5 3 4 1 2
# 5 3 4 1 2
# 3 5 4 1 2
# 3 4 5 1 2
# 1 3 4 5 2
# 1 2 3 4 5
def insertion_sort(lst):
for i in range(1,len(lst)):
key = lst[i] # stores the current element
j = i-1
while j >= 0 and key < lst[j]:
lst[j+1] = lst[j]
j-=1
... |
f32a86a337c63348e1a376061694109008f3e6b8 | 22553d5e0644f5ea1395b38684f5b8b928b0d983 | /src/utilities/requestsUtilities.py | 0dc9f7ec08256befea14d718e02681b1f1ae9d12 | [] | no_license | nurshahjalal/PyAPI | e19df1dc7086ae51d400a4db80378e453bf24970 | 549c4a3c4e8033975a0f5d0f66704c2c92a2431e | refs/heads/main | 2023-02-07T05:56:46.279428 | 2020-12-22T05:58:21 | 2020-12-22T05:58:21 | 323,529,723 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,755 | py | requestsUtilities.py | import requests
import os
from requests_oauthlib import OAuth1
from src.configs.host_config import API_HOST
from src.utilities.credentialUtility import CredentialUtility
import logging as logger
class RequestUtility(object):
def __init__(self):
# get the ENV variable from environment if ENV is not set t... |
0b8dc4f8c5803433f576832ed57c18ac8764a177 | c93243c4296e8a93cf3ce5cc5b25cf060de42fbc | /fypress/utils/functions.py | 1dda24c83c1eac2023f1f72ab7100d167ef64e0e | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Fy-/FyPress | 374fb158d7a0fdcd6fb669064f8ba9ead662b20f | be357134969797f92b94db77c9e3aa863c0094fe | refs/heads/master | 2021-01-18T02:12:21.849576 | 2020-07-24T07:33:34 | 2020-07-24T07:33:34 | 59,509,996 | 70 | 15 | null | null | null | null | UTF-8 | Python | false | false | 1,713 | py | functions.py | # -*- coding: UTF-8 -*-
from flask import request, url_for, g
from urlparse import urlparse, urljoin
from unidecode import unidecode
import string
import random
import re
import os
def singleton(cls):
cls._state = {}
orig_init = cls.__init__
def new_init(self, *args, **kwargs):
sel... |
7a82bc70913b427c0271b48f323284db4562a8f5 | 89a1181aa933911c3b319507e001ad636c769d32 | /gat_conv.py | a2b11942880d0606372b2e2bce5b06b50013e6b7 | [] | no_license | coolsunxu/GAT_Pytorch | 905364410230919c07a7570e4ca0522e1cdcc4d5 | ab9b1eed011975276e97c0ba2f001d390259f915 | refs/heads/master | 2021-03-15T11:48:19.626956 | 2020-04-04T10:09:33 | 2020-04-04T10:09:33 | 246,848,059 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,517 | py | gat_conv.py | import torch
import torch.nn as nn
class BatchMultiHeadGraphAttention(nn.Module): # 多头图注意力模型
def __init__(self, n_head, f_in, f_out, attn_dropout, bias=True):
super(BatchMultiHeadGraphAttention, self).__init__()
self.n_head = n_head # 头大小
self.f_in = f_in # 输入大小
self.f_out = f_out # 输出大小
self.attn_dropout ... |
0a5aa375ea2d4d94f51e37e5c4eaf2f88e92a2e6 | c179c8d605daf6c7876b6297806ce3f8c3ddec06 | /OpenMicsDemo/flask_app/models/openmic.py | e1f59b1457d2e3df88a9d1b233e3eafbda3fb6b0 | [] | no_license | alexstack012/Coding-Dojo-Python | 6d3e667c95ed96ecdfe67187f158368e66e7c5cf | 3b173c7b35d171d3c9051019c9ad86ee2d36b5eb | refs/heads/main | 2023-08-18T12:05:27.297406 | 2021-09-22T14:00:00 | 2021-09-22T14:00:00 | 403,322,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,070 | py | openmic.py | from flask_app import app
from flask_app.config.mysqlconnection import connectToMySQL
from flask import flash
from flask_app.models import user
class OpenMic:
def __init__(self, data):
self.id = data['id']
self.venue = data['venue']
self.type = data['type']
self.date = d... |
61a509ea7adad89e0659d62baebe02536b5d3b9a | 8f293bb2a18208f051a4955df4d32990b05455d2 | /inspirehep/utils/latex.py | 86afa59ab1371924e334755e98348e9b434dc4b2 | [] | no_license | spirosdelviniotis/inspire-next | 8ccd4e0483aca1bfee7562537d912c939ba3fea6 | 90032ba4825c6c4dda78c9c2b1d3edf18692b9dc | refs/heads/master | 2021-01-17T06:43:49.128333 | 2016-09-01T15:09:33 | 2016-09-01T15:09:33 | 67,199,332 | 1 | 0 | null | 2016-09-02T07:10:57 | 2016-09-02T07:10:57 | null | UTF-8 | Python | false | false | 12,874 | py | latex.py | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2016 CERN.
#
# INSPIRE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... |
4f281c7ef6940aa7e42c19de00106fe0b1ff9752 | 74acee4fdc8b195f23401b57e26257ce803bc3d2 | /vMigrater/vmm_userspace/get_vcpu_rts.py | 3ce0bf234f884ef42e5265d7d248a6e1a0ce6068 | [
"Apache-2.0"
] | permissive | triplekill/bcc | b5001d566553d10dd59323b5c59d2ae9096c91d8 | f755d5afdee80b8774cf671be4bc3754d716c59a | refs/heads/master | 2020-11-29T05:55:37.584544 | 2017-12-25T20:40:20 | 2017-12-25T20:40:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,941 | py | get_vcpu_rts.py | #!/usr/bin/python3
# iomigrater - create based on iofilter
# @lint-avoid-python-3-compatibility-imports
#
# biotop block device (disk) I/O by process.
# For Linux, uses BCC, eBPF.
#
# USAGE: biotop.py [-h] [-C] [-r MAXROWS] [interval] [count]
#
# This uses in-kernel eBPF maps to cache process details (PID and ... |
357a739e3ccb76cf9b540d8a7017d814e517c281 | 75dcb56e318688499bdab789262839e7f58bd4f6 | /_algorithms_challenges/codeabbey/_CodeAbbeyPythonSolutions-master/weighted_sum_of_digits.py | 1d3d69bd7da6c0e9e96a272f51e3f16c71dfae38 | [] | no_license | syurskyi/Algorithms_and_Data_Structure | 9a1f358577e51e89c862d0f93f373b7f20ddd261 | 929dde1723fb2f54870c8a9badc80fc23e8400d3 | refs/heads/master | 2023-02-22T17:55:55.453535 | 2022-12-23T03:15:00 | 2022-12-23T03:15:00 | 226,243,987 | 4 | 1 | null | 2023-02-07T21:01:45 | 2019-12-06T04:14:10 | Jupyter Notebook | UTF-8 | Python | false | false | 350 | py | weighted_sum_of_digits.py | amount_values = int(input())
results = []
def get_weight(num):
len_of_num = len(str(num))
weight_sum = 0
for i in range(len_of_num, 0, -1):
weight_sum += num%10*i
num //= 10
results.append(weight_sum)
values = list(map(int, input().split()))
for i in range(amount_values):
get_weigh... |
40b8a2343b39f22ce6aef306c624c8d2da8131d5 | a016f2eaca3981b8f48d3e5b147f971b53030b10 | /RandomForestClassification.py | bd282f58cc2d98ba6f920b5d4956c14e62653cd8 | [] | no_license | zheng-gogo/Ga_randomForest_predictMci | ad056e46ea4358e4eb3071ab202717e64ef115ad | 384ffe976e33b89106a3be63b3428928b657e170 | refs/heads/master | 2023-03-17T23:43:11.837589 | 2021-03-17T13:27:47 | 2021-03-17T13:27:47 | 319,944,771 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,904 | py | RandomForestClassification.py | import pandas as pd
# 决策树分类器,用于特征提取
from sklearn.feature_selection import SelectFromModel
from sklearn.tree import DecisionTreeClassifier
# 随机森林分类器
from sklearn.ensemble import RandomForestClassifier
# train_test_split自动分训练集和测试集
from sklearn.model_selection import train_test_split
# 验证方式cross_val_score交叉验证
from sklearn... |
7b91555a2044d1c5e22825831e1716a72554a0e5 | 1663028985b065f6e8f11ab7c15e93c0edea89c9 | /HW2/cm.py | 0cc7ba0216c18ff0254b147fd11255cb5a8cfc51 | [] | no_license | kaufmann42/Machine-Learning-Work | f96c9b38e750eb50151076bc53fac51dc21a3031 | 7fb43ed40dd009cdafdd3ed9fa79d62b885d450f | refs/heads/master | 2021-01-10T08:48:09.259379 | 2016-02-16T22:22:03 | 2016-02-16T22:22:03 | 50,889,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,141 | py | cm.py | # John Kaufmann
# 3/16/2016
# BME4931
#
# print a confusion matrix given the predicted classifiers, the actual classifiers and the name of the structure
def print_ConfusionMatrix(predicted, actual, name):
actual = predicted
total = actual.shape[0]
one = 0
two = 0
three = 0
four = 0
#const... |
5219d3d243e05a57de9abea6e6e1186e503cb970 | bf363e7a85de5b03c5eac06663b7c0ca3deb4626 | /code/KJ_label_data | 69be1b104ed78966eb5e75af996dfecdf96e685b | [] | no_license | brocklab/Johnson_Integrated_Modeling | 856ae6564afa628d02673f5b3ac58964fbc7b481 | ab4630e91a912ca3407429a0b306e8e85aec7ca1 | refs/heads/master | 2020-12-20T13:19:56.777583 | 2020-08-05T17:47:53 | 2020-08-05T17:47:53 | 236,089,283 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,824 | KJ_label_data | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 28 14:51:10 2019
@author: kj22643
"""
%reset
import numpy as np
import pandas as pd
import os
import scanpy as sc
import seaborn as sns
from plotnine import *
path = '/Users/kj22643/Documents/Documents/231_Classifier_Project/data'
#path = '/stor/sc... | |
390495ccc14282f3d5abe689c862e0967ec64c11 | c17708f1851e064477f14b0b3a0748337ecc5d18 | /insertInterval/my_solution.py | 67f39e127f531c77c44e67a7c911ba623b7e5115 | [] | no_license | petercrackthecode/LeetcodePractice | 3b94ff899e474db66ac8c7d9f48388816d4a2e1f | af6d188221794f805313f2183f58bd1068df0c88 | refs/heads/master | 2023-08-18T16:55:24.773399 | 2023-08-05T05:43:30 | 2023-08-05T05:43:30 | 194,612,257 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | my_solution.py | # https://leetcode.com/problems/insert-interval/
from typing import List
def is_intercepted(i_1: List[int], i_2: List[int]) -> bool:
return (i_1[0] <= i_2[0] and i_2[0] <= i_1[1]) or (i_2[0] <= i_1[0] and i_1[0] <= i_2[1])
def insert(intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]:
i... |
efca954e1977a6f6ac9a966b3c84ba80f5b7a663 | b76b67ca536ce8d02a3062d371452d6443153be1 | /baek/baek_10989_numbersort3.py | d144850a213add695d2563291c19e341b328ede6 | [] | no_license | anyl92/ALGORITHM | 872b5272aa19885a247e4627b12a611f15b8953a | b35a5dc0f832569de28fd72a9a8644bd2f124f98 | refs/heads/master | 2022-12-22T06:38:16.066205 | 2021-05-13T13:40:53 | 2021-05-13T13:40:53 | 197,392,280 | 1 | 0 | null | 2022-12-10T11:21:27 | 2019-07-17T13:11:16 | Python | UTF-8 | Python | false | false | 283 | py | baek_10989_numbersort3.py | import sys
sys.stdin = open('10989.txt', 'r')
counting_list = [0 for _ in range(10001)]
N = int(sys.stdin.readline())
for n in range(N):
counting_list[int(sys.stdin.readline())] += 1
for i, v in enumerate(counting_list):
if v:
sys.stdout.write((str(i) + '\n') * v)
|
0709d413ddbe41a0c97f94b7819fdfded241d3fc | 760c6031b03a40491a058b1db3e7d006275ed6e2 | /Code/Resources_parent_module.py | 21a7bd4fcc3fe838d8a82aa13e317a91059ace13 | [] | no_license | A-Giordano/Library_system_backend | 33187640d4c26d7755d5b1efb40e03105f672a18 | e1ae3458060a77626d8e645c7927360f8dfee652 | refs/heads/master | 2020-08-26T13:36:10.700322 | 2019-10-23T10:50:25 | 2019-10-23T10:50:25 | 217,027,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,684 | py | Resources_parent_module.py | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 9 16:22:21 2018
@author: SDis
"""
#import Code.Members_module
class Resources:
""" Parent class for Books and eResources containg the main data fields and related setters and getters"""
def __init__(self, title, author, publisher, year):
self.title = tit... |
9156ee034ceb8a39fc1eb3a18c1597c737814c72 | ea2f34db365c925378ffbc8cdca06355998c1c3e | /MeetUps/tests/test_views.py | 6a1f6bf6da3a7a3e75176f3ec4534faddda3dac1 | [] | no_license | developerVictorNkuna/Meet-up-DjangoTDD | 2358512fee41fc0ec1046fdf0a70117768a7fbeb | 9cb357c142134f069f91216365f4323fd9b1c507 | refs/heads/main | 2023-06-28T01:39:48.821234 | 2021-08-05T14:32:13 | 2021-08-05T14:32:13 | 392,716,769 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | test_views.py | # from django.test import TestCase ,LiveServerTestCase,Client
# from MeetUps.models import*
# from django.shortcuts import reverse
# from .forms import RegistrationForm
# class MeetUpViewTest(TestCase):
# @classmethod
# def setupTestDat(cls):
# #create or get all meetups
# d... |
afcadc11d23fb921eb6f8038a908de02ee763ca4 | cbfddfdf5c7fa8354162efe50b41f84e55aff118 | /venv/lib/python3.7/site-packages/apscheduler/executors/gevent.py | 1235bb6e4f221f27c4d6c86cb32c3d16885814ca | [
"Apache-2.0",
"MIT"
] | permissive | tclerico/SAAC | 8d2245221dd135aea67c5e079ac7eaf542b25e2f | 2f52007ae8043096662e76da828a84e87f71091e | refs/heads/master | 2022-12-09T21:56:33.430404 | 2019-02-20T14:23:51 | 2019-02-20T14:23:51 | 153,152,229 | 3 | 0 | MIT | 2022-09-16T17:52:47 | 2018-10-15T17:13:29 | Python | UTF-8 | Python | false | false | 777 | py | gevent.py | from __future__ import absolute_import
import sys
from apscheduler.executors.base import BaseExecutor, run_job
try:
import gevent
except ImportError: # pragma: nocover
raise ImportError('GeventExecutor requires gevent installed')
class GeventExecutor(BaseExecutor):
"""
Runs jobs as greenlets.
... |
bf51da12632013c62aa543ae7f02415057138c7a | bf66c7eba0ddc9cddce19ef1ac2b6096592958f0 | /jsonl_data_utils.py | e5c61b5f34c91f4af99b8043eb316de4cded2e36 | [] | no_license | mor91/redditor_bot | 593581f3b3cd50b7fc75f6583da651f580fe0892 | dc6e68efaf51d9ae4a64b85a8968134e58791fdb | refs/heads/master | 2021-01-12T06:16:53.734210 | 2017-01-06T07:54:20 | 2017-01-06T07:54:20 | 77,335,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,069 | py | jsonl_data_utils.py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
3887516e4222504defe439e62bd24b12db3cdd84 | 116a4a2fcd3e9c3d216f96103006c707daa6001a | /HelloDjango/apps/hhbase/forms.py | 56d96dab8a78e8fb63a05347076bedaacd7e0a33 | [] | no_license | Eldar1988/a_white_birds | 22d743ed1fa651062f070c0e81b7ac665be7a72a | 0430d5322b3a55b6f55e9541675d6670f5d8a518 | refs/heads/master | 2022-12-18T20:23:26.293059 | 2020-09-15T04:27:59 | 2020-09-15T04:27:59 | 283,169,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | forms.py | from django import forms
from .models import HhRequest
class WorkRequestForm(forms.ModelForm):
"""Форма заявки на премию"""
class Meta:
model = HhRequest
fields = ('profile', 'sphere', 'experience', 'work_request', 'resume')
widgets = {
'profile': forms.Select(
... |
c19c3f580d7555379bd7e077b0264a3784179e93 | 941dd50da105250fe8faa8ac1c9d27e0d655e82e | /assignment2/q1.py | c62e9abcfbbb74f98b511670fe5a495bd87f07b2 | [] | no_license | alphaluf888/asu_cse578_assignments | 136d20f5f8e8e605cbdc8f2b0111173c488f8dfd | 630a9132b83a6672576280a36024d3ccdc92cdbf | refs/heads/master | 2023-04-28T14:58:15.099018 | 2021-05-15T16:03:38 | 2021-05-15T16:03:38 | 349,888,443 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | q1.py | import sqlite3
import pandas as pd
#%matplotlib inline
import matplotlib.pyplot as plt
db_filename = 'readonly/dinofunworld.db'
conn = sqlite3.connect(db_filename)
c = conn.cursor()
c.execute("SELECT a.Name, count(c.visitorID) \
FROM attraction as a, checkin c \
WHERE \
a.AttractionID = c.attraction \
AND a.Category l... |
978f3979aee1c4361483fd61b54352e7fff8d3b3 | c2ef597a638e4c29258482e3fe58571bede52c57 | /pilutils/parse.py | d5e3de17593a2d35d749ef7b7ccdb6dd7d240d54 | [] | no_license | tandemdude/pilutils | ae10c140cd8a24764ead36bea374dc289ab08cc0 | ba0cea1abb5f9c854167dae3c709262d11251399 | refs/heads/master | 2022-11-28T02:35:30.921415 | 2020-07-30T11:29:55 | 2020-07-30T11:29:55 | 283,604,784 | 0 | 0 | null | 2020-07-29T21:20:33 | 2020-07-29T21:20:32 | null | UTF-8 | Python | false | false | 4,904 | py | parse.py | """Functions for parsing various strings to RGB tuples."""
import json
import re
from pathlib import Path
import importlib.resources as resources
from pilutils.basic import hex_to_rgb
__all__ = [
"parse_hex6",
"parse_hex3",
"parse_rgbfunc_int",
"parse_rgbfunc_float",
"parse_rgbfunc_percent",
"... |
8a773448383a26610f4798e12fb514248e71dc4b | abee52048026e82078538c32f2275a7ef1b3b533 | /import_module.py | ef9330ed926b5f49890d1989419606d7b91f17f4 | [] | no_license | MichaelShulga/botcreator | 23f47f56b3a274ab308d427cd17b44644c71e4f8 | 9ba090a4f52c4497b723c60ad358e1584d8a2f33 | refs/heads/master | 2023-04-08T22:55:29.190451 | 2021-04-19T15:17:29 | 2021-04-19T15:17:29 | 359,122,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | import_module.py | import importlib
if __name__ == '__main__':
module = importlib.import_module('UserFile')
print(module.if_new_message)
print(module.ID)
|
8ce2db0a28de8ddd504b744f3c9210d1a0ed7d45 | 4273be8b434cbe1bb5c0059a51d511f5a3c8f3b6 | /qbittorrent/client.py | dc47d8e78091d5312adacee3c164c8cb06fdc1d6 | [
"MIT"
] | permissive | CuteFwan/aqbit | 8e623855898405a49722dc94c20347bf23a359e0 | 8a05364fdb7bf78b9422f490db96a80b0481482a | refs/heads/master | 2021-08-16T22:12:42.562482 | 2020-08-11T16:08:21 | 2020-08-11T16:08:21 | 212,701,059 | 0 | 0 | MIT | 2019-10-14T05:06:52 | 2019-10-03T23:35:18 | Python | UTF-8 | Python | false | false | 7,503 | py | client.py | import json
from .errors import TorrentNotValid, TorrentHashNotFound, FailedLogin, HttpException
class QBittorrentClient:
"""
QBittorent client
"""
def __init__(self, *, connector):
self.connector = connector
def login(self, username : str, password : str):
return self.connector.... |
aef88406dccaac9ec4b3faa474dcc621c9f689e7 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/sdssj9-10_154328.12+353400.0/sdB_sdssj9-10_154328.12+353400.0_coadd.py | 7b93ed0614f71f301caa8b050e342053e151e410 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | sdB_sdssj9-10_154328.12+353400.0_coadd.py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[235.867167,35.566667], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_sdssj9-10_154328.12+353400.0/sdB_sdssj9-10_154328.12+353400.0_movie_count.fits", cntcoaddfile="/data2/fleming/... |
80317dda1ae412f24e74c59a2b32ac956ad2d21d | c47df8f2b59b6e94a6cd77c9bf58924e433c4d4d | /lozapp/forms.py | 8560f6ee87fff94f79245a662fb875948f123570 | [] | no_license | dklementik/Lozevents | 904af840a1159299c910b091ab831dd1aee60548 | 0e7cce45c2e7e599e4d73424e6a3886b54cbd79d | refs/heads/master | 2020-12-25T14:15:00.793793 | 2016-06-20T12:51:12 | 2016-06-20T12:51:12 | 61,547,091 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 844 | py | forms.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
from django import forms
from models import Event, Categorie
class EventForm(forms.ModelForm):
street = forms.CharField(max_length=45)
zipcode = forms.CharField(max_length=5)
city = forms.CharField(max_length=100)
class Meta:
model = Event
... |
766653db8d98c05b3156b331ca3f92b5c64e0a44 | 6a523399ca6dc234284f4274ae4fc9c79db08c30 | /xopgg/user/urls.py | e79e52a54418ccd1b1f850e352e88e4a3cff7f8d | [] | no_license | irvingxwb/SimpleOPGG | f265b4a0e99dc321f1af56873325fee902eb5b3c | 2b18aa4815f72f72685659e9f1f2c0573b1e4588 | refs/heads/master | 2021-09-27T00:13:52.733296 | 2021-03-15T23:55:37 | 2021-03-15T23:55:37 | 228,106,551 | 1 | 0 | null | 2021-06-10T20:07:56 | 2019-12-15T00:07:33 | JavaScript | UTF-8 | Python | false | false | 449 | py | urls.py | from .views import *
from django.urls import path
urlpatterns = [
path('register/', UserRegisterView.as_view()),
path('login/', UserLoginView.as_view()),
path('addaccount/', UserAddAccountView.as_view()),
path('matchlist/', GetMatchListDataView.as_view()),
path('matchrecord/', GetMatchRecordDataVie... |
b3bdf71172b3d495a1f3c5138f35cf02c44e1264 | c8ec6e3388c2027994d3a589be9cbd21d5da8778 | /Play/Week8/last_man_standing.py | cf8aa7237cb24b963198af81da0cece6b0a5a76b | [] | no_license | DoStini/FEUP-FPRO | c313dec3a8ed208a960187daf11471aa44c68866 | 37dfed22f34fd515e0f4ed1eb540613de0eeab5b | refs/heads/master | 2021-05-26T08:49:55.305306 | 2020-04-08T11:25:22 | 2020-04-08T11:25:22 | 254,065,132 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | last_man_standing.py | # -*- coding: utf-8 -*-
"""
Created on Sun Nov 24 10:16:27 2019
@author: morei
"""
def last_man_standing(alist, step, index=0):
if len(alist) == 1:
return alist[0]
else:
index += step - 1
if index >= len(alist):
index = index % len(alist)
alist.pop(ind... |
d09ac17c4d12d5d1903ee1b90716e37f4b49b738 | 4e4dd6a7ea6598f8cfcd36c01384b9f61574f2a4 | /main.py | de4f2e942306dd19dc0bef051a56528ff029f407 | [
"MIT"
] | permissive | hamidpvr313786/Welcome-Bot | f06b3705c475aafb28060fe9b7e39fe197d954b7 | f86ca19f429e152a901981ff00f8f4aedd819b8c | refs/heads/main | 2023-07-14T02:25:20.187895 | 2021-08-13T12:50:11 | 2021-08-13T12:50:11 | 395,609,385 | 1 | 0 | MIT | 2021-08-13T10:19:27 | 2021-08-13T10:19:26 | null | UTF-8 | Python | false | false | 1,312 | py | main.py | from telegram import Update
from telegram.ext import Updater , CommandHandler, CallbackQueryHandler, CallbackContext,Filters,MessageHandler
import os
Token =os.environ.get("BOT_TOKEN",None)
updater = Updater( Token ,use_context = True )
def start(updater,context):
updater.message.reply_text('''𝙷𝚒 , \n\n𝙸𝚊𝚖 𝚊 ... |
6397d80d9428fa0196ebb4246ec677d303067b4a | 87afb2a9acae1c04326f4e7118ad8b5d9580236c | /tests/test_helpers.py | b6e698fa168a0c1d843db966e8c4fe6404ccc474 | [] | no_license | edumucelli/backend-engineering-challenge | 14a27fc472622c09f77628b571c1a43b040adb20 | 1d04a97f4400cb5e5c47e10ce58a1dfca9d92c8c | refs/heads/master | 2020-06-20T07:53:07.311359 | 2019-07-22T20:30:08 | 2019-07-22T20:30:26 | 197,049,744 | 0 | 0 | null | 2019-07-15T18:14:13 | 2019-07-15T18:14:12 | null | UTF-8 | Python | false | false | 657 | py | test_helpers.py | import pytest
from unbabel_cli.helpers import extract_events_from_input_file
class TestHelpers(object):
def test_that_reading_ok_file_works(self):
events = extract_events_from_input_file('./fixtures/events_ok.json')
assert len(events) == 3
def test_that_read_events_are_ok(self):
eve... |
eaa01710bec413ca81c98b48e73be9ee4b593707 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/cpu/test_sparse_softmax_cross_entropy_with_logits_v2_op.py | 5475d5ff6b554f28fe05e88a7055740593ef1abc | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 2,013 | py | test_sparse_softmax_cross_entropy_with_logits_v2_op.py | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
19b5189970203c80d34df3ecf5d94620659361e8 | 4129bd61465d6a89b550d154e986f553c6c39b18 | /odd or even.py | 6b98e76b557d18647a4d8193c01a250a93e0567d | [] | no_license | banumathimurugan/python-programming | 3c5242bdee0c0520e47d19429bfc5ed585b83324 | 7dc53d4be7b7167f1a37a5eb08b19494ee7eeecb | refs/heads/master | 2021-04-27T12:17:10.402121 | 2018-09-12T10:29:59 | 2018-09-12T10:29:59 | 122,577,707 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 79 | py | odd or even.py | x=raw_input(Enter the number)
if x/2
print(Even number)
else
print(Odd number)
|
a7586f110be9051a87cdc7ae904bcf38df3651e5 | 8b9e9de996cedd31561c14238fe655c202692c39 | /math/leetcode_Add_Digits.py | f246b75e21d15cc0cf46501644be0547a5911cf4 | [] | no_license | monkeylyf/interviewjam | 0049bc1d79e6ae88ca6d746b05d07b9e65bc9983 | 33c623f226981942780751554f0593f2c71cf458 | refs/heads/master | 2021-07-20T18:25:37.537856 | 2021-02-19T03:26:16 | 2021-02-19T03:26:16 | 6,741,986 | 59 | 31 | null | null | null | null | UTF-8 | Python | false | false | 779 | py | leetcode_Add_Digits.py | """Add digits
leetcode
Given a non-negative integer num, repeatedly add all its digits until the result
has only one digit.
For example:
Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only
one digit, return it.
Follow up:
Could you do it without any loop/recursion in O(1) runtime?
"""
clas... |
9b69ecc81bff19dbbdb22f607a47c36c72946564 | d6af7a8523c5e916410a4d6449e8ecf504fa63ad | /rekenmachine.py | 61a3366913a54dfe4c5c0724c8f3686638cec376 | [] | no_license | GerlinedP/python-begin | f5e432a06946bb1d0aee514504444c1eb5857ccd | d2435ce932a45e47b765f6d7a768b46266d3f710 | refs/heads/master | 2023-03-22T19:40:55.334702 | 2021-03-15T18:55:59 | 2021-03-15T18:55:59 | 342,928,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | rekenmachine.py | # getal opvragen
getal1 = input("Getal 1: ")
getal1 = int(getal1)
# operator opvragen
# + - / *
operator = input("Operator: ")
# getal opvragen
getal2 = input("Getal 2: ")
getal2 = int(getal2)
# uitvoeren
if (operator == "+"):
uitkomst = getal1 + getal2
elif (operator == "-"):
uitkomst = getal1 - getal2
elif (oper... |
c57b63d60e91bf00c63d518c970ce3090d61dd28 | 3d89481cdb04c6d83fc76128b6ed88804f05a4e1 | /Zealbot/Publisher details/random_useragent/test.py | cbec8d4c9888cec77667fb2dc9cbdd231ed2e734 | [] | no_license | mahendranviji333/internstask | 11a00c2e921aaef27e62f8b1a857397513497319 | 104f98dde440901264674249a71ae6430d4b9735 | refs/heads/main | 2023-06-19T08:57:03.041889 | 2021-07-17T11:29:28 | 2021-07-17T11:29:28 | 386,555,819 | 0 | 0 | null | 2021-07-17T11:29:29 | 2021-07-16T07:52:20 | Python | UTF-8 | Python | false | false | 2,992 | py | test.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
import json
import os
from random_useragent import Randomize
class UserAgentsTest(unittest.TestCase):
def test_load_json(self):
with open(os.path.join(os.path.dirname(__file__),
'data/tablet.json')) as tablet_file:
t... |
e9a9032ded51c72786253bef6cff39abe5464c41 | 5aeb2a514cf35cc071e4b937ab168f497ec927fc | /Non-abundant sums.py | 05f8ad76c7c750dbd457725b0e6b76fd67f6f6ce | [] | no_license | vorapras/ProjectEuler | 67fa59756a28907706f3928db0965daf0a64aba5 | c48944a3b250575b434d147ff611a798a903a7a9 | refs/heads/master | 2021-01-18T17:50:51.423072 | 2017-10-28T05:31:50 | 2017-10-28T05:31:50 | 100,498,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | Non-abundant sums.py | n=28123
abundant_num = []
def sum_of_prop_divisor(n):
result = 0
for i in range(1, int(n/2)+1):
if n%i == 0:
result += i
return result
for i in range(1,n+1):
if i < sum_of_prop_divisor(i):
abundant_num += [i]
sum_of_abundant = []
for i in abundant_num:
for j in abundant... |
7b2b2b15c07574cb4cc397af3cb408f9c1ac06d2 | b96f7c01df9417aaf4408e794b1edcc501921c6f | /pirates/cutscene/Cutscene.py | 45c75bb57b8b08f7743872d336775c10a8491905 | [] | no_license | Puggyblue999/PiratesOfTheCarribeanOnline | 492b5feec3dace921026ab1ec64603c208869a62 | 5c7eff12c3821d337404be0face368a5a899fff1 | refs/heads/master | 2021-01-22T15:10:54.858772 | 2015-06-25T20:30:11 | 2015-06-25T20:30:11 | 38,146,060 | 4 | 4 | null | 2015-07-01T18:58:11 | 2015-06-27T04:01:44 | Python | UTF-8 | Python | false | false | 6,732 | py | Cutscene.py | from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from direct.showbase.PythonUtil import DelayedCall, makeList
from direct.showbase.DirectObject import DirectObject
from pirates.pirate import AvatarTypes
from pirates.cutscene import CutsceneData, CutsceneActor, CutsceneIvals
from pirates.ef... |
9f2b34d166d4bb5c749fff6bbacb35e190809171 | 881e5a11d678fff29607bd245063eb7a2bdcfacd | /KNAPSACK/knapsack_test_gen.py | 1c7085e84bfd01eee3e47346f4a5d54611532d12 | [
"Unlicense"
] | permissive | SRechenberger/spoj | c147121605dcb8cbc2745ef2f9b310ddf70749f3 | 7d03412e1a6b26c2185057d7bc02e043aa30558d | refs/heads/master | 2020-04-18T12:25:25.583545 | 2019-01-29T21:12:08 | 2019-01-29T21:12:08 | 167,532,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | knapsack_test_gen.py | import random
if __name__ == '__main__':
N = int(input("Input number of items N. (1 <= N <= 2000) "))
if not (1 <= N <= 2000):
print("N is not between 1 and 2000")
sys.exit(1)
S = random.randrange(1,2001)
filename = f'input{hex(random.randrange(0,2**16))}.txt'
with open... |
4f525725e9bc42ce842fcc57c928f43297e19b8b | dc5521a33194ce110552b3c7aa2b4faf5c4c302b | /app/api/v1/task/__init__.py | 7691e9a1fffa62a44c350d2f5695418b935e602d | [] | no_license | dagrons/mal | 3638d888c80d1f90aed516f7b5e9b6640f134edd | 5b695de24c309ae081b7eb0ef26d88d8bb5f4e09 | refs/heads/master | 2023-08-15T12:35:13.480740 | 2021-09-21T07:07:15 | 2021-09-21T07:07:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,422 | py | __init__.py | import json
import hashlib
import requests # 用来进行网络请求
import tempfile
import logging
from flask import Blueprint, current_app, request, render_template, jsonify, session, redirect
from app.models.feature import *
from .tasks import Q, analyze, executor
from .asyncext.FlaskTask import FlaskTask
task_bp = Bluepr... |
e1a31c084a922e4be7a9187f8d3212c144f3f834 | 5d7ad4d331ee029101fe6a239db9d0e7eebedaae | /4Binary Tree - Divide Conquer & Traverse/614. Binary Tree Longest Consecutive Sequence II.py | 8922f3fe567badaeadf0648c0beed6015df2360a | [] | no_license | Iansdfg/9chap | 77587e1c99b34d13b49a86ed575ec89db421551e | d7b42f94c20f6a579ad59d9f894dcc2fbc5a0501 | refs/heads/master | 2022-11-15T02:21:33.791516 | 2022-11-09T06:24:43 | 2022-11-09T06:24:43 | 201,677,377 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,275 | py | 614. Binary Tree Longest Consecutive Sequence II.py | """
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
"""
class Solution:
"""
@param root: the root of binary tree
@return: the length of the longest consecutive sequence path
"""
def longestConsecutive2(self, root... |
c959a94b2e4dd62d345b29f1e192dadd820f89eb | ea8e3d8d51304d6aba88ec16d625c752e67663be | /short/migrations/0004_auto_20210730_1511.py | 581d11cfb3679bc687eec0de6edf113564d01ab7 | [] | no_license | kevinkeven/shortener | 7174ad110d3198a836ec937c9af1681a6eef5fd7 | 73695a5bdf60b6c65ae33bff6e87187e51510377 | refs/heads/main | 2023-08-04T01:53:31.957943 | 2021-09-22T10:08:20 | 2021-09-22T10:08:20 | 409,153,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | 0004_auto_20210730_1511.py | # Generated by Django 3.2.4 on 2021-07-30 15:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('short', '0003_auto_20210730_1510'),
]
operations = [
migrations.AlterField(
model_name='shorturl',
name='expires',
... |
4734894408ac189fa594b0454e7c14aec65173ab | ce0560cca78abb41be475b9058b6024a64ed620f | /events/views.py | 794f01edd27b29b0a41152f3fd00c97e9153897f | [] | no_license | ducklet/dcpython-django | 0c413417479c9dacc7b7841fcae56730aecb931d | 0b5f36840aab112d23f54be1414a2991bfc8e08c | refs/heads/master | 2021-01-16T00:23:26.552484 | 2013-10-07T19:49:30 | 2013-10-07T19:49:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | views.py | from django.shortcuts import get_object_or_404, render
from django.conf import settings
from universalclient import Client
# Meetup API
meetup = Client("http://api.meetup.com").setArgs(params={"key": settings.MEETUP_API_KEY})
events = meetup._('2').events.setArgs(params={"group_urlname": "dcpython"})
upcoming = events... |
174850bc72ba3e721adc550685150f4f2b123987 | b3226b935c1276f895905deeed4531252541d687 | /library/views.py | d190f706b95440ab57463bff43d0bbb38708b75c | [] | no_license | ayushjiit/my-library | 6c496f242abc34b42db02af9ca3e64be1e148ce7 | 72a71bf7f24fd13743c95c1cb96f61dfe89725eb | refs/heads/master | 2016-08-12T02:21:38.157746 | 2015-12-23T17:56:17 | 2015-12-23T17:56:17 | 48,503,985 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,022 | py | views.py | from django.shortcuts import render
from .models import lib
from django.utils import timezone
from .forms import libform
from django.shortcuts import redirect
from django.shortcuts import render, get_object_or_404
# Create your views here.
#def lib_first(request):
# books = lib.objects.filter(published_date__lte=t... |
7362cceb0a3af6bfbfe98c488ea5e4065aadbad0 | 5f334d6c00aa2cc332e65b460a148d21446232b8 | /backend/timelapsed/services.py | c48baefbd281679f5b977a2ee9c5157d8451f3fa | [] | no_license | bananakingdomcorp/timelapsed | aab4aef056c1326db426c9b395a92b1f752e3d57 | 50cb8ca5eba9c92fb2d8aef3b5b76f6f37a51a16 | refs/heads/master | 2022-12-13T07:33:25.666591 | 2019-07-28T22:23:09 | 2019-07-28T22:23:09 | 176,606,396 | 0 | 1 | null | 2022-12-09T23:45:07 | 2019-03-19T22:11:10 | Python | UTF-8 | Python | false | false | 5,650 | py | services.py | #Add in services/functionality here
from .models import Users, Topic, Date_Range, Card, Subclass, Card_Relationship_Move_Action, Card_Relationship_Delete_Action, Card_Relationship_Subclass_Action, Card_Relationship_In_Same_Action, Subclass_Relationships, Card_Relationship_Parent_Action, Card_Relationship_Child_Actio... |
a8a416e65a4ff19621d08aecbfd4d87ac1bf4992 | 583e184acb7bfb8adfef43cb4ce98775e41c3e0b | /yt_concate/pipeline/Steps/read_caption.py | 88adc0612e83d8ab84c1a454b8f61bd48cb15987 | [] | no_license | chlin61/yt-concate | 66708e8f7f7fbe01d45eb911e36273fa1fa65132 | acb740af81b76fa7e5dff449576d40687e55caa3 | refs/heads/main | 2023-02-15T00:50:50.446068 | 2021-01-06T06:23:56 | 2021-01-06T06:23:56 | 320,506,134 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 758 | py | read_caption.py | from .step import Step
class ReadCaptions(Step):
def process(self, data, inputs, utils, logger):
logger.info('Read Captions ...')
for yt in data:
if not utils.cation_file_exist(yt):
continue
# for caption_file in os.listdir(CAPTION_DIR):
captions = {... |
b73add003d2838feef595c21a94bbbcfb04c8d94 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5648941810974720_0/Python/burakbugrul/kod.py | 03221332bfcc5cd0e84183f98db06a23c719db26 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py | kod.py | #-*- coding: UTF-8 -*-
import sys
from collections import Counter
temp = ("NINE")
case = int(raw_input())
for CASE in xrange(1, case+1):
print "Case #{}:".format(CASE),
inp = raw_input()
cnt = Counter(inp)
zero = cnt['Z']
cnt['Z'] -= zero
cnt['E'] -= zero
cnt['R'] -= zero
cnt['O'] -= zero
six = cnt['X... |
a0826f74319dc428d799d8b9b2ac096182837ec1 | 0dd1eeea73d4cc4275dbfa1f296e4f7c563a146f | /Classifiers/DataLoaders/Utils.py | 7ed7eac937dc26ef1cad35023cf1328b569495e9 | [] | no_license | turner11/Machine-Learning-Ex | d7a953fe298e7dd59a6d4bd181b3bcf48879cdb8 | 3c795f47437ad9d02639b7375e1e94b58ff64bc5 | refs/heads/master | 2021-01-19T13:21:48.555255 | 2017-12-22T08:51:49 | 2017-12-22T08:51:49 | 88,081,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | py | Utils.py | from Classifiers.DataLoaders.AbstractDataLoader import AbstractDataLoader
from Classifiers.DataLoaders.CancerDataLoader import CancerDataLoader
from Classifiers.DataLoaders.CreditDataLoader import CreditDataLoader
from Classifiers.DataLoaders.final_project_data_loader import FinalProjectDataLoader
def get_default_dat... |
c44992bfef09801e8034b10750345855d54bc768 | 33a39e03acfbf39c40792b02bd2fd2a88de1f9a9 | /Subsets.py | ce7056c140d9941b980e86b60f98657e90f6a46b | [] | no_license | sainihimanshu1999/Arrays-LeetCode | 468e72e6b15dd050c0d1ef4ae92a55d3ca157daf | 32aeb0e2c180f0949fbdb03959e032873ca5034a | refs/heads/main | 2023-04-20T03:38:58.028150 | 2021-05-09T17:27:25 | 2021-05-09T17:27:25 | 364,503,786 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | Subsets.py | '''
This is a universal way of finding the subset
'''
def subsets(self,nums):
if not nums:
return []
x = [[]]
for i in range(len(nums)):
for j in range(len(x)):
x.append(x[j]+[nums[i]])
return x
'''
another way of solving
'''
def subset(self,nums):
result = []
... |
86b5050f0611bfe2ab697d5fc7a552165c6b8ca5 | 2dbc1b205a7e3c8ce4c8072e5faf2fd55eda5c42 | /millworkapp/gallery/querysets.py | 63c74f12986da8f66930fc900b6778a97071945a | [] | no_license | xtornasol512/woodworkapp | ab812c0754f130f8cc0847593a9c72b06f2c217c | 398c5f1c3c7c5f74828fddd8a445fd9cf0ccf9dd | refs/heads/master | 2020-04-02T05:08:12.423537 | 2018-10-18T05:07:34 | 2018-10-18T05:07:34 | 154,054,147 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | querysets.py | ''' List of querysets '''
from django.db import models
class ProjectQueryset(models.QuerySet):
''' Add custom querysets'''
def display_on_website(self):
return self.filter(is_display_on_website=True)
def all_completed(self):
return self.display_on_website()
def all_in_progress(self):... |
81e12a93cd668ef201b9bf60b8ac31d4474ad006 | f8283a48ded791d5105e1ecf5dd8559ee44a03d1 | /hw5.3.py | 707b30ee74baf17646c2d4b6059a89b8b8cde5fc | [] | no_license | macbeth93/lesson5 | 7240a7a7b8b3761c3786f7cd2043fde42bcdbd35 | dc508d7b61141b9580365d9aba13ffe6ae9a25d3 | refs/heads/master | 2023-02-13T00:26:02.231374 | 2021-01-07T00:02:13 | 2021-01-07T00:02:13 | 327,407,923 | 0 | 0 | null | 2021-01-07T00:08:23 | 2021-01-06T19:17:26 | Python | UTF-8 | Python | false | false | 1,756 | py | hw5.3.py | # 3. Создать текстовый файл (не программно), построчно записать фамилии сотрудников и величину их окладов.
# Определить, кто из сотрудников имеет оклад менее 20 тыс., вывести фамилии этих сотрудников.
# Выполнить подсчет средней величины дохода сотрудников.
# File:
# Znajka
# 250000
# Vorchun
# 15000
# Molchun
# 22000
... |
557422ed3b87092a20effcdfa6d355111b87bac5 | e2df44c68460fb29084ba0ed6f3266d8802f6cb1 | /catkin_ws/src/balrog_sim/python_scripts/nav_covering.py | 405bb5ae2b31e050172e4eb5db3bf2254e442a69 | [] | no_license | harshilpatel312/TSRT10 | 879bfcbb882d6bc32111f3145f3637c1df8e2b55 | be8d3a90c75a6655fb82392a43c75135686a7eb8 | refs/heads/master | 2020-03-22T15:03:35.347270 | 2017-12-14T08:22:26 | 2017-12-14T08:22:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,671 | py | nav_covering.py | # NOTE! This is just a copy of balrog/python_scripts/nav_covering.py
'''All code neccesary for covering mode (mode 2), call find_goal(input) to find
the goal position and thereafter coveringMap(input) for the whole path '''
import numpy as np
import cv2
from utilities import map_index_2_pos, pos_2_map_index, raw_... |
daf57b6a92be46858b4d3a721bdf6b4e75889015 | 5d5e924eec544e08d0c18343590d1d10cd5704a1 | /array-strings_stacks/hit-counter.py | 4f79024cb7be27c976be0fbd1bfbd16d581a9ce2 | [] | no_license | cosmicRover/algoGrind | 9681a88e8500381cff5426371ff322194aed202d | 9e53ce83e36b88a164e1c11570b55781396b4d7d | refs/heads/master | 2021-08-16T18:05:48.661748 | 2021-06-18T20:49:25 | 2021-06-18T20:49:25 | 189,326,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | hit-counter.py | #queue approach
class HitCounter:
def __init__(self):
"""
key observations:
- timestamps always increase thus, no need for sorting
- perfect place for a queue
time O(n) total | space O(n)
"""
self.hits = collections.deque()
def hit(se... |
b982f6ac3253ca1e33f94de5ab48e139a3849a47 | 8a731c1bef5c2fb8f3cdd528a213b38bba613fd1 | /category_images.py | 2e98e2cfc8f5b670a4af8cc1bd7ad7ca65020df1 | [
"Artistic-2.0"
] | permissive | busyyang/easy12306 | eac78315699694a95498ca7a2c0b425ef807feb3 | 707d34f7a868fd6155ed6e7a1703b79ef5f62c73 | refs/heads/master | 2020-11-27T18:26:50.304148 | 2019-12-29T11:03:22 | 2019-12-29T11:03:22 | 229,560,285 | 0 | 0 | Artistic-2.0 | 2019-12-22T11:55:15 | 2019-12-22T11:55:14 | null | UTF-8 | Python | false | false | 1,947 | py | category_images.py | import numpy as np
import cv2
import mlearn
from keras.utils import to_categorical
import os
from pretreatment import load_data, phash
def load_true_labels(path='classify-true'):
filelist = os.listdir(path)
class_result = [(int(f.split('.')[0]), int(f.split('.')[1])) for f in filelist]
class_re... |
5ce7e9804ab6e9e48871aa78d6e7fc54330d4929 | 9e71f8521856d92e9ee4da8e6fdef0fa3a10eb30 | /3Dcohesive/graph.py | 6aa59ade55fa3a71d8ffa597acf77bf6c7da1a37 | [] | no_license | ZoraSawyer/Insert_czm_to_abaqus_input | f9ae787cb713622caed06cc82be711ac08b22628 | aeee9eb4c0d22c75c88d9440d029e577754a1906 | refs/heads/master | 2022-01-11T13:43:32.998385 | 2018-08-31T03:40:13 | 2018-08-31T03:40:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,588 | py | graph.py | """Author: Jianming Zeng"""
from node import *
from Element import *
from surface import *
from surfaceMap import *
class graph:
## Local variables and data strcuctures
name = None
nodeMap = dict()
nodes = 0
elementMap = dict()
elements = 0
mySurfaceMap = None
surfList = list()
surfaceCount = 1
CPList =... |
9d36f7e74c293df9e7131011567263970aa594d1 | 5376b09a7370dec42a62bd2a11c01843d2adbe2f | /examples/hacker_news/hacker_news_tests/test_resources/test_parquet_io_manager.py | 5e713c10c15ae3fe6863ff9a7f388a1de12d5387 | [
"Apache-2.0"
] | permissive | geoHeil/dagster | 72c4ce3bc9f793e6e6de2c38bea531b4a768e9af | f044147f1cb0a545152bbe651f079974293deb73 | refs/heads/master | 2023-08-24T06:06:52.000940 | 2021-10-05T17:28:15 | 2021-10-05T17:28:15 | 413,931,608 | 1 | 0 | Apache-2.0 | 2021-10-05T18:17:31 | 2021-10-05T18:16:00 | null | UTF-8 | Python | false | false | 1,526 | py | test_parquet_io_manager.py | import os
import tempfile
import pandas
from dagster import Out, ResourceDefinition, graph, op
from dagster_pyspark import pyspark_resource
from hacker_news.resources.parquet_io_manager import partitioned_parquet_io_manager
from pyspark.sql import DataFrame as SparkDF
@op(out={"out": Out(io_manager_key="pandas_to_sp... |
84f3b7ae8c564e9a80b51368e952c5cd646d91af | d96d94590854945fa632c9eefbbd278395ac7737 | /7. EXTENSIVE CONTINUOUS QUANTITIES/Octet.py | 23b3bcd765296a14d2ef519c7ff7354b8d193a1b | [] | no_license | jce-il/octet | e0a4e0dbb86630046e97d5e4be8b0fcffa5ada90 | f1eed927a657d16d041c4bb2179dc4983988291f | refs/heads/master | 2021-01-13T16:33:29.257907 | 2017-09-14T07:51:27 | 2017-09-14T07:51:27 | 79,194,989 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,332 | py | Octet.py | # -*- coding: utf-8 -*-
from math import pi
import math
'''container class for EXTENSIVE CONTINUOUS QUANTITIES'''
class Extensive_Continues_quantity:
_TypeName = "not defined" # example, mass, Volume, Energy, Kinetic Energy
_Units = "Not defined" # Kg, Jaoul, mol,
_Value = -999999.99
... |
a18d763bd6d476852bd88037dd05a7196d699531 | 5f95c82680e3877791bbe34185dd6c52df13b4df | /pybullet_robot_envs/envs/icub_envs/icub_push_gym_env.py | 9b83d89d2a477ea8770225884b5c7b74b6bbae44 | [] | no_license | wangshub/pybullet-robot-envs | ca53ad8a633ceebab43d18a4303c6617e3f8735d | 3ae1284939ee1cadb4e8855d17df1134534f337d | refs/heads/master | 2020-06-19T22:40:17.721953 | 2019-08-31T11:57:32 | 2019-08-31T11:57:32 | 196,900,405 | 0 | 0 | null | 2019-07-15T01:08:35 | 2019-07-15T01:08:35 | null | UTF-8 | Python | false | false | 13,562 | py | icub_push_gym_env.py | import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
os.sys.path.insert(0,currentdir)
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
import time
import math as m
import pybullet as p
from icub_env import iCubEnv
import pybullet_da... |
b0a157e0a664557ab315cb7d053d423b3e452360 | cb919f9727b56bfeb44f99d34b4c4275b10d5bfb | /MazeGenerator_PathPlanning/txtToMatrix.py | 4f94a15be68c9765f431d612c7c00401c69deeb5 | [] | no_license | raulfontenele/Planejamento_Caminho | e75c38f8e0673b45622ae4397c84884bec54e751 | 9893c9d2fa82b9de1bef8facdcdbb348830fb101 | refs/heads/master | 2022-11-13T09:37:18.660488 | 2020-07-12T18:57:58 | 2020-07-12T18:57:58 | 256,637,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | txtToMatrix.py | def txtToMatrix(txtFile):
maze = []
arquivo = open(txtFile,'r')
for line in arquivo.read().split():
d = list(map(int, line.split("-")[0:len(line.split("-")) - 1]))
maze.append(d)
return maze
|
2dc2078f6d51c7eb7dadf4ca85bfe74cb1224e6d | 07e8a977ec6d672a87997c74a77d5efc579eb01d | /Problems/A very nested list/main.py | d77bdbbbe5d4b6f0d972ace30cef21223f1ccef8 | [] | no_license | fpolizzi/jb-academy-python-tic-tac-toe | de36a52306de62574df749a47917ec99ababe536 | fdb7eb44e36f3e33ea3c724e82f6534caa3c18a6 | refs/heads/main | 2023-04-17T22:22:18.085054 | 2021-05-12T21:05:03 | 2021-05-12T21:05:03 | 336,416,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | main.py | result_list = []
str_1 = input()
str_2 = input()
list_2 = [str_2]
str_3 = input()
list_3 = [[str_3]]
result_list.append(str_1)
result_list.append(list_2)
result_list.append(list_3)
print(result_list)
|
f95b2d7af393615fc4269b9d9096c31165157030 | f19c116e5e3248b8dcb5ac8ab0a7d650560b7cda | /models.py | 842cec2fe2da48d19268f504104f0f1590ac390c | [] | no_license | Ascariel/UdacityProject4GameDesign | f0b040037ece30e581a34eb21701ba48159fdfbc | 3947e8b29bcd49323cd68881bfd4e0910feb1d4f | refs/heads/master | 2021-01-17T20:08:40.860572 | 2016-08-10T04:43:40 | 2016-08-10T04:43:40 | 62,960,902 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,306 | py | models.py | """models.py - This file contains the class definitions for the Datastore
entities used by the Game. Because these classes are also regular Python
classes they can include methods (such as 'to_form' and 'new_game')."""
import random
from datetime import date
from protorpc import messages
from google.appengine.ext impo... |
a7bc00041455882cf2a2ff50a42ec4b89b275192 | bffb0c3c64029c7fa8521cce1374105803a280e1 | /docs/数据结构和算法/codes/select_sort2.py | 0dcd198a9ce11ce639aa32c2fb7cacd6fa80722d | [] | no_license | yiouejv/blog | b7d6ea015e13da9f988ac5a62098d24561f43d9b | f5c0a3ce26e961df3fc8879f55b681bb9d8aae51 | refs/heads/master | 2021-07-06T20:33:39.124373 | 2021-03-28T08:47:52 | 2021-03-28T08:47:52 | 229,209,161 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | select_sort2.py |
def select_sort(seq):
for i in range(len(seq)):
seq[i] = min(seq[i:])
def test_select_sort():
seq = list(range(10))
import random
random.shuffle(seq)
select_sort(seq)
assert(seq==sorted(seq))
|
34e993fc564c379ac93df8c71cb37585cb8209b4 | 788576f12ba8ce896432ca2f7d175f9577c46405 | /biblioteca/apps/circulacion/forms.py | d6674a88ec3f6bc3f6bd7430930bd589e161ea50 | [] | no_license | ikkerxd/biblioteca | 11eb22c4cddb0ecdde9c5699425eb17596f9224f | 7a979dccf37574dc749ef2e7b9767b65bb8de821 | refs/heads/master | 2020-05-30T05:10:51.615033 | 2016-08-22T14:46:26 | 2016-08-22T14:46:26 | 37,169,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,470 | py | forms.py | # -*- encoding: utf-8 -*-
from django import forms
from .models import Prestamo
from apps.lector.models import Lector,TipoLector,Biblioteca
from apps.catalogacion.models import Ejemplar
from datetime import date
class LectorPrestamoForm(forms.Form):
lector = forms.CharField(
label='número de carnet',
... |
f6eb097228ec53c5666e9008013f36b164a0b157 | 30e6cd03270347c938383a671ba9cfda3da76f52 | /.config/i3/lemonbar/lemonbar.py | 4e08ffffa16cdd0de1bdd7543d659c86bf27cddd | [] | no_license | leonardodaniel/dotfiles | 59ba82e3411a79367c095c5cf380567a3e9c7431 | 4eaa3c115025aa49a79e80b3bfd5f72922be13a0 | refs/heads/master | 2020-01-27T12:30:55.603012 | 2016-10-18T08:26:35 | 2016-10-18T08:26:35 | 48,172,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,120 | py | lemonbar.py | #! /bin/python
# -*- coding: UTF-8 -*-
from sys import stdout
from datetime import datetime
import subprocess
import json
# ordered names or icons (or both) to use for the workspaces
icons = ['Term \uf120 ',
'Firefox \uf269',
'Docs \uf1c1 ',
'Pictures \uf1c5',
' ',' ',' ',... |
08627b33827681ae93bbe8e5b5e8045bc7e41439 | 0376df403627d39c0750139bea69ae3fb49a37d8 | /pymd2mc/analysis/clustersAnalysis.py | e1cf2ae067611df043d7d208f60b86b158dccbb8 | [] | no_license | tectronics/pymd2mc | 705b915093de71676a007a0fadc886bc4c1e8750 | 316ce9cc117ed9c13593df523742d755abbe791a | refs/heads/master | 2018-01-11T15:02:34.955792 | 2014-08-02T22:06:29 | 2014-08-02T22:06:29 | 47,171,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,065 | py | clustersAnalysis.py | #!/usr/bin/python
"""
This program calculates clusters size histogram from xyz file
"""
__author__ = 'Mateusz Lis'
__version__ = '0.1'
from optparse import OptionParser
import sys
from time import time
from myExceptions import InputError
from structures.xyzfile import XYZFile
from xyz2hexnet.energyCalc import HexLa... |
011b82445a74d3be5b9131e5d5467011eac29106 | 1b928891b1492e446bbe63086844098d4931c155 | /component_stats/cms/cms/util/misc.py | 22156d03fbc4cb9e56fbe44170e279b48f4d9db7 | [
"BSD-2-Clause"
] | permissive | sjgosai/cms2-work | d06fd954878c271b9c259075d9f7386ded0a2dbb | c745d5f8f00e0305fd397db58b57bf7a8b8a659e | refs/heads/master | 2022-12-02T10:16:59.163563 | 2020-07-04T00:30:15 | 2020-07-04T00:30:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,746 | py | misc.py | '''A few miscellaneous tools. '''
# Division of integers with / should never round!
import collections
import itertools
import logging
import os
import re
import subprocess
import multiprocessing
import sys
import util.file
log = logging.getLogger(__name__)
__author__ = "dpark@broadinstitute.org"
def unique(item... |
4775794ff73b268792e33df9408a40d494a5b1c0 | d30c6d691a34fc9181fb71e9712b9505384422ec | /数据分析/plot/basic.py | 4050114c585fe75e83d7905d22dd752e0d7c09c4 | [] | no_license | shishengjia/PythonDemos | cef474eb01ee9541ba0c70fc0750ee48a025f42f | c0a857b1cacdbb2b6b727a84f95f93b6e86d60c2 | refs/heads/master | 2021-01-01T16:15:19.593635 | 2017-10-26T07:18:46 | 2017-10-26T07:18:46 | 97,797,104 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | basic.py | # encoding: utf-8
"""
@author: shishengjia
@time: 2017/10/12 下午3:29
"""
from matplotlib import pyplot as plt
x = [1, 2, 3]
y = [2, 3, 4]
plt.figure()
plt.subplot(231)
plt.plot(x, y)
plt.subplot(232)
plt.bar(x, y)
# plt.subplot(233)
#
# plt.subplot(234)
#
# plt.subplot(235)
#
# plt.subplot(236)
plt.show()
|
0c40de9f552d9e5bce82f4c44f4488ecdcdbf9c4 | e13c12497d6c2b189b7bd0fd21c293bd3f9a82c5 | /desafios/Ex030.py | cc6fb93d37f46a5c3dd7c7c43efd74f1a3e1557f | [
"MIT"
] | permissive | FelipeAlafy/Python | 7898bd9be1131ede89af0839b8735e5fa225f225 | da2374e55e8aa84e4ca6d9c7bf8dafeb546a4742 | refs/heads/master | 2022-12-03T20:48:36.899800 | 2020-08-03T18:39:55 | 2020-08-03T18:39:55 | 284,721,410 | 0 | 0 | MIT | 2020-08-03T18:39:56 | 2020-08-03T14:25:24 | Python | UTF-8 | Python | false | false | 145 | py | Ex030.py | v = int(input("Digite um valor? "))
if v % 2 == 0:
print("\033[34mEsse número é par!")
else:
print("\033[36mEsse número é ímpar!")
|
56d33fe372246873edbb291d3ba3d052aa062509 | 6996702b2116ea8bdd5a024d02dab17eafcf8649 | /Visual/Canvas/Device/switch.py | 671d5ba3a2d0ea63f52d4a12cdca83eb4bc543f7 | [] | no_license | thnglhu/NetVis | 130f7214a61d847a7f151b904d9906c65df32418 | 106bd03dcfb760490dcebd1ec69c976b33419875 | refs/heads/master | 2020-07-29T08:30:52.411474 | 2019-10-26T14:18:01 | 2019-10-26T14:18:01 | 209,730,096 | 0 | 0 | null | 2019-09-27T16:42:59 | 2019-09-20T07:19:47 | Python | UTF-8 | Python | false | false | 7,625 | py | switch.py | from .vertex import Vertex
from ..port import Port
from .hub import Hub
from threading import Thread
from time import sleep, time
import setting
from ..Frame.Data import BroadcastFrame
from ..Frame.Data import MulticastFrame
from ..Frame.Data.bpdu import BPDU
from Resource import get_image
class Switch(Hub):
#... |
e0c40ad52ea17fec00adc93aea545282c15e78d5 | 17ebade14d15114302cf4c55fc1203a29c3a06e0 | /main.py | 33bb00e94d2d70c81201e7ab01e0a0fd251bc066 | [] | no_license | jiahchen/bdmauto | d63b8462864178c3cdad1c1d0e705369427d0f2a | 3ad123228841b38e1dfd723a3e31ccf20b3c51c3 | refs/heads/master | 2020-03-27T19:12:50.447721 | 2018-09-16T02:03:50 | 2018-09-16T02:03:50 | 146,972,848 | 5 | 0 | null | 2018-09-16T02:03:51 | 2018-09-01T06:09:35 | Python | UTF-8 | Python | false | false | 1,229 | py | main.py | import time
from common.adb import ADB
# dv1 = ADB("127.0.0.1:62001")
# dv1.connect()
# dv1.open_app("com.pearlabyss.blackdesertm.tw2", "com.pearlabyss.blackdesertm.Loader")
# time.sleep(25)
# dv1.capture()
# dv1.touch(get_coordinates("google.png"))
# while True:
# dv1.capture()
# time.sleep(5)
class BlackM... |
e4f2c910f01e270dc5c8f203e866084e0bb6f56a | c0eee87cbd58162315b4f51a2d64e45bb76401d2 | /locations/spiders/orkin.py | 3e0967dbc4ef21270f96595a96d1990a835a4311 | [
"MIT",
"CC0-1.0"
] | permissive | gmavian/alltheplaces | bdcbcbb851c8891c76fabce349cb7e071c2f3768 | 0fdd61e084a764dedf483a7074265956a38a3303 | refs/heads/master | 2023-08-03T19:46:17.734124 | 2023-07-31T12:36:38 | 2023-07-31T12:36:38 | 162,633,873 | 0 | 0 | NOASSERTION | 2018-12-20T21:37:18 | 2018-12-20T21:37:17 | null | UTF-8 | Python | false | false | 1,494 | py | orkin.py | import scrapy
from locations.items import Feature
class OrkinSpider(scrapy.Spider):
name = "orkin"
item_attributes = {"brand": "Orkin", "brand_wikidata": "Q7102943"}
allowed_domains = ["orkin.com"]
download_delay = 0.1
start_urls = ("https://www.orkin.com/locations",)
def parse(self, respons... |
95a1d6f52a3babaa3c158b47193d5986a14bc1f0 | fefc4f446bcacd34e30964a0c41f751f994f4b8b | /OrderTrack/migrations/versions/af987c9246c1_order_table.py | d0d48d933c998247ed1dc22a7e3936ce288aecd1 | [] | no_license | ThomasFerryFR/ordertrack | 52c2be784b68295cbe05997129ea31835da87198 | 800953e9cf057def060ac95170d3457ba0def3df | refs/heads/master | 2020-03-15T02:16:48.618109 | 2018-05-03T03:06:52 | 2018-05-03T03:06:52 | 131,914,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,267 | py | af987c9246c1_order_table.py | """order table
Revision ID: af987c9246c1
Revises: 97dfd81294d6
Create Date: 2018-04-22 16:13:35.895530
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'af987c9246c1'
down_revision = '97dfd81294d6'
branch_labels = None
depends_on = None
def upgrade():
# ##... |
51ad86e3b86288792f8620a8190a677fc0fa63a3 | 6501b11f383b3083c47cc2103b308aae8c0a4092 | /types_classes.py | 87ee406bcbc87772f758af5a03e81ab3cf636cd4 | [] | no_license | mazarady/GPS | 5401d4d815d69c48cd5459c533f5a7e09031b29b | 5b820d3c3d3528245c9809a88b5461683e4573eb | refs/heads/master | 2016-09-12T13:36:43.250379 | 2016-05-10T21:46:51 | 2016-05-10T21:46:51 | 58,492,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,393 | py | types_classes.py | #classes
import datetime
class directions:
'''directions for steps'''
def stuff(self, json_results: 'json') -> None:
for steps in json_results['route']['legs']:
print(steps['origNarrative'])
... |
4980945187e92c79270b4c809cc2086ed987ad55 | 482ed16cd1c8d721e98a9c460555802f7cce8906 | /run-tests/t474.py | 942222ac9b30e5de64a2da4213309f482cd19d64 | [
"MIT"
] | permissive | forkcodeaiyc/skulpt_parser | ea2347b2a452476854cf03412474fae63bca31c0 | dd592e9b91bcbbe0c5cfdb5c2da0fb5ae604a428 | refs/heads/master | 2023-09-04T11:32:09.760317 | 2021-10-11T22:58:18 | 2021-10-11T22:58:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | t474.py | class A:
pass
print(isinstance(4, int))
print(isinstance(4, (float, int)))
print(isinstance(A(), A))
print(isinstance(4, (int, float, 5)))
print(isinstance(4, (int, float, A())))
print(isinstance(A, A))
print(isinstance(4, type(4)))
print(isinstance(True, type(False)))
print(isinstance(5.4, type(1.2)))
print(isi... |
adeb42b26e611e2242580e9949c3b83cd869a6b5 | 7c163d25b53d8f2a5a832ca8573033448b07877f | /part04-e17_cleaning_data/src/cleaning_data.py | 5da00f1295e8e91bd357590e656489cada3d2c41 | [] | no_license | AnkS4/hy-data-analysis-with-python-2020 | 58144c984ab1275e7cae1854c31b1fdfdc7e998d | 6f207e495ab67d1f9a48300e12e921cb828dbc10 | refs/heads/master | 2023-01-04T09:11:21.526101 | 2020-10-28T19:00:14 | 2020-10-28T19:00:14 | 269,292,265 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,407 | py | cleaning_data.py | #!/usr/bin/env python3
import pandas as pd
import numpy as np
def cleaning_data():
df = pd.read_csv("src/presidents.tsv", sep="\t")
'''
df["President"] = df["President"].str.partition(',')[2] + ' ' + df["President"].str.partition(',')[0]
df["President"] = df["President"].str.title()
df["President"... |