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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
672cee7f79fa3e2b5901a663472259dd30519494 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03745/s351300740.py | 3e4e123b6714827b290515fba41d30a3daa2ba8e | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | s351300740.py | import sys
input = lambda : sys.stdin.readline().rstrip()
n = int(input())
a = list(map(int, input().split()))
cnt = 0
flag = 0
for i in range(n - 1):
if flag == 0:
if a[i + 1] - a[i] > 0:
flag = 1
elif a[i + 1] - a[i] < 0:
flag = -1
elif flag == 1 and a[i + 1] - a[i] ... |
09c3209b483ad935a30f2a84c5efb8f87ddba619 | 6f95df0b44902aba1e8e4b79cc5d71610f2ff651 | /backend/deep_trust_app/booking/admin.py | 89226643fa4ce473a8eb97dd365ab94bd6c492f0 | [] | no_license | Nadyvel/deep-trust-app | 18f567e8a932a4e42b97fce6f383a7fa9fe4df47 | fc0fdba55cafa604160a097136c8910af0314abe | refs/heads/master | 2022-03-03T03:48:40.490751 | 2020-03-01T15:41:02 | 2020-03-01T15:41:02 | 244,176,519 | 0 | 0 | null | 2022-02-10T21:21:10 | 2020-03-01T15:45:02 | JavaScript | UTF-8 | Python | false | false | 143 | py | admin.py | from django.contrib import admin
# Register your models here.
from deep_trust_app.booking.models import Booking
admin.site.register(Booking)
|
0d91fc5c20380d1e862a6532afc9ac7b605e8a72 | c443535b5cb0317eca9a4f7851d1e3f78f96ebe5 | /loops.py | fba49938278b84cfcb6e7ebffd9f6d82b4133ad6 | [] | no_license | ides15/learn-python | 29674377d7e8bf009475defee9a36797d8fbb955 | 4488e428185e8e9b449d2494a03970fa06852b4a | refs/heads/master | 2021-03-16T08:48:00.710321 | 2018-03-21T21:59:10 | 2018-03-21T21:59:10 | 117,407,001 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,033 | py | loops.py | """
For learning Python loops
USAGE:
In a command prompt, navigate to this directory and run `python ./loops.py`
"""
#------------------------------
# `in` keyword
#------------
S = 'hello world'
A = [4, 6, 9]
print(5 in A) # conditional, will eval to false
print(6 in A) # conditional, will eval to true... |
52aa2afc94d3eab826802545f144e0c127aaccf4 | 1785ab2d5b94d34d33c935f8e59ace602368e3e7 | /policies/mlp_policies.py | 37c3caad5ee007c61a0023954f73d4a37cc29107 | [] | no_license | MariusUrbonas/rl_agents | 18d00e0b0cf8de214abe0e58c9c4b966626bdb62 | f0a0dcc5cd622be25bd2badbeb83ab8bcc77860a | refs/heads/master | 2020-08-23T01:18:54.993364 | 2019-10-21T08:55:21 | 2019-10-21T08:55:21 | 216,514,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,112 | py | mlp_policies.py | import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
class MlpPolicy(torch.nn.Module):
def __init__(self, input_dim, output_dim):
super(MlpPolicy, self).__init__()
self.input_dim = input_dim
self.output_dim = output_dim
self... |
ce56cfdf0057553e762e4df8f4ab94d90e0da8de | 993ed6589dce79854cdeda0d4b71f61356aa0a45 | /150729_pyboard_to_pyqtgraph/serial_pyboard_to_python.py | 319cb8faf653a4d50f6645a583a2bd6db0436ff3 | [
"MIT"
] | permissive | gregnordin/micropython_pyboard | 8a55a065bce9ebb89954d23c7eda32581c129c2d | f22d4c6db91e8cee4e3944bbd3b0b08903ed3080 | refs/heads/master | 2021-01-20T00:58:46.255450 | 2015-08-02T07:01:08 | 2015-08-02T07:01:08 | 40,037,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,779 | py | serial_pyboard_to_python.py | #HV Control &
#Read and Plot from the PMT
#This code is to record the data that is received into the Teensy's ADC.
#Includes the HV control and replotting the results at the end.
#See CSV Dataplot notebook to plot old experiment data.
from __future__ import division
from __future__ import print_function
from pyqtgr... |
2b47b7106bff2c88f4edc66b5434999e6d475c84 | 969fe792686352793e290c0528dd684da2b1bc87 | /inttest_md.py | 3f9b5ef375923c08746487952a85028c81295ef4 | [] | no_license | rartino/hands-on-3 | d62bbf9eb100b0ea4d47a0057557c946067ccf36 | 6421a7c7f67ffc3ee9ea17c703029414e6fe62a5 | refs/heads/main | 2022-12-26T07:19:01.840189 | 2020-10-04T23:43:00 | 2020-10-04T23:43:00 | 301,247,075 | 0 | 0 | null | 2020-10-04T23:51:37 | 2020-10-04T23:20:58 | Python | UTF-8 | Python | false | false | 30 | py | inttest_md.py | import md
md.run_md()
|
65e9702318cf69afb0b860d96776b18e8c2374ec | f969452f423a5d3a0269404fe5f5b0ab6966d9cb | /carts/migrations/0011_auto_20200518_2030.py | 291808f6df8301585d037814bce3efb10e468c35 | [] | no_license | gaddopur/aman_co | 96d34aeb11f4a83386067ca98299fa0a0fb02aa9 | 712512de6685d0fbf8996db4b944192a71f3d2af | refs/heads/master | 2022-11-14T16:52:28.973541 | 2020-07-02T15:49:16 | 2020-07-02T15:49:16 | 261,143,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py | 0011_auto_20200518_2030.py | # Generated by Django 2.2.11 on 2020-05-18 15:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('carts', '0010_cartitem_varitaion'),
]
operations = [
migrations.RenameField(
model_name='cartitem',
old_name='varitaion',
... |
b190c387acc13e41f8e42517f2edf88acfe7231f | 69d3bbfe5821279a6d30a0ae4c3308d5940b2162 | /app/teacher/forms.py | 4381b9bdfe6c319714f1022dfa1307e651ae62bf | [] | no_license | DmitryLanda/lmi-flask | 5928d8cd666ce8420f0516e50a945d37253674ee | 80421646ad279ddfbbba45549516c8185cb33fd8 | refs/heads/master | 2021-01-10T19:31:39.851527 | 2014-07-26T19:56:56 | 2014-07-26T19:56:56 | 22,295,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | forms.py | # -*- coding: utf-8 -*-
from flask.ext.wtf import Form
from models import Teacher
from wtforms import DateField, SelectField, TextAreaField, StringField
from wtforms.validators import Required, Email, ValidationError
class TeacherForm(Form):
name = StringField('name', validators=[Required()])
birth_date = Da... |
e414937f9b80ea9e2a6cef6b422de509c9e62dec | 2469707fed514d80a5d8f2527e7b581511b30564 | /Reconstruction/model/EEGChannelNet.py | 0d5938752a4e8d19f59f32aaeca2cd580b0ff1e3 | [] | no_license | sitiporn/BCI | b91c9c7c42760f2cb13abc89e4fad43fde6fa052 | 47e666ac86c98452cd0ac0f22398eabdef835f59 | refs/heads/master | 2023-08-14T15:53:14.605086 | 2021-10-01T08:34:27 | 2021-10-01T08:34:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,342 | py | EEGChannelNet.py | import torch
import torch.nn as nn
from container import ParallelModule
from layers import ResidualBlock, Flatten
class EEGEncoder(nn.Module):
"""
This encoder is implemented by follow the architecture from research paper : Decoding Brain Representations
by Multimodal Learning of Neural Activity and Vis... |
34b2f7305b8595f0ceca7b30b87c168ae5e78c9e | 4b0a9d06c5fa11708a74564d5f11e677366330ec | /tests/test_docs.py | 871895f1b80760767748e3103fcfa4e2cfd4b502 | [
"MIT"
] | permissive | crflynn/dephell | 86a7372e9a189efc0e1dd28e612c980ccf55de4b | 2b6b1cba3146976a766266de5434e466dd10ec7a | refs/heads/master | 2022-11-18T00:00:41.756262 | 2020-06-02T13:52:58 | 2020-06-02T13:52:58 | 277,380,078 | 1 | 0 | MIT | 2020-07-05T20:41:45 | 2020-07-05T20:41:45 | null | UTF-8 | Python | false | false | 385 | py | test_docs.py | # built-in
from pathlib import Path
# project
from dephell.config.scheme import SCHEME
def test_params_all_described():
undocumented = {'and', 'auth', 'vars', 'command'}
path = Path(__file__).parent.parent / 'docs' / 'params.md'
content = path.read_text()
for key in SCHEME:
if key in undocume... |
d962f27f6568557c37ba3a12ee41162ba7b4de05 | bd3229e5966a2db17ddde787ee796566ed46de85 | /nepal.py | 256dbec40932773e2a117731202fedd40bd0dfde | [] | no_license | vividly789/my-python-program-codes | 4c41427d9ae6bfbed507c53c6a9894fa7ce377a5 | 8956a445499a33813d407a8e5ef0a5a1e0244a7c | refs/heads/master | 2020-09-25T16:40:08.236633 | 2019-12-06T18:57:46 | 2019-12-06T18:57:46 | 226,045,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | nepal.py | a="nepal"
l=len(a)
k=l-1
for i in range(1,1+l) :
print(a[k:l])
k=k-1
# new area cal
a =3
b=4
area = a*b
print(area)
print("Welcome to nepal")
|
c9b8eeb40c0ae68d9b4917a9afc9929d4175f2b0 | 7d497d397df0cfaaa19b6198db7fb5d701bf8409 | /geometry/gradient_point_group.py | 45e51bbda0a9b798fd00a83f3319e94d12a26dbe | [
"MIT"
] | permissive | Zylphrex/csc420-project | b1dc0b70326a313d08f9b62ef4d7ba999ebaa4f5 | 71fbacb9dbf4331946d50176d97d65edabc208dc | refs/heads/master | 2022-12-04T13:26:30.888139 | 2020-02-25T03:12:32 | 2020-02-25T03:12:32 | 219,383,564 | 0 | 0 | MIT | 2022-11-22T04:48:04 | 2019-11-04T00:05:03 | Python | UTF-8 | Python | false | false | 956 | py | gradient_point_group.py | import numpy as np
import geometry
class GradientPointGroup(geometry.PointGroup):
def __init__(self):
super().__init__()
self.direction = None
def compute_equivalent_angle(self, radian):
radians = np.arange(-2, 3) * np.pi + radian
deltas = np.abs(radians - self.direction)
... |
3780b556243213fae11d3dd9424b71ba38a81d72 | 0fe2ef43189563714c96ed68711fa9b44c591905 | /sort_min.py | 695c94913c4ab38d7678d3f3169c6e38006badf7 | [] | no_license | KarolinaNik/python_examples | 6eb706e11c6ed5b46e213bb8557267bf2bbf30dd | 59ffb50754af4008036721f171d8490fc1f9aee9 | refs/heads/master | 2022-12-18T10:28:14.619771 | 2020-09-23T08:45:26 | 2020-09-23T08:45:26 | 297,905,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | sort_min.py | smallest = None
print('All values are:')
for value in [9, 41, 12, 3, 74, 15]:
print(value)
print()
print('Sorting:')
for value in [9, 41, 12, 3, 74, 15]:
if smallest is None:
smallest = value
elif value < smallest :
smallest = value
print(smallest, value)
print('After',smallest) |
a6f0dde8e1f16b3027aeba76d8614a2de85ba487 | 5d4cf1bb3b5c99cc6d0723d221d2341dadb4cef7 | /tweet_reader.py | eb2852ab2c11fb8d1ba874b92c83df8ea459ab03 | [] | no_license | Felipe-Caldeira/CS-337-Project-1 | d55b449db84557450dc01efd83cba9a200ba1ad8 | e8d583fe137a3f0707cc6dcf832d2a1df174ddcf | refs/heads/main | 2023-03-04T11:34:43.920953 | 2021-02-05T18:38:35 | 2021-02-05T18:38:35 | 333,241,431 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,898 | py | tweet_reader.py | from langdetect import detect
from info_extraction import *
import math
# These are just lists used to store certain tweets relating to awards/nominees/etc to analyze what they look like.
test_awards = []
test_nominees = []
# Main pipeline
limit = 10000 # Limit how many tweets to read.
def AnalyzeTweets():
for... |
1fa2984a8a1acf57a3b8f604c73c76ede1b62b3c | d4412fbe37540e2c4cbe59ed6503d3661ccb7d9c | /examples/tutorial/download_cifar10.py | 5c6b6988ade531f9a6e77955803b7c2dbd88ca9a | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | permissive | hpcaitech/ColossalAI | a082ed08a3807b53c49d1f86835b9808590d9042 | c7b60f75470f067d1342705708810a660eabd684 | refs/heads/main | 2023-09-01T04:13:13.834565 | 2023-08-30T15:07:21 | 2023-08-30T15:07:21 | 422,274,596 | 32,044 | 4,084 | Apache-2.0 | 2023-09-14T15:19:54 | 2021-10-28T16:19:44 | Python | UTF-8 | Python | false | false | 265 | py | download_cifar10.py | import os
from torchvision.datasets import CIFAR10
def main():
dir_path = os.path.dirname(os.path.realpath(__file__))
data_root = os.path.join(dir_path, 'data')
dataset = CIFAR10(root=data_root, download=True)
if __name__ == '__main__':
main()
|
10c37e653ad42996315113ff82b862ae81484aa4 | d7029351957d79bfbc4fe1e1b7b9c2945ad6b368 | /ejercicio-edad-3.py | 8793fd5c301175f358d4efddb948b629946e7e99 | [] | no_license | Alegp/Python | 1fd2c14bb1111ac2dfe1af199af0fd709a91de00 | b022f4d6f0f7ee30457f5957804b763732582a47 | refs/heads/master | 2021-05-02T17:36:40.480559 | 2018-06-12T00:11:13 | 2018-06-12T00:11:13 | 120,648,828 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | ejercicio-edad-3.py | #coding: utf8
edad = input ("Indique su edad: ")
if (edad >= 18 and edad <=23) or (edad == 17):
print "Entra en la sesion de jovenes"
else:
print "Acceso denegado"
|
3a7ed8876eaddcd2f7ea5f506a605e1a95314509 | e79adbabc91e2274a550d813c30b9e85fe09b852 | /codehub/main.py | 2e7ac54b1ff47ead0ab62a1e03f446f39b823fb9 | [] | no_license | ahchfwk/pythonUtils | 30478e218bf9ce4c147ac03d061dbc44c29d7e17 | c0790d1ed45d31366d1c7786844bb5945932cae7 | refs/heads/master | 2020-09-22T00:04:33.100382 | 2019-11-30T08:09:17 | 2019-11-30T08:09:17 | 224,979,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | main.py | '''created by fwk
2018/4/9
main function
'''
from myhdfs import hdfstest
if __name__ == "__main__":
hdfstest.getReleaseFromHdfs_batch(10)
|
2c7b15860e1476744dddcc86e5ed67d4f666b54c | ad0857eaba945c75e705594a53c40dbdd40467fe | /baekjoon/python/square_string_4354.py | 29fda88860ff0d82cf0c52b83992b4a3c74abf84 | [
"MIT"
] | permissive | yskang/AlgorithmPractice | c9964d463fbd0d61edce5ba8b45767785b0b5e17 | 3efa96710e97c8740d6fef69e4afe7a23bfca05f | refs/heads/master | 2023-05-25T13:51:11.165687 | 2023-05-19T07:42:56 | 2023-05-19T07:42:56 | 67,045,852 | 0 | 0 | null | 2021-06-20T02:42:27 | 2016-08-31T14:40:10 | Python | UTF-8 | Python | false | false | 868 | py | square_string_4354.py | # Title: 문자열 제곱
# Link: https://www.acmicpc.net/problem/4354
import sys
sys.setrecursionlimit(10 ** 6)
read_single_str = lambda: sys.stdin.readline().strip()
def get_p(str_in: str):
origin_len = len(str_in)
last_len = origin_len
num_part = 2
while len(str_in) >= num_part:
w... |
bbe119251c3680b18af29412264ba2f9cb4586bc | ad4fd5b47da97d61caf6a82793fd7427f8752aef | /remote_lab/scout_ipcam/nodes/republish.py | 363d66cb986cd9065ba3210c1b12a87667c1c7ff | [] | no_license | zumbi3z/CEMRA | f70da158cda1240f783d5b0b617ac1048e8117cd | d70a9cc85d5f5db0bdd607dfcd087d9542f6737f | refs/heads/master | 2021-05-06T03:32:43.700109 | 2018-07-17T15:58:33 | 2018-07-17T15:58:33 | 114,902,540 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | republish.py | #! /usr/bin/env python
import rospy
from sensor_msgs.msg import *
def sub_callback(msg):
global pub
pub.publish(msg)
def sub_callback2(msg):
global pub2
pub2.publish(msg)
if __name__=="__main__":
global pub, pub2
rospy.init_node("republisher")
pub = rospy.Publisher... |
ec35686caa652f97f957ad75cfc518bf14c1e021 | 265c25b24df7960bf14aa8f6e0359e82de9de73f | /utils.py | 034aa27e50c6bf05768db7b7ea9f5f94f9e2356e | [] | no_license | Lyusungwon/film_pytorch | a2327bd90ab068c2e43be0ddd2ffb5c7557ca721 | c6c3e07a2de722d01e44a83b34e8f1594f920135 | refs/heads/master | 2020-04-14T16:04:51.568887 | 2019-02-07T06:15:25 | 2019-02-07T06:15:25 | 163,943,126 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,601 | py | utils.py | import os
import torch
import torch.nn as nn
import time
import pickle
def timefn(fn):
def wrap(*args):
t1 = time.time()
result = fn(*args)
t2 = time.time()
print("@timefn:{} took {} seconds".format(fn.__name__, t2 - t1))
return result
return wrap
def is_file_exist(fi... |
920cd41b18f5cfb45f46c44ed707cebe682d4dd9 | 13ab442ca00de43ebb09ed9e350b3c542f75105a | /nephoria/aws/ec2/windows_instance.py | 4931277d72baff6506b9e76fefe45c6e776cb461 | [
"BSD-3-Clause"
] | permissive | nephomaniac/nephoria | 8ce391486d20bf4e645539495c3036e83c80b42d | 50cf899473cef0da9198969a9b36c0c5db7d78a2 | refs/heads/master | 2021-07-07T09:50:59.803097 | 2021-03-31T22:57:36 | 2021-03-31T22:57:36 | 41,113,066 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 98,145 | py | windows_instance.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source ... |
2b7d9ded82fa980eeae06beb2d84d89612d53df1 | de42ccaf67865667681ac4566bcc6681580aeab3 | /functions.py | 1c6aac142ddc687e765eaf7cb9aa8f3203d64a41 | [] | no_license | Dashtid/Python-CT | c8ea82605c9a6c773d420fa36bb8fcf71be6c17b | 31ac2a31c30e8726653bd4752cdbd6ea4c02320e | refs/heads/master | 2020-05-28T03:44:01.166177 | 2019-05-27T15:45:12 | 2019-05-27T15:45:12 | 188,870,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,430 | py | functions.py | import SimpleITK as sitk
import numpy as np
from sklearn.ensemble import RandomForestClassifier
# # Estimation function # #
# --------------------------- #
# Linear registration function
# --------------------------- #
# --- Input --- #
# im_ref : The common image [numpy.ndarray]
# im_mov : The group ima... |
1406b2ab78b52823a8f455c8e2719f6bd84bd168 | b6ffcd9f2b6cea02478dba3ca0515b7044fe604f | /PyPumpControl/lib/encoder.py | a165e2d89daf17befae476ef9a1aac71b6f7d7c0 | [] | no_license | RiceElectricVehicle/maus-pump-control-examples | 5092b25ef8b6daa0a2927d7e864ffb0e7830921e | 6900274b17ab644da2b6eef52022ff1cafc6cf09 | refs/heads/master | 2020-04-04T08:07:24.031850 | 2018-11-01T20:31:49 | 2018-11-01T20:31:49 | 155,771,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,811 | py | encoder.py | # -*- coding: utf-8 -*-
"""MicroPython rotary encoder library."""
from machine import Pin
ENC_STATES = (0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0)
class Encoder(object):
def __init__(self, pin_x='P4', pin_y='P5', pin_mode=Pin.PULL_UP,
scale=1, min=0, max=100, reverse=False):
s... |
1bab6b039462bb5762aa588d5ba7c3e74362d0a7 | 2b238627de066356b54503bf762ec6dfd6d26e9a | /meta/minRemoveToMakeValidParenthesis.py | bde52f5ad3b8631c48a19002b126f49e33794f0e | [] | no_license | LKhushlani/leetcode | 601e1efa8ae6dbfdd4c3b49710f82cf68b9fa54a | 0a4643ca38224bd4cb4a101a6be3161f35979911 | refs/heads/master | 2023-04-28T08:17:38.286004 | 2023-04-20T02:13:52 | 2023-04-20T02:13:52 | 237,696,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | minRemoveToMakeValidParenthesis.py | class Solution:
def minRemoveToMakeValid(self, s: str) -> str:
bracketsToRemove = set()
stack = []
for i, c in enumerate(s):
if c not in '()':
continue
if c == '(':
stack.append(i)
elif not stack:
... |
75ddcdd4e80b962198ff9de1d996837927c3ac1a | 65dcacf684e0e62d3713f6f78abbbaead9effad6 | /semaland_string_features.py | 229bf18acc493fe50fc9ea580e845074734a069d | [] | no_license | luutuntin/Cinderella | aef786e877341ac8793310f0218b2fd9eddf816c | c3730f464c7c7f7deea6bf28d04702c711cb474a | refs/heads/master | 2022-01-17T04:30:37.020167 | 2022-01-10T00:22:05 | 2022-01-10T00:22:05 | 41,883,123 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | semaland_string_features.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, with_statement
"""
cosi299a- Cinderella
alexluu@brandeis.edu
"""
def truecase_is(string):
""" -> lower/title/upper/other """
if string.islower():
return 'l'
if string.istitle():
return 't'
if string... |
cdcb2710291e9897b874f63840193470ed58be49 | 674e6f9844439b4dc7098e396f4af94ba4c0317b | /Spiders/user_info_spider/page_info_ajax_spider/page_info_ajax_spider/spiders/page_info_ajax.py | 65ab523e7f2db457dda45559e7cb6dca82ec2f0f | [] | no_license | lzr123/BigDataTraining | 2eb2ff71c8a53a0bb2f93c6fb5b66eb35546599e | 4fbd0231c771cbb9d36f167b91a0d156c511e0d6 | refs/heads/master | 2020-06-08T19:14:58.641659 | 2019-08-03T15:14:37 | 2019-08-03T15:14:37 | 193,290,057 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | page_info_ajax.py | # -*- coding: utf-8 -*-
import json
import re
import scrapy
from scrapy import Request
class PageInfoAjaxSpider(scrapy.Spider):
name = 'page_info_ajax'
allowed_domains = ['bilibili.com']
# start_urls = ['http://bilibili.com/']
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x6... |
f4bfef2ee78b87184cc72666fade949f8f931fc3 | a2807cde990769d2737b2ca4d57f8611c226c568 | /CWs/CW3.py | 5c292026cb10c6a13e6697f79e5e83aea83d749e | [] | no_license | marinajukova/HSE_programming | 15e526246c640446561a1435a016c9469047dd20 | b99fbb298a0b8e241c139d4eed36dafb6676ca99 | refs/heads/master | 2021-01-21T14:57:11.535799 | 2017-06-23T12:33:12 | 2017-06-23T12:33:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,878 | py | CW3.py | #### про enumerate
##s = input()
##for index, letter in enumerate(s):
## print(index,':',letter)
#### то же что и
##for i in range(len(s)):
## print (i,':', s[i])
#### номер начала каждого слова
##st = input()
##for index, symbol in enumerate(st):
## if symbol == ' ' and index != len(st)-1 or index == 0 or in... |
6d0340a08701b0c4f34e9b833bca27cf455d682d | 13617cd87821cab9a4f0b1fb0a8355dfd145a43a | /ERDDAP/ERDDAP_read_bathy.py | b58d52fc6247273b2323305cc7e0de50667ef216 | [
"GFDL-1.1-only",
"MIT"
] | permissive | petercunning/notebook | a84acf2ba22c053cf2dfd912387ab66dfe1668c7 | 5b26f2dc96bcb36434542b397de6ca5fa3b61a0a | refs/heads/master | 2021-01-15T03:54:00.227967 | 2020-02-25T00:02:23 | 2020-02-25T00:02:23 | 242,869,782 | 0 | 0 | MIT | 2020-02-24T23:56:41 | 2020-02-24T23:56:40 | null | UTF-8 | Python | false | false | 1,478 | py | ERDDAP_read_bathy.py |
# coding: utf-8
# # Read Bathy data from ERDDAP
# In[ ]:
get_ipython().system(u'conda install basemap --yes')
# In[1]:
import numpy as np
import matplotlib.pyplot as plt
import urllib
import netCDF4
from mpl_toolkits.basemap import Basemap
# In[2]:
# Definine the domain of interest
minlat = 42
maxlat = 45
min... |
0f6737b9e9e9a13d75c20352e9ef9c1db6c0c8a3 | 82c572e0eb859fc2ecdaf7b213d2f06a54b77e49 | /scripts/user_interface.py | 971f35ecb3d321db432cf85431360ba185c19ca4 | [] | no_license | serenapaneri/final_assignment | 83f01449e44cfbf09b1c6491f5047b5012412d2f | 8861288de3343bfcda42114f2c8f52d44cc8733f | refs/heads/main | 2023-08-31T06:19:14.151441 | 2021-10-25T17:13:56 | 2021-10-25T17:13:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,789 | py | user_interface.py | #! /usr/bin/env python
# import ros stuff
import rospy
from std_srvs.srv import *
#to check if the service is active
active_ = False
def unable_service(req):
"""
This function contains the variable declared above that is
used to enable the service.
"""
global active_
active_ = req.data
res = SetBoolRespo... |
0686dec7f3dc23f01ffff41f611a1bb597bb5352 | 1c133ba4c865e4a620899a284347d91dc8170d5c | /src/mattermostdriver/endpoints/files.py | ff9547dde8fa4a7e9f1ad20f792a789effef0670 | [
"MIT"
] | permissive | Vaelor/python-mattermost-driver | 59ecc7b30e4b5109dae4c6ce8e3c93e666516b2d | c6ac437d351c32ea7bf1eca39846a6482c51bd01 | refs/heads/master | 2023-05-29T18:52:02.774069 | 2022-08-17T08:09:50 | 2022-08-17T08:09:50 | 95,458,169 | 183 | 77 | MIT | 2023-04-29T13:08:16 | 2017-06-26T14:55:49 | Python | UTF-8 | Python | false | false | 890 | py | files.py | from .base import Base
class Files(Base):
endpoint = "/files"
def upload_file(self, channel_id, files):
return self.client.post(self.endpoint, data={"channel_id": channel_id}, files=files)
def get_file(self, file_id):
return self.client.get(
self.endpoint + "/" + file_id,
... |
41d77e6f377fa357cc0c082367a1b9217b3829c6 | 37525eb4790909ee46adfe54fede62a94f668fc0 | /Django_App/movie_restful_api/movies/views.py | 8c24343f1bc89c50e43a227cd5685aa7f246313e | [] | no_license | jiwookseo/web_projects | c099e76a4b9c1ccccc912580f27568721cbd764c | db3bc170316a392414799024a435043a79d90b74 | refs/heads/master | 2020-04-18T11:39:53.090615 | 2019-05-09T08:56:04 | 2019-05-09T08:56:04 | 167,508,640 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,596 | py | views.py | from django.shortcuts import render, get_object_or_404
from .models import Genre, Movie, Score
from .serializers import GenreSerializer, MovieSerializer, ScoreSerializer
from django.http import JsonResponse
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators imp... |
d4493837b6d5b5886a51b667770cf6ccfd9e4f0f | 409038e6b09547ee7029bf2994c2c37a41b0dbb2 | /details/views.py | 614e3cecbaf0571b762f3d74c5f4cf04b6a816fb | [] | no_license | himanshu-dutta/portfolio-website | 8ad2cb052bdb47156b504be94a701a33b6f170b8 | a34c12978ea1519d0d17650a73e91100fa41f6e9 | refs/heads/master | 2023-02-13T07:49:58.463426 | 2021-01-06T09:15:05 | 2021-01-06T09:15:05 | 284,319,871 | 0 | 0 | null | 2021-01-06T09:15:07 | 2020-08-01T18:48:27 | JavaScript | UTF-8 | Python | false | false | 463 | py | views.py | from rest_framework.response import Response
from rest_framework import permissions
from rest_framework.generics import ListAPIView, RetrieveAPIView
from details.models import Detail
from details.serializers import DetailSerializer
# Create your views here.
class DetailView(RetrieveAPIView):
queryset = Detail.ob... |
bd0e80dc367d90508ff04000971657c307382437 | 8bc70bd37cab41f63b541d0dcf4cd763bf4cb76e | /prehandle.py | d31fe74211d0a619d3d77130613ae380a458f5f7 | [] | no_license | FanGuojie/classify_key | 8909f72c600680d79abdfa484cca4573a9e16971 | 945d957efb6334a1667e10b002791f7ee9182594 | refs/heads/master | 2020-04-12T19:03:31.666293 | 2018-12-21T11:54:50 | 2018-12-21T11:54:50 | 162,698,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,936 | py | prehandle.py | import numpy as np
import cv2
# # 读取图片
def generate_numpy_data(start, end):
global data, img2
print("generate numpy data from imgs")
def loadImg(j, m):
global img2
try:
img = cv2.imread('./' + str(m + 1) + '/' + str(j)+".png" , 0)
for i in range(2)... |
143bbd0e74bbb3002d4c57d3f19128553d1d492b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02724/s580437270.py | ca84ca95b3afd2a01edf62c2f1e39669d1291cc6 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | s580437270.py | X = int(input())
a = (X//500)*1000
b = ((X%500)//5)*5
print(a+b) |
a7129ba903db7e8c4cd7475e7d3c316eefff3a9a | 6d0913ec4390302e9c9525d87d4de9ba55aec7eb | /tests/FillType.py | 22e3d4e2276508c4a6a762287f7b19c177fdc834 | [
"MIT"
] | permissive | rcpbayindir/can_decoder | 057a1a21a652d534544f8495adf19067de97aa74 | abfdd839856745f88b3fc3a58c8bedbdd05d5616 | refs/heads/master | 2023-07-09T15:12:28.142840 | 2021-07-06T12:35:54 | 2021-07-07T09:25:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | FillType.py | from enum import Enum, auto
class FillType(Enum):
FillType_NONE = auto(),
FillType_OBD2 = auto(),
FillType_J1939 = auto(),
FillType_RANDOM = auto(),
|
d2211b2b18d8a277eb499bcbaf243c67ed19f66a | f22ff99a13d76a5b8ee192ef793e42f4d43f12cf | /Clases/sesion.py | 7d144e25ce12fd530f6c175c4ee2eebb83e27caa | [] | no_license | josepablobermudezm/Simulation-of-the-OSI-model | a12cd817932a16c3774e740d6c583d93e59be163 | 31ebb373d3a9b789d225481d13d5fe948c05b349 | refs/heads/master | 2023-06-10T18:04:15.488861 | 2021-07-03T18:13:30 | 2021-07-03T18:13:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | sesion.py | import socket, os
from .transporte import transporte
class sesion:
def __init__(self, nombre):
self.nombre = nombre
def conectar(self, host, puerto, mensaje):
print("------------------")
print("CAPA DE SESION")
print("CREANDO SESION")
c = socket.socket(socket.AF_INET, s... |
a2c5ceeafe35b62234e3f562d83af85e7f2c2470 | ac3db86631a4ab6fd9ef0d1397ccd842cef957fa | /SPARK17/expeyes/eyeplot17.py | 945a9b049705053648c0600faac0f337106e5e9f | [
"MIT"
] | permissive | csparkresearch/ExpEYES17-Qt | 57f5e19196bfd7a04454c0708c33d6eccd36e1e1 | 7a3bdc0df19569c0321434d8fd897439b1854fb1 | refs/heads/master | 2020-12-31T00:30:42.669312 | 2018-04-19T11:11:39 | 2018-04-19T11:11:39 | 86,545,764 | 1 | 4 | null | 2017-07-21T10:00:39 | 2017-03-29T06:22:12 | Python | UTF-8 | Python | false | false | 12,938 | py | eyeplot17.py | '''
Plotting libray, using Tkinter for expEYES
Author : Ajith Kumar B.P, bpajith@gmail.com
License : GNU GPL version 3
'''
import gettext, sys
gettext.bindtextdomain("expeyes")
gettext.textdomain('expeyes')
_ = gettext.gettext
VER = sys.version[0]
if VER == '3':
from tkinter import *
else:
from Tkinter import *
... |
b0c734ad016934fb9692e2297c2d26f451e720c8 | 2070cf38a01282820cd8e9d01846919abae25aba | /user.py | 247b7151cd08191ceeafea8efc76ccdf59d9ad11 | [] | no_license | domilam/python_simulator | 6e5cdb61f048727397904912726ee0f953f11c63 | 24c0ad2d2a0d7ce9d76ea5a26ee64349aa76196a | refs/heads/master | 2020-06-18T23:14:02.607342 | 2019-07-12T21:49:54 | 2019-07-12T21:49:54 | 196,488,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | user.py | # coding=utf-8
import uuid
class User:
def __init__(self, name):
self.id = uuid.uuid4().hex
self.name = name
self.inbox = []
def add_toinbox(self, message):
self.inbox.append(message) |
f7d2fb01bdf972444b21b86867698582706ef8b9 | 7329c146bee13deaa81ed9f88f591f7c011a50da | /Employee/Regemp/apps.py | a88ef64452d626cdf1141e609e1e73cf4b93b21e | [] | no_license | Athul-cr/vozzinoPresentation | a8c0119c0368c2f5b0f57b6e2da82c1990791d60 | 989f22a35eaad7e4ea5d6ec7735b868b233e19de | refs/heads/main | 2022-12-20T10:32:34.525714 | 2020-10-07T09:24:32 | 2020-10-07T09:24:32 | 301,791,109 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | apps.py | from django.apps import AppConfig
class RegempConfig(AppConfig):
name = 'Regemp'
|
3280c4fd389a12c8adcca1679efe93faece54669 | 7ba5463c0a9d053c59cc5ea4c2c762c981fddf7e | /bbs/admin.py | 0e0d34d3add0cc3c5aa8bb9c384ee6d3342223f3 | [] | no_license | SeiichiroKimura/myapp | fb5c5078e00f573aacea81e8e80aa3004a24988a | 7f04b821a9c9b4cc3ae965be880e11067cd5724b | refs/heads/master | 2020-12-04T08:22:55.252136 | 2020-01-20T13:59:19 | 2020-01-20T13:59:19 | 231,693,115 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | admin.py | from django.contrib import admin
from .models import Article
admin. site.register(Article)
|
5671b673894019bbb2e49632dd98661bfd627db8 | 45abf73d2c743abbddeedb8a21d033c1ab39d69d | /gerencianet/version.py | c45a3df3e61ba9b8e83740c18bab814a9525036a | [
"MIT"
] | permissive | CantarzoTDC/gn-api-sdk-python | 5eac9f5b3ab46f8661c16cf0e8b3a6581671c070 | 09664fdcc7b9d99db6265c63b5c0efdfa413acd9 | refs/heads/master | 2023-04-14T10:19:36.083472 | 2021-04-12T20:01:20 | 2021-04-12T20:01:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37 | py | version.py | # encoding: utf-8
VERSION = '2.0.0'
|
d3633289ca0f2477cfb757ccdf538c192ec695de | 328debd467e615e6635d868893fde38972410c79 | /manager.py | 3ac9e552df742a0ee021abaa1407154247a430b6 | [] | no_license | jinxiu89/wones | 1014b3a5c9b013118e37f16535237855c460e6a7 | 2dbb07ef40203503a86638197cb1fe43974b60ef | refs/heads/master | 2022-09-23T21:35:58.283827 | 2019-10-31T12:41:16 | 2019-10-31T12:41:16 | 127,682,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | manager.py | #!/usr/bin/env python
# author:jinxiu89@163.com
# create by thomas on 18-1-26.
import app.models
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from create_app import app
from db_exts import db
from flask import redirect, url_for
from app.filter import *
from app.context import *
db... |
5b166a97d82fcf20762040cbd78c8d85276d658f | 78e67f1b8b8fcac48ec437add9a163695d7b30ac | /PythonWebBasics/Notes/Notes/notes_app/urls.py | 4e163f85737c6d66877ed3910c6e890bc529135f | [] | no_license | StefanDimitrovDimitrov/Django201 | f52c40648e9255bd4038baa58db199f1f6b98f88 | 56da5c3c5795cf1556ad5e155d9a31f9c773e995 | refs/heads/main | 2023-06-20T02:46:11.295727 | 2021-07-16T18:37:37 | 2021-07-16T18:37:37 | 374,638,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 962 | py | urls.py |
'''
• http://localhost:8000/ - home page
• http://localhost:8000/add - add note page
• http://localhost:8000/edit/:id - edit note page
• http://localhost:8000/delete/:id - delete note page
• http://localhost:8000/details/:id - note details page
• http://localhost:8000/profile - profile page
'''
from django.urls imp... |
b62749c2ae0dc11db21b0ae76112db5dde3183c0 | 816e8b103444f3417f297c8572386ff98d8491c1 | /OpenCVLearn210829.py | dbd21943bb401250b1c6171fc5df61b252167f70 | [] | no_license | joshuaweiss2020/JoshuaPythonOpenCV | b7b05b6dd49e40e7d75bfaebd7248930f96f6ea4 | e4413da7192606c7c7fccb2ce3c4c06dd1a62f86 | refs/heads/master | 2023-08-01T11:53:19.593622 | 2021-09-12T13:42:22 | 2021-09-12T13:42:22 | 400,981,994 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,430 | py | OpenCVLearn210829.py | import cv2
import numpy as np
image = cv2.imread("Alex1small.jpg")
print("shape:", image.shape)
print("size:", image.size)
print("dtype:", image.dtype)
print("px rgb", image[642, 499])
print("px", image[642, 499, 1])
# 改变图片左上角区域的颜色 y:0-100 x:0-100
# for i in range(300,401):
# for j in range(250,351):
# im... |
b597dec890132d6caf95f33f257b8750b5b974bf | f719d8ade9ac85e59d123b43f14178f0fde29087 | /UsingPythonToAccessWebData/Week_3/testUrllib.py | 39038cddcac8a1523b150d39c49986d7d9c0ec7c | [] | no_license | mrmthornton/PythonForEverybody | c3933d113a75b178b60953631fd33fb6d53b671f | 6db1b73201c137e918184ae2174cd42828612320 | refs/heads/master | 2021-01-10T06:11:31.011666 | 2016-04-03T06:21:08 | 2016-04-03T06:21:08 | 50,816,737 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 237 | py | testUrllib.py | '''
Created on Nov 25, 2015
@author: mike
'''
import urllib # treats url/s like files
url = 'http://www.py4inf.com/code/romeo.txt'
urlHandle = urllib.urlopen(url)
#for line in urlHandler:
# print line.strip()
print urlHandle.read() |
7b5cd57a1d8b8e36475d1fcb17492acde03d06d6 | d99e73252210d9ab5dea0b46d2f82f8a036373ce | /scripts/plot2DITs.py | 3b389b2bee8dc55d322b5d4380cb183e2e7ce72e | [] | no_license | schwancr/schwancr_bin | 710378ebca8482b1e4e38be894a22349e808e18a | fb42d40ac7be4b9984c257c09b569d740926781a | refs/heads/master | 2016-08-04T23:36:29.658194 | 2015-06-30T18:26:04 | 2015-06-30T18:26:04 | 7,841,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,354 | py | plot2DITs.py | #!/usr/bin/env python
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('-d',dest='data_FNs',nargs='+',help='Data filenames to find implied timescale data.')
parser.add_argument('-k',dest='num_states',nargs='+',type=int,help='Number of states associated with each data filename')
parser.... |
9c2a5051c6b20ac1fdc06d91981464f492a87d62 | 797e860ab061ef0952976c223a47c6975a92f7c7 | /echo-server.py | 39ec8197bb21f4c517f9c14744b95cbf89e2b2f4 | [] | no_license | ejonghan/Network_TermProject | f705b6ea417dc35c029681ab3ee9b9a42c3fde61 | 03a73f0143f5ad4a263c95038ba58f61a7858f7f | refs/heads/master | 2022-10-21T13:37:40.123500 | 2020-06-21T18:23:39 | 2020-06-21T18:23:39 | 273,894,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,996 | py | echo-server.py | import socket
IP = '127.0.0.1' # 로컬 호스트넘버
S_PORT = 7777 # 임의의 포트넘버
client_queue = []
serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # TCP타입 소켓객체 생성
serverSocket.bind((IP, S_PORT)) # 소켓을호스트와 포트넘버에 연결
serverSocket.listen(1) # 클라이언트의 접속 허용
## queue에서 정보를 삭제하는 메소드
def removeClient(ip, chatRoom_Nu... |
15678de87d70d6a9b8340e6ce5dc6e2a38d325c7 | 84618eb69fc2533791cb04d3989d6921b3246296 | /blog/models.py | 29253a939cf1aa29b07ee22b6badc50de2e07f5a | [] | no_license | nickatnight/tivix-assignment | 97b65092a00fad86f2ff8ee8e090e8a5a5442392 | a5df1668df4a882d5ad739391acf13b801f4cb10 | refs/heads/master | 2020-12-24T19:28:12.710669 | 2016-05-11T09:28:44 | 2016-05-11T09:28:44 | 58,011,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,565 | py | models.py | from django.core.urlresolvers import reverse
from django.db import models
from django.template.defaultfilters import slugify
def upload_location(instance, filename):
"""
Upload blog image content to the 'media' folder.
"""
return '%s/%s/%s' % ('blog-imgs', instance.slug, filename)
class Post(models.... |
28f9d9d01df94415b6a04db738e75cf170deb5e0 | 9d123c6b87b0baf80a6fce070023e19d68048b90 | /slothql/django/__init__.py | 74db447929d015215e8f54e2b9357d53e22ed6b9 | [
"MIT"
] | permissive | IndioInc/slothql | ea4da3727cb974360eeb3b38517ead4328687e81 | 64a574013e249968746044555bd8779ac353b13f | refs/heads/master | 2021-05-08T11:07:34.420797 | 2018-04-14T02:08:55 | 2018-04-14T02:08:55 | 119,881,523 | 2 | 0 | MIT | 2018-04-15T01:31:10 | 2018-02-01T19:16:50 | Python | UTF-8 | Python | false | false | 103 | py | __init__.py | from .views import GraphQLView
from .types import Model
__all__ = (
'GraphQLView',
'Model',
)
|
d9810e0df686cd586404d63f213106a666befa2d | 09bcf0c2db5e7fac49e9c571816fe2cc38c4f722 | /components/input/speech/nlu/api_ai.py | 52a33b446f62d355276b45bd1b497ec9b6f4cb67 | [] | no_license | zhangyan612/aibotics | e867404f3dfc3bd451afbb26ff88f6295cc60a0a | 415dc458e2de9e22db702f48b0dde88e9670f380 | refs/heads/master | 2021-07-12T10:00:49.554975 | 2017-10-10T06:46:41 | 2017-10-10T06:46:41 | 105,710,040 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,155 | py | api_ai.py | import sys
import os
import json
try:
import apiai
except ImportError:
sys.path.append(
os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)
)
import apiai
# replacement of service into local service
# Rasa NLU
# https://github.com/zhangyan612/rasa_nlu
# def main():
# ai ... |
aafb48145d1b9cd1b7827afc3050e764e68a1d95 | ca1179e97d1d251d13e0ba7875960262e9d0f6f2 | /src/main/scripts/setup | a9f198004dd0c55111818c8d1c899325669e5af0 | [] | no_license | icatproject-contrib/topcat_doi_plugin | 08c3c7e7f24ac60af9fc0537dd43c3af584eb7d4 | f88dc777f2ec3a3241af0758d2c5e0dc9f5a8430 | refs/heads/master | 2021-06-12T03:40:37.123846 | 2017-09-18T14:39:01 | 2017-09-18T14:39:01 | 65,726,026 | 1 | 0 | null | 2021-06-07T18:07:34 | 2016-08-15T11:01:05 | Java | UTF-8 | Python | false | false | 1,018 | setup | #!/usr/bin/env python
from setup_utils import *
import os
import re
# topcat
def uninstall():
app = actions.getAppName("topcat_doi_plugin")
if app: actions.undeploy(app)
actions.unregisterDB("topcat_doi_plugin")
actions, arg, props = getActions("topcat_doi_plugin-setup.properties", ["db.driver", "db.url"... | |
2da4ae75cdcd1abab2c1f8a085e715242efac9b0 | bff7991531b33b3b9d0b7adad2c464471f93f2e0 | /smartrecruiters/era_3/microservices/satellite-spy/api/migrations/0011_auto_20190806_1119.py | 50cc304803b6909e873649b4b8269c47933615b3 | [] | no_license | glotchimo/legacy | 574e058e51f1232eb498dbff593fde35044a6246 | 28c05a421d0be2fc9184a794fa5adb92d293d7f6 | refs/heads/master | 2022-04-06T21:49:23.001154 | 2020-02-29T23:54:20 | 2020-02-29T23:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,505 | py | 0011_auto_20190806_1119.py | # Generated by Django 2.2.1 on 2019-08-06 18:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0010_auto_20190716_1132'),
]
operations = [
migrations.RemoveField(
model_name='historicalinsight',
name='cat... |
dc5b342c286a2ddd7fb9c7417364c0ed131af42a | 3068b4d57ec232e10899ca3b149ebd3ded298ea9 | /vigenere_hill/hill/matrice/matrice.py | c1f04e5ea7d642639bbb5cf7f6745e53b470cceb | [] | no_license | maamri95/vignere_hill | ff477d888a1e8e1ac6a0c3cdb69e9e7ac1276222 | 46b5083b914039fb567b58aaca1e57fe2d93b71a | refs/heads/master | 2020-06-09T23:48:13.036983 | 2019-09-23T22:11:09 | 2019-09-23T22:11:09 | 193,529,854 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,491 | py | matrice.py | def reduire(mat, n, m):
"""
return la matrice moi la ligne n et la collenne m
:param m: collenne
:param n: ligne
:param mat: matrice
:type n: int
:type m: int
:type mat: list[list[int]]
"""
res = []
for i in range(len(mat)):
if i != n:
lin = []
... |
370c03f95ee9877ec1c07ec68a73486e3e0a381a | 044b91c3f5c43520e7f5ea4c40f20df580f21747 | /examples/app_config.py | b6a74556f8448b286cdb26e8042c7a690569b686 | [
"MIT",
"Apache-2.0"
] | permissive | radical-cybertools/radical.utils | f688ce78e88e8862b6a2df60e275c2cbfbce1043 | 533590687671cfcf0d9b5e60b8928718ebaee80d | refs/heads/devel | 2023-08-31T01:14:09.578774 | 2023-08-23T00:36:32 | 2023-08-23T00:36:32 | 13,388,638 | 7 | 9 | NOASSERTION | 2023-08-11T18:06:09 | 2013-10-07T16:10:33 | Python | UTF-8 | Python | false | false | 3,579 | py | app_config.py |
import os
import pprint
import radical.utils as ru
# ------------------------------------------------------------------------------
# a default config, which defines:
# - the structure / keys of the config settings
# - the default values for the keys
app_config = {
'log_level' : 0,
'scheduler' : 'R... |
99c71ff35b645a4ad3045f7492a9987e688160a6 | a0cc9316e913f6b12644267674dcd5027aa38d8c | /dispenser_food_py/_________________________run.py | b60756fd533f387f70db2ebfb9db5fa94e9ecdc6 | [] | no_license | pavel-b-kr12/DoBot_multicontroll | 13d29c88bc3f5b30d19e2fc0e1b41bbe71281901 | 898fffd6735763c17e8f26cb0e1b3d178fbd29d6 | refs/heads/master | 2020-12-14T15:13:53.532414 | 2020-03-20T16:19:27 | 2020-03-20T16:19:27 | 234,782,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,096 | py | _________________________run.py | #F4 to toggle prog panel
bDebug=False # print
bKeyboardLeds=False
bMainBtns=False
bBtnStyle=True
bIDLE=False #False True to run from IDLE
# QPushButton
# {
# font-size:20px;
# color:red;
# }
#SetQueuedCmdForceStopExec(api)
#ClearAllAlarmsState(api)
#GetDeviceSN(api)
#GetDeviceName(api)
#GetDeviceVersion(api)
#
#G... |
4eb9a7055bbc5b71dd5799467c95cd329ffaf885 | ed53e5e1b41bd00994ffa23261d9e40f615329da | /python/comm/i2c_SSD1306.py | 7aafcfa2cf675fdbf746383a21d4592d3d15b728 | [] | no_license | mamgeorge/raspberryPi | b621b5886b0e797e993b9a12fd9ce99c67012c5b | d399a4c8783842ef414fd3a967c1cf9f0b7da1e0 | refs/heads/master | 2023-04-16T09:58:38.475424 | 2021-07-08T02:52:18 | 2021-07-08T02:52:18 | 224,088,303 | 1 | 1 | null | 2021-06-30T14:51:45 | 2019-11-26T02:51:04 | Python | UTF-8 | Python | false | false | 595 | py | i2c_SSD1306.py | # \\python\comm\i2c_SSD1306_org.py
# https://github.com/adafruit/Adafruit_Python_SSD1306
# ORA VCC pin_01 : 3V3
# WHT GND pin_06 : GND
# MAG SDA pin_03 : BCM_02
# YEL SCL pin_05 : BCM_03
from board import SCL, SDA
import busio
import adafruit_ssd1306
i2c = busio.I2C(SCL, SDA)
pix_width = 128
pix_height = 64
# crea... |
61c182002065eed702431b11f45b98c84d2d8d62 | b7d800d92b501e0e5a45b793eb9c60a92f9050e5 | /datmo/core/storage/local/tests/test_dal_user.py | 47c9309c1519c08ffaaef651ffafc31e7a0a7ced | [
"Apache-2.0"
] | permissive | pennyfx/datmo | 6454f326567a468cc816962a21bd725f78eedb26 | 3110eae8d5275164794bdd4d5ea7c19243b30e0c | refs/heads/master | 2020-03-15T08:33:53.395018 | 2018-05-03T19:09:21 | 2018-05-03T19:09:21 | 132,053,873 | 0 | 0 | null | 2018-05-03T21:57:22 | 2018-05-03T21:57:22 | null | UTF-8 | Python | false | false | 3,749 | py | test_dal_user.py | """
Tests for LocalDAL
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import tempfile
import platform
from datetime import datetime
from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver
from datmo.core.storage.local.dal i... |
03ca788d18fffdc5e1bff282b6ab18442b5ec0e0 | 1e75d08bc387dd7c2e3532d0db97bfb17e74242f | /graphs.py | 4950cf308688bc6727e7264c6846d2410e70a2b5 | [] | no_license | arieldeveloper/Co2-sea-ice-predictions | d09a2c34a8269533ab4410066f7c0542f6689c4c | 7eb37361cf517776a30f6b5199538f1c5213917b | refs/heads/main | 2023-01-31T04:14:11.852339 | 2020-12-15T21:50:00 | 2020-12-15T21:50:00 | 320,044,350 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 6,978 | py | graphs.py | """CSC110 Fall Final project: Graphing datasets and predictions and a Choropleth Map.
DESCRIPTION:
===============================
This module contains 2 main functions: The first one plots 3 different graphs based on our
datasets and predictions, and the second one creates a choropleth map. There is also a helper
fu... |
4a3347df62914cbdafbbe9b572cff9d77ff2a1bc | 42fa2514fb1c7f278f9cee60db3a3f9893a1b092 | /equilibrium.py | e8d254eaafc74bba7ec2ab629c0953721f067b34 | [
"MIT"
] | permissive | EmilHP/HANKPY | 134ca91a8055a0e6ee69056ec2478379261a74e7 | a8834f35be7ac30e61ba76d75293b1f7b54ae823 | refs/heads/master | 2021-05-20T18:51:33.778381 | 2020-04-13T17:38:19 | 2020-04-13T17:38:19 | 252,379,240 | 0 | 0 | null | 2020-04-02T06:58:42 | 2020-04-02T06:58:41 | null | UTF-8 | Python | false | false | 8,498 | py | equilibrium.py | import numpy as np
import time
import solve
from consav.misc import elapsed
def find_ra_mon_comp(model,Pi0=None,KN0=None,do_print=True,step_size=0.1,tol=1e-8):
# unpack
par = model.par
# initial
m = (par.vareps-1)/par.vareps
Pi = Pi0
KN = KN0
it = 1
# relaxation loop
... |
e21121dc67e181b14f6b538eab00667e70a48759 | bda804b2922af42b25fd066ba5fb172b7acf8477 | /finddivisorsnumber.py | 730ce180535ab190bb9c628e54d623dab06218ca | [] | no_license | kammitama5/Distracting_KATAS | c8fb813afee3a8527320c794dff5274c61551bbc | d10984bef26fada09a6ba0a8493ef640f22b2acc | refs/heads/master | 2020-06-27T19:09:55.518148 | 2018-05-02T04:14:44 | 2018-05-02T04:14:44 | 74,521,719 | 0 | 1 | null | 2017-08-10T04:15:40 | 2016-11-22T23:17:00 | Python | UTF-8 | Python | false | false | 144 | py | finddivisorsnumber.py | def divisors(n):
arr = []
for i in range(1, n+1):
if n % i == 0:
g = i
arr.append(g)
return len(arr)
|
7cee0f7bc3527a23f2591c5cf6bb3d8350788ccc | 3d4cd68400eb5429282b23bf6a1b7226851b731a | /spddo/chat/chat_handler.py | 6a9cecbc3df78b104157a2bd67d9d392b2f58b61 | [] | no_license | blueshed/spddo-chat | 2dee16478e9a30ed0196d76d450e0772147aa208 | d7ba492162ba95c0d2b8ed78370366eb96e39c3a | refs/heads/master | 2021-01-17T11:29:48.959086 | 2016-05-21T18:33:08 | 2016-05-21T18:33:08 | 43,005,167 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,701 | py | chat_handler.py | from tornado.websocket import WebSocketHandler
class ChatHandler(WebSocketHandler):
'''
Simple chat websocket handler
'''
@property
def chat_clients(self):
''' access utility for application settings '''
return self.settings["chat_clients"]
@property
def broadcast_que... |
d9c384ab99bd4724b902f096c2fa723f4dd5e756 | e99b2151bcd6e4c6990e1113e7829762e862eaf8 | /model/loss.py | 6204f864fbc21e644bae74a80330a2a734777e0c | [
"MIT"
] | permissive | keonlee9420/DiffSinger | 49889a16bd41ef54a88d8e8e83722f795ee88117 | f849f8def5abb38ad272a384e8bec838ea1957a4 | refs/heads/main | 2023-04-09T08:30:41.552064 | 2022-02-01T03:18:20 | 2022-02-03T02:36:01 | 373,542,601 | 202 | 26 | null | null | null | null | UTF-8 | Python | false | false | 11,044 | py | loss.py | import torch
import torch.nn as nn
import torch.nn.functional as F
import os
import json
from utils.tools import ssim
from utils.pitch_tools import cwt2f0_norm
from text import sil_phonemes_ids
class DiffSingerLoss(nn.Module):
""" DiffSinger Loss """
def __init__(self, args, preprocess_config, m... |
4027907cb1c933a009d2a96ec53fe7fa052086bc | 91b24091f0a389fd55a42d4994b75bcfa8380aa9 | /video_server.py | 585baac1c2406194c854e43fadc7f2311bcd1e63 | [] | no_license | jinand10/python-video | 6ddfff1ebdda53273c1ecf65b4effd46e1a15e24 | 54fa3575d4bd483d62c06228f53f1799aaa15671 | refs/heads/master | 2021-02-10T01:03:17.396480 | 2020-03-03T07:39:49 | 2020-03-03T07:39:49 | 244,340,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,667 | py | video_server.py | import time
import requests
import re
import os
import sys
import json
import datetime
from flask import request, Flask, jsonify
from hashlib import md5
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
VHEADERS = {
'User-Agent':'Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; MI 4S Build/LMY47V) AppleWebKit/537... |
99d58a28092a6e59556f9911846babe040767166 | 0b1b92e30893d4428b0e04342490da8aef121a65 | /Python/paint.py | ab6dc696c22823f55fa7881a535db90786631ee4 | [] | no_license | miaojiang1987/LeetCode | 280dc892f8adbf8c18f30c180e76b045b3797f8c | d8f96b0ec1a85abeef1ce8c0cc409ed501ce088b | refs/heads/master | 2021-06-09T14:46:43.858955 | 2021-05-20T09:06:24 | 2021-05-20T09:06:24 | 155,755,065 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 631 | py | paint.py | class Solution(object):
def minCost(self, costs):
"""
:type costs: List[List[int]]
:rtype: int
"""
if not costs or len(costs)==0:
return 0
dp=[[0 for i in range(3)] for j in range(len(costs))]
for i in range(3):
dp[0][i]=costs[... |
3000d9411995c3b266aaefaba153027413a33d33 | 308c7d5dd37ca24096081edea6f73e79ce089da4 | /101-150/118. 杨辉三角.py | a6446f47f0a5adbf19f5c85b8e61f0bee731921a | [] | no_license | fengges/leetcode | 4953ca038b085cdb772054fa1483bf816dccb578 | 5d592440b214024cad342c497b381dbce19d8a70 | refs/heads/master | 2022-09-18T17:52:49.525234 | 2022-09-03T08:45:07 | 2022-09-03T08:45:07 | 132,389,747 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | 118. 杨辉三角.py | class Solution:
def generate(self, numRows):
if numRows==0:
return []
reuslt=[[1]]
for i in range(1,numRows):
temp=[1]
up=reuslt[-1]
for j in range(len(up)-1):
temp.append(up[j]+up[j+1])
temp.append(1)
re... |
87fd94f201bdb1ef4e35c5b7e078a6978fa3fd79 | 289e97fd14bd5f7919f89b3ed640c3cf6b88cf3e | /src/alpha/gpfrm_speciated.py | 71d83b3a9f1057a551baeb031859d196c06626d4 | [] | no_license | AndLen/gpfrm | ad3a3de337409ce0b901a55a74c276a277c9cccb | 785c6daf5d3cdab56488739b019f27441abc01a8 | refs/heads/main | 2023-03-28T02:48:25.155652 | 2021-04-03T04:42:35 | 2021-04-03T04:42:35 | 354,200,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,867 | py | gpfrm_speciated.py | from itertools import starmap
from deap import base
from deap import creator
from numba import njit
import gptools.weighted_generators as wg
from alpha import frm_speciated_ea as ase
from alpha.eval_frm import st_pearsons
from alpha.gp_design import get_pset_weights
from alpha.rundata_frm_sp import rd
from gptools.Pa... |
ac9349805fb1934671a54f1e1c46cc0b5954590b | 43d8ee55c988d135e480fe052433a7bb5773847b | /gendiff/formatter/stylish.py | 3fbbcca7acdb08f84818ce79e957755f95297cea | [] | no_license | gstr169/python-project-lvl2 | 7deb7d966c9a76e244b3225deeae7330fd83b85c | f2f667877987ce4dd0eb7f1bed97c6ea1f4df8c8 | refs/heads/main | 2023-01-05T13:22:43.031033 | 2020-11-06T16:58:59 | 2020-11-06T16:58:59 | 306,965,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,881 | py | stylish.py | def format_indent(depth):
return ' ' * (depth * 4 - 2)
def format_dict_value(value, depth):
parts = []
for key in value:
indent = format_indent(depth + 1)
formatted_value = to_str(value[key], depth + 1)
parts.append(f"{indent} {key}: {formatted_value}")
output = '\n'.join(part... |
41a4432f90f95d3ba3d37867d357a5ea197da1b2 | 523574145235dff11aa11109d8a805b033d47a90 | /hack-ohio-2020/website/userIn/apps.py | 2a43c04183bca446c1933829528b11a3547336ca | [] | no_license | jlevine18/hack-ohio-2020 | 58cbab1ad068291eb50c656643819c0c04a22f99 | 0db3f034995066b3317989a36c97d1fcd94597bc | refs/heads/main | 2023-01-23T07:57:40.975231 | 2020-11-15T16:23:43 | 2020-11-15T16:23:43 | 312,733,226 | 1 | 0 | null | 2020-11-15T07:18:53 | 2020-11-14T02:54:56 | Python | UTF-8 | Python | false | false | 89 | py | apps.py | from django.apps import AppConfig
class WeightsConfig(AppConfig):
name = 'weights'
|
68f28a0aa0d111e6ad858fddb2709e6600ca9154 | f46f49fa8651996f28723ae78475dc005f8c6c5f | /read_smx_sheet/templates/History_Delete_Insert_Apply.py | 5608d1c841d189a92080b3f297a2f775f766794f | [] | no_license | AyazzHamdy/SAMA_UDI | 5f7609bbf283734cd411d0a49f5a57757a86cd4b | 13a4af9cef25481f2b3d17d5d7aca072736d5861 | refs/heads/master | 2023-02-23T15:07:25.218643 | 2021-01-29T13:39:42 | 2021-01-29T13:39:42 | 274,145,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,237 | py | History_Delete_Insert_Apply.py | from read_smx_sheet.app_Lib import functions as funcs
from read_smx_sheet.Logging_Decorator import Logging_decorator
from read_smx_sheet.parameters import parameters as pm
from os import path, makedirs
@Logging_decorator
def history_delete_insert_apply(cf, source_output_path, secondary_output_path_HIST, smx_table):
... |
479ed60ae310216448b148a3980403b684062426 | a4cf49eb386251ca24439adfa9e96740953da961 | /datastructure.py | 5f7d378f16b07cc56f489dc873c7f9dd16b9c335 | [] | no_license | am-a-llama/MyCaptain-codes | 474e697d0b10abf40960693303e9c9768cbe674f | 73f77a4e8a1439e156e2506166aa13a33dca8df6 | refs/heads/main | 2023-08-22T07:22:41.124494 | 2021-09-26T16:49:49 | 2021-09-26T16:49:49 | 410,242,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | datastructure.py | #TASK 1
r= eval(input("Input radius of the circle: "))
area= 3.1415926535897932*(r**2)
print("The area of the circle wih radius",r,'is:',area)
#TASK 2
fname= input("Input the Filename: ")
for i in range(len(fname)):
if fname[i]=='.':
ext= fname[i+1:]
if ext=='py':
print('T... |
97726df9c2a9230a7b65f7f6d8f3c5c7f2c9e0eb | 3a25d2a547488a9b2b097ac011de0bf09e127bba | /src/models.py | 0cd4793d0d08eae2064901917814340518a1d227 | [] | no_license | ruiatelsevier/Semantic-HPO | d1b44476839a04e1f85923a2c1373b4307852567 | 3f3a10d1796f2cddd0092dac4d1a70610605cee5 | refs/heads/master | 2020-09-20T15:55:20.472587 | 2019-11-12T01:58:10 | 2019-11-12T01:58:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,044 | py | models.py |
import torch
from torch import nn
import torch.nn.functional as F
from pytorch_pretrained_bert.modeling import BertPreTrainedModel, BertLayerNorm, \
BertEmbeddings, BertEncoder, BertPooler
from pytorch_pretrained_bert import BertModel, BertConfig
class BertForSentenceEmbedding(BertPreTrainedModel):
def __ini... |
c4d8e59dde7d6207203f2719d564f37e5454a060 | 2611579133fd310e74dde7b67580c93bff15ea4f | /serverdensity/wrapper/crud.py | 612c9462dcc0d410503d8004bdcae76ecbbc2953 | [
"MIT"
] | permissive | tommyboytech/sd-python-wrapper | d96e8986aa4aa5f12b6812adb239ccd7ee0c1f91 | 6a55bc585d405d01ad84bde96177dc456ce42d06 | refs/heads/master | 2020-01-19T21:38:19.182274 | 2017-12-01T21:26:07 | 2017-12-01T21:26:07 | 94,220,199 | 0 | 0 | null | 2017-06-13T14:11:27 | 2017-06-13T14:11:26 | null | UTF-8 | Python | false | false | 1,004 | py | crud.py | from serverdensity import Response
class CRUD(object):
api = None
def create(self, data=None, **kwargs):
if not data:
data = self._data
return self.__class__(self.api.post(url=self.PATHS['create'], data=data, **kwargs))
def delete(self, _id=None, **kwargs):
if not _... |
431c6942ce7838033cca149f5d77387ef15bfdce | 790323d1aba845f640213d21ca3d873c170edd8c | /client/__main__.py | 07d2c3079f98018d8c788fcc0829f6d0fb9a524a | [
"MIT"
] | permissive | KevinMech/slither.py | eb5ffe1974bd159e3b642253d0c5b8ac421ee354 | 7fa066cf70172067dd0a82c2ce56ceb5708b08a2 | refs/heads/master | 2021-01-19T08:45:23.264876 | 2017-05-07T17:05:52 | 2017-05-07T17:05:52 | 87,669,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | __main__.py | import curses
import game
import graphics
# Initialize Screen
window = curses.initscr()
window.keypad(1)
selectMenu = 0
# Draw Menu Input Logic
while True:
graphics.drawMenu(window, selectMenu)
key = window.getch()
if key == curses.KEY_UP and selectMenu > 0:
selectMenu -= 1
elif key == curses.... |
94b199c5418e17dedcbe4ed2075c24bef518c739 | 4cae69f6c634aee39dd55a78b5bbd394c73a5300 | /DesktopApp/main_design_code.py | f33ff2b9e6315d2728bbe0ec6c372eaca849eab8 | [] | no_license | uckocaman/kelimeKarti_flashcard | 28a56e582526d4a37f5f566f92a4f63ba88ed97d | 1cda19dfaf598215f9435127535dc97703f60f5d | refs/heads/master | 2022-11-23T10:20:59.900412 | 2020-07-28T15:33:09 | 2020-07-28T15:33:09 | 278,837,351 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,936 | py | main_design_code.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'main_design.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 impor... |
6dea289bf9e5656b224bdfce62735a37a2f63a05 | df975682edbe6464eac503225867857951c40758 | /blog/migrations/0002_auto_20190118_1410.py | cd2856f0e0cdae71462c30a9ec4df7ff20cd7f7e | [] | no_license | QI-Xiao/my-second-blog | cac5dda52854925e6f7bb84984ab710c1e00f32b | 44b82014b8d70e1efa7ae235eeca0a272376fece | refs/heads/master | 2020-04-12T03:02:12.023588 | 2019-01-18T09:11:14 | 2019-01-18T09:11:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | 0002_auto_20190118_1410.py | # Generated by Django 2.1.5 on 2019-01-18 14:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='movies',
old_name='movie_id',
new_n... |
85566af0eaf4d610cf389a054975f24e7418ff11 | 6f22958731b74db9a20e6945623fdba6b96c5541 | /setup.py | 6a8cd6a08ba4e475e5a6ae194ce882e12442300e | [
"Unlicense"
] | permissive | hahnicity/harmonify | b0e300f00764978ab9733e714f2735f9a76c20bd | fe2074161a6852b309267d13f86bcf10d8045e5c | refs/heads/master | 2016-09-05T22:06:24.468343 | 2014-02-22T10:26:13 | 2014-02-22T10:26:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = "0.1"
setup(
name="harmonify",
author="Gregory Rehm",
author_email="grehm87@gmail.com",
version=__version__,
description="A Django+NoSQL backend for interfacing with carvoyant",
packages=find_packages(),
packa... |
00c2a21c3492a044681b96fbb4fd16f2bea5004a | a7ac5ef738535f40305d4353d5f2bf47616086e2 | /nlp_engine.py | e3d864fd4112620854bf99fd6fd2ed80186f52f4 | [
"MIT"
] | permissive | JaL11/micromicroservice_CSE_WS20 | c36d5311d9b497d80f8a14b2968d6eeaca4d211f | 7011fff614e0da53e74e7af89090aeb7a702627f | refs/heads/main | 2023-03-09T09:59:30.009156 | 2021-02-22T22:50:08 | 2021-02-22T22:50:08 | 327,346,263 | 0 | 0 | MIT | 2021-02-22T22:42:38 | 2021-01-06T15:05:00 | Python | UTF-8 | Python | false | false | 1,635 | py | nlp_engine.py | '''
Author: Ming Yeh Oliver Cheung
Copyright (c) 2021 Wise CSE Group 1
'''
import spacy, logging
class NlpEngine:
""" Loads the nlp model and uses it to classify user input
"""
def __init__(self, model):
logging.info("Started Meta Engine...")
self.nlp = self.load(model)
self.doc =... |
ddd6afa1d11563d8090ab5bef3b96594e885bd09 | 13a32b92b1ba8ffb07e810dcc8ccdf1b8b1671ab | /home--tommy--mypy/mypy/lib/python2.7/site-packages/theano/sandbox/cuda/opt_util.py | 65005ec1ed99208a34fabcf80ecaf449ec42c645 | [
"Unlicense"
] | permissive | tommybutler/mlearnpy2 | 8ec52bcd03208c9771d8d02ede8eaa91a95bda30 | 9e5d377d0242ac5eb1e82a357e6701095a8ca1ff | refs/heads/master | 2022-10-24T23:30:18.705329 | 2022-10-17T15:41:37 | 2022-10-17T15:41:37 | 118,529,175 | 0 | 2 | Unlicense | 2022-10-15T23:32:18 | 2018-01-22T23:27:10 | Python | UTF-8 | Python | false | false | 7,623 | py | opt_util.py | from __future__ import absolute_import, print_function, division
from functools import wraps
import numpy
from theano import tensor, scalar as scal, Constant
from theano.gof import local_optimizer
from theano.tensor import (DimShuffle, get_scalar_constant_value,
NotScalarConstantError)
fro... |
0137a6e4edf21fa8dd1fbcbc9cd3b23328931c7b | 9e39fa461dc32c7dc5c31fe88f77d1cb76259262 | /src/kaLB.py | 92d15e3cbb33436601b4cec2b1774a51b98f87bd | [] | no_license | Brieden/kaLB | a7d4f894c7f56eae9d077294dc1ed76971cca88c | b98e5e9131f184a71abcd15a16e92cec5e22d8a8 | refs/heads/master | 2021-05-09T16:07:12.791067 | 2018-02-19T09:19:23 | 2018-02-19T09:19:23 | 119,109,471 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,582 | py | kaLB.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
kaLB is a fluid dynamic simulation implementation using the lattice boltzmann method.
Use this programm to start a simulation,
based on settings provided by the json inputfile.
This file is just the starter file and it is intended to work together with
d2q9_simulation... |
ec201b1e6a8836c85b40bb1fcd3d785caa4ebdea | b19227a2e289293264e0fdf3e085e705740d0b0c | /flyyy/spiders/not crawlable/selfridges.py | 3608f230bc16fe64b7766be781f8c66882b6bdff | [] | no_license | r007-1/m5Nph2Ef | 0651720c702581f1ce9c62df494e6160446049b0 | 05e5ff61eeaaad048b346617de8bf1c1b1712c97 | refs/heads/master | 2023-01-12T16:26:39.821303 | 2017-09-27T07:35:31 | 2017-09-27T07:35:31 | 52,653,075 | 0 | 0 | null | 2022-12-26T20:15:13 | 2016-02-27T06:10:49 | Python | UTF-8 | Python | false | false | 4,277 | py | selfridges.py | from bs4 import BeautifulSoup as bs
from lxml import etree, html
import requests
import scrapy
from flyyy.items import NuyolkItem
import time
import datetime
import random
import math
import csv
import numpy
import numpy as np
#### CRAWLER BLOCKED
class Selfridges(scrapy.Spider):
name = "selfridges"
allowed_domai... |
c3d9ad49b62c56dfbd9674cb1ac5c206e6401a27 | 804c1fcaa0f35383b7753f0c7e211220dee1009a | /handroll/extensions/blog.py | 49e9d61bd802b24bf5d248c690bccba648b03ce1 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | handroll/handroll | e97e45b47eea14c6363c0fa8ae7c141254ced5ec | 7768a4d94ef9170a68098eed2a71456d88bc193d | refs/heads/master | 2020-12-13T13:09:17.916767 | 2018-06-18T02:40:25 | 2018-06-18T02:40:25 | 19,365,290 | 18 | 3 | null | 2017-05-08T01:00:47 | 2014-05-02T03:48:29 | Python | UTF-8 | Python | false | false | 8,570 | py | blog.py | # Copyright (c) 2017, Matt Layman
import bisect
import configparser
import os
import smartypants
from werkzeug.contrib.atom import AtomFeed, FeedEntry
from handroll import logger
from handroll.exceptions import AbortError
from handroll.extensions.base import Extension
from handroll.i18n import _
class BlogPost(obj... |
7fa7a632078ce4f0052e3cadf11d5efd47a1fad5 | 55ab64b67d8abc02907eb43a54ff6c326ded6b72 | /scripts/addons/Tila_ConfigManager/AddonManager/log_list.py | 82d5a51a1ba6c704f7472ef1407b62c4e8aca0f8 | [
"MIT"
] | permissive | Tilapiatsu/blender-custom_config | 2f03b0bb234c3b098d2830732296d199c91147d0 | 00e14fc190ebff66cf50ff911f25cf5ad3529f8f | refs/heads/master | 2023-08-16T14:26:39.990840 | 2023-08-16T01:32:41 | 2023-08-16T01:32:41 | 161,249,779 | 6 | 2 | MIT | 2023-04-12T05:33:59 | 2018-12-10T23:25:14 | Python | UTF-8 | Python | false | false | 1,281 | py | log_list.py | import bpy
class TILA_Config_LogElement(bpy.types.PropertyGroup):
name: bpy.props.StringProperty(default='')
icon: bpy.props.StringProperty(default='BLANK1')
class TILA_Config_LogList(bpy.types.UIList):
bl_idname = "TILA_UL_Config_log_list"
def draw_item(self, context, layout, data, item, icon, active_data, ac... |
77e4bbe625251254cdadaeeb23dddf51e729e747 | 736cf8331244729476e0af07867d32f8262c06b3 | /programs/admin.py | 30e3764cea09f8ebc16005319c1f9bae8d867ccf | [] | no_license | dpawlows/physicsgenome | 7c7dd0a986ce0cd9a7b61f03f574ef8236e179c9 | 020f611550e31dd3346ccb5fd0e5382b5e7cd16e | refs/heads/master | 2021-01-10T12:20:39.487935 | 2015-09-02T14:47:04 | 2015-09-02T14:47:04 | 36,837,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,804 | py | admin.py | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext_lazy as _
from django import forms
from programs.models import *
from programs.forms import CustomUserCreationForm, CustomUserChangeForm
import pdb
class ProgramAdmin(admin.ModelAdmin):
list... |
58ca520a2f43cef26a95de446f9c7a82819b0b66 | 878a8a2dc17ace8f8bfe8f80670dd45badf74641 | /2017SL/Test.py | 17475cc692735fce592d69498d4e90a672b15e3f | [] | no_license | Ryuseo/script_language_Term_Project | 4a1892955e8d7da8bd228521b3c38cdf91382504 | 40860f4c77b939598fbe0cac50676eb6a22dd363 | refs/heads/master | 2021-01-23T00:40:11.019693 | 2017-06-16T13:17:50 | 2017-06-16T13:17:50 | 92,830,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | Test.py | import urllib.request
class GetData:
key = 'fDs8VW%2BvtwQA8Q9LhBW%2BT2ETVBWWJaITjKfpzDsNJO8ugDsvdboInI16ZD295Txxtxwhc4G3PwMAvxd%2FWvz2gQ%3D%3D&pageNo=1&numOfRows=999'
url = "http://apis.data.go.kr/B552657/ErmctInfoInqireService/getEgytBassInfoInqire?serviceKey=" + key
def main(self):
data = urllib... |
9535973f9714926269490b8550a67c74d04d8f0a | 82fce9aae9e855a73f4e92d750e6a8df2ef877a5 | /Lab/venv/lib/python3.8/site-packages/OpenGL/raw/GLES2/NV/viewport_array.py | 101caad4a21d58eb9fdfbbcc3fd197043715d7e7 | [] | no_license | BartoszRudnik/GK | 1294f7708902e867dacd7da591b9f2e741bfe9e5 | 6dc09184a3af07143b9729e42a6f62f13da50128 | refs/heads/main | 2023-02-20T19:02:12.408974 | 2021-01-22T10:51:14 | 2021-01-22T10:51:14 | 307,847,589 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,165 | py | viewport_array.py | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
from OpenGL.constant import Constant as _C
# End users want this...
from OpenGL.raw.GLES2 import _errors
# Code generation uses this
from OpenGL.raw.GLES2 import _types as _cs
_EXTENSION_NAME = 'GLES2_NV_viewport_array'
... |
77d7fb49ed4c3e78b148cd446e9a5c6a0e6fac8b | 745a2fcd7fb53021332bbbf0ab94bf55f3f830cb | /MyCalProgram.py | 78401d03a9938f67ffc370785f4a4e1ad9fb0628 | [] | no_license | Candela-zz/WRP | 29ad369a4819bf4144b66045c35b39cf6e619233 | 4ce2d26d03a0d13d9a8105077c6b9e5159be7f9d | refs/heads/master | 2022-11-28T18:44:42.146731 | 2020-08-11T07:55:29 | 2020-08-11T07:55:29 | 271,825,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | MyCalProgram.py | #GUIcal.py
from tkinter import *
from tkinter import ttk
import math
GUI=Tk()
GUI.title('My Cal Program')
GUI.geometry('500x500')
def calc():
height=v_height.get()
base=v_base.get()#ดึงค่ามาจากv_base
print(f'height is {height}')
print(f'Basal length is {base}')
length= math.isqrt((height*height)+(b... |
63069f03d17862b8ea6aa74d0acd1370bbea0dcb | 654a74bd2002b5dbeff4c6170d7c73d015c08931 | /library/data/route_exchange_service/routes.py | bd873d852659388bdf4c1b1ee6f41c8c4473b195 | [] | no_license | dmitryyurkevich/demo_rest | 8bf74ae8b22fd4e3f04ba06ba64bcdf840f2a1e8 | b3d7c6ca8e8d06f0340434e216202dc9a5423fb6 | refs/heads/master | 2023-06-04T01:12:04.528583 | 2021-07-02T00:40:32 | 2021-07-02T00:40:32 | 382,182,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,499 | py | routes.py | import os
import xml.etree.ElementTree as Et
import copy
from .common import CommonRouteExchangeService
class DataRoutes(CommonRouteExchangeService):
"""Класс для работы с данными аршрутов"""
def get_route_from_file(self, path_route):
"""Считывание маршрута из файла
:param path_route: Путь д... |
41eef711c79fb084c9780b6d2638d863266e569d | d5cd960ce2620656186a9dc903ea44da5cf9e134 | /user/Magic8Ball.py | 438366a24cc0601a8ac7ff1a1d8b3aa038db970d | [] | no_license | NorthcoteHS/10MCOD-Jason-VU | d82632bc724f5207dee162b1fcda714bf2c6f7d6 | 6f72f46a61f171ddc47545b3003b5ef3b3931402 | refs/heads/master | 2021-04-15T17:00:56.575577 | 2018-05-03T00:20:13 | 2018-05-03T00:20:13 | 126,428,600 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | Magic8Ball.py | import random
responses = ['Seems so','Never','Untrue','Always no matter what','You decide your fate','Not sure','Yep','Nope','Maybe','Nein','Qui','Ask the person next to you','That question is not for me']
def answer():
question = input('Ask me anything: ')
print(random.choice(responses))
answer()
secondQues... |
f4bc5663ab2b2a6dbb41a2fc3d7ca67100b455a4 | 4f1e0a01592782dea6be4638c0c728ef1d400596 | /path_integration/grid_scores_path_integration.py | 16fde2553f72dca0e62c664daff244a3710f271c | [] | no_license | bjkomer/ssp-experiments | 04f65f3300d95378f6d4a07d449ccc237a394775 | 4c6958e52a0188f5ee7fe6eb108e76abdc416bfb | refs/heads/master | 2022-12-25T10:21:25.523085 | 2020-10-11T03:26:36 | 2020-10-11T03:26:36 | 169,465,377 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,556 | py | grid_scores_path_integration.py | # Compute grid scores using the new dataset format
import matplotlib
import os
# allow code to work on machines without a display or in a screen session
display = os.environ.get('DISPLAY')
if display is None or 'localhost' in display:
matplotlib.use('agg')
import argparse
import numpy as np
import torch
import to... |
8c6f890631e9696a7907975b5d0bb71d03b380da | 71f2a55f443c5f6ce0de02db66a27aa961912798 | /Basics/Partition_image.py | a3db923abcc4c79880960fc163ab503d254528de | [
"MIT"
] | permissive | ByteHackr/Image_Processing_Practice | 5de3c54ab04ec6ea25ba37e5c19e567189f2063b | 33b57fa43982d2e3bcb64748656619314e6fa0c5 | refs/heads/master | 2021-06-27T01:18:51.683631 | 2021-01-28T07:09:32 | 2021-01-28T07:09:32 | 209,365,520 | 3 | 1 | MIT | 2020-05-08T10:51:15 | 2019-09-18T17:22:13 | Python | UTF-8 | Python | false | false | 452 | py | Partition_image.py | import cv2
import numpy as np
img = cv2.imread('Scan1.jpg')
img_height , img_width , dim = img.shape
cv2.imshow('image1',img[0:int(img_height/2),0:int(img_width/2)])
cv2.imshow('image2',img[int(img_height/2):img_height,0:int(img_width/2)])
cv2.imshow('image3',img[0:int(img_height/2),int(img_width/2):img_wid... |
90714aab74e93456c04ee2c1917b2b7b52e0901c | 50079de33c1c72c9dc877fba69f7ddc0acec7002 | /Algorithmic Toolbox1/Data Structures/week2_Priority_Queue/Jobs Queue/job_queue.py | 1d2ece313286961610b4edf7c3aacd3fe77795c8 | [] | no_license | patell11/DataStructuresAndAlgorithms_SanDiego | 75a427e5ae6fdd40632a2c9e4b9cc27d91a2d08f | 559f77bf2f9837f2c4126728bdf00996507eb66f | refs/heads/master | 2021-05-25T16:43:33.074690 | 2020-08-12T13:06:54 | 2020-08-12T13:06:54 | 253,828,150 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,289 | py | job_queue.py | # python3
class BinaryHeap:
def __init__(self):
self.heaplist = []
self.size = 0
# compares the time and the worker id - as the worker with the lowest id is prefered over same priority
def comparator(self, worker1, worker2):
if worker1[1] != worker2[1]:
return worker1[... |
1fb93694fae885f5cf8faa8005d5a656b469bfd8 | 6dbf3c70ccdd5e3f44ae4e01863419b9a8dfe020 | /P5 primera y ultima aparicion.py | a11e24f80a21ad240652a811abbfae58799f0701 | [] | no_license | laura7pr/Modelo | a841f411ec6be737ff9108f3651c7800bc5b9b60 | 35c3b92f6c711a2c73eb4a8bdaa888286383455a | refs/heads/master | 2018-07-11T20:50:18.100491 | 2018-06-01T09:00:07 | 2018-06-01T09:00:07 | 110,802,373 | 0 | 0 | null | 2017-11-15T07:55:34 | 2017-11-15T07:55:33 | null | UTF-8 | Python | false | false | 185 | py | P5 primera y ultima aparicion.py | frase=str(input("dime una frase:"))
palabra=str(input("¿que letra buscas?"))
primera =frase .find(palabra)
print(primera+1)
segunda =frase .rfind(palabra)
print(segunda+1) |
e0de9005b09c9bce0ea2988c1f19c359be6b0098 | de922fc1409f684cfdf2b334444db5f9cc284d55 | /src/utils/stats.py | fdd25b169322a2dd1e4480b37b486749141f972b | [] | no_license | yamaguchi-milkcocholate/adversarial_training | 8bc60294906376ad3c90e28627a82cecdff26e1d | 6bf7f71909e3addf58336a99f48c0678aeb282ed | refs/heads/master | 2022-07-18T00:27:23.438292 | 2020-05-22T12:45:53 | 2020-05-22T12:45:53 | 262,957,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | stats.py | from __future__ import annotations
import torch
def success_rate(outputs: torch.Tensor, labels: torch.Tensor) -> float:
_, prediction = torch.max(outputs.data, 1)
total = labels.size(0)
correct = (prediction == labels).sum().item()
return 100 * float(correct / total)
|
3ef7421565182e2759b9ea9f2a61222020cfd208 | cd5c214543765932bab42fb3f35d98405fe1decf | /Skipjack.py | 18051f3d77bb8bfd7035d7693d47520c466daf47 | [] | no_license | Anniegard/Skipjack | 2eb57be1fe7a2ebec753e282cf40c32588caf05b | ea5693a0bca08797996df7e104085646874b8a20 | refs/heads/main | 2023-05-05T02:36:44.656062 | 2021-05-28T11:31:47 | 2021-05-28T11:31:47 | 371,679,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,877 | py | Skipjack.py | FTABLE = (
(0xa3, 0xd7, 0x09, 0x83, 0xf8, 0x48, 0xf6, 0xf4, 0xb3, 0x21, 0x15, 0x78, 0x99, 0xb1, 0xaf, 0xf9),
(0xe7, 0x2d, 0x4d, 0x8a, 0xce, 0x4c, 0xca, 0x2e, 0x52, 0x95, 0xd9, 0x1e, 0x4e, 0x38, 0x44, 0x28),
(0x0a, 0xdf, 0x02, 0xa0, 0x17, 0xf1, 0x60, 0x68, 0x12, 0xb7, 0x7a, 0xc3, 0xe9, 0xfa, 0... |
bccf33eaefc63015d763ab4f0e11a5a7b864d061 | ec15da147e440780b9012bf7e5286be123131987 | /PyCrossNought.py | 967905749df8f5c3c253517fbdb2cdee8066c104 | [] | no_license | shantpat/PyCrossNought | bc8a2925aef85e9269a216eeb8c8075c405761c5 | ed1d146f5cd382c908d91698907a7536b58b5f84 | refs/heads/main | 2022-12-20T07:55:25.627039 | 2020-10-16T15:12:04 | 2020-10-16T15:12:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 43,244 | py | PyCrossNought.py | import random
def print_board():
global board
print(board[0],' || ',board[1],' || ',board[2] )
print('===============')
print(board[3],' || ',board[4],' || ',board[5] )
print('===============')
print(board[6],' || ',board[7],' || ',board[8] )
print('')
def tie_algorithm():
... |
dd05b52668c73d1b3fae7c697a0bd4929249a9ac | 3ea4037217f5c7503c97a41f360cdfda8fce27bf | /utility/utility.py | 047c9dd3b0fd19c7cdcf86ac866c9a4862c61465 | [] | no_license | nareshkmrteli/task_backend | c4ed3bbe755ce213690c67c1add1fccb47b2967b | f0b116fb47c781c4d66beabe69d4910b8e018775 | refs/heads/master | 2023-03-03T04:30:57.806812 | 2021-02-12T07:20:15 | 2021-02-12T07:20:15 | 338,249,436 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | utility.py | from rest_framework.authentication import SessionAuthentication
class CsrExemptSessionAuthentiation(SessionAuthentication):
def enforce_csrf(self,request):
pass
|
46582fca0ee5d76dc39db3f47269ca2d06a92809 | 9bab009977d418e01a18ce2d5315274a727e2543 | /locks/parser/parser.py | 92ee7138d99bc7792b8dfa69a6e98e18d7eb60df | [] | no_license | Irwin1985/locks-py | 80cf97c4b7f4200865b7e056d4b7bcf7ef6392bb | 246765b0ba85a7716f4eac22a5ec381e5c65e54c | refs/heads/main | 2023-01-21T21:10:18.164596 | 2020-12-02T10:29:30 | 2020-12-02T10:29:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,947 | py | parser.py | from ..lexer.token import Token, TokenType
from ..error import SyntaxErr
from .ast import *
from typing import List
#
# Takes a list of tokens, generates an AST from them.
# AST nodes are defined in ast.py
#
class Parser:
def __init__(self, tokList: List[Token]) -> None:
self._tokList: List[Token] = tokL... |
3cc097e125ac85406f2b406236462b60de6626e3 | ced34c55ae6b09165c772038d8ce8d6ac3ee5c13 | /senpi.py | e253b3d78019c156eb9008312b60798d25413590 | [] | no_license | ksundell/senpi | 613ebcda9cedeb0ac6aa6cee2fe7160355a94134 | 8ce9e9d356bda859a8090ffe91d9229a55417d34 | refs/heads/master | 2021-01-10T08:33:51.330238 | 2015-12-15T22:04:04 | 2015-12-15T22:04:04 | 47,838,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,542 | py | senpi.py | #!/usr/bin/env python3
#TODO: Add error-catching for missing modules
import speech_recognition as sr
import time
import sys
import os
from say_hello import hello
exitvar = 1
recognitionString = "senpai" #Change this string to change the recognition keyword.
recognitionStringLength = len(recognitionString) + 1
os.chdir... |
75911bcf300334f918e9b245583e73a6127c1019 | c607beca3f4fce11efd86fc066c0d745a1923eb6 | /Baekjoon/1405.py | 02f4ab1cbdac321e98ec8dd7fdc3b40d168e915b | [] | no_license | Doohae/Algorithms-Practice | 1b2373bb7f29993d0f3b77422f676ae2a41b959a | c4c55486a0be2bc0879cf8e095a55420ea65e8fa | refs/heads/main | 2023-08-30T16:26:47.509736 | 2021-11-15T15:14:43 | 2021-11-15T15:14:43 | 411,626,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 930 | py | 1405.py | # 백준 1405번 미친 로봇
from itertools import product
from tqdm.auto import tqdm
base = list(map(int, input().split()))
N = base[0]
prob = base[1:]
mapping = {0: "E", 1: "W", 2: "N", 3: "S"}
go = {"E": 0, "W": 1, "N": 2, "S": 3}
direction = [mapping[i] for i in range(len(prob)) if prob[i] != 0]
def is_simple(pth):
ckpt ... |
2870c58fd57efe47e87777f2524621b4490dc720 | 5a8df91ae273a97c8247d4a3b24bcc81f0f86607 | /PlotUtils/Scripts/run_modifytree_QMisID.py | b95802b87af16295e839179ed150e8d2c56bfdbf | [] | no_license | grigiq/HTopMultilepAnalysis | 929716b6efacdc6b48ddcc42a800f0e3934319da | 5445069209ee36881702f6df1cc79ad71eff0498 | refs/heads/master | 2021-05-07T01:32:31.706753 | 2017-11-08T06:41:12 | 2017-11-08T06:41:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,151 | py | run_modifytree_QMisID.py | #!/usr/bin/env python
""" run_modifytree_QMisID.py: simple script to execute a ROOT macro by calling the CINT interpreter with TROOT::ProcessLine() """
__author__ = "Marco Milesi, Francesco Nuti"
__email__ = "marco.milesi@cern.ch, francesco.nuti@cern.ch"
__maintainer__ = "Marco Milesi"
import os, subprocess... |