This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:csv_reading/csv_reading.dart' as csv_reading; | |
void main(List<String> arguments) { | |
if (arguments.isEmpty) { | |
print("Usage: csv_reading path/to.csv\n"); | |
exit(1); | |
} | |
final path = arguments[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Contractor Entry] | |
Name=Share via Telegram | |
Name[ru]=Поделиться в Telegram | |
MimeType=!node; | |
Exec=sh -c "flatpak run org.telegram.desktop -sendpath %f && notify-send 'File sent' '%f successfully sent via Telegram'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>CFBundleDocumentTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleTypeMIMETypes</key> | |
<array> | |
<string>text/x-markdown</string> | |
</array> | |
<key>CFBundleTypeExtensions</key> | |
<array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>CFBundleDocumentTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleTypeName</key> | |
<string>XML File</string> | |
<key>LSHandlerRank</key> | |
<string>Default</string> | |
<key>CFBundleTypeRole</key> | |
<string>Viewer</string> | |
<key>LSItemContentTypes</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.meamka; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.text.DecimalFormat; | |
import java.text.NumberFormat; | |
public class LinesCount { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_chunk(sequence, chunk_size=100, limit=None): | |
count = 0 | |
offset = 0 | |
length = len(sequence) | |
if not limit: | |
limit = length | |
while count < limit and offset < length: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFileObject (fileObject, callback) { | |
var blob = null; | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", fileObject.path); | |
xhr.responseType = "blob"; | |
// Process onload event: create new File object and call callback function. | |
xhr.onload = () => { | |
blob = xhr.response; | |
blob.name = fileObject.name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process_chunk(*items): | |
pass | |
def process_count(count): | |
print 'Count %d' % count | |
def chunked(iters, size): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
n = input() | |
Mark = namedtuple('Mark', raw_input().strip()) | |
print round(sum([float(m.MARKS) for m in [Mark(*map(lambda x: x.strip(), raw_input().strip().split())) for i in xrange(n)]]) / n, 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution(object): | |
def trap(self, height): | |
""" | |
:type height: List[int] | |
:rtype: int | |
""" | |
water = 0 | |
height_len = len(height) | |
if height_len < 3: | |
return water |
NewerOlder